Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 7 Mar 2010 14:18:40 -0000 Issue 9021

user-digest-help

2010-03-07


Author LoginPost Reply

user Digest 7 Mar 2010 14:18:40 -0000 Issue 9021

Topics (messages 205266 through 205285):

Re: Struts 2, Log4J and turning off WARNING messages
 205266 by: carl ballantyne

Re: Struts2 JQuery select box
 205267 by: Yoshi
 205268 by: Johannes Geppert
 205269 by: nani2ratna
 205271 by: Johannes Geppert

How to do with Struts2(Similar to Web2.0 wizard)!!!!
 205270 by: sharath karnati

possible s:submit with parameter?
 205272 by: lucas owen
 205275 by: Burton Rhodes
 205278 by: Adam Pinder
 205280 by: lucas owen
 205281 by: lucas owen

Struts 2 Validations values restore.
 205273 by: Siddiq Syed
 205277 by: Adam Pinder
 205279 by: Siddiq Syed

Struts-Menu & Struts2
 205274 by: CRANFORD, CHRIS
 205276 by: CRANFORD, CHRIS

Re: Form submit always redirects to the action page instead of the target div
 205282 by: Jose A. Corbacho

struts 2 - framework question
 205283 by: john lee
 205284 by: Cimballi
 205285 by: Pawe³ Wielgus

Administrivia:

---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)

----------------------------------------------------------------------


Attachment: user_205266.ezm (zipped)
Hi Adam,

You were right. A double check has solved it. Yes it was the server
logging. I was able to add an additional property on the logging page
for GlassFish.

There I was able to set the logging for org.apache.struts2.util to OFF.

Thanks for the prod in the right direction.

Cheers,
Carl.

Quoting carl ballantyne <carl.ballantyne@(protected)>:

