struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <>
Subject Re: Outputting form:text value as "normal" text in the .jsp
Date Thu, 10 Jul 2003 08:38:36 GMT
I would not put the text to display into the form. Just put it straight 
in the request scope when you obtain it, or in both places if needs be. 
Or alternatively, output it as a read-only text field with CSS styles 
that make the field box invisible.


Linus Nikander wrote:
> Is there a way to output the value of an attribute contained in a Form as
> "normal" text on the displaying .jsp page ? The following code illustrates
> what I'm trying to do.
> <html:form action="/saveRegistrationHandlerSettings">
>     <html:checkbox property="isRegistrationAllowed"/>
>     <bean:write name="registrationHandlerForm"
> property="isRegistrationAllowed" />
> </html:form>
> isRegistrationAllowed is a checkbox property. the "<html:checkbox
> property="isRegistrationAllowed"/>" works fine and displays the set value.
> "<bean:write name="registrationHandlerForm" property="isRegistrationAllowed"
> />" also works fine and renders "true" or "false" to the screen.
> Essentially that is exactly what I want to do, BUT when using the
> <bean:write ..> tag i have to specify which bean the property is to be
> fetched from, thus I make the .jsp dependant on the fact that
> registrationHandlerForm is the name of the bean in the request/session. The
> form on the other hand knows the name of the bean because of the
> struts-config.xml. Is there another way to output the text without
> explicitly naming the bean in the .jsp ?
> //Linus Nikander -
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message