Hi Dave,

Thanks for your tip. Apologies for my newbie-ness. Like I said, I've tried every combination I can think of - except presumably the correct one. Some examples:

<s:param name="#attr['reqParam'].key"
        value="#attr['reqParam'].value"/>

<s:param name="#['reqParam'].key" value="#['reqParam'].value"/>

<s:param name="[0].key" value="[0].value"/>

<s:param name="#[reqParam].key" value="#[reqParam].value"/>

<s:param name="#[0].key" value="#[0].value"/>

                <s:param name="#attr.reqParam.key" 
value="#attr.reqParam.value"/>

in conjunction with below, where reqParameters is a Map of key & value pairs I'd like to add to the URL.

<s:url id="uri" action="%{action}" namespace="%{nameSpace}">
        <s:iterator var="reqParam" value="%{reqParameters}"
                        status="paramStatus">
                <s:param name="#attr['reqParam'].key"
                        value="#attr['reqParam'].value"/>
        </s:iterator>
</s:url>

Any hints as to the syntax I should use in the s:param tag?

cheers,
Nathan


Dave Newton wrote:
Nathan Coast wrote:
Is passing a map of params to a construct a url supported by the URL tag? (or some other struts2 mechanism).

<s:url id="uri" action="%{action}" namespace="%{nameSpace}">
    <s:iterator value="%{parameters}" status="paramStatus">
        <s:param name="%{key}" value="${value}"/>
    </s:iterator>
</s:url>

${key} ${value} return the correct values however the s:param doesn't support expressions.

It doesn't support JSP EL expressions, but it *does* support OGNL expressions.

Dave


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




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

Reply via email to