> Hi Adam,
>
> Looks to me like it is Struts.
>
> I am using GlassFish 2.1 and went into the admin console and turned the
> logging off for the Root ( javax.enterprise; ). But doing that turns of
> any logging at all. I cannot set it to another level because the level
> WARNING is higher than DEBUG which is what I want. And that would set
> it to that level for every class. I just want to turn it off for the
> annoying WARNING messages from org.apache.struts2.util.
>
> Even log4j.logger.org.apache.struts2.util=OFF does not work. Despite
> that fact I should not need it since I have the root set to ERROR.
>
> Cheers,
> Carl.
>
>
> Quoting adam pinder <apinder@(protected)>:
>
>>
>>
>>
>> are you sure its not your appserver logging and not struts logging.
>>
>>
>>
>> adam
>>
>>
>>
>>> Date: Fri, 5 Mar 2010 11:02:07 +0100
>>> From: carl.ballantyne@(protected)
>>> To: user@(protected)
>>> Subject: RE: Struts 2, Log4J and turning off WARNING messages
>>>
>>> Thanks Raghuveer,
>>>
>>> I already have the log4j.properties in the WEB-INF/classes folder.
>>>
>>> And I want to turn the messages off, hence I have put
>>> log4j.logger.org.apache.struts2=DEBUG. But it seems to have no effect.
>>>
>>> Cheers,
>>> Carl.
>>>
>>> Quoting Raghuveer <raghuveerv@(protected)>:
>>>
>>>> 1. Place log4j.properties in WEB-INF\classes
>>>> 2. Set log4j.logger.org.apache.struts2=warn, struts in log4j.properties.
>>>>
>>>> Raghuveer
>>>>
>>>> -----Original Message-----
>>>> From: carl ballantyne [mailto:carl.ballantyne@(protected)]
>>>> Sent: Wednesday, March 03, 2010 6:25 PM
>>>> To: Struts Users Mailing List
>>>> Subject: Struts 2, Log4J and turning off WARNING messages
>>>>
>>>> Hi All,
>>>>
>>>> I cannot seem to turn off the warning messages Struts 2 is putting in
>>>> my log files. This makes it impossible to follow debugging in some
>>>> parts of the applications. I keep getting messages like following:
>>>>
>>>>
>>>>
>>> [#|2010-03-03T13:45:10.345+0100|WARNING|sun-appserver2.1|org.apache.struts2.
>>>>
>>> util.TextProviderHelper|_ThreadID=23;_ThreadName=httpSSLWorkerThread-8080-2;
>>>> _RequestID=5867914b-d1a7-4fd5-a848-a419944b1ad6;|The default value
>>>> expression 'Guardar' was evaluated and did not match a property. The
>>>> literal value 'Guardar' will be
>>>> used.|#]
>>>>
>>>>
>>>> I have googled around and looked at the archives and cannot find a
>>>> solution that works. Below is my log4j.properties which is in the
>>>> WEB-INF/classes folder.
>>>>
>>>>
>>>> # Set root logger level to WARN and append to stdout
>>>> log4j.rootLogger=ERROR, stdout
>>>>
>>>> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
>>>> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
>>>>
>>>> # Pattern to output the caller's file name and line number.
>>>> log4j.appender.stdout.layout.ConversionPattern=%d %5p (%c:%L) - %m%n
>>>>
>>>> # Print only messages of level ERROR or above in the package noModule.
>>>> log4j.logger.noModule=FATAL
>>>>
>>>>
>>>>
>>>> Any ideas? Anyone else having the same problem?
>>>>
>>>> Cheers, Carl.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> *Advertencia legal: en virtud de lo establecido en la Ley Organica 15/1999
>>>> de Proteccion de Datos de Caracter Personal, le informamos de que
>>> los datos
>>>> personales que pueda facilitarnos se incorporaran a un fichero
>>> automatizado
>>>> titularidad de CAST INFO, S.A. con la finalidad de gestionar la relacion
>>>> negocial que nos vincula. Podra revocar su consentimiento al
>>> tratamiento de
>>>> los datos, asi como ejercer sus derechos de acceso, rectificacion,
>>>> cancelacion u oposicion dirigiendose por escrito a CAST INFO
>>> domiciliada en
>>>> C/ Tuset 23, 1 -- 08006 Barcelona, o a la direccion de correo electronico
>>>> lopd@(protected).
>>>>
>>>> Este mensaje y los ficheros anexos que pueda contener son confidenciales,
>>>> pueden contener informacion sometida a secreto profesional y se dirige
>>>> exclusivamente a su destinatario. Si ha recibido este mensaje por error o
>>>> tiene conocimiento del mismo por cualquier motivo, le rogamos que nos lo
>>>> comunique inmediatamente por este mismo medio y se abstenga de utilizarlo,
>>>> reproducirlo, alterarlo, archivarlo o comunicarlo a terceros. El emisor no
>>>> se responsabiliza de posibles perjuicios derivados de la captura,
>>>> incorporaciones de virus o cualesquiera otras manipulaciones
>>> efectuadas por
>>>> terceros.
>>>>
>>>> Antes de imprimir este e-mail piense bien si es necesario hacerlo.
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>> For additional commands, e-mail: user-help@(protected)
>>>>
>>>>
>>>> *Advertencia legal: en virtud de lo establecido en la Ley Organica
>>>> 15/1999 de Proteccion de Datos de Caracter Personal, le informamos
>>>> de que los datos personales que pueda facilitarnos se incorporaran a
>>>> un fichero automatizado titularidad de CAST INFO, S.A. con la
>>>> finalidad de gestionar la relacion negocial que nos vincula. Podra
>>>> revocar su consentimiento al tratamiento de los datos, asi como
>>>> ejercer sus derechos de acceso, rectificacion, cancelacion u
>>>> oposicion dirigiendose por escrito a CAST INFO domiciliada en C/
>>>> Tuset 23, 1 -- 08006 Barcelona, o a la direccion de correo
>>>> electronico lopd@(protected).
>>>>
>>>> Este mensaje y los ficheros anexos que pueda contener son
>>>> confidenciales, pueden contener informacion sometida a secreto
>>>> profesional y se dirige exclusivamente a su destinatario. Si ha
>>>> recibido este mensaje por error o tiene conocimiento del mismo por
>>>> cualquier motivo, le rogamos que nos lo comunique inmediatamente por
>>>> este mismo medio y se abstenga de utilizarlo, reproducirlo,
>>>> alterarlo, archivarlo o comunicarlo a terceros. El emisor no se
>>>> responsabiliza de posibles perjuicios derivados de la captura,
>>>> incorporaciones de virus o cualesquiera otras manipulaciones
>>>> efectuadas por terceros.
>>>>
>>>> Antes de imprimir este e-mail piense bien si es necesario hacerlo.
>>>>
>>>
>>>
>>>
>>>
>>> *Advertencia legal: en virtud de lo establecido en la Ley Organica
>>>  15/1999 de Proteccion de Datos de Caracter Personal, le  
>>> informamos de que los datos personales que pueda facilitarnos se  
>>> incorporaran a un fichero automatizado titularidad de CAST INFO,  
>>> S.A. con la finalidad de gestionar la relacion negocial que nos  
>>> vincula. Podra revocar su consentimiento al tratamiento de los  
>>> datos, asi como ejercer sus derechos de acceso, rectificacion,  
>>> cancelacion u oposicion dirigiendose por escrito a CAST INFO  
>>> domiciliada en C/ Tuset 23, 1 -- 08006 Barcelona, o a la  
>>> direccion de correo electronico lopd@(protected).
>>>
>>> Este mensaje y los ficheros anexos que pueda contener son  
>>> confidenciales, pueden contener informacion sometida a secreto  
>>> profesional y se dirige exclusivamente a su destinatario. Si ha  
>>> recibido este mensaje por error o tiene conocimiento del mismo por
>>>  cualquier motivo, le rogamos que nos lo comunique inmediatamente
>>>  por este mismo medio y se abstenga de utilizarlo, reproducirlo,  
>>> alterarlo, archivarlo o comunicarlo a terceros. El emisor no se  
>>> responsabiliza de posibles perjuicios derivados de la captura,  
>>> incorporaciones de virus o cualesquiera otras manipulaciones  
>>> efectuadas por terceros.
>>>
>>> Antes de imprimir este e-mail piense bien si es necesario hacerlo.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>
>> _________________________________________________________________
>> Got a cool Hotmail story? Tell us now
>> http://clk.atdmt.com/UKM/go/195013117/direct/01/
>>
>> *Advertencia legal: en virtud de lo establecido en la Ley Organica  
>> 15/1999 de Proteccion de Datos de Caracter Personal, le informamos
>>  de que los datos personales que pueda facilitarnos se
>> incorporaran a un fichero automatizado titularidad de CAST INFO,
>> S.A. con la  finalidad de gestionar la relacion negocial que nos
>> vincula. Podra  revocar su consentimiento al tratamiento de los
>> datos, asi como  ejercer sus derechos de acceso, rectificacion,
>> cancelacion u  oposicion dirigiendose por escrito a CAST INFO
>> domiciliada en C/  Tuset 23, 1 -- 08006 Barcelona, o a la
>> direccion de correo  electronico lopd@(protected).
>>
>> Este mensaje y los ficheros anexos que pueda contener son  
>> confidenciales, pueden contener informacion sometida a secreto  
>> profesional y se dirige exclusivamente a su destinatario. Si ha  
>> recibido este mensaje por error o tiene conocimiento del mismo por  
>> cualquier motivo, le rogamos que nos lo comunique inmediatamente  
>> por este mismo medio y se abstenga de utilizarlo, reproducirlo,  
>> alterarlo, archivarlo o comunicarlo a terceros. El emisor no se  
>> responsabiliza de posibles perjuicios derivados de la captura,  
>> incorporaciones de virus o cualesquiera otras manipulaciones  
>> efectuadas por terceros.
>>
>> Antes de imprimir este e-mail piense bien si es necesario hacerlo.
>>
>>
>
>
>
>
> *Advertencia legal: en virtud de lo establecido en la Ley Organica
> 15/1999 de Proteccion de Datos de Caracter Personal, le informamos de
> que los datos personales que pueda facilitarnos se incorporaran a un
> fichero automatizado titularidad de CAST INFO, S.A. con la finalidad de
> gestionar la relacion negocial que nos vincula. Podra revocar su
> consentimiento al tratamiento de los datos, asi como ejercer sus
> derechos de acceso, rectificacion, cancelacion u oposicion dirigiendose
> por escrito a CAST INFO domiciliada en C/ Tuset 23, 1 -- 08006
> Barcelona, o a la direccion de correo electronico lopd@(protected).
>
> Este mensaje y los ficheros anexos que pueda contener son
> confidenciales, pueden contener informacion sometida a secreto
> profesional y se dirige exclusivamente a su destinatario. Si ha
> recibido este mensaje por error o tiene conocimiento del mismo por
> cualquier motivo, le rogamos que nos lo comunique inmediatamente por
> este mismo medio y se abstenga de utilizarlo, reproducirlo, alterarlo,
> archivarlo o comunicarlo a terceros. El emisor no se responsabiliza de
> posibles perjuicios derivados de la captura, incorporaciones de virus o
> cualesquiera otras manipulaciones efectuadas por terceros.
>
> Antes de imprimir este e-mail piense bien si es necesario hacerlo.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)




