Grokbase Groups Struts user July 2007
FAQ
Hi



I am using Struts 2.0 and this is my JSP code:



<s:iterator value="tempList" status="tempListItem">



<tr>

<td><s:checkbox
value="false" theme="simple" name = "<s:property value="top"/>" /></td>

<td ><s:property /></td>

</tr>



</s:iterator>



Now I am getting a JasperException: equal symbol expected error, around
the name attribute of the checkbox.



What is the problem I don't understand. It seems really silly to me.



Himanshu

Search Discussions

  • Himanshu Ranavat at Jul 28, 2007 at 1:06 am
    Hi I gt the answer to my own qn. I think the Struts guys can add this eg
    to their website:



    <s:iterator value="tempList" status="tempListItem">



    <tr>

    <td><s:checkbox
    name="box1" value="false" theme="simple" fieldValue = "%{[0].top}"
    /></td>

    <td ><s:property /></td>

    </tr>



    </s:iterator>



    This finally wrks

    "tempList" is a string array in da java backend



    Thanx



    Himanshu



    _____

    From: Himanshu Ranavat
    Sent: Friday, July 27, 2007 5:50 PM
    To: 'Struts Users Mailing List'
    Subject: FW: equal symbol expected error





    Hey



    I also tried using the '[0]' operator but amazingly it doesn't wrk. This
    is my code:



    <s:iterator value="tempList" status="tempListItem">



    <tr>

    <td><s:checkbox
    name="box1" value="false" theme="simple" fieldValue = "[0]" /></td>

    <td ><s:property /></td>

    </tr>



    </s:iterator>



    This dint throw an exception but the fieldValue (or the value field in
    HTML) field contained just "[0]"



    However, struts doc claims this will wrk:



    http://struts.apache.org/2.x/docs/iterator.html (see below code frm this
    page)



    <s:action name="entries" var="entries"/>
    <s:iterator value="#entries.entries" >
    <s:property value="name" />
    <s:property />
    <s:push value="...">
    <s:action name="edit" var="edit" >
    <s:param name="entry" value="[0]" /> ----------seee
    here it says it wrks
    </s:action>
    </push>
    </s:iterator>

    So is the doc wrong. Or am I missing a variable.

    Or am I missing something

    Himanshu







    _____

    From: Himanshu Ranavat
    Sent: Friday, July 27, 2007 5:01 PM
    To: 'Struts Users Mailing List'
    Subject: equal symbol expected error



    Hi



    I am using Struts 2.0 and this is my JSP code:



    <s:iterator value="tempList" status="tempListItem">



    <tr>

    <td><s:checkbox name =
    "box1" value="false" theme="simple" fieldValue = "<s:property
    value="top"/>" /></td>

    <td ><s:property /></td>

    </tr>



    </s:iterator>



    Now I am getting a JasperException: equal symbol expected error, around
    the name attribute of the checkbox.



    What is the problem I don't understand. It seems really silly to me.



    Himanshu

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriesstruts
postedJul 28, '07 at 12:01a
activeJul 28, '07 at 1:06a
posts2
users1
websitestruts.apache.org
irc#struts

1 user in discussion

Himanshu Ranavat: 2 posts

People

Translate

site design / logo © 2022 Grokbase