Author Login
Post Reply
user Digest 17 Aug 2008 01:15:54 -0000 Issue 8196
Topics (messages 190089 through 190113):
Re: validation: fieldexpression doesn't get executed if stringlength validation fails
190089 by: Martin Gainty
Memcached
190090 by: Frans Thamura
190100 by: Martin Gainty
Struts2 Application Structure
190091 by: Roger
190093 by: Al Sutton
190094 by: Jeromy Evans
190095 by: Roger
190096 by: Al Sutton
190097 by: Martin Gainty
Validate associate Map
190092 by: Kibo
190098 by: Kibo
190099 by: Dave Newton
190101 by: stanlick.gmail.com
190103 by: Al Sutton
190104 by: Dave Newton
190105 by: Kibo
190106 by: Dave Newton
190107 by: Dave Newton
190113 by: stanlick.gmail.com
Struts Authorization Interceptor
190102 by: Relph,Brian
javascript in returned jsp through xhr
190108 by: Kropp, Henning
190111 by: Kropp, Henning
190112 by: Frans Thamura
value from varstatus
190109 by: cpanon
[OT][JSTL] Re: value from varstatus
190110 by: Dave Newton
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_190089.ezm (zipped)
it must be true..i took a business course and according to the book..there are people who are paid for work..(..not here unfortunately..)
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 18:45:06 -0700
> From: newton.dave@(protected)
> Subject: RE: validation: fieldexpression doesn't get executed if stringlength validation fails
> To: user@(protected)
>
> Wait... you guys get PAID to work?!?!
>
>
> --- On Fri, 8/15/08, Martin Gainty <mgainty@(protected):
>
> > From: Martin Gainty <mgainty@(protected)>
> > Subject: RE: validation: fieldexpression doesn't get executed if stringlength validation fails
> > To: "Struts Users Mailing List" <user@(protected)>
> > Date: Friday, August 15, 2008, 9:27 PM
> > yep..i need a secretary...know anyone that wants to work for
> > free?
> > Thanks,
> > 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 17:32:53 -0700
> > > From: newton.dave@(protected)
> > > Subject: RE: validation: fieldexpression doesn't
> > get executed if stringlength validation fails
> > > To: user@(protected)
> > >
> > > I think you might have replied to the wrong message?
> > >
> > > Dave
> > >
> > > --- On Fri, 8/15/08, Martin Gainty wrote:
> > > > 2 solutions
> > > > 1)cookies
> > > > 2a)store old windows value
> > > > session.put("windowId",1);
> > > > 2b)open next window in new window
> > > > 2c)windows.open('_blank')
> > > >
> > 2d)onload="session.put("windowid",2);
> > > > test windowid
> > > >
> > > > anyone?
> > > > 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 18:13:43 -0300
> > > > > From: belingueres@(protected)
> > > > > To: user@(protected)
> > > > > Subject: Re: validation: fieldexpression
> > doesn't
> > > > get executed if stringlength validation fails
> > > > >
> > > > > Besides the 3-8 thing there (which I suppose
> > is a
> > > > typo), String
> > > > > comparison with == works well for me:
> > > > >
> > > > > <field-validator
> > > > type="fieldexpression">
> > > > > <param
> > > >
> > name="expression"><![CDATA[newPassword ==
> > > > > verifNewPassword]]></param>
> > > > > <message>Password must be the
> > > > same</message>
> > > > > </field-validator>
> > > > >
> > > > >
> > > > > 2008/8/15, natalia_
> > <nstavisky@(protected)>:
> > > > > >
> > > > > > I want all validation on 2 fields to
> > take place,
> > > > I am not short-circuiting
> > > > > > any. But it looks like the behavior is
> > such that
> > > > if stringlength fails the
> > > > > > fieldexpression doesn't fire. Only
> > if the
> > > > field satisfies the length
> > > > > > requirement then I see the result of
> > > > fieldexpression to appear. I tried to
> > > > > > put the fieldexpression before the
> > stringlength,
> > > > but that didn't change
> > > > > > anything.
> > > > > >
> > > > > > <field
> > name="account.loginName">
> > > > > > <field-validator
> > > > type="stringlength">
> > > > > > 3
> > > > > > 8
> > > > > > <message
> > > >
> > key="validation.loginName.length">Login Name
> > > > must be
> > > > > > between ${minLength} and ${maxLength}
> > characters
> > > > in length</message>
> > > > > > </field-validator>
> > > > > >
> > > > > > <field-validator
> > > > type="fieldexpression">
> > > > > >
> > > > > >
> > > > account.loginName.equals(confirmLoginName)
> > > > > >
> > > > > > <message
> > > >
> > key="validation.loginName.doNotMatch">Login
> > > > Name and
> > > > > > Confirm Login Name do not
> > match</message>
> > > > > > </field-validator>
> > > > > >
> > > > > > </field>
> > > > > >
> > > > > > <field
> > name="confirmLoginName">
> > > > > > <field-validator
> > > > type="stringlength">
> > > > > > 3
> > > > > > 8
> > > > > > <message
> > > >
> > key="validation.confirmLoginName.length">Confirm
> > > > Login
> > > > > > Name must be between ${minLength} and
> > > > ${maxLength} characters in
> > > > > > length</message>
> > > > > > </field-validator>
> > > > > > </field>
> > > > > > --
> > > > > > View this message in context:
> > > >
> > http://www.nabble.com/validation%3A-fieldexpression-doesn%27t-get-executed-if-stringlength-validation-fails-tp19004155p19004155.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)
> > > > >
> > > >
> > > >
> > _________________________________________________________________
> > > > Get ideas on sharing photos from people like you.
> > Find new
> > > > ways to share.
> > > >
> > http://www.windowslive.com/explore/photogallery/posts?ocid=TXT_TAGLM_WL_Photo_Gallery_082008
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > user-unsubscribe@(protected)
> > > For additional commands, e-mail:
> > user-help@(protected)
> > >
> >
> > _________________________________________________________________
> > Be the filmmaker you always wanted to be—learn how to
> > burn a DVD with Windows®.
> > http://clk.atdmt.com/MRT/go/108588797/direct/01/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
_________________________________________________________________
Get ideas on sharing photos from people like you. Find new ways to share.
http://www.windowslive.com/explore/photogallery/posts?ocid=TXT_TAGLM_WL_Photo_Gallery_082008