*Advertencia legal: en virtud de lo establecido en la Ley Organica 15/1999 de Proteccion de Datos de Caracter Personal, le informamos de que los datos personales que pueda facilitarnos se incorporaran a un fichero automatizado titularidad de CAST INFO, S.A. con la finalidad de gestionar la relacion negocial que nos vincula. Podra revocar su consentimiento al tratamiento de los datos, asi como ejercer sus derechos de acceso, rectificacion, cancelacion u oposicion dirigiendose por escrito a CAST INFO domiciliada en C/ Tuset 23, 1 -- 08006 Barcelona, o a la direccion de correo electronico lopd@(protected).

Este mensaje y los ficheros anexos que pueda contener son confidenciales, pueden contener informacion sometida a secreto profesional y se dirige exclusivamente a su destinatario. Si ha recibido este mensaje por error o tiene conocimiento del mismo por cualquier motivo, le rogamos que nos lo comunique inmediatamente por este mismo medio y se abstenga de utilizarlo, reproducirlo, alterarlo, archivarlo o comunicarlo a terceros. El emisor no se responsabiliza de posibles perjuicios derivados de la captura, incorporaciones de virus o cualesquiera otras manipulaciones efectuadas por terceros.

Antes de imprimir este e-mail piense bien si es necesario hacerlo.


