dev@jsftemplating.java.net

Re: JSFTemplating: Dynamic table: rows problem

From: Karam Singh Badesha <Karam.Badesha_at_Sun.COM>
Date: Sat, 01 Sep 2007 10:35:38 -0700

Ken,
Sorry about the wrong alarm. Found the problem. It was supposed to go
with dynamicTableColumnRowGroup property instead of table. Its fine now.

thanks
Karam

Ken Paulsen wrote:
>
> Does it work if you pass in a static value? Perhaps
> pageSession.tableRows isn't what you expect? I will look into this
> more when I get a chance.
>
> Ken
>
> Karam Singh Badesha wrote:
>> Ken,
>> Whatever I pass as number of rows, its not working. Can you please
>> take a look at the code it that is missing? I am specifying it like
>> following:
>>
>> <sun:table
>> id="table1"
>> rows="#{pageSession.tableRows}"
>> ...
>>
>> where tableRows is of type "Integer".
>>
>> The same code works fine on a different page where I don't use
>> dynamicColumnRowGroup.
>>
>> thanks
>> Karam
>>
>> Karam Singh Badesha wrote:
>>> Ken,
>>> I now have everything working the way I wanted except the
>>> tableColumn within tableColumn for the heading. If you can send me
>>> an example showing how its done it would be really great.
>>> If someone is interested in how I have done this I can share the
>>> code. Basically I have couple of drop down menus and depending on
>>> different version the output table (which is also shown on the same
>>> page) data changes (column numbers are different for every version).
>>> Then on resubmit with new data I redirect to the same page and pass
>>> on the form values. The same page would then reload with the new
>>> table. Column headers, data and all of the other configuration data
>>> is coming from an oracle database.
>>>
>>> Thanks for all the help so far Ken. Its greatly appreciated.
>>>
>>> -Karam
>>>
>>> Karam Singh Badesha wrote:
>>>> I was passing empty string. I can try passing and "${null}" and see
>>>> if it works.
>>>>
>>>> Also what about the tableColumn within tableColumn? You can see the
>>>> example in those images as well. Can you provide a small static
>>>> example showing that. If you hardcode the html somewhere to get
>>>> that, its fine with me. I just want to see a small example.
>>>>
>>>> -Karam
>>>>
>>>> Ken Paulsen wrote:
>>>>>
>>>>>
>>>>> Hi Karam,
>>>>>
>>>>> I understand what you mean now. What are you passing in for soft
>>>>> in that column? Empty string ("") or (null)? You can express
>>>>> null as a String by doing ${null} in JSFT.
>>>>>
>>>>> Ken
>>>>>
>>>>> Karam Singh Badesha wrote:
>>>>>> Ken,
>>>>>> Attached are the newTable and oldTable snapshots. As you can see
>>>>>> that spacerColumn in the newTable has a sort icon. Eventhough I
>>>>>> am passing empty value for that column, just because of "sort"
>>>>>> being there creates those icons. That is why I was asking if
>>>>>> there is way to ignore that if some option can be passed so that
>>>>>> it doesn't create those icons.
>>>>>> Also for tableColumn within tableColumn you can see that in the
>>>>>> example as well.
>>>>>>
>>>>>> thanks
>>>>>> Karam
>>>>>>
>>>>>> Ken Paulsen wrote:
>>>>>>>
>>>>>>> Hi Karam,
>>>>>>>
>>>>>>> I'm not sure if columns w/i columns is supported the way you
>>>>>>> want (or at all). You can try using a panelGrid / panelGroup to
>>>>>>> acheive this w/i a single column. This would have to be done
>>>>>>> using the createChild event that I showed you how to do in a
>>>>>>> previous email... or you might be able to do the same
>>>>>>> work-a-round you decided to do for your href's (embed the HTML
>>>>>>> directly in the markup). If you did this, you'd do something like:
>>>>>>>
>>>>>>> "<table><tr><td>#{td.value.foo}</td><td>...", "#{td.value.bar}",
>>>>>>> ...
>>>>>>>
>>>>>>> I'm not sure what you mean be the "spacerColumn". Is this a
>>>>>>> Woodstock feature? Or are you simply trying to provide a blank
>>>>>>> column? Perhaps if you send a screen shot it would help explain
>>>>>>> what you mean.
>>>>>>>
>>>>>>> You may also want to add the woodstock alias to some of these
>>>>>>> questions as I am certainly not a Woodstock table expert. :)
>>>>>>> Although I'm happy to try to help.
>>>>>>>
>>>>>>> Good luck!
>>>>>>>
>>>>>>> Ken
>>>>>>>
>>>>>>> Karam Singh Badesha wrote:
>>>>>>>> Ken,
>>>>>>>> Finally I have got all the data from database and showing
>>>>>>>> properly in the table. Only things I am not sure how to do are:
>>>>>>>>
>>>>>>>> - how would I create columns within columns?
>>>>>>>> - spacerColumn has sort icon (not a big issue currently). I
>>>>>>>> think since all the lists that I am passing have to be same
>>>>>>>> number, even though sort entry is empty, it still shows the
>>>>>>>> icon. There needs to be a way to ignore it if say the value is
>>>>>>>> "null" or something.
>>>>>>>>
>>>>>>>> thanks
>>>>>>>> Karam
>>>>>>>>