Attachment:
user_190090.ezm (zipped)hi there
anyone can get the idea, how to make S2 apps run cool fast and amazing
i read about memcached from Dave slide of Blogs.sun.com, and there is
also hibernate-memchaced
and there is spymemcached.
any glue is it possible s2 cached by memcached, and what is the benenfit
--
--
Frans Thamura
Meruvian Foundation
Mobile: +62 855 7888 699
Linkedin: http://www.linkedin.com/in/fthamura
Training JENI, Medallion (Alfresco, Liferay dan Compiere).. buruan...
URL: http://nagasakti.mervpolis.com/roller/mervnews/entry/jeni_training_compiere_dan_alfresco

Attachment:
user_190100.ezm (zipped)
in struts-default.properties you can config the objectFactory cache created classes
struts.objectFactory.spring.useClassCache = true
###suggestion to browser to please cache static parts
### If true -> Struts will write out header for static contents such that they will
### be cached by web browsers (using Date, Cache-Content, Pragma, Expires)
### headers).
##this is only a suggestion to the browser
struts.serve.static.browserCache=true
YMMV/
Anyone else?
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: Sat, 16 Aug 2008 13:26:12 +0700
> From: frans@(protected)
> To: user@(protected)
> Subject: Memcached
>
> hi there
>
> anyone can get the idea, how to make S2 apps run cool fast and amazing
>
> i read about memcached from Dave slide of Blogs.sun.com, and there is
> also hibernate-memchaced
>
> and there is spymemcached.
>
> any glue is it possible s2 cached by memcached, and what is the benenfit
>
>
>
> --
> --
> Frans Thamura
> Meruvian Foundation
>
> Mobile: +62 855 7888 699
> Linkedin: http://www.linkedin.com/in/fthamura
>
> Training JENI, Medallion (Alfresco, Liferay dan Compiere).. buruan...
> URL: http://nagasakti.mervpolis.com/roller/mervnews/entry/jeni_training_compiere_dan_alfresco
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
_________________________________________________________________
Be the filmmaker you always wanted to be—learn how to burn a DVD with Windows®.
http://clk.atdmt.com/MRT/go/108588797/direct/01/