Attachment: user_205267.ezm (zipped)
Hi,

to exclude a property from be serialized just use the annotation on get
method of the property.

@JSON(serialize=false)





2010/3/4 nani2ratna <nani2ratna@(protected)>

>
> Hi Johannes,
> I saw that one earlier.
> I found the bug.
> I have another property in my action class which is service class.
>
> So i excluded that service class from json.
> Now its working fine.
> I did this one,
> @Actions( {
>        @Action(value = "/JsonAction", results = {
>          @Result(name = "success", type = "json", params =
> {"excludeProperties", "prodmDatPmService"} )
>        })
>       })
>
> But how to exclude more than one property.
>
> Thanks and Regards
> RS
>
>
> nani2ratna wrote:
> >
> > HI,
> >
> > I am trying to get this object
> > List<ProdmProdcat> prodcatList = new ArrayList<prodmProdcat>();
> > ProdmProdcat is a java bean which got two properties.
> > they are String prodcat_code;
> > and String prodcat_desc;
> >
> > Is this object fine.
> >
> > Thanks and Regards
> > RS
> >
> >
> > nani2ratna wrote:
> >>
> >> HI,
> >>
> >> Thank you.
> >> I executed the action.
> >> It gave me the following exception
> >>
> >> java.lang.IllegalAccessException: Class
> >> org.apache.struts2.json.JSONWriter can not access a member of class
> >> org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper
> with
> >> modifiers "public"
> >>    sun.reflect.Reflection.ensureMemberAccess (Reflection.java:65)
> >>    java.lang.reflect.Method.invoke (Method.java:588)
> >>    org.apache.struts2.json.JSONWriter.bean (JSONWriter.java:227)
> >>    org.apache.struts2.json.JSONWriter.process (JSONWriter.java:165)
> >>    org.apache.struts2.json.JSONWriter.value (JSONWriter.java:131)
> >>
> >> Thanks and Regards
> >> RS
> >>
> >>
> >>
> >> Johannes Geppert wrote:
> >>>
> >>> you can just execute your action like a normal action.
> >>>
> >>> http://localhost:8080/app/json.action
> >>>
> >>> The result should be a normal textfile which you can open
> >>> with notepad or whatever you want.
> >>>
> >>> Also you can use Firebug "Network/XHR" to see your action response
> >>>
> >>> Best Regards
> >>>
> >>> Johannes Geppert
> >>>
> >>>
> >>> nani2ratna wrote:
> >>>>
> >>>> Hi Johanes,
> >>>>
> >>>> Thanks for reply.
> >>>> Actually I am very new to JSON.
> >>>> Action is working fine.
> >>>>
> >>>> I went through your code and redid the same type stuff in my app.
> >>>> I don't know about JSON reponse.
> >>>> Since in your action class there no result(jsp) mapped.
> >>>> So I too did the same. I am just executing the action method. And I
> >>>> don't know how to send response.
> >>>>
> >>>> Can you please explain or send me some links.
> >>>> So i can read and do that.
> >>>>
> >>>> Thanks in advance
> >>>> RS
> >>>>
> >>>>
> >>>>
> >>>> Johannes Geppert wrote:
> >>>>>
> >>>>> Hello,
> >>>>>
> >>>>> did your JSON Actions works fine?
> >>>>>
> >>>>> Check if you really get an JSON response and the
> >>>>> variables inside the result have the same name.
> >>>>>
> >>>>> Can you please POST your result with sample data?
> >>>>>
> >>>>> Best Regards
> >>>>>
> >>>>> Johannes Geppert
> >>>>>
> >>>>>
> >>>>> nani2ratna wrote:
> >>>>>>
> >>>>>> Hi,
> >>>>>>
> >>>>>> I am trying to use http://code.google.com/p/struts2-jquery/ for
> >>>>>> loading select box.
> >>>>>> I just followed this link
> >>>>>> http://www.weinfreund.de/struts2-jquery-showcase/index.action#.
> >>>>>>
> >>>>>> Every thing is executing fine.
> >>>>>> But the list not loading properly.
> >>>>>> I am new to JSON.
> >>>>>>
> >>>>>> I changed below jsp page which was working fine with normal select
> >>>>>> box.
> >>>>>>
> >>>>>> my code is
> >>>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>
> >>>
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/Struts2-JQuery-select-box-tp27780125p27782386.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_205268.ezm (zipped)


nani2ratna wrote:
>
> But sj:select is not working like s:select.
> If i use normal struts 2 select, values are loading normally.
> But sj:select loading after all the elements in the jsp page rendered
> completely.
>
The Content is loaded via AJAX, and this was executed when the DOM is ready.


nani2ratna wrote:
>
> Another one, while loading the elements I am presetting the value of list
> to some value using value attribute.
> This one working is fine in s:select.
> But not working with sj:select.
>
http://code.google.com/p/struts2-jquery/issues/detail?id=107

