OK, makes perfect sense now. Thanks to both Dave and Jeroen for your prompt replies!

--john


Dave Newton wrote:
john.c.cartwri...@noaa.gov wrote:
I'm trying to understand why the following does not produce a URL w/ the
requested parameter appended. Can someone please help me?

var url = "<s:url action="ListFeatures" namespace="/secure/json"><s:param name="status" value="ALL" /></s:url>";

//produces '/scufn/secure/json/ListFeatures.action'

You probably don't have an action property named "ALL".

The "value" attribute is an OGNL expression, not an immediate string. If you want to use an immediate string, quote it:

<s:url action="ListFeatures" namespace="/secure/json">
  <s:param name="status" value="'ALL'" />
</s:url>

Using OGNL's %{} escape sequence can make it absolutely clear what's going on (and add visual separation):

<s:param name="status" value="%{'ALL'}" />

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