Attachment:
user_190091.ezm (zipped)Having followed this group for a while I know that the generally accepted
wisdom is that every page should be handled via an Action. However, I have an
application that is probably going to be 70% static pages with 30% Strut-able
actions to handle form entry etc etc. This means that I'm going to have an
awful lot of action classes that do nothing other than display the next page
which feels kludgy. How would people deal with this?
Regards

Attachment:
user_190093.ezm (zipped)Not sure where you get the action-per page is the generally accepted
norm, but if your page is purely static (i.e. accesses no variables and
includes no forms), go straight to the html page.
Not only does this save you the JSP compile/post-compile interpretation
time it also allows you to move the page onto an separate Apache HTTPD
server to improve performance.
Al.
Roger wrote:
> Having followed this group for a while I know that the generally accepted
> wisdom is that every page should be handled via an Action. However, I have an
> application that is probably going to be 70% static pages with 30% Strut-able
> actions to handle form entry etc etc. This means that I'm going to have an
> awful lot of action classes that do nothing other than display the next page
> which feels kludgy. How would people deal with this?
>
> Regards
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
--
Al Sutton
W: www.alsutton.com
T: twitter.com/alsutton

Attachment:
user_190094.ezm (zipped)Al Sutton wrote:
> Not sure where you get the action-per page is the generally accepted
> norm, but if your page is purely static (i.e. accesses no variables
> and includes no forms), go straight to the html page.
>
> Not only does this save you the JSP compile/post-compile
> interpretation time it also allows you to move the page onto an
> separate Apache HTTPD server to improve performance.
>
> Al.
>
If you can't go down that path, the CodeBehind plugin is exactly what
you need. If no action exists but a JSP exists, it invokes a default
"do nothing" action so the JSP has access to all the usual Struts2
context and tags.
http://struts.apache.org/2.0.11/docs/codebehind-plugin.html

Attachment:
user_190095.ezm (zipped)On Saturday 16 August 2008 13:06:19 Al Sutton wrote:
> Not sure where you get the action-per page is the generally accepted
> norm, but if your page is purely static (i.e. accesses no variables and
> includes no forms), go straight to the html page.
>
> Not only does this save you the JSP compile/post-compile interpretation
> time it also allows you to move the page onto an separate Apache HTTPD
> server to improve performance.
>
This is where I think I'm getting confused. How do I seperate my static HTML
from my application? Any link http://www.host.com/MyApplication passes
directly to Struts 2.
Regards
>
> Roger wrote:
> > Having followed this group for a while I know that the generally accepted
> > wisdom is that every page should be handled via an Action. However, I
> > have an application that is probably going to be 70% static pages with
> > 30% Strut-able actions to handle form entry etc etc. This means that I'm
> > going to have an awful lot of action classes that do nothing other than
> > display the next page which feels kludgy. How would people deal with
> > this?
> >
> > Regards
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)

Attachment:
user_190096.ezm (zipped)Roger wrote:
> Any link http://www.host.com/MyApplication passes
> directly to Struts 2.
>
Only if you're using a strange configuration that says it should.
Otherwise http://www.host.com/MyApplication/blah.jsp will be processed
in the same way as any other jsp, and
http://www.host.com/MyApplication/blah.html will be treated like any
other HTML file.