This should be fixed in next version.

Best Regards

Johannes Geppert

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

--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_205269.ezm (zipped)

Thanks you very much Johannes.
Can you tell me when the next version might be released.


Thanks and Regards
RS



Johannes Geppert wrote:
>
>
> nani2ratna wrote:
>>
>> But sj:select is not working like s:select.
>> If i use normal struts 2 select, values are loading normally.
>> But sj:select loading after all the elements in the jsp page rendered
>> completely.
>>
> The Content is loaded via AJAX, and this was executed when the DOM is
> ready.
>
>
> nani2ratna wrote:
>>
>> Another one, while loading the elements I am presetting the value of list
>> to some value using value attribute.
>> This one working is fine in s:select.
>> But not working with sj:select.
>>
> http://code.google.com/p/struts2-jquery/issues/detail?id=107
>
> This should be fixed in next version.
>
> Best Regards
>
> Johannes Geppert
>

--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_205271.ezm (zipped)

some days after jquery UI 1.8 is final.

Best Regards

Johannes Geppert


nani2ratna wrote:
>
> Thanks you very much Johannes.
> Can you tell me when the next version might be released.
>


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

--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_205270.ezm (zipped)
Hi All,
 
   I'm currently using Struts2 + Spring(DAO).
 
   Say I have 2 web application, these two application are using file upload functionality. Currently, we are placing same functionality in different projects(coping .jsp, .action and spring dao classes).
 
   I'd like to know similar to wizard in web2.0 where we can share code in different applications, whether this can be achieved using struts2? If possible, can you please give me how to do this without coping code in 2 projects.
 
  Thanks in advance.
 
Regards,
Sharath. 



Attachment: user_205272.ezm (zipped)
Hi Struts users:

I'm wondering if it is possible to pass a parameter inside a s:submit tag.

I'm working with the following form (this is just a sketch) on a webpage, in
which I collect some user data and display a list of elements (let's say
books):

      ___________                 ____________
Name:|___________|      Surname: |____________|


List of Books:

      Title
Author                             Details
--------------------------------------------------------------------------------------------------------------------------------------------
      XYZ                     ABC
<s:submit action="bookDetails" param="bookId">


...

Note: it has to be a submit because if the user enters a name or surname, I
want it to be displayed when the users comes back from the book details
page!

I dont know if this is possible with Struts 2

Thanks in advance

Attachment: user_205275.ezm (zipped)
Sounds like a good use for javascript , not a struts tag.

On 3/5/10, lucas owen <sr.ilustre@(protected):
> Hi Struts users:
>
> I'm wondering if it is possible to pass a parameter inside a s:submit tag.
>
> I'm working with the following form (this is just a sketch) on a webpage, in
> which I collect some user data and display a list of elements (let's say
> books):
>
>       ___________                 ____________
> Name:|___________|      Surname: |____________|
>
>
> List of Books:
>
>       Title
> Author                             Details
> --------------------------------------------------------------------------------------------------------------------------------------------
>        XYZ                     ABC
> <s:submit action="bookDetails" param="bookId">
>
>
> ...
>
> Note: it has to be a submit because if the user enters a name or surname, I
> want it to be displayed when the users comes back from the book details
> page!
>
> I dont know if this is possible with Struts 2
>
> Thanks in advance
>

--
Sent from my mobile device


Attachment: user_205278.ezm (zipped)
Any form textfield will be submitted when page submitted which is
effectively a parameter.

Adam

On 5 Mar 2010, at 19:46, lucas owen <sr.ilustre@(protected):

> Hi Struts users:
>
> I'm wondering if it is possible to pass a parameter inside a
> s:submit tag.
>
> I'm working with the following form (this is just a sketch) on a
> webpage, in
> which I collect some user data and display a list of elements (let's
> say
> books):
>
>       ___________                 ____________
> Name:|___________|      Surname: |____________|
>
>
> List of Books:
>
>       Title
> Author                             Details
> ---
> ---
> ---
> ---
> ---
> ---
> ---
> ---
> ---
> ---
> ---
> ---
> ---
> ---
> ---
> ---
> ---
> ---
> ---
> ---
> ---
> ---
> ---
> ---
> --------------------------------------------------------------------
>       XYZ                     ABC
> <s:submit action="bookDetails" param="bookId">
>
>
> ...
>
> Note: it has to be a submit because if the user enters a name or
> surname, I
> want it to be displayed when the users comes back from the book
> details
> page!
>
> I dont know if this is possible with Struts 2
>
> Thanks in advance


Attachment: user_205280.ezm (zipped)
Of course!!

The problem is I can't use javascript, the application is supposed to work
in any computer, any browser...no matter how old they are

Any suggestions?

2010/3/5 Burton Rhodes <burtonrhodes@(protected)>

