You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Anjali Abraham <an...@aztec.soft.net> on 2005/09/15 07:05:37 UTC

RE: Need help on How to populate username data's into the html table using Tapestry4.0v

Well thanks for the suggestion, but yesterday itself I had solved this
problem by myself.

Regards,
Anjali

-----Original Message-----
From: Nick Stuart [mailto:baredok@gmail.com] 
Sent: Wednesday, September 14, 2005 7:42 PM
To: Tapestry users
Subject: Re: Need help on How to populate username data's into the html
table using Tapestry4.0v

if you are using the latest beta build (6 as of now) you need to add
some kind of binding prefix in front of the value attributes in your
bindings. Your components would in turn look like:
           <component id="users" type="For">
                       <binding name="source" value="ognl:users"/>
                       <binding name="value" value="ognl:user "/>
                       <binding name="element" value="literal:tr"/>
           </component>
           <component id="username" type="Insert">
                       <binding name="value" value="ognl:user.username"/>
           </component>

Hope this helps.
-Nick

On 9/14/05, Anjali Abraham <an...@aztec.soft.net> wrote:
> Hi All,
>             I have a scenario wherein, I retrive all username field from
> data base and that is in "List". I need to populate those user names into
> html table. I work on Taptestry4.0v.
> 
> My .page file content is:
> <page-specification class="pages.MyExample">
>             <property name="user"/>
>             <component id="users" type="For">
>                         <binding name="source" value="users"/>
>                         <binding name="value" value=" user "/>
>                         <binding name="element" value="literal:tr"/>
>             </component>
>             <component id="username" type="Insert">
>                         <binding name="value" value=" user.username"/>
>             </component>
> </page-specification>
> 
> And in my .html, the code is like this:
>             <table>
>                         <tr jwcid="users">
>                   <td><span jwcid="username"/></td>
> </tr>
>       </table>
> 
> 
> And in my .java, I have the code:
> 
>             public List getUsers() {
>                          /* I have the code here which gets all the
username
> field values in "List" type and
> that's what I will be returning */
>                          return theList;
>             }
> 
>             public String getUsername(){
>                         return username;
>             }
> 
> But I am getting this error while loading this html page:
> 
> Unable to read OGNL expression '<parsed OGNL expression>' of
> $MyExample_0@1ca7841[myexample]: java.lang.String.username
> 
> binding:
> ExpressionBinding[mymedia currentUser.username]
> 
> location:
> context:/WEB-INF/myexample.page, line 14, column 61
> 
> 9
> <binding name="source" value="users"/>
> 
> 10
> <binding name="value" value=" user "/>
> 
> 11
> <binding name="element" value="literal:tr"/>
> 
> 12
> </component>
> 
> 13
> <component id="username" type="Insert">
> 
> 14
> <binding name="value" value=" user.username"/>
> 
> 15
> </component>
> 
> 16
> 
> 
> 17
> </page-specification>
> 
> Please help me out!!!!!!!!!!!!!!!
> 
> Thanks in Advance,
> 
> Regards,
> Anjali
> 
> 
>

---------------------------------------------------------------------
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