Re: Json result

2014-09-01 Thread Christoph Nenning
 Hi,
 
 Conisider this action:
 
 SampleAction{privateListSampleVOsamples;//With setters and 
 gettersprivateListAnotherVOanotherList;//With setters and 
 gettersprivateStringanString;//With setters and getters@Action(value
 =/loadSelect,results ={@Result(name =success,type =json)})
 publicStringloadSomeSamples(){samples =newArrayListSampleVO();//
 Put some object in samples.returnSUCCESS;}}
 This will result to:
 
 {samples:{0:{property:a},1:{property:b},2:
 {property:c}},anString:hello,anotherList:{0:
 {prop1:a,prop2:b},1:{prop1:c,prop2:d}}}
 Is it possible to configure json result to make below result
 
 
{samples:{0:{property:a},1:{property:b},2:{property:c}}}
 
 ~Regards,
 ~~Alireza Fattahi



You can use the excludeProperties parameter, see:


https://struts.apache.org/release/2.3.x/docs/json-plugin.html



regards,
Christoph

This Email was scanned by Sophos Anti Virus


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



CRUD sample and slides

2014-09-01 Thread Christoph Nenning
Hi,


for the talk I gave last week I created a new CRUD sample which I pushed 
to github:

https://github.com/wolpi/struts2-crud-sample


You can also find by slides there, they are partly in german.


regards,
Christoph

This Email was scanned by Sophos Anti Virus


Re: CRUD sample and slides

2014-09-01 Thread Johannes Geppert
Thank you for sharing this Christoph.


Best Regards

Johannes

#
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep



2014-09-01 10:27 GMT+02:00 Christoph Nenning christoph.nenn...@lex-com.net
:

 Hi,


 for the talk I gave last week I created a new CRUD sample which I pushed
 to github:

 https://github.com/wolpi/struts2-crud-sample


 You can also find by slides there, they are partly in german.


 regards,
 Christoph

 This Email was scanned by Sophos Anti Virus



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: Portlets

2014-09-01 Thread Lukasz Lenart
2014-08-28 14:21 GMT+02:00 tkofford tkoff...@ku.edu:
 I don't know if this will resolve your problem, but you might want to see
 this
 post:http://struts.1045723.n5.nabble.com/Struts2-Portlets-tp5716471p5716475.html

Thanks! I followed this guideline [1] and was able to create a simple
portlet, now I have to play a bit with it to figure out these issues
[2][3]. BTW did you experience any of that?

[1] http://struts.apache.org/release/2.3.x/docs/struts-2-portlet-tutorial.html
[2] https://issues.apache.org/jira/browse/WW-4219
[3] https://issues.apache.org/jira/browse/WW-3861


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