> Sounds like a good use for javascript , not a struts tag.
>
> On 3/5/10, lucas owen <sr.ilustre@(protected):
> > Hi Struts users:
> >
> > I'm wondering if it is possible to pass a parameter inside a s:submit
> tag.
> >
> > I'm working with the following form (this is just a sketch) on a webpage,
> in
> > which I collect some user data and display a list of elements (let's say
> > books):
> >
> >       ___________                 ____________
> > Name:|___________|      Surname: |____________|
> >
> >
> > List of Books:
> >
> >       Title
> > Author                             Details
> >
> --------------------------------------------------------------------------------------------------------------------------------------------
> >        XYZ                     ABC
> > <s:submit action="bookDetails" param="bookId">
> >
> >
> > ...
> >
> > Note: it has to be a submit because if the user enters a name or surname,
> I
> > want it to be displayed when the users comes back from the book details
> > page!
> >
> > I dont know if this is possible with Struts 2
> >
> > Thanks in advance
> >
>
> --
> Sent from my mobile device
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_205281.ezm (zipped)
yes, of course...

but imagine you have a list of elements, how do you pass the Id of the
element you want to display in other page with a s:submit???
(I cant use javascript)
2010/3/6 Adam Pinder <apinder@(protected)>

> Any form textfield will be submitted when page submitted which is
> effectively a parameter.
>
> Adam
>
>
> On 5 Mar 2010, at 19:46, lucas owen <sr.ilustre@(protected):
>
> Hi Struts users:
>>
>> I'm wondering if it is possible to pass a parameter inside a s:submit tag.
>>
>> I'm working with the following form (this is just a sketch) on a webpage,
>> in
>> which I collect some user data and display a list of elements (let's say
>> books):
>>
>>      ___________                 ____________
>> Name:|___________|      Surname: |____________|
>>
>>
>> List of Books:
>>
>>      Title
>> Author                             Details
>>
>> --------------------------------------------------------------------------------------------------------------------------------------------
>>       XYZ                     ABC
>> <s:submit action="bookDetails" param="bookId">
>>
>>
>> ...
>>
>> Note: it has to be a submit because if the user enters a name or surname,
>> I
>> want it to be displayed when the users comes back from the book details
>> page!
>>
>> I dont know if this is possible with Struts 2
>>
>> Thanks in advance
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_205273.ezm (zipped)

Hi all,

The only part that I hate most is validation in struts 2. Rest of the things
falls in right place.

When client side validations happens and the validation messages have to be
displayed in the page that need to be determined form the action., i.e
redirect-action on INPUT.

Here is the example what I am trying to do.

<action name="complete" class="com.xyz">
 <result name="success" type="tiles">abc.jsp</result>
 <result name="input" type="redirect-action">
    cnn
  </result>
</action>

<action name="cnn" class="com.xyz">
<result name="nbc" type="tiles">nbc.jsp</result>
<result name="gma" type="tiles>gma.jsp</result>
</action>

When I click complete button by entering some garbage(validating) values
following steps happens,

1. getter ,setter methods will be called
2. validation check than happen
3. validation message can be capture in a session , so that it can be
forwarded to the action using the following interceptor
http://struts.apache.org/2.1.8.1/docs/message-store-interceptor.html
http://glindholm.wordpress.com/category/struts-2/
4. I can able to display the validations messages but the problem is all the
garbage values that I enter will not be display back in the respective input
fields.

I know i have this post many a times in this forum, but still I didn't got
the concreate solution for this.

Do any one body have any idea how can we populate back the values, or is
there any interceptor that store the request values and forwards the request
values for the another action.

I tried several temporary solutions,
i) by storing the request values in the tempsession variable and the copying
back in the another request.
ii) by trying chaining the request (chain interceptor )
iii) by implementing the preparable interface , prepare method.
vi) by impelenting prepareDoMethod....().

Any thoughts or prior experience please share .

Thanks
Siddiq.
--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_205277.ezm (zipped)
You don't redirect on validation errors.
A jsp page form is associated with an action, the same jsp is
displayed on validation errors then the action and jsp will re-
display the erroneous values automatically. Redirect on success is
more common.

Adam

On 5 Mar 2010, at 21:37, Siddiq Syed <siddiq_sa@(protected):

