struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Siggelkow, Bill" <bill.siggel...@mirant.com>
Subject RE: How to set formbean properties without asking the user
Date Mon, 23 Dec 2002 18:43:17 GMT
Can you provide more details?  When you are dealing with forms, the basic types are either
String or booleans.  Perhaps what you want to do is best handled in your Action that processes
the form.  It sounds like you need to make an object available in let's say the request scope
and then have that object be used along with the form in the Action.  The thing is forms were
meant to work with user input -- it may prove difficult to try and use it in a different fashion.

My 2 cents.

-----Original Message-----
From: Tobias Flohre [mailto:flohre@adesso.de]
Sent: Monday, December 23, 2002 11:31 AM
To: Struts Users Mailing List
Subject: RE: How to set formbean properties without asking the user



Hi again,
using a hidden field is a good idea, but I just can set a simple java type
into the value. I need to write a complex object into the property of my
bean!
Does anybody know how I can do that without using java?

Thanks,
Tobias

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

You could use a hidden field with the value equal to the value of the
scripting variable ..

<html:hidden name="personalplanungEditForm" property="someProperty" value='
<%=theScriptingVariable%>'/>

-----Original Message-----
From: Tobias Flohre [mailto:flohre@adesso.de]
Sent: Monday, December 23, 2002 10:10 AM
To: Struts Users Mailing List
Subject: How to set formbean properties without asking the user



Hello,

I have a probably very simple question:
I have a form like this:

<html:form action="/personalplanungEditShow" name="personalplanungEditForm"
type="PersonalplanungEditForm">
<td class="mitteoben"><html:image src="images/icons/editsmall.gif" property
="editieren<%=index.intValue()%>" alt="Editieren" /></td>
</html:form>

I want to set a property of personalplanungEditForm to a value that is
stored
in a scripting variable. How can I do this without using any java code?
Does a tag exist for doing that?

Thank you in advance!
Tobias



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

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



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

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


Mime
View raw message