Attachment:
user_190097.ezm (zipped)
Good Morning Al
if you're using Apache you want to config the ajp13 connector to handle any/all struts/jsp/servlet requests
so in your %APACHE_HOME%/conf/httpd.conf you'll want to config in ajp13 worker as illustrated here
# send all requests ending in .jsp to ajp13
JkMount /*.jsp ajp13
JkMount /jpetstore/* ajp13
JkMount /manager/* ajp13
JKMount /struts2-showcase/* ajp13
JkMount /*.do ajp13
JkMount /*/servlet/ ajp13
JkWorkerProperty worker.list=ajp13
JkWorkerProperty worker.loadbalancer.type=lb
JkWorkerProperty worker.loadbalancer.balanced_workers=ajp13
JkWorkerProperty worker.ajp13.type=ajp13
JkWorkerProperty worker.ajp13.host=localhost
JkWorkerProperty worker.ajp13.port=8009
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: Sat, 16 Aug 2008 11:55:04 +0100
> From: al.sutton@(protected)
> To: user@(protected)
> Subject: Re: Struts2 Application Structure
>
> Roger wrote:
> > Any link http://www.host.com/MyApplication passes
> > directly to Struts 2.
> >
> Only if you're using a strange configuration that says it should.
> Otherwise http://www.host.com/MyApplication/blah.jsp will be processed
> in the same way as any other jsp, and
> http://www.host.com/MyApplication/blah.html will be treated like any
> other HTML file.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
_________________________________________________________________
Get ideas on sharing photos from people like you. Find new ways to share.
http://www.windowslive.com/explore/photogallery/posts?ocid=TXT_TAGLM_WL_Photo_Gallery_082008

Attachment:
user_190092.ezm (zipped)
Hi konference
How can I validate classes which are associated in collection.
The class "Page" contents Map with "PageText" classes:
Page.java
------------------
private Map<LanguageName, PageText> texts = new HashMap();
... getter / setter
PageText.java
--------------------------
private String description;
@StringLengthFieldValidator(message="Length too short",
key="validate.minLength.6", trim=true, mimLength = "6")
public void setDescription(String description) {
this.description = description;
}
Action.java
-------------------
private Page page;
//it work but I need validate all classes in Map, not only ['en']
@Validations( visitorFields = {
@VisitorFieldValidator(
message = "Default message", key = "i18n.key",
fieldName= "page.texts['en']", appendPrefix = false) }
)
public String execute() throws Exception{
return Action.SUCCESS;
}
------------------------
When I set: fieldName= "page.texts['en']" it work, but in Map are a lots of
classes.
I need validate all class in collection.
When I set only: fieldName= "page.texts" it dont work.
I need set something of : fieldName= "page.texts[*]" but it dont work.
How can I determine in attribute fieldName as to validate all classes in
"page.texts" ?
Is it possible or I must resolve it otherwise?
Thanks a lot
-----
Tomas Jurman
Czech Republic
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_190098.ezm (zipped)
I have to write custom validation method where I iterate all "PageText" class
and validate it.
I want to use validate() method from ActionSupport class but the method is
invoke always.
I need invoke validator method only when is invoke method save();
Is better resolution?
public String save() throws Exception{
if (!isValid())
return INPUT;
pageService.update(page);
return execute();
}
private boolean isValid(){
boolean success = true;
for (Map.Entry<LanguageName, PageText> e :
page.getTexts().entrySet()){
if (e.getValue().getDescription().length() < 6 ){
addFieldError(getComponentName(e.getValue(), "description"),
getText("validation.page.texts.description"));
success = false;
}
}
return success; //==========>
}
Kibo wrote:
>
> Hi konference
>
> How can I validate classes which are associated in collection.
> The class "Page" contents Map with "PageText" classes:
>
> Page.java
> ------------------
> private Map<LanguageName, PageText> texts = new HashMap();
>
> ... getter / setter
>
> PageText.java
> --------------------------
> private String description;
>
> @StringLengthFieldValidator(message="Length too short",
> key="validate.minLength.6", trim=true, mimLength = "6")
> public void setDescription(String description) {
> this.description = description;
> }
>
> Action.java
> -------------------
> private Page page;
>
> //it work but I need validate all classes in Map, not only ['en']
> @Validations( visitorFields = {
> @VisitorFieldValidator(
> message = "Default message", key = "i18n.key",
> fieldName= "page.texts['en']", appendPrefix = false) }
> )
> public String execute() throws Exception{
> return Action.SUCCESS;
> }
>
> ------------------------
>
> When I set: fieldName= "page.texts['en']" it work, but in Map are a lots
> of classes.
> I need validate all class in collection.
> When I set only: fieldName= "page.texts" it dont work.
> I need set something of : fieldName= "page.texts[*]" but it dont work.
>
> How can I determine in attribute fieldName as to validate all classes in
> "page.texts" ?
> Is it possible or I must resolve it otherwise?
>
> Thanks a lot
>
>
-----
Tomas Jurman
Czech Republic
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_190099.ezm (zipped)--- On Sat, 8/16/08, Kibo wrote:
> I have to write custom validation method where I iterate all
> "PageText" class and validate it. I want to use validate()
> method from ActionSupport class but the method is invoke always.
> I need invoke validator method only when is invoke method
> save(); Is better resolution?
One option would be to read the documentation for the validation interceptor [1,2] and its superclass, MethodFilterInterceptor [3].
Dave
[1] Validation interceptor overview:
http://struts.apache.org/2.x/docs/validation-interceptor.html
[2] ValidationInterceptor Javadocs:
http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/validator/ValidationInterceptor.html
[3] MethodFilterInterceptor Javadocs:
http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.html