>
> Hi all,
>
> The only part that I hate most is validation in struts 2. Rest of
> the things
> falls in right place.
>
> When client side validations happens and the validation messages
> have to be
> displayed in the page that need to be determined form the action., i.e
> redirect-action on INPUT.
>
> Here is the example what I am trying to do.
>
> <action name="complete" class="com.xyz">
>  <result name="success" type="tiles">abc.jsp</result>
>  <result name="input" type="redirect-action">
>     cnn
>   </result>
> </action>
>
> <action name="cnn" class="com.xyz">
> <result name="nbc" type="tiles">nbc.jsp</result>
> <result name="gma" type="tiles>gma.jsp</result>
> </action>
>
> When I click complete button by entering some garbage(validating)
> values
> following steps happens,
>
> 1. getter ,setter methods will be called
> 2. validation check than happen
> 3. validation message can be capture in a session , so that it can be
> forwarded to the action using the following interceptor
> http://struts.apache.org/2.1.8.1/docs/message-store-interceptor.html
> http://glindholm.wordpress.com/category/struts-2/
> 4. I can able to display the validations messages but the problem is
> all the
> garbage values that I enter will not be display back in the
> respective input
> fields.
>
> I know i have this post many a times in this forum, but still I
> didn't got
> the concreate solution for this.
>
> Do any one body have any idea how can we populate back the values,
> or is
> there any interceptor that store the request values and forwards the
> request
> values for the another action.
>
> I tried several temporary solutions,
> i) by storing the request values in the tempsession variable and the
> copying
> back in the another request.
> ii) by trying chaining the request (chain interceptor )
> iii) by implementing the preparable interface , prepare method.
> vi) by impelenting prepareDoMethod....().
>
> Any thoughts or prior experience please share .
>
> Thanks
> Siddiq.
> --
> View this message in context: http://old.nabble.com/Struts-2-Validations-values-restore.-tp27799499p27799499.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


Attachment: user_205279.ezm (zipped)



adam pinder wrote:
>
> You don't redirect on validation errors.
> A jsp page form is associated with an action, the same jsp is
> displayed on validation errors then the action and jsp will re-
> display the erroneous values automatically. Redirect on success is
> more common.
>
> Adam
>
> On 5 Mar 2010, at 21:37, Siddiq Syed <siddiq_sa@(protected):
>
>>
>> Hi all,
>>
>> The only part that I hate most is validation in struts 2. Rest of
>> the things
>> falls in right place.
>>
>> When client side validations happens and the validation messages
>> have to be
>> displayed in the page that need to be determined form the action., i.e
>> redirect-action on INPUT.
>>
>> Here is the example what I am trying to do.
>>
>> <action name="complete" class="com.xyz">
>>  <result name="success" type="tiles">abc.jsp</result>
>>  <result name="input" type="redirect-action">
>>     cnn
>>   </result>
>> </action>
>>
>> <action name="cnn" class="com.xyz">
>> <result name="nbc" type="tiles">nbc.jsp</result>
>> <result name="gma" type="tiles>gma.jsp</result>
>> </action>
>>
>> When I click complete button by entering some garbage(validating)
>> values
>> following steps happens,
>>
>> 1. getter ,setter methods will be called
>> 2. validation check than happen
>> 3. validation message can be capture in a session , so that it can be
>> forwarded to the action using the following interceptor
>> http://struts.apache.org/2.1.8.1/docs/message-store-interceptor.html
>> http://glindholm.wordpress.com/category/struts-2/
>> 4. I can able to display the validations messages but the problem is
>> all the
>> garbage values that I enter will not be display back in the
>> respective input
>> fields.
>>
>> I know i have this post many a times in this forum, but still I
>> didn't got
>> the concreate solution for this.
>>
>> Do any one body have any idea how can we populate back the values,
>> or is
>> there any interceptor that store the request values and forwards the
>> request
>> values for the another action.
>>
>> I tried several temporary solutions,
>> i) by storing the request values in the tempsession variable and the
>> copying
>> back in the another request.
>> ii) by trying chaining the request (chain interceptor )
>> iii) by implementing the preparable interface , prepare method.
>> vi) by impelenting prepareDoMethod....().
>>
>> Any thoughts or prior experience please share .
>>
>> Thanks
>> Siddiq.
>> --
>> View this message in context:
>> http://old.nabble.com/Struts-2-Validations-values-restore.-tp27799499p27799499.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_205274.ezm (zipped)
Besides specifying the bundle attribute on the menu:useDisplayer tag, is
there any other way to translate the text from menu-config.xml with
struts2? If I specify the bundle as "applicationMessages", it works but
always translates to English rather than the other languages such as
german. How can get it to work with struts2?




Attachment: user_205276.ezm (zipped)
Looks like I have to specify two attributes on the tag:

bundle="applicationMessages"
locale="WW_TRANS_I18N_LOCALE"

By doing this allows struts-menu to work with the Struts2
internationalization support.

Chris

> -----Original Message-----
> From: CRANFORD, CHRIS [mailto:Chris.Cranford@(protected)]
> Sent: Friday, March 05, 2010 4:08 PM
> To: Struts Users Mailing List
> Subject: Struts-Menu & Struts2
>
> Besides specifying the bundle attribute on the menu:useDisplayer tag,
is
> there any other way to translate the text from menu-config.xml with
> struts2? If I specify the bundle as "applicationMessages", it works
but
> always translates to English rather than the other languages such as
> german. How can get it to work with struts2?



