You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by viet nguyen <vi...@yahoo.com> on 2001/08/29 02:56:26 UTC

static text fields on the session or from??

If I need to display a screen which includes both
editable fields and static text fields, would it be
better to store the read-only fields on the session
instead of having them in the form?  Since the values
of these fields will never change, it seems to defeat
the purpose of form automatic population if I provide
them in the form. Any ideas??

Thanks,
V.

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Re: static text fields on the session or from??

Posted by Keith Bacon <ke...@yahoo.com>.
Isn't ApplicationResources.properties designed to hold this sort of
info? It has the advantage that you can review/change your literals
in one place & also supports internationalisation.
-------------------
ie. in your jsp

<bean:message key="LogonForm.literal.please.signon"/>

will fetch this message from ApplicationResources.properties

LogonForm.literal.please.signon=Singon Here
-------------------
If you don't need that then why not hard code them in the JSP? These
are part of the view only. Putting them in the Form bean implies they
have some tie-in to the rest of the system IMHO.
----
Keith.


--- martin.cooper@tumbleweed.com wrote:
> I would suggest putting them in the form. That way, the form
> represents all
> the data required for the view, whether modifiable or not, and you
> don't
> have multiple pieces of data scattered around in different places.
> The data
> that isn't in input fields won't be populated back into the form,
> so there's
> no overhead there.
> 
> --
> Martin Cooper
> 
> 
> ----- Original Message -----
> From: "viet nguyen" <vi...@yahoo.com>
> To: <st...@jakarta.apache.org>
> Sent: Tuesday, August 28, 2001 5:56 PM
> Subject: static text fields on the session or from??
> 
> 
> > If I need to display a screen which includes both
> > editable fields and static text fields, would it be
> > better to store the read-only fields on the session
> > instead of having them in the form?  Since the values
> > of these fields will never change, it seems to defeat
> > the purpose of form automatic population if I provide
> > them in the form. Any ideas??
> >
> > Thanks,
> > V.
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Make international calls for as low as $.04/minute with Yahoo!
> Messenger
> > http://phonecard.yahoo.com/
> 
> 


__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

Re: static text fields on the session or from??

Posted by ma...@tumbleweed.com.
I would suggest putting them in the form. That way, the form represents all
the data required for the view, whether modifiable or not, and you don't
have multiple pieces of data scattered around in different places. The data
that isn't in input fields won't be populated back into the form, so there's
no overhead there.

--
Martin Cooper


----- Original Message -----
From: "viet nguyen" <vi...@yahoo.com>
To: <st...@jakarta.apache.org>
Sent: Tuesday, August 28, 2001 5:56 PM
Subject: static text fields on the session or from??


> If I need to display a screen which includes both
> editable fields and static text fields, would it be
> better to store the read-only fields on the session
> instead of having them in the form?  Since the values
> of these fields will never change, it seems to defeat
> the purpose of form automatic population if I provide
> them in the form. Any ideas??
>
> Thanks,
> V.
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/