You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by sa...@women-at-work.org on 2004/12/09 18:52:13 UTC

Sortable table with own column header

Hi there!

The following code should show the messages of a members inbox using 
a sortable table.

 <table class="mytable" jwcid="table@contrib:Table"
    source="ognl:visit.member.messages"
    columns="subject, from_username, to_username, msg_time, msg_text,
read_msg"
    persistent="false"/>

My question are:

1. Would persistent=true cache the members inbox so that new messages are
not shown ?

2. How can I display different stuff as the column headers ? I would like to
get the text from a database where the table column are mapped to the
corresponding textx....

3. i tested the method that will retrieve messages and everything seems to
be fine...however this code only diplays 2 columns and not the
rest....really odd...all other columns are empty althouth the ArrayList with
message objects contains only message object with all values set...



Any ideas?

Cheers!

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Sortable table with own column header

Posted by sa...@women-at-work.org.
Thank you!


> On Dec 11, 2004, at 7:13 AM, Erik Hatcher wrote:
> > I would further suggest that to avoid OGNL madness, simply build the 
> > entire String up dynamically in your page .java code.  Expose that 
> > String as a getter, like "public void getColumns()".  Building the 
> > string in Java code allows you to debug it more carefully and you can 
> > see the actual value that
> > you will hand to the columns attribute easily.
> 
> Uh, let me correct this obvious typo.... "public _String_ getColumns()" 
>   :)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Sortable table with own column header

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Dec 11, 2004, at 7:13 AM, Erik Hatcher wrote:
> I would further suggest that to avoid OGNL madness, simply build the 
> entire String up dynamically in your page .java code.  Expose that 
> String as a getter, like "public void getColumns()".  Building the 
> string in Java code allows you to debug it more carefully and you can 
> see the actual value that
> you will hand to the columns attribute easily.

Uh, let me correct this obvious typo.... "public _String_ getColumns()" 
  :)


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Sortable table with own column header

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
I would further suggest that to avoid OGNL madness, simply build the  
entire String up dynamically in your page .java code.  Expose that  
String as a getter, like "public void getColumns()".  Building the  
string in Java code allows you to debug it more carefully and you can  
see the actual value that
you will hand to the columns attribute easily.

Then bind using columns="ognl:columns".

	Erik



On Dec 11, 2004, at 4:58 AM, Mind Bridge wrote:

> Hi,
>
> The 'ognl:' prefix determines that what follows is an OGNL expression,
> rather than a static string. Have a look at the 'source' parameter of  
> your
> table, for example. Its value is 'ognl:visit.member.messages' and  
> because of
> ognl: prefix, visit.member.messages is evaluated as an OGNL expression  
> -- it
> translates to something like getVisit().getMembers().getMessages() as a
> result.
>
> What a proposed essentially is to have an ognl: prefix in your columns
> binding and have OGNL evaluate the rest of it and return a string that
> describes the columns. In other words, you need only one ognl: in  
> front of
> everything and the line becomes something like this:
>
>      columns="ognl: 'fromUsername:' + getMessage('_USERNAME') +
>  ':fromUsername, subject:' + getMessage('_SUBJECT') + ':subject' "
>
> Does this help?
>
>
> ----- Original Message -----
> From: <sa...@women-at-work.org>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Saturday, December 11, 2004 10:47 AM
> Subject: RE: Sortable table with own column header
>
>
>> Okay, I tried it now. It works for a single column, however i seem to  
>> have
>> problems with the notation for more than one column.
>>
>>     columns="ognl:'fromUsername:' + getMessage('_USERNAME') +
>> ':fromUsername',ognl:'subject:' + getMessage('_SUBJECT') + ':subject'"
>>
>> does not work yet.
>>
>>
>> What is it "ognl:'fromUsername:' instead of "'ognl:fromUsername: ...
>> anyway ?
>>
>> And why do I need "ognl:" for the id column?
>>
>>
>>> Cheers mate. will try it out. That would be exactly what I was  
>>> looking
>>> for....a cool table with just a couple of lines of "code".
>>>
>>>> Hi,
>>>>
>>>> Please try this:
>>>>
>>>> <table class="mytable" jwcid="table@contrib:Table"
>>>>     source="ognl:visit.member.messages"
>>>>     columns="ognl:'subject:' + getMessage('_SUBJECT') + ':subject'"
>>>>     persistent="false"/>
>>>>
>>>> Basically, 'columns' needs to be a string, and that string can be
>>> composed
>>>> using OGNL.
>>>>
>>>>
>>>> In this case it will probably be better to define the column title  
>>>> in
>>> the
>>>> corresponding .properties file as:
>>>>
>>>> subject = Subject
>>>>
>>>> (or something like that) rather than use _SUBJECT, but of course  
>>>> that
>>>> could
>>>> depend on the specifics of the program.
>>>>
>>>> Hope this helps...
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: sarah.simbad@women-at-work.org
>>>> [mailto:sarah.simbad@women-at-work.org]
>>>> Sent: Thursday, December 09, 2004 8:49 PM
>>>> To: Tapestry users
>>>> Subject: Re: Sortable table with own column header
>>>>
>>>>
>>>> Hello again!
>>>>
>>>>
>>>> Well I found out that:
>>>>
>>>> <table class="mytable" jwcid="table@contrib:Table"
>>>>     source="ognl:visit.member.messages"
>>>>     columns="subject:TheSubject:subject"
>>>>     persistent="false"/>
>>>>
>>>> Prints TheSubject a a heading.
>>>>
>>>> However
>>>>
>>>> <table class="mytable" jwcid="table@contrib:Table"
>>>>     source="ognl:visit.member.messages"
>>>>     columns="subject:ognl:getMessage('_SUBJECT'):subject"
>>>>     persistent="false"/>
>>>>
>>>> does not work. How can I bind the middle parameter ?
>>>>
>>>>
>>>>> Hi there!
>>>>>
>>>>> The following code should show the messages of a members inbox  
>>>>> using
>>>>> a sortable table.
>>>>>
>>>>>  <table class="mytable" jwcid="table@contrib:Table"
>>>>>     source="ognl:visit.member.messages"
>>>>>     columns="subject, from_username, to_username, msg_time,
> msg_text,
>>>>> read_msg"
>>>>>     persistent="false"/>
>>>>>
>>>>> My question are:
>>>>>
>>>>> 1. Would persistent=true cache the members inbox so that new
> messages
>>>> are
>>>>> not shown ?
>>>>>
>>>>> 2. How can I display different stuff as the column headers ? I  
>>>>> would
>>>> like
>>>>> to
>>>>> get the text from a database where the table column are mapped to
> the
>>>>> corresponding textx....
>>>>>
>>>>> 3. i tested the method that will retrieve messages and everything
>>> seems
>>>> to
>>>>> be fine...however this code only diplays 2 columns and not the
>>>>> rest....really odd...all other columns are empty althouth the
>>> ArrayList
>>>>> with
>>>>> message objects contains only message object with all values set...
>>>>>
>>>>>
>>>>>
>>>>> Any ideas?
>>>>>
>>>>> Cheers!
>>>>>
>>>>
>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail:  
>>>>> tapestry-user-unsubscribe@jakarta.apache.org
>>>>> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
>>>>>
>>>>
>>>> -------------------------------------------------------------------- 
>>>> -
>>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail:  
>>>> tapestry-user-help@jakarta.apache.org
>>>>
>>>> ---
>>>>
>>>> Checked by AVG anti-virus system (http://www.grisoft.com).
>>>> Version: 6.0.802 / Virus Database: 545 - Release Date: 11/26/2004
>>>>
>>>>
>>>> -------------------------------------------------------------------- 
>>>> -
>>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail:  
>>>> tapestry-user-help@jakarta.apache.org
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:  
>>> tapestry-user-help@jakarta.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Sortable table with own column header

Posted by Mind Bridge <mi...@yahoo.com>.
Hi,

The 'ognl:' prefix determines that what follows is an OGNL expression,
rather than a static string. Have a look at the 'source' parameter of your
table, for example. Its value is 'ognl:visit.member.messages' and because of
ognl: prefix, visit.member.messages is evaluated as an OGNL expression -- it
translates to something like getVisit().getMembers().getMessages() as a
result.

What a proposed essentially is to have an ognl: prefix in your columns
binding and have OGNL evaluate the rest of it and return a string that
describes the columns. In other words, you need only one ognl: in front of
everything and the line becomes something like this:

     columns="ognl: 'fromUsername:' + getMessage('_USERNAME') +
 ':fromUsername, subject:' + getMessage('_SUBJECT') + ':subject' "

Does this help?


----- Original Message ----- 
From: <sa...@women-at-work.org>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Saturday, December 11, 2004 10:47 AM
Subject: RE: Sortable table with own column header


> Okay, I tried it now. It works for a single column, however i seem to have
> problems with the notation for more than one column.
>
>     columns="ognl:'fromUsername:' + getMessage('_USERNAME') +
> ':fromUsername',ognl:'subject:' + getMessage('_SUBJECT') + ':subject'"
>
> does not work yet.
>
>
> What is it "ognl:'fromUsername:' instead of "'ognl:fromUsername: ...
> anyway ?
>
> And why do I need "ognl:" for the id column?
>
>
> > Cheers mate. will try it out. That would be exactly what I was looking
> > for....a cool table with just a couple of lines of "code".
> >
> > > Hi,
> > >
> > > Please try this:
> > >
> > > <table class="mytable" jwcid="table@contrib:Table"
> > >     source="ognl:visit.member.messages"
> > >     columns="ognl:'subject:' + getMessage('_SUBJECT') + ':subject'"
> > >     persistent="false"/>
> > >
> > > Basically, 'columns' needs to be a string, and that string can be
> > composed
> > > using OGNL.
> > >
> > >
> > > In this case it will probably be better to define the column title in
> > the
> > > corresponding .properties file as:
> > >
> > > subject = Subject
> > >
> > > (or something like that) rather than use _SUBJECT, but of course that
> > > could
> > > depend on the specifics of the program.
> > >
> > > Hope this helps...
> > >
> > >
> > > -----Original Message-----
> > > From: sarah.simbad@women-at-work.org
> > > [mailto:sarah.simbad@women-at-work.org]
> > > Sent: Thursday, December 09, 2004 8:49 PM
> > > To: Tapestry users
> > > Subject: Re: Sortable table with own column header
> > >
> > >
> > > Hello again!
> > >
> > >
> > > Well I found out that:
> > >
> > > <table class="mytable" jwcid="table@contrib:Table"
> > >     source="ognl:visit.member.messages"
> > >     columns="subject:TheSubject:subject"
> > >     persistent="false"/>
> > >
> > > Prints TheSubject a a heading.
> > >
> > > However
> > >
> > > <table class="mytable" jwcid="table@contrib:Table"
> > >     source="ognl:visit.member.messages"
> > >     columns="subject:ognl:getMessage('_SUBJECT'):subject"
> > >     persistent="false"/>
> > >
> > > does not work. How can I bind the middle parameter ?
> > >
> > >
> > > > Hi there!
> > > >
> > > > The following code should show the messages of a members inbox using
> > > > a sortable table.
> > > >
> > > >  <table class="mytable" jwcid="table@contrib:Table"
> > > >     source="ognl:visit.member.messages"
> > > >     columns="subject, from_username, to_username, msg_time,
msg_text,
> > > > read_msg"
> > > >     persistent="false"/>
> > > >
> > > > My question are:
> > > >
> > > > 1. Would persistent=true cache the members inbox so that new
messages
> > > are
> > > > not shown ?
> > > >
> > > > 2. How can I display different stuff as the column headers ? I would
> > > like
> > > > to
> > > > get the text from a database where the table column are mapped to
the
> > > > corresponding textx....
> > > >
> > > > 3. i tested the method that will retrieve messages and everything
> > seems
> > > to
> > > > be fine...however this code only diplays 2 columns and not the
> > > > rest....really odd...all other columns are empty althouth the
> > ArrayList
> > > > with
> > > > message objects contains only message object with all values set...
> > > >
> > > >
> > > >
> > > > Any ideas?
> > > >
> > > > Cheers!
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
tapestry-user-help@jakarta.apache.org
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > >
> > > ---
> > >
> > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > Version: 6.0.802 / Virus Database: 545 - Release Date: 11/26/2004
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


RE: Sortable table with own column header

Posted by sa...@women-at-work.org.
Okay, I tried it now. It works for a single column, however i seem to have
problems with the notation for more than one column.

    columns="ognl:'fromUsername:' + getMessage('_USERNAME') +
':fromUsername',ognl:'subject:' + getMessage('_SUBJECT') + ':subject'"

does not work yet.


What is it "ognl:'fromUsername:' instead of "'ognl:fromUsername: ...
anyway ?

And why do I need "ognl:" for the id column?


> Cheers mate. will try it out. That would be exactly what I was looking
> for....a cool table with just a couple of lines of "code".
> 
> > Hi,
> > 
> > Please try this:
> > 
> > <table class="mytable" jwcid="table@contrib:Table"
> >     source="ognl:visit.member.messages"
> >     columns="ognl:'subject:' + getMessage('_SUBJECT') + ':subject'"
> >     persistent="false"/>
> > 
> > Basically, 'columns' needs to be a string, and that string can be
> composed
> > using OGNL.
> > 
> > 
> > In this case it will probably be better to define the column title in
> the
> > corresponding .properties file as:
> > 
> > subject = Subject
> > 
> > (or something like that) rather than use _SUBJECT, but of course that
> > could
> > depend on the specifics of the program.
> > 
> > Hope this helps...
> > 
> > 
> > -----Original Message-----
> > From: sarah.simbad@women-at-work.org
> > [mailto:sarah.simbad@women-at-work.org]
> > Sent: Thursday, December 09, 2004 8:49 PM
> > To: Tapestry users
> > Subject: Re: Sortable table with own column header
> > 
> > 
> > Hello again!
> > 
> > 
> > Well I found out that:
> > 
> > <table class="mytable" jwcid="table@contrib:Table"
> >     source="ognl:visit.member.messages"
> >     columns="subject:TheSubject:subject"
> >     persistent="false"/>
> > 
> > Prints TheSubject a a heading.
> > 
> > However
> > 
> > <table class="mytable" jwcid="table@contrib:Table"
> >     source="ognl:visit.member.messages"
> >     columns="subject:ognl:getMessage('_SUBJECT'):subject"
> >     persistent="false"/>
> > 
> > does not work. How can I bind the middle parameter ?
> > 
> > 
> > > Hi there!
> > >
> > > The following code should show the messages of a members inbox using
> > > a sortable table.
> > >
> > >  <table class="mytable" jwcid="table@contrib:Table"
> > >     source="ognl:visit.member.messages"
> > >     columns="subject, from_username, to_username, msg_time, msg_text,
> > > read_msg"
> > >     persistent="false"/>
> > >
> > > My question are:
> > >
> > > 1. Would persistent=true cache the members inbox so that new messages
> > are
> > > not shown ?
> > >
> > > 2. How can I display different stuff as the column headers ? I would
> > like
> > > to
> > > get the text from a database where the table column are mapped to the
> > > corresponding textx....
> > >
> > > 3. i tested the method that will retrieve messages and everything
> seems
> > to
> > > be fine...however this code only diplays 2 columns and not the
> > > rest....really odd...all other columns are empty althouth the
> ArrayList
> > > with
> > > message objects contains only message object with all values set...
> > >
> > >
> > >
> > > Any ideas?
> > >
> > > Cheers!
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > >
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > 
> > ---
> > 
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.802 / Virus Database: 545 - Release Date: 11/26/2004
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


RE: Sortable table with own column header

Posted by sa...@women-at-work.org.
Cheers mate. will try it out. That would be exactly what I was looking
for....a cool table with just a couple of lines of "code".

> Hi,
> 
> Please try this:
> 
> <table class="mytable" jwcid="table@contrib:Table"
>     source="ognl:visit.member.messages"
>     columns="ognl:'subject:' + getMessage('_SUBJECT') + ':subject'"
>     persistent="false"/>
> 
> Basically, 'columns' needs to be a string, and that string can be composed
> using OGNL.
> 
> 
> In this case it will probably be better to define the column title in the
> corresponding .properties file as:
> 
> subject = Subject
> 
> (or something like that) rather than use _SUBJECT, but of course that
> could
> depend on the specifics of the program.
> 
> Hope this helps...
> 
> 
> -----Original Message-----
> From: sarah.simbad@women-at-work.org
> [mailto:sarah.simbad@women-at-work.org]
> Sent: Thursday, December 09, 2004 8:49 PM
> To: Tapestry users
> Subject: Re: Sortable table with own column header
> 
> 
> Hello again!
> 
> 
> Well I found out that:
> 
> <table class="mytable" jwcid="table@contrib:Table"
>     source="ognl:visit.member.messages"
>     columns="subject:TheSubject:subject"
>     persistent="false"/>
> 
> Prints TheSubject a a heading.
> 
> However
> 
> <table class="mytable" jwcid="table@contrib:Table"
>     source="ognl:visit.member.messages"
>     columns="subject:ognl:getMessage('_SUBJECT'):subject"
>     persistent="false"/>
> 
> does not work. How can I bind the middle parameter ?
> 
> 
> > Hi there!
> >
> > The following code should show the messages of a members inbox using
> > a sortable table.
> >
> >  <table class="mytable" jwcid="table@contrib:Table"
> >     source="ognl:visit.member.messages"
> >     columns="subject, from_username, to_username, msg_time, msg_text,
> > read_msg"
> >     persistent="false"/>
> >
> > My question are:
> >
> > 1. Would persistent=true cache the members inbox so that new messages
> are
> > not shown ?
> >
> > 2. How can I display different stuff as the column headers ? I would
> like
> > to
> > get the text from a database where the table column are mapped to the
> > corresponding textx....
> >
> > 3. i tested the method that will retrieve messages and everything seems
> to
> > be fine...however this code only diplays 2 columns and not the
> > rest....really odd...all other columns are empty althouth the ArrayList
> > with
> > message objects contains only message object with all values set...
> >
> >
> >
> > Any ideas?
> >
> > Cheers!
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> ---
> 
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.802 / Virus Database: 545 - Release Date: 11/26/2004
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


RE: Sortable table with own column header

Posted by Mind Bridge <mi...@yahoo.com>.
Hi,

Please try this:

<table class="mytable" jwcid="table@contrib:Table"
    source="ognl:visit.member.messages"
    columns="ognl:'subject:' + getMessage('_SUBJECT') + ':subject'"
    persistent="false"/>

Basically, 'columns' needs to be a string, and that string can be composed
using OGNL.


In this case it will probably be better to define the column title in the
corresponding .properties file as:

subject = Subject

(or something like that) rather than use _SUBJECT, but of course that could
depend on the specifics of the program.

Hope this helps...


-----Original Message-----
From: sarah.simbad@women-at-work.org
[mailto:sarah.simbad@women-at-work.org]
Sent: Thursday, December 09, 2004 8:49 PM
To: Tapestry users
Subject: Re: Sortable table with own column header


Hello again!


Well I found out that:

<table class="mytable" jwcid="table@contrib:Table"
    source="ognl:visit.member.messages"
    columns="subject:TheSubject:subject"
    persistent="false"/>

Prints TheSubject a a heading.

However

<table class="mytable" jwcid="table@contrib:Table"
    source="ognl:visit.member.messages"
    columns="subject:ognl:getMessage('_SUBJECT'):subject"
    persistent="false"/>

does not work. How can I bind the middle parameter ?


> Hi there!
>
> The following code should show the messages of a members inbox using
> a sortable table.
>
>  <table class="mytable" jwcid="table@contrib:Table"
>     source="ognl:visit.member.messages"
>     columns="subject, from_username, to_username, msg_time, msg_text,
> read_msg"
>     persistent="false"/>
>
> My question are:
>
> 1. Would persistent=true cache the members inbox so that new messages are
> not shown ?
>
> 2. How can I display different stuff as the column headers ? I would like
> to
> get the text from a database where the table column are mapped to the
> corresponding textx....
>
> 3. i tested the method that will retrieve messages and everything seems to
> be fine...however this code only diplays 2 columns and not the
> rest....really odd...all other columns are empty althouth the ArrayList
> with
> message objects contains only message object with all values set...
>
>
>
> Any ideas?
>
> Cheers!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.802 / Virus Database: 545 - Release Date: 11/26/2004


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Sortable table with own column header

Posted by sa...@women-at-work.org.
Hello again!


Well I found out that:

<table class="mytable" jwcid="table@contrib:Table"
    source="ognl:visit.member.messages"
    columns="subject:TheSubject:subject"
    persistent="false"/>

Prints TheSubject a a heading.

However

<table class="mytable" jwcid="table@contrib:Table"
    source="ognl:visit.member.messages"
    columns="subject:ognl:getMessage('_SUBJECT'):subject"
    persistent="false"/>

does not work. How can I bind the middle parameter ?


> Hi there!
> 
> The following code should show the messages of a members inbox using 
> a sortable table.
> 
>  <table class="mytable" jwcid="table@contrib:Table"
>     source="ognl:visit.member.messages"
>     columns="subject, from_username, to_username, msg_time, msg_text,
> read_msg"
>     persistent="false"/>
> 
> My question are:
> 
> 1. Would persistent=true cache the members inbox so that new messages are
> not shown ?
> 
> 2. How can I display different stuff as the column headers ? I would like
> to
> get the text from a database where the table column are mapped to the
> corresponding textx....
> 
> 3. i tested the method that will retrieve messages and everything seems to
> be fine...however this code only diplays 2 columns and not the
> rest....really odd...all other columns are empty althouth the ArrayList
> with
> message objects contains only message object with all values set...
> 
> 
> 
> Any ideas?
> 
> Cheers!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org