You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by David Uebelacker <da...@uebelacker.eu> on 2007/10/08 11:01:45 UTC

[Trinidad] Table with special row to define filters

Hi,

is there a way to add a special row to a trinidad table, which is not
defined by the data ?

We have to implement a table, with filters for each column. Under the
header should be a row, with one input fields for every column. The user
can define a filter, by entering a value into these input fields.

I tried it with the header facet, but there is the sorting mechanism in
the way :-(. Any better ideas/solutions ?


Thanks,

David


-- 
David Uebelacker
mailto:david@uebelacker.eu
http://david.uebelacker.eu/


Programmatically selecting and deselecting rows in a tr:table with rowSelection="multiple"

Posted by "Yee, Richard K CTR DMDC" <Ri...@osd.pentagon.mil>.
Is it possible to programmatically select or deselect rows in a
tr:table? I would like to remove the rows that a user has selected from
within an action handler method that is bound to a commandButton.
It seems that when I call getSelectionState() on the CoreTable, I'm
getting a null RowKeySet.

Thanks,

Richard

Re: [Trinidad] Table with special row to define filters

Posted by David Uebelacker <da...@uebelacker.eu>.
Hi Andrew,

thanks a lot, that idea did not came to my mind!

David

Andrew Robinson schrieb:
> Why would a different data model prevent usage of input fields?
>
> <tr:dataTable value="#{mySpecialDataModel}"
>   varStatus="_mystatus" var="_row">
> <tr:column>
>   <tr:inputText rendered="#{_mystatus.index eq 0}" ... />
>   <tr:outputText rendered="#{_mystatus.index ne 0}" ... />
> </tr:column>
>
> This would only show the input text if it is the first row. This is an
> extremely simple example, but you should get the point.
>
> -Andrew
>
> On 10/9/07, David Uebelacker <da...@uebelacker.eu> wrote:
>   
>> Hi,
>>
>> i want to define input text fields in this row, so it will not work with
>> another data model :-(.
>> Overwriting the default renderer seems to be the only solution for me.
>>
>> David
>>
>> Andrew Robinson schrieb:
>>     
>>> Custom DataModel that always returns a special first row?
>>>
>>> On 10/8/07, David Uebelacker <da...@uebelacker.eu> wrote:
>>>
>>>       
>>>> Hi,
>>>>
>>>> is there a way to add a special row to a trinidad table, which is not
>>>> defined by the data ?
>>>>
>>>> We have to implement a table, with filters for each column. Under the
>>>> header should be a row, with one input fields for every column. The user
>>>> can define a filter, by entering a value into these input fields.
>>>>
>>>> I tried it with the header facet, but there is the sorting mechanism in
>>>> the way :-(. Any better ideas/solutions ?
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> David
>>>>
>>>>
>>>> --
>>>> David Uebelacker
>>>> mailto:david@uebelacker.eu
>>>> http://david.uebelacker.eu/
>>>>
>>>>
>>>>
>>>>         
>>>       
>>     
>
>   


[Trinidad] dialog framework and Seam: current workaround still valid?

Posted by wo...@pta.de.
Hi,

I was looking into

http://wiki.apache.org/myfaces/Trinidad_And_Seam

and found that with Seam 2.0RC1 things have changed so far as that
the described workaround regarding the integration of Trinidad's dialog 
framework with Seam does not seem to work anymore.

But it could also be that something is not working properly on my side.
More precisley speaking, I found that the critical location in that 
workaround  is 

   private void restoreConversation(Context context) {
                if (context.isSet(CONVERSATION_ID_SESSION_PARAMETER)) {
                    String convId = context.get(
CONVERSATION_ID_SESSION_PARAMETER).toString();
                    System.out.println("================== 
restoreConversation attempt with convId:"+convId);
                    ConversationPropagation.instance
().restoreConversationId(createParameterMapForConversationRestore(convId));
                    context.remove(CONVERSATION_ID_SESSION_PARAMETER); 
 
                } else {//TODO problem is that it never enters above 
restoration but always has unset context!! 
                         System.out.println("================== no 
restoreConversation attempt due to unset context!");
                }
            }

So what happens is that this method is always branching into the else part 
so no restoration takes place.
The CONVERSATION_ID_SESSION_PARAMETRis "cid" but I am not sure if this is 
still really the valid magical constant for Trinidad's conversation id
which would explain why it's never there.

Any ideas? Is "cid" still correct? I did not know where to look.. ;<(

Many thanks,
Wolfgang.

Re: [Trinidad] Table with special row to define filters

Posted by Andrew Robinson <an...@gmail.com>.
Why would a different data model prevent usage of input fields?

<tr:dataTable value="#{mySpecialDataModel}"
  varStatus="_mystatus" var="_row">
<tr:column>
  <tr:inputText rendered="#{_mystatus.index eq 0}" ... />
  <tr:outputText rendered="#{_mystatus.index ne 0}" ... />
</tr:column>

This would only show the input text if it is the first row. This is an
extremely simple example, but you should get the point.

-Andrew

On 10/9/07, David Uebelacker <da...@uebelacker.eu> wrote:
> Hi,
>
> i want to define input text fields in this row, so it will not work with
> another data model :-(.
> Overwriting the default renderer seems to be the only solution for me.
>
> David
>
> Andrew Robinson schrieb:
> > Custom DataModel that always returns a special first row?
> >
> > On 10/8/07, David Uebelacker <da...@uebelacker.eu> wrote:
> >
> >> Hi,
> >>
> >> is there a way to add a special row to a trinidad table, which is not
> >> defined by the data ?
> >>
> >> We have to implement a table, with filters for each column. Under the
> >> header should be a row, with one input fields for every column. The user
> >> can define a filter, by entering a value into these input fields.
> >>
> >> I tried it with the header facet, but there is the sorting mechanism in
> >> the way :-(. Any better ideas/solutions ?
> >>
> >>
> >> Thanks,
> >>
> >> David
> >>
> >>
> >> --
> >> David Uebelacker
> >> mailto:david@uebelacker.eu
> >> http://david.uebelacker.eu/
> >>
> >>
> >>
> >
> >
>
>

Re: [Trinidad] Table with special row to define filters

Posted by David Uebelacker <da...@uebelacker.eu>.
Hi Andrew,

finally i did overwrite the table renderer, cause your solution doesn't 
really work, if you don't display all rows on one page.
The page selection functionality will always display one record to much ;-).

David

David Uebelacker schrieb:
> Hi,
>
> i want to define input text fields in this row, so it will not work 
> with another data model :-(.
> Overwriting the default renderer seems to be the only solution for me.
>
> David
>
> Andrew Robinson schrieb:
>> Custom DataModel that always returns a special first row?
>>
>> On 10/8/07, David Uebelacker <da...@uebelacker.eu> wrote:
>>  
>>> Hi,
>>>
>>> is there a way to add a special row to a trinidad table, which is not
>>> defined by the data ?
>>>
>>> We have to implement a table, with filters for each column. Under the
>>> header should be a row, with one input fields for every column. The 
>>> user
>>> can define a filter, by entering a value into these input fields.
>>>
>>> I tried it with the header facet, but there is the sorting mechanism in
>>> the way :-(. Any better ideas/solutions ?
>>>
>>>
>>> Thanks,
>>>
>>> David
>>>
>>>
>>> -- 
>>> David Uebelacker
>>> mailto:david@uebelacker.eu
>>> http://david.uebelacker.eu/
>>>
>>>
>>>     
>>
>>   
>
>


Re: [Trinidad] Table with special row to define filters

Posted by David Uebelacker <da...@uebelacker.eu>.
Hi,

i want to define input text fields in this row, so it will not work with 
another data model :-(.
Overwriting the default renderer seems to be the only solution for me.

David

Andrew Robinson schrieb:
> Custom DataModel that always returns a special first row?
>
> On 10/8/07, David Uebelacker <da...@uebelacker.eu> wrote:
>   
>> Hi,
>>
>> is there a way to add a special row to a trinidad table, which is not
>> defined by the data ?
>>
>> We have to implement a table, with filters for each column. Under the
>> header should be a row, with one input fields for every column. The user
>> can define a filter, by entering a value into these input fields.
>>
>> I tried it with the header facet, but there is the sorting mechanism in
>> the way :-(. Any better ideas/solutions ?
>>
>>
>> Thanks,
>>
>> David
>>
>>
>> --
>> David Uebelacker
>> mailto:david@uebelacker.eu
>> http://david.uebelacker.eu/
>>
>>
>>     
>
>   


Re: [Trinidad] Table with special row to define filters

Posted by Andrew Robinson <an...@gmail.com>.
Custom DataModel that always returns a special first row?

On 10/8/07, David Uebelacker <da...@uebelacker.eu> wrote:
> Hi,
>
> is there a way to add a special row to a trinidad table, which is not
> defined by the data ?
>
> We have to implement a table, with filters for each column. Under the
> header should be a row, with one input fields for every column. The user
> can define a filter, by entering a value into these input fields.
>
> I tried it with the header facet, but there is the sorting mechanism in
> the way :-(. Any better ideas/solutions ?
>
>
> Thanks,
>
> David
>
>
> --
> David Uebelacker
> mailto:david@uebelacker.eu
> http://david.uebelacker.eu/
>
>