Attachment:
user_190101.ezm (zipped)Can you record *yourself *reading these documents and just post the Podcast?
On Sat, Aug 16, 2008 at 9:24 AM, Dave Newton <newton.dave@(protected):
> --- On Sat, 8/16/08, Kibo wrote:
> > I have to write custom validation method where I iterate all
> > "PageText" class and validate it. I want to use validate()
> > method from ActionSupport class but the method is invoke always.
> > I need invoke validator method only when is invoke method
> > save(); Is better resolution?
>
> One option would be to read the documentation for the validation
> interceptor [1,2] and its superclass, MethodFilterInterceptor [3].
>
> Dave
>
> [1] Validation interceptor overview:
> http://struts.apache.org/2.x/docs/validation-interceptor.html
>
> [2] ValidationInterceptor Javadocs:
>
> http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/validator/ValidationInterceptor.html
>
> [3] MethodFilterInterceptor Javadocs:
>
> http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.html
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_190103.ezm (zipped)lol... I've just had a mental image of Dave reading the XML examples.....
Some things just don't work in audio.
Al.
stanlick@(protected):
> Can you record *yourself *reading these documents and just post the Podcast?
>
>
> On Sat, Aug 16, 2008 at 9:24 AM, Dave Newton <newton.dave@(protected):
>
>
>> --- On Sat, 8/16/08, Kibo wrote:
>>
>>> I have to write custom validation method where I iterate all
>>> "PageText" class and validate it. I want to use validate()
>>> method from ActionSupport class but the method is invoke always.
>>> I need invoke validator method only when is invoke method
>>> save(); Is better resolution?
>>>
>> One option would be to read the documentation for the validation
>> interceptor [1,2] and its superclass, MethodFilterInterceptor [3].
>>
>> Dave
>>
>> [1] Validation interceptor overview:
>> http://struts.apache.org/2.x/docs/validation-interceptor.html
>>
>> [2] ValidationInterceptor Javadocs:
>>
>> http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/validator/ValidationInterceptor.html
>>
>> [3] MethodFilterInterceptor Javadocs:
>>
>> http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.html
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>
>

