You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sebastian Ho <se...@bii.a-star.edu.sg> on 2004/11/04 07:48:29 UTC

html:text in logic:iterate

Hi

I have a iterate tag which contains a text box. I wish to display value
in the textbox. But this line in the JSP couldnt get through the
parsing.
            <html:text property="percentage" size="10"
value="<bean:write name="mymobilephaseloadings"
property="percentage"/>"/>

Anyone knoww how to get around this?

Thanks

Sebastian Ho

---------------------------------------------------------------------

<logic:iterate id="mymobilephaseloadings" name="mobilephaseloadings"
scope="session">
          <tr bgcolor="#FFFFCC">
          <html:form action="EditLCMSMSGradientStepByIdentifier.do">
            <td>
              <bean:write name="mymobilephaseloadings"
property="gradientStepTime"/>
            </td>
            <td>
            <html:text property="percentage" size="10"
value="<bean:write name="mymobilephaseloadings"
property="percentage"/>"/>
            </td>
            <td>
            <html:cancel property="action" value="Save">
            <bean:message key="button.save"/>
          </html:cancel>  
            </td>
            <html:hidden property="page"
value="displaygradientstepbyidentifier"/>
            </html:form>
          </tr>
        </logic:iterate>


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


Re: html:text in logic:iterate

Posted by Erik Weber <er...@mindspring.com>.
Couldn't you just use one of the expression languages?

For example:

<html:text property="percentage" size="10" 
value="${mymobilephaseloadings.percentage}"/>
 . . . in a JSP 2.0 (Expression Language-aware) container, or, using the 
EL tags:
<html-el:text property="percentage" size="10" 
value="${mymobilephaseloadings.percentage}"/>

or <%= mymobilephaseloadings.getPercentage() %> using the older runtime 
expression language.

Not sure if my syntax is 100% correct.

Also, I think you might be able to embed the c:out tag in place of the 
bean:write tag.

Make sure you really want to use the value attribute, as this can have 
undesired consequences when paired with an ActionForm.

Erik



Sebastian Ho wrote:

>Hi
>
>I have a iterate tag which contains a text box. I wish to display value
>in the textbox. But this line in the JSP couldnt get through the
>parsing.
>            <html:text property="percentage" size="10"
>value="<bean:write name="mymobilephaseloadings"
>property="percentage"/>"/>
>
>Anyone knoww how to get around this?
>
>Thanks
>
>Sebastian Ho
>
>---------------------------------------------------------------------
>
><logic:iterate id="mymobilephaseloadings" name="mobilephaseloadings"
>scope="session">
>          <tr bgcolor="#FFFFCC">
>          <html:form action="EditLCMSMSGradientStepByIdentifier.do">
>            <td>
>              <bean:write name="mymobilephaseloadings"
>property="gradientStepTime"/>
>            </td>
>            <td>
>            <html:text property="percentage" size="10"
>value="<bean:write name="mymobilephaseloadings"
>property="percentage"/>"/>
>            </td>
>            <td>
>            <html:cancel property="action" value="Save">
>            <bean:message key="button.save"/>
>          </html:cancel>  
>            </td>
>            <html:hidden property="page"
>value="displaygradientstepbyidentifier"/>
>            </html:form>
>          </tr>
>        </logic:iterate>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>
>
>  
>

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