Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Subject: Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Subject: Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
Subject: Re: Display Tag? (2.0.11)

Subject: Re: Display Tag? (2.0.11)

2007-11-01       - By Musachy Barroso

 Back
You can access the values published by displaytag using "#attr",  like:

<dt:table name="products" id="row" class="dt">
  <dt:column>
      <s:property value="#attr.row.name" />
  </dt:column>
</dt:table>

musachy

On 11/1/07, Jake Robb <jrobb@(protected)> wrote:
> I've used DisplayTag with S1 before, with excellent results.  I'm also
> using it in S2 in a few cases, and it's working fine.
>
> However, now I want to use it to render a form.  Each row in the table
> will contain a couple of input tags, and the table as a whole represents
> a single List on my action.
>
> Without DisplayTag, I can accomplish that as follows:
>
>   <s:iterator value="rules" status="status" id="rule">
>     <div class="resultRow${status.odd ? ' highlight' : ''}">
>       <div class="name">
>         <s:property value="name" />
>       </div>
>       <div class="value">
>         <s:textfield name="%{'rules['+#status.index+'].value'}" label=""
> size="90" />
>       </div>
>     </div>
>   </s:iterator>
>
>
> I converted the code above as follows:
>
>   <display:table htmlId="rulesTable" list="rules" id="rule">
>     <display:column title="Rule Name">
>       <s:property value="name" />
>     </display:column>
>     <display:column title="Rule Name">
>       <s:textfield name="rules[rule_rowNum].value" label="" size="90" />
>     </display:column>
>   </display:table>
>
>
> But that didn't work, because DisplayTag doesn't push rule_rowNum onto
> the stack.  So I added a push tag:
>
>   <display:table htmlId="rulesTable" list="rules" id="rule">
>     <s:push value="<%= rule_rowNum.toString() %>" id="rowNum"/>
>     <display:column title="Rule Name">
>       <s:property value="name" />
>     </display:column>
>     <display:column title="Rule Name">
>       <s:textfield name="rules[rowNum].value" size="90" />
>     </display:column>
>   </display:table>
>
>
> Then I discovered that s:push doesn't accept runtime expressions, just
> like everything else in 2.0.11.
>
> So, how do I accomplish this?  I guess I could keep it the old way, but
> I'd really rather be consistent.
>
> -Jake
>
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


--
"Hey you! Would you help me to carry the stone?" Pink Floyd

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.