Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 15 Aug 2008 12:54:40 -0000 Issue 8194

user-digest-help

2008-08-15


Author LoginPost Reply

user Digest 15 Aug 2008 12:54:40 -0000 Issue 8194

Topics (messages 190049 through 190071):

Re: Problem with Struts2 tag
 190049 by: dynamicd
 190050 by: Musachy Barroso
 190061 by: rajanikanth786.aol.com

Re: [S2]Validation with xml file not working
 190051 by: "Stephan Schröder"
 190052 by: Martin Gainty
 190053 by: Dave Newton
 190059 by: "Stephan Schröder"
 190066 by: Ylva Degerfeldt
 190067 by: Torsten Krah
 190068 by: Ylva Degerfeldt

Validation referencing problem, using annotations
 190054 by: dug .

Re: Struts2 Portlet - pre/post render, pre/post action hooks?
 190055 by: Nils-Helge Garli Hegvik
 190063 by: Torsten Krah
 190069 by: Nils-Helge Garli Hegvik

Session ID
 190056 by: Hrvoje Ban
 190058 by: Chris Pratt
 190060 by: Hrvoje Ban
 190062 by: rajanikanth786.aol.com
 190065 by: rajanikanth786.aol.com
 190070 by: "Stephan Schröder"

Re: Problems with sx tags
 190057 by: Jeromy Evans

Datetimepicker conversion problem
 190064 by: JC Oosthuizen

Disabling input based on other input with Struts/javascript
 190071 by: DominicGarda

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_190049.ezm (zipped)

have u tried
<sx:autocompleter list="practiceList" name="emailList" onclick
="javascript:getData();"/>




rajanikanth786 wrote:
>
>
> Hi,
>
>
>
>
>
> In <sx:autocompleter> tag in struts2, i am unable to call any javascript
> event(functions).
>
>
>
>
>
> for example,
>
>
> <sx:autocompleter list="practiceList" name="emailList" onclick
> ="getData();"/>
>
>
>
>
>
>
> and in the getData() function i am just checking with one alert message.
>
>
>
>
>
>
> I want to know whether any javascript function we can use for
> <sx:autocompleter>.
>
>
>
>
>
>
>
>
> Thanks & Regards,
>
>
> RajaniKanth Teppala.
>
>
> rajanikanth786@(protected)
>
>

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


Attachment: user_190050.ezm (zipped)
Try to use the topics instead, check the documentation.

On 8/14/08, dynamicd <dhaval.parekh@(protected):
>
> have u tried
> <sx:autocompleter list="practiceList" name="emailList" onclick
> ="javascript:getData();"/>
>
>
>
>
> rajanikanth786 wrote:
>>
>>
>> Hi,
>>
>>
>>
>>
>>
>> In <sx:autocompleter> tag in struts2, i am unable to call any javascript
>> event(functions).
>>
>>
>>
>>
>>
>> for example,
>>
>>
>> <sx:autocompleter list="practiceList" name="emailList" onclick
>> ="getData();"/>
>>
>>
>>
>>
>>
>>
>> and in the getData() function i am just checking with one alert message.
>>
>>
>>
>>
>>
>>
>> I want to know whether any javascript function we can use for
>> <sx:autocompleter>.
>>
>>
>>
>>
>>
>>
>>
>>
>> Thanks & Regards,
>>
>>
>> RajaniKanth Teppala.
>>
>>
>> rajanikanth786@(protected)
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Problem-with-Struts2--tag-tp18983721p18989448.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)
>
>


--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment: user_190061.ezm (zipped)

Hi,
? With struts2 <sx:autocompleter> tag im unable to call javascript function, eventhough i called like this. But javascript is not invoked.

<sx:autocompleter list="practiceList" name="emailList" onclick
="javascript:getData();"/>

I want to know whether any javascript function we can use for <sx:autocompleter>.



Thanks & Regards,
RajaniKanth Teppala.








Attachment: user_190051.ezm (zipped)
> What could it be?

i don't know which interceptors are on your default stack. Does 'workflow' come after 'validation'?

/Stephan

-------- Original-Nachricht --------
> Datum: Thu, 14 Aug 2008 18:20:33 +0200
> Von: "Ylva Degerfeldt" <ylva.degerfeldt@(protected)>
> An: "Struts Users Mailing List" <user@(protected)>
> Betreff: Re: [S2]Validation with xml file not working

