Re: S:url and s:param and character encoding

2014-09-01 Thread Lukasz Lenart
2014-08-29 18:11 GMT+02:00 Miguel Almeida mig...@almeida.at:
 I had an issue recently with a download action not finding the
 corresponding file and you might be able to help me with it. The
 filename (on disk) was Calendário (á is the focus here).

 I am using the following s:url (Calendário is within the variable
 #answer):

 s:url encode=true var=downloadUrl 
 action=Filedownload
 s:param 
 name=answer.id${entityId}/s:param
 s:param name=fileNames:property 
 value=%{#answer}//s:param
 /s:url
 s:a theme=simple 
 href=%{downloadUrl}s:property
 value=%{#answer}//s:a

It can be an issue in DefaultUrlHelper as it uses
paramValue.toString() (which means it uses server's locale), did you
try to use s:param name=fileName${answer}/s:param instead of
s:param name=fileNames:property value=%{#answer}//s:param ?


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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



Re: S:url and s:param and character encoding

2014-09-01 Thread Miguel Almeida


On Mon, 2014-09-01 at 10:20 +0200, Lukasz Lenart wrote:

 2014-08-29 18:11 GMT+02:00 Miguel Almeida mig...@almeida.at:
  I had an issue recently with a download action not finding the
  corresponding file and you might be able to help me with it. The
  filename (on disk) was Calendário (á is the focus here).
 
  I am using the following s:url (Calendário is within the variable
  #answer):
 
  s:url encode=true var=downloadUrl 
  action=Filedownload
  s:param 
  name=answer.id${entityId}/s:param
  s:param 
  name=fileNames:property value=%{#answer}//s:param
  /s:url
  s:a theme=simple 
  href=%{downloadUrl}s:property
  value=%{#answer}//s:a
 
 It can be an issue in DefaultUrlHelper as it uses
 paramValue.toString() (which means it uses server's locale), did you
 try to use s:param name=fileName${answer}/s:param instead of
 s:param name=fileNames:property value=%{#answer}//s:param ?

I actually had s:param name=fileName${answer}/s:param and it
worked corretly. I had to change to the s:property alternative due to
an issue with a JSP page with a grouped view - somewhere in the code the
variable #answer is probably being set differently, so with ${answer} I
would get an array [id1,id2...] whereas with s:property
value=%{#answer}/ I would get the correct fileName.



 
 
 Regards


Re: S:url and s:param and character encoding

2014-09-01 Thread Lukasz Lenart
2014-09-01 13:17 GMT+02:00 Miguel Almeida mig...@almeida.at:
 I actually had s:param name=fileName${answer}/s:param and it
 worked corretly. I had to change to the s:property alternative due to
 an issue with a JSP page with a grouped view - somewhere in the code the
 variable #answer is probably being set differently, so with ${answer} I
 would get an array [id1,id2...] whereas with s:property
 value=%{#answer}/ I would get the correct fileName.

What kind of issue? I think it will be hard to figure out what's wrong
without example


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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



RE: S:url and s:param and character encoding

2014-08-30 Thread Martin Gainty
Struts URL modificada por request_locale de 'es' va a refeerncia el archivo de 
propiedades
s:url id=indexES namespace=/ action=locale 
  s:param name=request_locale es/s:param
/s:url

!-- las siguientes referencias de struts tiraría el contenido de esta 
GLOBAL_ES.properties --
global.name = Nombre de usuario
global.age = Edad
global.submit = Presentar
global.heading = seleccionar la configuracion regional
global.success = Autenticado correctamente

   s:a href=%{indexES} Español/s:a
   s:form action=empinfo method=post namespace=/
  s:textfield name=name key=global.name size=20 /
  s:textfield name=age key=global.age size=20 /
  s:submit name=submit key=global.submit /
   /s:form

 -- ¿no trabaja para ti ? --

 Subject: S:url and s:param and character encoding
 From: mig...@almeida.at
 To: user@struts.apache.org
 Date: Fri, 29 Aug 2014 17:11:11 +0100
 
 I had an issue recently with a download action not finding the
 corresponding file and you might be able to help me with it. The
 filename (on disk) was Calendário (á is the focus here).
 
 I am using the following s:url (Calendário is within the variable
 #answer):
 
   s:url encode=true var=downloadUrl 
 action=Filedownload
   s:param 
 name=answer.id${entityId}/s:param
   s:param name=fileNames:property 
 value=%{#answer}//s:param
   /s:url
   s:a theme=simple 
 href=%{downloadUrl}s:property
 value=%{#answer}//s:a 
 
 If I use a plain-old a and s:properties I get the normal behaviour:
 
   a 
 href=Filedownload.action?answer.id=s:property
 value=%{#entityId}/fileName=s:property
 value=%{#answer}/s:property value=%{#answer}//a
 
 Is there something missing from s:url?
 I also found https://issues.apache.org/jira/browse/WW-2414 which seems
 to mention something similar, but marked as solved in 2.0.x.
 
 Cheers,
 
 Miguel
  

S:url and s:param and character encoding

2014-08-29 Thread Miguel Almeida
I had an issue recently with a download action not finding the
corresponding file and you might be able to help me with it. The
filename (on disk) was Calendário (á is the focus here).

I am using the following s:url (Calendário is within the variable
#answer):

s:url encode=true var=downloadUrl 
action=Filedownload
s:param 
name=answer.id${entityId}/s:param
s:param name=fileNames:property 
value=%{#answer}//s:param
/s:url
s:a theme=simple 
href=%{downloadUrl}s:property
value=%{#answer}//s:a 

If I use a plain-old a and s:properties I get the normal behaviour:

a 
href=Filedownload.action?answer.id=s:property
value=%{#entityId}/fileName=s:property
value=%{#answer}/s:property value=%{#answer}//a

Is there something missing from s:url?
I also found https://issues.apache.org/jira/browse/WW-2414 which seems
to mention something similar, but marked as solved in 2.0.x.

Cheers,

Miguel