I don't know if I'm the right person to respond to this since I've only
been using Struts a short while, but why can't you access the formbean
properties in a scriptlet.  The formbean is stored in the pageContext so
why can't you do this:

<%
   MyFormBean form = pageContext.getAttribute("name or form bean in
struts-config.xml",
                                                                       
        pageContext.REQUEST_SCOPE);
   Map map = new Map();
   map.put("systemCode", form.getSystemCode());

   etc....
%>

Of course, REQUEST_SCOPE might be SESSION_SCOPE or whatever scope you
specify in struts-config.xml.

Cory R. Newey
[EMAIL PROTECTED]
Senior Software Engineer
Novell, the leading provider of Net services software


>>> [EMAIL PROTECTED] 02/04/03 03:18PM >>>
Hi,

I have been struggling in vain to use the <html:link> tag with
multiple
parameters. I know you're supposed to use a java.util.Map to hold the
parameters, since there could be any number of them, but the question
is,
how do you set up this map within a scriptlet when you can't access
formbean properties from scriptlets??!

It so happens I am in a loop, and want to pull in two parameters, one
of
which is a property of the bean being iterated over in the loop.
I want to do something like:


<logic:iterate name="systemForm" property="subSystems" id="subSystem">
    <tr>
        <td><bean:write name="subSystem" property="systemCode" /></td>
        <td><bean:write name="subSystem" property="shortName" /></td>
        <td><bean:write name="subSystem" property="longName" /></td>
        <td>
<%
Map map = new Map();
***** impossible part coming up ***********
map.put("systemCode", <bean:write name="systemForm" property
="systemCode"/>);
map.put("systemCode", <bean:write name="subSystem"
property="systemCode"
/>);
***** end impossible part **********
%>
            <html:link href="editSubSystemPrepare.do" paramName
="map">Edit</html:link>
        </td>
    </tr>
</logic:iterate>

I have searched many times and found no answer to this problem. Help!!

Thanks,

Andrew Broderick




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to