> Lukasz, I'm not sure how to check the deployment but I was thinking
> that too. (I'm using NetBeans 5.5.1 and Sun App. server.)
>
> André, it's funny you should mention that because I just changed the
> name From .....-validation.xml to ....-validations.xml because they
> must have misspelled it in one place in the "Struts 2 in Action" book,
> so I thought that was the correct way since the name without the s
> gives me this exception:
>
> java.lang.IllegalArgumentException: URI is not hierarchical
>
> At least I know it has nothing to do with that I'm uploading a file
> from a form, 'cause that part works fine. It's something about the
> validation. What could it be?
>
> /y
>
> On Thu, Aug 14, 2008 at 6:04 PM, André Cedik | GDG
> <a.cedik@(protected):
> > Maybe it's just because of the misspelling.
> > If you'd like to do validation this way,
> > your xml-file should be named
> > "NameAndCvAction-validation.xml" without
> > the "s" at the end.
> >
> >
> > Ylva Degerfeldt wrote:
> >> Hi everyone,
> >>
> >> I'm trying to use the Validation framework by creating a file called
> >> NameAndCvAction-validations.xml, for my action "NameAndCvAction", but
> >> it's not working the way it should.
> >> I've stepped through the code and it seems that the validations that
> >> should have been made through the xml file just don't happen.
> >>
> >> When, for instance, I've tried to deliberately leave some fields empty
> >> (which the validator should have noticed), the execute method is still
> >> invoked. This shouldn't happen when there are validation errors,
> >> right?
> >>
> >> I've put the validation xml file in the same directory (and package)
> >> as the corresponding action, but it seems that Struts 2 can't find it
> >> anyway. What am I doing wrong?
> >>
> >> This is the declaration of my action in struts.xml:
> >> .....
> >> <action name = "NameAndCvAction" class =
> "Web.StrutsActions.NameAndCvAction">
> >>         <result>/showSkills.jsp</result>
> >>         <result name = "input">/NameAndCv.jsp</result>
> >> </action>
> >> ....
> >> (This belongs to a package that extends struts-default)
> >>
> >> By the way, I'm also using simple validation which works without
> >> problems. (But I'd like to know how to use the validation framework
> >> "the harder way" too.)
> >>
> >> Can somebody please help me?
> >>
> >> Thanks in advance!
> >>
> >> /Ylva
> >>
> >> ---------------------------------------------------------------------
> >> 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)
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)

--
GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry Passion!
http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196

Attachment: user_190052.ezm (zipped)

yes .. vanilla config from struts-default.xml

  <!-- Sample validation and workflow stack -->
       <interceptor-stack name="validationWorkflowStack">
          <interceptor-ref name="basicStack"/>
          <interceptor-ref name="validation"/>
          <interceptor-ref name="workflow"/>
       </interceptor-stack>

HTH
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.


> Date: Fri, 15 Aug 2008 00:22:01 +0200
> From: simon.void@(protected)
> Subject: Re: [S2]Validation with xml file not working
> To: user@(protected)
>
> > What could it be?
>
> i don't know which interceptors are on your default stack. Does 'workflow' come after 'validation'?
>
> /Stephan
>
> -------- Original-Nachricht --------
> > Datum: Thu, 14 Aug 2008 18:20:33 +0200
> > Von: "Ylva Degerfeldt" <ylva.degerfeldt@(protected)>
> > An: "Struts Users Mailing List" <user@(protected)>
> > Betreff: Re: [S2]Validation with xml file not working
>
> > Lukasz, I'm not sure how to check the deployment but I was thinking
> > that too. (I'm using NetBeans 5.5.1 and Sun App. server.)
> >
> > André, it's funny you should mention that because I just changed the
> > name From .....-validation.xml to ....-validations.xml because they
> > must have misspelled it in one place in the "Struts 2 in Action" book,
> > so I thought that was the correct way since the name without the s
> > gives me this exception:
> >
> > java.lang.IllegalArgumentException: URI is not hierarchical
> >
> > At least I know it has nothing to do with that I'm uploading a file
> > from a form, 'cause that part works fine. It's something about the
> > validation. What could it be?
> >
> > /y
> >
> > On Thu, Aug 14, 2008 at 6:04 PM, André Cedik | GDG
> > <a.cedik@(protected):
> > > Maybe it's just because of the misspelling.
> > > If you'd like to do validation this way,
> > > your xml-file should be named
> > > "NameAndCvAction-validation.xml" without
> > > the "s" at the end.
> > >
> > >
> > > Ylva Degerfeldt wrote:
> > >> Hi everyone,
> > >>
> > >> I'm trying to use the Validation framework by creating a file called
> > >> NameAndCvAction-validations.xml, for my action "NameAndCvAction", but
> > >> it's not working the way it should.
> > >> I've stepped through the code and it seems that the validations that
> > >> should have been made through the xml file just don't happen.
> > >>
> > >> When, for instance, I've tried to deliberately leave some fields empty
> > >> (which the validator should have noticed), the execute method is still
> > >> invoked. This shouldn't happen when there are validation errors,
> > >> right?
> > >>
> > >> I've put the validation xml file in the same directory (and package)
> > >> as the corresponding action, but it seems that Struts 2 can't find it
> > >> anyway. What am I doing wrong?
> > >>
> > >> This is the declaration of my action in struts.xml:
> > >> .....
> > >> <action name = "NameAndCvAction" class =
> > "Web.StrutsActions.NameAndCvAction">
> > >>         <result>/showSkills.jsp</result>
> > >>         <result name = "input">/NameAndCv.jsp</result>
> > >> </action>
> > >> ....
> > >> (This belongs to a package that extends struts-default)
> > >>
> > >> By the way, I'm also using simple validation which works without
> > >> problems. (But I'd like to know how to use the validation framework
> > >> "the harder way" too.)
> > >>
> > >> Can somebody please help me?
> > >>
> > >> Thanks in advance!
> > >>
> > >> /Ylva
> > >>
> > >> ---------------------------------------------------------------------
> > >> 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)
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
>
> --
> GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry Passion!
> http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>

