struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alejandro77 <alejandro.garcia....@gmail.com>
Subject Re: <s:property> tags nested
Date Fri, 19 Sep 2008 07:03:12 GMT

I have divided my site into 3 jsp: left.jsp, header.jsp and main.jsp.
I want the main.jsp is the same for the entire application.
I have 2 links in the left.jsp. 
if pulse in the first link, put in the ValueStack a collection called
'users' formed for 'user' object.
if pulse in the second link, put in the ValueStack a collection called
'groups' formed for 'group' object.
The 'user' object and the 'group' object have different fields.
In the main.jsp, i have a generic table showing the data of users (if pulse
in the first link) or groups (if pulse in the second link). The content of
the columns of this table will be different when pulse in the link user and
when pulse in the link group.
For example, if pulse in the link user, the content of the first column of
the table is the name of a user. if pulse in the link group, the name of the
first column of the table is the name of a group.
To know that data show, if a user pulse in the link user, i put the names of
the fields of class 'user' in the ValueObject. If a user pulse in the link
group, i put the names of the fields of class 'group' in the ValueObject.
In this way, if i want show the name of a user or a group, in the table, i
do:

<s:property value="<s:property value="name">"/>

<s:property value="name"> recover the value 'nameUser' or 'nameGroup'. 
Then <s:property value="nameUser"> recover the name of a user and
<s:property value="nameGroup">
recover the name of a group.

But tags nested are not permitted


-- 
View this message in context: http://www.nabble.com/%3Cs%3Aproperty%3E-tags-nested-tp19563094p19567216.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Mime
View raw message