Re: s:url does not include parameter

2009-04-14 Thread Jeroen De Ridder
It's evaluating ALL as an OGNL expression, not a string literal. Use 
either


s:url action=ListFeatures namespace=/secure/jsons:param 
name=statusALL/s:param/s:url


or

s:url action=ListFeatures namespace=/secure/jsons:param 
name=status value='ALL' //s:url


(notice the extra single quotes in the second one).


Hello All,

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/jsons:param name=status value=ALL //s:url;


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


Thanks!

--john


-
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



Re: s:url does not include parameter

2009-04-14 Thread Dave Newton

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/jsons: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



Re: s:url does not include parameter

2009-04-14 Thread John Cartwright
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/jsons: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



RE: s:url does not include parameter

2009-04-14 Thread Martin Gainty

Good Evening John

i found this link helpful for explaining namespace and action resolution
http://struts.apache.org/2.0.14/docs/namespace-configuration.html

HTH
Martin Gainty 
__ 
Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note de 
déni et de confidentialité 
This message is confidential. If you should not be the intended receiver, then 
we ask politely to report. Each unauthorized forwarding or manufacturing of a 
copy is inadmissible. This message serves only for the exchange of information 
and has no legal binding effect. Due to the easy manipulation of emails we 
cannot take responsibility over the the contents.
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.






 Date: Tue, 14 Apr 2009 16:12:59 -0600
 From: john.c.cartwri...@noaa.gov
 Subject: Re: s:url does not include parameter
 To: user@struts.apache.org
 
 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/jsons: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
 

_
Windows Live™ SkyDrive: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_skydrive_032009