_________________________________________________________________
Your PC, mobile phone, and online services work together like never before.
http://clk.atdmt.com/MRT/go/108587394/direct/01/

Attachment: user_190053.ezm (zipped)
I think he was asking the original poster if *his* stack included those interceptors in the correct order, since it's his validation that isn't working properly.

Dave

--- On Thu, 8/14/08, Martin Gainty <mgainty@(protected):
> yes .. vanilla config from struts-default.xml
>
>    <!-- Sample validation and workflow stack -->
>         <interceptor-stack
> name="validationWorkflowStack">
>           <interceptor-ref
> name="basicStack"/>
>           <interceptor-ref
> name="validation"/>
>           <interceptor-ref
> name="workflow"/>
>         </interceptor-stack>
>
> HTH
> Martin
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to
> the official business of Sender. This transmission is of a
> confidential nature and Sender does not endorse distribution
> to any party other than intended recipient. Sender does not
> necessarily endorse content contained within this
> transmission.
>
>
> > Date: Fri, 15 Aug 2008 00:22:01 +0200
> > From: simon.void@(protected)
> > Subject: Re: [S2]Validation with xml file not working
> > To: user@(protected)
> >
> > > What could it be?
> >
> > i don't know which interceptors are on your
> default stack. Does 'workflow' come after
> 'validation'?
> >
> > /Stephan
> >
> > -------- Original-Nachricht --------
> > > Datum: Thu, 14 Aug 2008 18:20:33 +0200
> > > Von: "Ylva Degerfeldt"
> <ylva.degerfeldt@(protected)>
> > > An: "Struts Users Mailing List"
> <user@(protected)>
> > > Betreff: Re: [S2]Validation with xml file not
> working
> >
> > > Lukasz, I'm not sure how to check the
> deployment but I was thinking
> > > that too. (I'm using NetBeans 5.5.1 and Sun
> App. server.)
> > >
> > > André, it's funny you should mention that
> because I just changed the
> > > name From .....-validation.xml to
> ....-validations.xml because they
> > > must have misspelled it in one place in the
> "Struts 2 in Action" book,
> > > so I thought that was the correct way since the
> name without the s
> > > gives me this exception:
> > >
> > > java.lang.IllegalArgumentException: URI is not
> hierarchical
> > >
> > > At least I know it has nothing to do with that
> I'm uploading a file
> > > from a form, 'cause that part works fine.
> It's something about the
> > > validation. What could it be?
> > >
> > > /y
> > >
> > > On Thu, Aug 14, 2008 at 6:04 PM, André Cedik |
> GDG
> > > <a.cedik@(protected):
> > > > Maybe it's just because of the
> misspelling.
> > > > If you'd like to do validation this way,
> > > > your xml-file should be named
> > > > "NameAndCvAction-validation.xml"
> without
> > > > the "s" at the end.
> > > >
> > > >
> > > > Ylva Degerfeldt wrote:
> > > >> Hi everyone,
> > > >>
> > > >> I'm trying to use the Validation
> framework by creating a file called
> > > >> NameAndCvAction-validations.xml, for my
> action "NameAndCvAction", but
> > > >> it's not working the way it should.
> > > >> I've stepped through the code and it
> seems that the validations that
> > > >> should have been made through the xml
> file just don't happen.
> > > >>
> > > >> When, for instance, I've tried to
> deliberately leave some fields empty
> > > >> (which the validator should have
> noticed), the execute method is still
> > > >> invoked. This shouldn't happen when
> there are validation errors,
> > > >> right?
> > > >>
> > > >> I've put the validation xml file in
> the same directory (and package)
> > > >> as the corresponding action, but it
> seems that Struts 2 can't find it
> > > >> anyway. What am I doing wrong?
> > > >>
> > > >> This is the declaration of my action in
> struts.xml:
> > > >> .....
> > > >> <action name =
> "NameAndCvAction" class =
> > > "Web.StrutsActions.NameAndCvAction">
> > > >>        
> <result>/showSkills.jsp</result>
> > > >>         <result name =
> "input">/NameAndCv.jsp</result>
> > > >> </action>
> > > >> ....
> > > >> (This belongs to a package that extends
> struts-default)
> > > >>
> > > >> By the way, I'm also using simple
> validation which works without
> > > >> problems. (But I'd like to know how
> to use the validation framework
> > > >> "the harder way" too.)
> > > >>
> > > >> Can somebody please help me?
> > > >>
> > > >> Thanks in advance!
> > > >>
> > > >> /Ylva
> > > >>
> > > >>
> ---------------------------------------------------------------------
> > > >> 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)
> > > >
> > > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> user-unsubscribe@(protected)
> > > For additional commands, e-mail:
> user-help@(protected)
> >
> > --
> > GMX Kostenlose Spiele: Einfach online spielen und
> Spaß haben mit Pastry Passion!
> >
> http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@(protected)
> > For additional commands, e-mail:
> user-help@(protected)
> >
>
> _________________________________________________________________
> Your PC, mobile phone, and online services work together
> like never before.
> http://clk.atdmt.com/MRT/go/108587394/direct/01/