Attachment:
user_190104.ezm (zipped)I'll offer it as a service along with my mad meta-Google skillz.
--- On Sat, 8/16/08, stanlick@(protected):
> From: stanlick@(protected)>
> Subject: Re: Validate associate Map
> To: "Struts Users Mailing List" <user@(protected)
> Date: Saturday, August 16, 2008, 2:35 PM
> Can you record *yourself *reading these documents and just
> post the Podcast?
>
>
> On Sat, Aug 16, 2008 at 9:24 AM, Dave Newton
> <newton.dave@(protected):
>
> > --- On Sat, 8/16/08, Kibo wrote:
> > > I have to write custom validation method where I
> iterate all
> > > "PageText" class and validate it. I
> want to use validate()
> > > method from ActionSupport class but the method is
> invoke always.
> > > I need invoke validator method only when is
> invoke method
> > > save(); Is better resolution?
> >
> > One option would be to read the documentation for the
> validation
> > interceptor [1,2] and its superclass,
> MethodFilterInterceptor [3].
> >
> > Dave
> >
> > [1] Validation interceptor overview:
> >
> http://struts.apache.org/2.x/docs/validation-interceptor.html
> >
> > [2] ValidationInterceptor Javadocs:
> >
> >
> http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/validator/ValidationInterceptor.html
> >
> > [3] MethodFilterInterceptor Javadocs:
> >
> >
> http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.html
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@(protected)
> > For additional commands, e-mail:
> user-help@(protected)
> >
> >