Attachment: user_205282.ezm (zipped)
I already had tried with sx:submit but I got the same problem

On Fri, Mar 5, 2010 at 2:45 PM, Johannes Geppert <jogep@(protected):

>
> i think you must use
>
> <sx:submit targets="contentDiv"/>
>
>
> instead of
>
> <s:submit targets="contentDiv"/>
>
> Best Regards
>
> Johannes Geppert
>
>
> mccorby wrote:
> >
> > Hi all,
> > All the forms in my application redirect to the the action associated
> > instead of the target div.
> >
> > I'm using Struts 2.1.6
> >
> > Here is the code:
> >
> > <s:form id="loginForm" namespace="/" action="Login" method="post" >
> >   <s:textfield name="name" />
> >   <s:submit targets="contentDiv"/>
> > </s:form>
> >
> > I also try with
> > <s:submit targets="contentDiv" notifyTopics="show_contentDiv_topic"/>
> >
> > having
> >
> > <sx:div id="contentDiv" listenTopics="show_contenDiv_topic">
> > </sx:div>
> >
> > Doing it using <sx:a> works but it's not what I'm looking for.
> >
> > <sx:head/> is defined in the pages
> >
> > Thanks
> >
> >
>
>
> -----
> ---
> web: http://www.jgeppert.com
> twitter: http://twitter.com/jogep
>
> --
> View this message in context:
> http://old.nabble.com/Form-submit-always-redirects-to-the-action-page-instead-of-the-target--div-tp27790299p27790804.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_205283.ezm (zipped)

my company is distributor, we plan to provide platform for our customer(different store) to sell their product to indivual customers.
 
http://www.xyz.om/store1
http://www.xyz.com/store2
http://www.xyz.com/store3
...
http://www.xyz.com/storeN
 
(store1...storeN) list our(distributor)'s product to their customer, when customer see the display price, the display price=our price(base price)+storeX's margin
 
my question is the following
 
a. in the struts.xml, different store should have different package defination ?
 
b. in the application, what is the struts2's method to detect which store? in other words, how can i detect which link(http://www.xyz.om/store1 or store2 or store3) is pass in ? without knowing which store is called, i can not call special routine(could be price cal, ...) associated with that store.
 
any good idea to approach this?
 
tks in advance
 
john



Attachment: user_205284.ezm (zipped)
John, you can use namespaces at the package level to distinguish your stores.
You can also do that in a rest way, like http://www.xyz.com/store/1.

Cimballi


On Sat, Mar 6, 2010 at 11:18 PM, john lee <sh_thorn_bird@(protected):
>
> my company is distributor, we plan to provide platform for our customer(different store) to sell their product to indivual customers.
>
> http://www.xyz.om/store1
> http://www.xyz.com/store2
> http://www.xyz.com/store3
> ...
> http://www.xyz.com/storeN
>
> (store1...storeN) list our(distributor)'s product to their customer, when customer see the display price, the display price=our price(base price)+storeX's margin
>
> my question is the following
>
> a. in the struts.xml, different store should have different package defination ?
>
> b. in the application, what is the struts2's method to detect which store? in other words, how can i detect which link(http://www.xyz.om/store1 or store2 or store3) is pass in ? without knowing which store is called, i can not call special routine(could be price cal, ...) associated with that store.
>
> any good idea to approach this?
>
> tks in advance
>
> john
>
>
>


Attachment: user_205285.ezm (zipped)
Hi All,
You can also have N applications representing stores under names store1..storeN,
where one application just knows about itself and all applications are
identical in code but different in data and css maybe.

Best greetings,
Paweł Wielgus.


2010/3/7 Cimballi <cimballi.cimballi@(protected)>:
> John, you can use namespaces at the package level to distinguish your stores.
> You can also do that in a rest way, like http://www.xyz.com/store/1.
>
> Cimballi
>
>
> On Sat, Mar 6, 2010 at 11:18 PM, john lee <sh_thorn_bird@(protected):
>>
>> my company is distributor, we plan to provide platform for our customer(different store) to sell their product to indivual customers.
>>
>> http://www.xyz.om/store1
>> http://www.xyz.com/store2
>> http://www.xyz.com/store3
>> ...
>> http://www.xyz.com/storeN
>>
>> (store1...storeN) list our(distributor)'s product to their customer, when customer see the display price, the display price=our price(base price)+storeX's margin
>>
>> my question is the following
>>
>> a. in the struts.xml, different store should have different package defination ?
>>
>> b. in the application, what is the struts2's method to detect which store? in other words, how can i detect which link(http://www.xyz.om/store1 or store2 or store3) is pass in ? without knowing which store is called, i can not call special routine(could be price cal, ...) associated with that store.
>>
>> any good idea to approach this?
>>
>> tks in advance
>>
>> john
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

©2008 gg3721.com - Jax Systems, LLC, U.S.A.