Attachment: user_190059.ezm (zipped)

actually, now i have the same problem (or a variation of it) :-)

I develop under Vista with eclipse. When i deploy the webapp from eclipse (to Tomcat6) validation works fine. But when i export to war-file and deploy it on my xubuntu laptop with Tomcat6, validation is omitted. The validation-files are present in the war-file. Could this be because of a different xml file encoding? (On vista it's UTF8. I have no idea what Tomcat6 expects but UTF8 sounds reasonable.)

-------- Original-Nachricht --------
> Datum: Thu, 14 Aug 2008 18:38:02 -0700 (PDT)
> Von: Dave Newton <newton.dave@(protected)>
> An: Struts Users Mailing List <user@(protected)>
> Betreff: RE: [S2]Validation with xml file not working

> I think he was asking the original poster if *his* stack included those
> interceptors in the correct order, since it's his validation that isn't
> working properly.
>
> Dave
>
> --- On Thu, 8/14/08, Martin Gainty <mgainty@(protected):
> > yes .. vanilla config from struts-default.xml
> >
> >    <!-- Sample validation and workflow stack -->
> >         <interceptor-stack
> > name="validationWorkflowStack">
> >           <interceptor-ref
> > name="basicStack"/>
> >           <interceptor-ref
> > name="validation"/>
> >           <interceptor-ref
> > name="workflow"/>
> >         </interceptor-stack>
> >
> > HTH
> > Martin
> >
> >
> > > Date: Fri, 15 Aug 2008 00:22:01 +0200
> > > From: simon.void@(protected)
> > > Subject: Re: [S2]Validation with xml file not working
> > > To: user@(protected)
> > >
> > > > What could it be?
> > >
> > > i don't know which interceptors are on your
> > default stack. Does 'workflow' come after
> > 'validation'?
> > >
> > > /Stephan
> > >
> > > -------- Original-Nachricht --------
> > > > Datum: Thu, 14 Aug 2008 18:20:33 +0200
> > > > Von: "Ylva Degerfeldt"
> > <ylva.degerfeldt@(protected)>
> > > > An: "Struts Users Mailing List"
> > <user@(protected)>
> > > > Betreff: Re: [S2]Validation with xml file not
> > working
> > >
> > > > Lukasz, I'm not sure how to check the
> > deployment but I was thinking
> > > > that too. (I'm using NetBeans 5.5.1 and Sun
> > App. server.)
> > > >
> > > > André, it's funny you should mention that
> > because I just changed the
> > > > name From .....-validation.xml to
> > ....-validations.xml because they
> > > > must have misspelled it in one place in the
> > "Struts 2 in Action" book,
> > > > so I thought that was the correct way since the
> > name without the s
> > > > gives me this exception:
> > > >
> > > > java.lang.IllegalArgumentException: URI is not
> > hierarchical
> > > >
> > > > At least I know it has nothing to do with that
> > I'm uploading a file
> > > > from a form, 'cause that part works fine.
> > It's something about the
> > > > validation. What could it be?
> > > >
> > > > /y
> > > >
> > > > On Thu, Aug 14, 2008 at 6:04 PM, André Cedik |
> > GDG
> > > > <a.cedik@(protected):
> > > > > Maybe it's just because of the
> > misspelling.
> > > > > If you'd like to do validation this way,
> > > > > your xml-file should be named
> > > > > "NameAndCvAction-validation.xml"
> > without
> > > > > the "s" at the end.
> > > > >
> > > > >
> > > > > Ylva Degerfeldt wrote:
> > > > >> Hi everyone,
> > > > >>
> > > > >> I'm trying to use the Validation
> > framework by creating a file called
> > > > >> NameAndCvAction-validations.xml, for my
> > action "NameAndCvAction", but
> > > > >> it's not working the way it should.
> > > > >> I've stepped through the code and it
> > seems that the validations that
> > > > >> should have been made through the xml
> > file just don't happen.
> > > > >>
> > > > >> When, for instance, I've tried to
> > deliberately leave some fields empty
> > > > >> (which the validator should have
> > noticed), the execute method is still
> > > > >> invoked. This shouldn't happen when
> > there are validation errors,
> > > > >> right?
> > > > >>
> > > > >> I've put the validation xml file in
> > the same directory (and package)
> > > > >> as the corresponding action, but it
> > seems that Struts 2 can't find it
> > > > >> anyway. What am I doing wrong?
> > > > >>
> > > > >> This is the declaration of my action in
> > struts.xml:
> > > > >> .....
> > > > >> <action name =
> > "NameAndCvAction" class =
> > > > "Web.StrutsActions.NameAndCvAction">
> > > > >>        
> > <result>/showSkills.jsp</result>
> > > > >>         <result name =
> > "input">/NameAndCv.jsp</result>
> > > > >> </action>
> > > > >> ....
> > > > >> (This belongs to a package that extends
> > struts-default)
> > > > >>
> > > > >> By the way, I'm also using simple
> > validation which works without
> > > > >> problems. (But I'd like to know how
> > to use the validation framework
> > > > >> "the harder way" too.)
> > > > >>
> > > > >> Can somebody please help me?
> > > > >>
> > > > >> Thanks in advance!
> > > > >>
> > > > >> /Ylva



--
GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry Passion!
http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196

Attachment: user_190066.ezm (zipped)
About the interceptors on the default stack I don't know how to check
that since it's built in. But "Struts in Action" says that in the
struts-default.xml, the validation interceptor comes before the
workflow interceptor. And I don't think that's the problem anyway
since simple validation is working.

It's just this weird "URI is not hierarchical" exception which happens
(among other places) in ValidatorFactory.parseValidators

Anyone who has any ideas why this is happening?

Stephan, are you getting this exception too?

/Ylva

On Fri, Aug 15, 2008 at 10:15 AM, "Stephan Schröder" <simon.void@(protected):
>
> actually, now i have the same problem (or a variation of it) :-)
>
> I develop under Vista with eclipse. When i deploy the webapp from eclipse (to Tomcat6) validation works fine. But when i export to war-file and deploy it on my xubuntu laptop with Tomcat6, validation is omitted. The validation-files are present in the war-file. Could this be because of a different xml file encoding? (On vista it's UTF8. I have no idea what Tomcat6 expects but UTF8 sounds reasonable.)
>
> -------- Original-Nachricht --------
>> Datum: Thu, 14 Aug 2008 18:38:02 -0700 (PDT)
>> Von: Dave Newton <newton.dave@(protected)>
>> An: Struts Users Mailing List <user@(protected)>
>> Betreff: RE: [S2]Validation with xml file not working
>
>> I think he was asking the original poster if *his* stack included those
>> interceptors in the correct order, since it's his validation that isn't
>> working properly.
>>
>> Dave
>>
>> --- On Thu, 8/14/08, Martin Gainty <mgainty@(protected):
>> > yes .. vanilla config from struts-default.xml
>> >
>> >    <!-- Sample validation and workflow stack -->
>> >         <interceptor-stack
>> > name="validationWorkflowStack">
>> >           <interceptor-ref
>> > name="basicStack"/>
>> >           <interceptor-ref
>> > name="validation"/>
>> >           <interceptor-ref
>> > name="workflow"/>
>> >         </interceptor-stack>
>> >
>> > HTH
>> > Martin
>> >
>> >
>> > > Date: Fri, 15 Aug 2008 00:22:01 +0200
>> > > From: simon.void@(protected)
>> > > Subject: Re: [S2]Validation with xml file not working
>> > > To: user@(protected)
>> > >
>> > > > What could it be?
>> > >
>> > > i don't know which interceptors are on your
>> > default stack. Does 'workflow' come after
>> > 'validation'?
>> > >
>> > > /Stephan
>> > >
>> > > -------- Original-Nachricht --------
>> > > > Datum: Thu, 14 Aug 2008 18:20:33 +0200
>> > > > Von: "Ylva Degerfeldt"
>> > <ylva.degerfeldt@(protected)>
>> > > > An: "Struts Users Mailing List"
>> > <user@(protected)>
>> > > > Betreff: Re: [S2]Validation with xml file not
>> > working
>> > >
>> > > > Lukasz, I'm not sure how to check the
>> > deployment but I was thinking
>> > > > that too. (I'm using NetBeans 5.5.1 and Sun
>> > App. server.)
>> > > >
>> > > > André, it's funny you should mention that
>> > because I just changed the
>> > > > name From .....-validation.xml to
>> > ....-validations.xml because they
>> > > > must have misspelled it in one place in the
>> > "Struts 2 in Action" book,
>> > > > so I thought that was the correct way since the
>> > name without the s
>> > > > gives me this exception:
>> > > >
>> > > > java.lang.IllegalArgumentException: URI is not
>> > hierarchical
>> > > >
>> > > > At least I know it has nothing to do with that
>> > I'm uploading a file
>> > > > from a form, 'cause that part works fine.
>> > It's something about the
>> > > > validation. What could it be?
>> > > >
>> > > > /y
>> > > >
>> > > > On Thu, Aug 14, 2008 at 6:04 PM, André Cedik |
>> > GDG
>> > > > <a.cedik@(protected):
>> > > > > Maybe it's just because of the
>> > misspelling.
>> > > > > If you'd like to do validation this way,
>> > > > > your xml-file should be named
>> > > > > "NameAndCvAction-validation.xml"
>> > without
>> > > > > the "s" at the end.
>> > > > >
>> > > > >
>> > > > > Ylva Degerfeldt wrote:
>> > > > >> Hi everyone,
>> > > > >>
>> > > > >> I'm trying to use the Validation
>> > framework by creating a file called
>> > > > >> NameAndCvAction-validations.xml, for my
>> > action "NameAndCvAction", but
>> > > > >> it's not working the way it should.
>> > > > >> I've stepped through the code and it
>> > seems that the validations that
>> > > > >> should have been made through the xml
>> > file just don't happen.
>> > > > >>
>> > > > >> When, for instance, I've tried to
>> > deliberately leave some fields empty
>> > > > >> (which the validator should have
>> > noticed), the execute method is still
>> > > > >> invoked. This shouldn't happen when
>> > there are validation errors,
>> > > > >> right?
>> > > > >>
>> > > > >> I've put the validation xml file in
>> > the same directory (and package)
>> > > > >> as the corresponding action, but it
>> > seems that Struts 2 can't find it
>> > > > >> anyway. What am I doing wrong?
>> > > > >>
>> > > > >> This is the declaration of my action in
>> > struts.xml:
>> > > > >> .....
>> > > > >> <action name =
>> > "NameAndCvAction" class =
>> > > > "Web.StrutsActions.NameAndCvAction">
>> > > > >>
>> > <result>/showSkills.jsp</result>
>> > > > >>         <result name =
>> > "input">/NameAndCv.jsp</result>
>> > > > >> </action>
>> > > > >> ....
>> > > > >> (This belongs to a package that extends
>> > struts-default)
>> > > > >>
>> > > > >> By the way, I'm also using simple
>> > validation which works without
>> > > > >> problems. (But I'd like to know how
>> > to use the validation framework
>> > > > >> "the harder way" too.)
>> > > > >>
>> > > > >> Can somebody please help me?
>> > > > >>
>> > > > >> Thanks in advance!
>> > > > >>
>> > > > >> /Ylva
>
>
>
> --
> GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry Passion!
> http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_190067.ezm (zipped)
Am Freitag, 15. August 2008 00:22:01 schrieb Stephan Schröder:
> i don't know which interceptors are on your default stack. Does 'workflow'
> come after 'validation'?

Look into struts-default.xml in the struts-2.x.jar file, there you can see all
stacks defined with their interceptors.

--
Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html

Really, I'm not out to destroy Microsoft. That will just be a
completely unintentional side effect."
 -- Linus Torvalds

Attachment: smime.p7s (zipped)
Attachment: user_190068.ezm (zipped)
Ok, I found it. But (as the book said) , "validation" comes before
"workflow" in the "validationWorkflowStack", so there has to be some
other explanation for the exception.

/Ylva

On Fri, Aug 15, 2008 at 1:59 PM, Torsten Krah
<tkrah@(protected):
> Am Freitag, 15. August 2008 00:22:01 schrieb Stephan Schröder:
>> i don't know which interceptors are on your default stack. Does 'workflow'
>> come after 'validation'?
>
> Look into struts-default.xml in the struts-2.x.jar file, there you can see all
> stacks defined with their interceptors.
>
> --
> Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
> Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html
>
> Really, I'm not out to destroy Microsoft. That will just be a
> completely unintentional side effect."
>     -- Linus Torvalds
>

Attachment: user_190054.ezm (zipped)
Hi guys
I'm close to finishing my 1st project with struts2, which I'm quite excited
about. I've gotten around to validation (!).

I'm having some issues getting validation to work on one of my actions. I
can't reference the variables from the web page in order to validate them.
I've named the variables in such a fashion that they go straight into the
bean (go struts!).

How do I properly reference them to validate them?


*my form:(*fragment)
<s:form action="ApplyForRole" enctype="multipart/form-data" method="post">

  <h3>your contact details</h3>
  <s:hidden name="role_id" value="%{role.role_id}" />
  <s:textfield required="true" labelposition="top" size="25" name="*
applicant.name"* label="name" /><br />
......
</s:form>

*my action:*
...
@Validations(
requiredStrings =
{@RequiredStringValidator(type<%7B@(protected)>=
ValidatorType.SIMPLE, fieldName = "
*applicant.name*", message = "You must enter a value for name.")}
)
public class SaveApplication extends ActionSupport {
...
  //add applicant bean to this action
  public void setApplicant(Applicant a) {
    applicant = a;
  }

  public Applicant getApplicant () {
    return applicant;
  }

}

*and the applicant bean:*
public class Applicant {
.....
  private String *name*;
.....

  public String getName() {
    return name;
  }

  public void setName (String s) {
    name = s;
  }
....
}

Please point me in the right direction. Any suggested reading would
definitely be appreciated.

Thanks

doug

Attachment: user_190055.ezm (zipped)
I guess that depends on what you're trying to achieve. Interceptors
are typically used for before/after functionality.

Nils-H

On Thu, Aug 14, 2008 at 2:41 PM, Torsten Krah
<tkrah@(protected):
> Hi.
> I am wondering if it is possible to hook into the render and action phase of
> the portlet execution?
> If there is not yet such a possibility, where to look for to do this
> (something like extending dispatcher portlet ... anything else).
>
>
> --
> Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
> Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html
>
> Really, I'm not out to destroy Microsoft. That will just be a
> completely unintentional side effect."
>     -- Linus Torvalds
>

Attachment: user_190063.ezm (zipped)
Am Freitag, 15. August 2008 08:11:42 schrieb Nils-Helge Garli Hegvik:
> I guess that depends on what you're trying to achieve. Interceptors
> are typically used for before/after functionality.

I want to intercept the dispatching of the "Render" and "Action" phase of the
portlet, to inject SecurityContext of Spring Security, like its done with
spring portlet mvc framework (there are HandlerAdapters which do that).

Is this possible using interceptors?
How do i know if its a doAction or doRender request from interceptors point of
view ? And how do i know if its "before" or "after"?
Afaik see interceptor does not know this as ActionProxy Chain does call them
which is invoked from Jsr168Dispatcher, am i right?
If this is the case, i don't know "where" i am and can't do this with
interceptors.

If its not possible, what would be the "best" way to do so?

Torsten

--
Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html

Really, I'm not out to destroy Microsoft. That will just be a
completely unintentional side effect."
 -- Linus Torvalds

Attachment: smime.p7s (zipped)
Attachment: user_190069.ezm (zipped)
I think you should be able to write an interceptor to do this. Take a
look at [1] and [2] for some information about how it works and how to
write custom interceptors. All the information you need to access
should be available in the invocation context. You should also take a
look at the PortletActionContext class.

Nils-H

[1] - http://struts.apache.org/2.x/docs/interceptors.html
[2] - http://struts.apache.org/2.x/docs/writing-interceptors.html

On Fri, Aug 15, 2008 at 11:50 AM, Torsten Krah
<tkrah@(protected):
> Am Freitag, 15. August 2008 08:11:42 schrieb Nils-Helge Garli Hegvik:
>> I guess that depends on what you're trying to achieve. Interceptors
>> are typically used for before/after functionality.
>
> I want to intercept the dispatching of the "Render" and "Action" phase of the
> portlet, to inject SecurityContext of Spring Security, like its done with
> spring portlet mvc framework (there are HandlerAdapters which do that).
>
> Is this possible using interceptors?
> How do i know if its a doAction or doRender request from interceptors point of
> view ? And how do i know if its "before" or "after"?
> Afaik see interceptor does not know this as ActionProxy Chain does call them
> which is invoked from Jsr168Dispatcher, am i right?
> If this is the case, i don't know "where" i am and can't do this with
> interceptors.
>
> If its not possible, what would be the "best" way to do so?
>
> Torsten
>
> --
> Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
> Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html
>
> Really, I'm not out to destroy Microsoft. That will just be a
> completely unintentional side effect."
>     -- Linus Torvalds
>

Attachment: user_190056.ezm (zipped)
Hi!

How can I get session ID from inside a Struts2 interceptor?

Attachment: user_190058.ezm (zipped)
I usually implement ServletRequestAware so that I can call
request.getSession().getId(). I would love to see them add that value to
the SessionMap but it's not there at the moment.
(*Chris*)

On Fri, Aug 15, 2008 at 12:45 AM, Hrvoje Ban <kyrogar@(protected):

> Hi!
>
> How can I get session ID from inside a Struts2 interceptor?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_190060.ezm (zipped)
On Fri, Aug 15, 2008 at 9:47 AM, Chris Pratt <thechrispratt@(protected):
> I usually implement ServletRequestAware so that I can call
> request.getSession().getId(). I would love to see them add that value to
> the SessionMap but it's not there at the moment.
> (*Chris*)

That would work for a action, but how to it for interceptor?

Attachment: user_190062.ezm (zipped)

Hi,

Can u tell me where you are unable to get the Session ID in struts2.




thanks,
rajanikanth







Attachment: user_190065.ezm (zipped)

Hi,

For ActionClass implement ServletRequestAware then one abstract method is created for httpServletRequest, and it implement that method.

By using that httpServletRequest? u can call ur session variable
httpServletRequest.getSession(false).getAttribute(SessionId);

In our project im getting the values from session like this only.







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










I usually implement ServletRequestAware so that I can call
request.getSession().getId(). I would love to see them add that value to
the SessionMap but it's not there at the moment.
(*Chris*)

On Fri, Aug 15, 2008 at 12:45 AM, Hrvoje Ban <kyrogar@(protected):

> Hi!
>
> How can I get session ID from inside a Struts2 interceptor?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>






Attachment: user_190070.ezm (zipped)
> That would work for a action, but how to it for interceptor?

Try this one:
ServletActionContext.getRequest().getSession().getId();

/Stephan


-------- Original-Nachricht --------
> Datum: Fri, 15 Aug 2008 10:27:35 +0200
> Von: "Hrvoje Ban" <kyrogar@(protected)>
> An: "Struts Users Mailing List" <user@(protected)>
> Betreff: Re: Session ID

> On Fri, Aug 15, 2008 at 9:47 AM, Chris Pratt <thechrispratt@(protected)>
> wrote:
> > I usually implement ServletRequestAware so that I can call
> > request.getSession().getId(). I would love to see them add that value
> to
> > the SessionMap but it's not there at the moment.
> > (*Chris*)
>
> That would work for a action, but how to it for interceptor?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)

--
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/wasistshortview.php?mc=sv_ext_mf@(protected)

Attachment: user_190057.ezm (zipped)
oscar perez wrote:
> One of the problems is that if in the returned AJAX content is included any
> sx tag then if there is any javascript in the returned content this simply
> dissappears. I tried all the combinations with executeScripts
> separateScripts with no success however..
>  

I've created several test apps looking at this and they all execute the
inline scripts correctly. I believe you as it's a commonly reported
problem, but it needs better isolation.

> Another problem related to it is that I would like to be able to call
> callback functions after the returned content has been rendered. The
> workaround for that is to use afterNotifyTopics and timeouts but I dont
> think this is quite the same.
>  

As far as I know, the widget does not fire an event "onContentReady"
(ie. after the DOM has been updated and scripts executed). That would
have been a nice feature.

> And then the last problem is that I would like to use different targets to
> render the returned content based on the operation status.
>  

Yeah, not supported in the current implementation.

> Most likely these problems have solution with sx tags and it is just a
> problem that I don't have enough knowledge but after reading the
> documentation and ajax recipes extensively I couldn't find any answer to any
> of the above questions.
>  

No, I think you're right there's no answers to these problems except
possibly the first.

> I've moved now to jQuery and all my problems are solved :)
>  

Great idea and one that you won't regret. I moved to YUI for similar
reasons.


Attachment: user_190064.ezm (zipped)

Hi All,

I am using a datetimepicker on my jsp. The field containing the date is of
type org.joda.time.DateTime. Struts does not know how to convert DateTime to
and from Strings so I created my own Converter and it works fine when I use
a textfield, but gives me a ParseException when using a datetimepicker.

The tag in my jsp looks as follows:
<s:datetimepicker cssClass="text medium" name="miniSub.installDate"
label="%{getText('miniSub.installDate')}"
displayFormat="%{getText('date.format')}"/>

When the page gets rendered the converter is called and the DateTime is
converted to a string, but that string is not used by the datetimepicker.
This causes a ParseException to occur.

How can I tell the datetimepicker to not try and convert the data on its own
but to use the registered converter to convert the data.

Regards,
JC Oosthuizen
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_190071.ezm (zipped)

I am trying to create jsp pages that are forms for workers at a plant to fill
out. If they click the No radio button I need to disable the rest of the
fields in that row. If they click the Yes radio button thereafter, i need
all the input fields in that row to be re-enabled. Here is my code which
even changes the disabled value to true when the Yes radio button is pressed
even though the command says "false":

<tr class="mainMenuSectHeight">
      <td rowspan="4">Eye/Face</td>
      <td>Chemical Exposure :</td>
      <td align="center"><html:radio
property="eyeFaceChemicalExposureYesNo" value="Y"
onclick="setEyeFaceChemicalExposureYesNo(this.value)"/></td>
      <td align="center"><html:radio
property="eyeFaceChemicalExposureYesNo" value="N"
onclick="setEyeFaceChemicalExposureYesNo(this.value)"/></td>
      <td align="center"><html:text
property="eyeFaceChemicalExposureDescription"
onchange="updateEyeFaceChemicalExposureDescription(this.value)" size="20"
disabled="false"/></td>
      <td align="center"><html:text
property="eyeFaceChemicalExposurePPERequirements"
onchange="updateEyeFaceChemicalExposurePPERequirements(this.value)"
size="20" disabled="false"/></td>
   </tr>

function setEyeFaceChemicalExposureYesNo(YorN) {
   window.alert("seteyeFaceChemicalExposureYesNo!!"+YorN);
   if(YorN=="N"){
     
document.ppeForm.eyeFaceChemicalExposureDescription.disabled="true";
     
document.ppeForm.eyeFaceChemicalExposurePPERequirements.disabled="true";
   }
   else{
     
document.ppeForm.eyeFaceChemicalExposureDescription.disabled="false";
     
document.ppeForm.eyeFaceChemicalExposurePPERequirements.disabled="false";
   }
 
window.alert("disabled="+document.ppeForm.eyeFaceChemicalExposurePPERequirements.disabled);
   document.ppeForm.action="ppe.do?&actionType=" +
"setEyeFaceChemicalExposureYesNo"+"&eyeFaceChemicalExposureYesNo="+YorN;
   document.ppeForm.submit();
   }


Any Ideas on a way to fix this or a better way to approach the problem?
--
Sent from the Struts - User mailing list archive at Nabble.com.

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