Attachment:
user_190105.ezm (zipped)
Hi Dave
Thanks a lot for your help. I found out that the VisitorFieldValidator can
work with Object, Arrays and Collections.
Then I convert the Map to Collection and it begins work correct.
@Validations( visitorFields = {
@VisitorFieldValidator(
message = "Default message", key = "i18n.key",
fieldName= "page.texts.values", appendPrefix = false) }
)
public String save() throws Exception{
LOG.debug("ManagerPagesAction - method:save");
pageService.update(page);
return execute();
}
...
----------------------
<interceptor-ref name="validation">
<param name="validateAnnotatedMethodOnly">true</param>
</interceptor-ref>
Thanks
newton.dave wrote:
>
> --- On Sat, 8/16/08, Kibo wrote:
>> I have to write custom validation method where I iterate all
>> "PageText" class and validate it. I want to use validate()
>> method from ActionSupport class but the method is invoke always.
>> I need invoke validator method only when is invoke method
>> save(); Is better resolution?
>
> One option would be to read the documentation for the validation
> interceptor [1,2] and its superclass, MethodFilterInterceptor [3].
>
> Dave
>
> [1] Validation interceptor overview:
> http://struts.apache.org/2.x/docs/validation-interceptor.html
>
> [2] ValidationInterceptor Javadocs:
> http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/validator/ValidationInterceptor.html
>
> [3] MethodFilterInterceptor Javadocs:
> http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.html
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
-----
Tomas Jurman
Czech Republic
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_190106.ezm (zipped)--- On Sat, 8/16/08, Kibo <tomasjurman@(protected):
> Thanks a lot for your help. I found out that the
> VisitorFieldValidator can work with Object, Arrays and Collections.
Wow, that's nothing like the question I answered; glad it's working for you, although I'm a little confused now.
Dave
>
> Then I convert the Map to Collection and it begins work
> correct.
>
> @Validations( visitorFields = {
> @VisitorFieldValidator(
> message = "Default message", key
> = "i18n.key",
> fieldName= "page.texts.values",
> appendPrefix = false) }
> )
> public String save() throws Exception{
> LOG.debug("ManagerPagesAction -
> method:save");
> pageService.update(page);
> return execute();
> }
> ...
> ----------------------
> <interceptor-ref
> name="validation">
> <param
> name="validateAnnotatedMethodOnly">true</param>
>
> </interceptor-ref>
>
>
> Thanks
>
>
>
> newton.dave wrote:
> >
> > --- On Sat, 8/16/08, Kibo wrote:
> >> I have to write custom validation method where I
> iterate all
> >> "PageText" class and validate it. I want
> to use validate()
> >> method from ActionSupport class but the method is
> invoke always.
> >> I need invoke validator method only when is invoke
> method
> >> save(); Is better resolution?
> >
> > One option would be to read the documentation for the
> validation
> > interceptor [1,2] and its superclass,
> MethodFilterInterceptor [3].
> >
> > Dave
> >
> > [1] Validation interceptor overview:
> >
> http://struts.apache.org/2.x/docs/validation-interceptor.html
> >
> > [2] ValidationInterceptor Javadocs:
> >
> http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/validator/ValidationInterceptor.html
> >
> > [3] MethodFilterInterceptor Javadocs:
> >
> http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.html
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@(protected)
> > For additional commands, e-mail:
> user-help@(protected)
> >
> >
> >
>
>
> -----
> Tomas Jurman
> Czech Republic
> --
> View this message in context:
> http://www.nabble.com/Validate-associate-Map-tp19010237p19014275.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_190107.ezm (zipped)--- On Sat, 8/16/08, Al Sutton wrote:
> lol... I've just had a mental image of Dave reading the
> XML examples.....
I have a very soothing XML voice.
I'm like the Isaac Hayes (but alive-ier) of structured text.
Dave

Attachment:
user_190113.ezm (zipped)Dude, I totally think technical books on audio would sell! Most NERDS (like
myself) have the attention span of a moth and are so busy chasing shiny
things they can never get to the end of a book! I would slam an aBook in my
iPod for the commute. For a great example of what I mean by attention span
disorder, check this <http://www.coudal.com/regrets.php> out.
On Sat, Aug 16, 2008 at 3:23 PM, Dave Newton <newton.dave@(protected):
> --- On Sat, 8/16/08, Al Sutton wrote:
> > lol... I've just had a mental image of Dave reading the
> > XML examples.....
>
> I have a very soothing XML voice.
>
> I'm like the Isaac Hayes (but alive-ier) of structured text.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_190102.ezm (zipped)
Hello,
I have recently integrated my struts2 apps with spring security for authentication. We use an implementation of CAS for single-sign-in/out. I am now looking to add authorization, and I was wondering if anyone had implemented an authorization interceptor with spring-security, and how that turned out. I am looking for both action and method level authorization.
Thanks,
Brian Relph
----------------------------------------------------------------------
CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024.

Attachment:
user_190108.ezm (zipped)Hi,
I am a little stuck here. A action loads a jsp into a div. For this I
use the ajax theme (dojo) and a form submit with target. Works fine. The
Problem ist, that the jsp returned by the action has javascript in it.
Its the jcalendar. Having this jsp load normally the calendar works
fine, but not in div.
To solve this I tried executeScripts option, but that did not work. I
searched and found out that eval might help, but I simply dont know how
this could help.
Any hints would be greatly appreciated. Many thanks in advanced!

Attachment:
user_190111.ezm (zipped)

Attachment:
Re: javascript in returned jsp through xhr.eml (zipped)Dear Gainty,
vielen Dank for your reply. I am very sorry but I cant supply you with a
url. What I load into the div is the following:
<%@(protected)"%>
<s:form id="traitForm" method="post">
<s:textfield id="form_start" theme="xhtml" cssClass="text medium" />
<button id="button_start" type="button" class="button">..</button>
<s:submit key="button.next" />
</s:form>
<script type="text/javascript" src="<c:url
value='/scripts/prototype.js'/>"></script>
<script type="text/javascript"
src="${ctx}/scripts/calendar/calendar.js"></script>
<script type="text/javascript"
src="${ctx}/scripts/calendar/calendar-setup.js"></script>
<script type="text/javascript"
src="${ctx}/scripts/calendar/lang/calendar-${pageContext.request.locale}.js"></script>
<script type="text/javascript">
Form.focusFirstElement(document.forms["traitForm"]);
Calendar.setup(
{
inputField : "form_start", // id of the input field
//ifFormat : "%m/%d/%Y", // the date format
ifFormat : Calendar._TT['TT_DATE_TIME_FORMAT'],
showsTime : true,
singleClick : false,
button : "button_start" // id of the button
}
);
</script>
I use the following technique to load it into the div:
<s:form id="form_TraitPage" action="selectTraitPage"
namespace="/" method="post" >
<s:radio list="traits" listValue="getText(class.name)"
listKey="class.name" name="traitType" />
<s:submit id="submitSelectTratiPage" theme="ajax" targets="traitDiv" />
</s:form>
<s:div id="traitDiv" theme="ajax"
cssStyle="width: 100%;"
loadingText="getText('Loading')" >
</s:div>
The selectTraitPage-action returns the jsp with the jcalender. The
problem is, that clicking the button than does not result in a calendar
view. I can use it when loaded not in the div.
I simply dont know why and are very grateful for your help. I believe
its a matter, that the imported calender.js and/or prototype.js (which
is needed for the calendar) can bind to the button!? So it fails.....
Thx,
Henning
Martin Gainty schrieb:
> can you supply the URL (which delivers the content..) and we can test
> it here
> <%@(protected)" %>
> <head>
> <sx:head debug="true" extraLocales="de-de"/>
> </head>
> <body>
> <sx:div href="http://kropp.de/test">Initial Content</sx:div>
> </body>
> </html>
> Vielen Danke,
> 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: Sat, 16 Aug 2008 22:41:09 +0200
> > From: hkropp@(protected)
> > To: user@(protected)
> > Subject: javascript in returned jsp through xhr
> >
> > Hi,
> >
> > I am a little stuck here. A action loads a jsp into a div. For this I
> > use the ajax theme (dojo) and a form submit with target. Works fine.
> The
> > Problem ist, that the jsp returned by the action has javascript in it.
> > Its the jcalendar. Having this jsp load normally the calendar works
> > fine, but not in div.
> >
> > To solve this I tried executeScripts option, but that did not work. I
> > searched and found out that eval might help, but I simply dont know how
> > this could help.
> >
> > Any hints would be greatly appreciated. Many thanks in advanced!
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
>
> ------------------------------------------------------------------------
> Talk to your Yahoo! Friends via Windows Live Messenger. Find Out How
> <http://www.windowslive.com/explore/messenger?ocid=TXT_TAGLM_WL_messenger_yahoo_082008>

Attachment:
user_190112.ezm (zipped)talking about XHR
anyone have success a JSON send and request?
the idea is to make S2 as the JSON RPC implementation
anyone
F

Attachment:
user_190109.ezm (zipped)Hello
Whenever I try to get the numerical value of varStatus all I get is this
Typejavax.servlet.jsp.jstl.core.LoopTagSupport$1$Status@(protected)
Furthermore I cant seem to use the name attribute to properly evaluate down to value, it keeps saying that the value(which I want and proves it can do the dereferencing) is not a bean, no matter what syntax. Can someone help on these?
<c:forEach var="lv" items="${current.dynaOptions}" varStatus="status">
<c:forEach var="option" items="${lv.dynamicOptions}" varStatus="statusOption">
<bean:define id="rc">${currentIncr}ctrlType<c:out value="${statusOption}"></c:out></bean:define>
<html:radio property="simpleRadioOptions01[${currentVarStatus}].choosenValue"value="${option.value}" styleId="${rc}"/>
<bean:write name="option" property="label"/><br />
</c:forEach>

Attachment:
user_190110.ezm (zipped)--- On Sat, 8/16/08, cpanon <cpanon@(protected):
> Whenever I try to get the numerical value of varStatus all
> I get is this Typejavax.servlet.jsp.jstl.core.LoopTagSupport [...]
"All you get" is giving you precisely what you've asked for.
You'd need to use ${varStatus.count} (or index) or something. See the JSTL documentation [1,2]. Searching the fine web may also be of assistance [3].
Dave
[1] forEach docs
http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/index.html
[2] LoopTagStatus docs
http://java.sun.com/products/jsp/jstl/1.1/docs/api/javax/servlet/jsp/jstl/core/LoopTagStatus.html
[3] STFW
http://www.google.com/search?q=c:foreach