Author Login
Post Reply
user Digest 4 Feb 2010 16:14:38 -0000 Issue 9000
Topics (messages 204941 through 204965):
Struts 2 - Global Validation
204941 by: Arulmani V A
204942 by: Arulmani V A
204943 by: Arulmani V A
204944 by: Arulmani V A
204945 by: Arulmani V A
204946 by: Brian Thompson
204949 by: Arulmani V A
204954 by: Stephen Turner
204957 by: Brian Thompson
204962 by: mailtolouis2020-struts.yahoo.com
struts 1 and jsr-303 bean validation
204947 by: Fred Obsidianstone
Struts 2.1.8.1 custom freemarker template path
204948 by: GF
array list validation
204950 by: Stephen Ince
204951 by: Stephen Ince
204952 by: Stephen Ince
NPE
204953 by: Saeed Iqbal
204955 by: Cimballi
204956 by: Lukasz Lenart
204958 by: Saeed Iqbal
204959 by: Saeed Iqbal
how to customize the rendering of a tabbedpanel? struts2, dojo plugin
204960 by: Jake Vang
dynamic i18n
204961 by: Peter Symoens
204963 by: Lukasz Lenart
204964 by: Peter Symoens
204965 by: Brian Thompson
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_204941.ezm (zipped)Hi,
Any idea how to do global validation in Struts 2 ?
For example, in Struts 1, I can define all global regular expression validations in a file called validation-regexpr.xml such as :
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE form-validation PUBLIC
"-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN"
"http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd">
<form-validation>
<global>
<constant>
<constant-name>alpha</constant-name>
<constant-value>[A-Za-z]*</constant-value>
</constant>
</global>
</form-validation>
The above global regular expressions can be reused in other validation files as follows :
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE form-validation PUBLIC
"-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.2.0//EN"
"http://jakarta.apache.org/commons/dtds/validator_1_2_0.dtd">
<form-validation>
<formset>
<form name="EmployeeForm">
<field property="EmployeeName" depends="mask">
<msg name="mask" key="errors.invalid" />
<arg position="0" key="label.EmployeeName" />
<var>
<var-name>mask</var-name>
<var-value>${alpha}</var-value>
</var>
</field>
</form>
</formset>
</form-validation>
I could not get information on how to do this in Struts 2, no luck with the Struts2 e-books also. Any help in this regard will be greatly appreciated ....
Regards
Arul
Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/

Attachment:
user_204942.ezm (zipped)Hi,
How to do global validation in Struts 2 ? For example, in Struts 1, I can define all global regular expression validations in a file called validation-regexpr.xml such as :
<form-validation>
<global>
<constant>
<constant-name>alpha</constant-name>
<constant-value>[A-Za-z]*</constant-value>
</constant>
</global>
</form-validation>
The above global regular expressions can be reused in other validation files as follows :
<form-validation>
<formset>
<form
name="EmployeeForm">
<field property="EmployeeName" depends="mask">
<msg name="mask" key="errors.invalid" />
<arg position="0" key="label.EmployeeName" />
<var>
<var-name>mask</var-name>
<var-value>${alpha}</var-value>
</var>
</field>
</form>
</formset>
</form-validation>
Any help in this regard will be greatly appreciated.
Regards
Arul
The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/

Attachment:
user_204943.ezm (zipped)Hi,
How to do global validation in Struts 2 ? For example, in Struts 1, I can define all global regular expression validations in a file called validation-regexpr.xml such as :
<global>
<constant>
<constant-name>alpha</constant-name>
<constant-value>[A-Za-z]*</constant-value>
</constant>
</global>
The above global regular expressions can be reused in other validation files as follows :
<field property="EmployeeName" depends="mask">
<msg name="mask" key="errors.invalid" />
<arg position="0" key="label.EmployeeName" />
<var>
<var-name>mask</var-name>
<var-value>${alpha}</var-value>
</var>
</field>
Any help in this regard will be greatly appreciated.
Regards
Arul
The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/

Attachment:
user_204944.ezm (zipped)Hi,
How to do global validation in Struts 2 ? For example, in Struts 1, I can define all global regular expression validations in a file called validation-regexpr.xml such as :
<constant>
<constant-name>alpha</constant-name>
<constant-value>[A-Za-z]*</constant-value>
</constant>
The above global regular expressions can be reused in other validation files as follows : <var>
<var-name>mask</var-name>
<var-value>${alpha}</var-value>
</var>
Any help in this regard will be greatly appreciated.
Regards
Arul
The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/

Attachment:
user_204945.ezm (zipped)Hi,
How to do global validation in Struts 2 ? For example, in Struts 1, I can define all global regular expression validations in a file called validation-regexpr.xml such as :
<constant> <constant-name>alpha</constant-name> <constant-value>[A-Za-z]*</constant-value> </constant>
The above global regular expressions can be reused in other validation files as follows : <var> <var-name>mask</var-name> <var-value>${alpha}</var-value> </var>
Any help in this regard will be greatly appreciated.
Regards
Arul
The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/

Attachment:
user_204946.ezm (zipped)Could you quit spamming the list, please?
On Wed, Feb 3, 2010 at 2:46 PM, Arulmani V A <arulmani_s@(protected):
> Hi,
> How to do global validation in Struts 2 ? For example, in Struts 1, I can
> define all global regular expression validations in a file called
> validation-regexpr.xml such as :
>
> <constant> <constant-name>alpha</constant-name> <constant-value>[A-Za-z]*</constant-value> </constant>
> The above global regular expressions can be reused in other validation
> files as follows
> : <var> <var-name>mask</var-name> <var-value>${alpha}</var-value> </var>
> Any help in this regard will be greatly appreciated.
>
> Regards
> Arul
>
>
>
>
> The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.
> http://in.yahoo.com/
>

Attachment:
user_204949.ezm (zipped)Hi,
Apologies for having posted the same query 5 times - it was purely
UNINTENTIONAL. I'm new to this list and when I posted my query for the first
time, I got the following reply :
Hi. This is the deliver program at bjtu.edu.cn.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
02211071@(protected)
quota exceed
--- Attachment is a copy of the message.
[这是服务器 bjtu.edu.cn 的投递程序返回的提示信息]
到下列地址的信件投递失败,对方服务器无法正常接受或者拒绝接受这封邮件,
这是一个永久性的错误,服务器已经放弃继续投递。
02211071@(protected)
对方服务器返回错误提示:
quota exceed
--
[附件是您所发送信件的原件]
Hence thinking that my message was not posted (owing to length), I went about
modifying my query and tried posting it repeatedly, each time getting the same
reply
as above. Finally frustrated that my message is not going through at all
and that I get do not spam replies, I unsubscribed from the mailing list..
When the message gets posted successfully, why would you send a auto-reply like
above which perplexes the new user... If you could fix this, then there won't be confusion to the newbies who post.
Regards
Arul
The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/

Attachment:
user_204954.ezm (zipped)Hello Arul,
No worries - welcome to the list.
The message you got was from a list subscriber's email system, not from
the struts mailing list so it's outside the list admins' control. They
happen from time to time - best to ignore those messages.
Don't get discouraged - this is a good place to hang out for struts 2 help!
Steve
On Thu, 04 Feb 2010 07:10:31 -0500, Arulmani V A <arulmani_s@(protected)>
wrote:
> Hi,
>
> Apologies for having posted the same query 5 times - it was purely
> UNINTENTIONAL. I'm new to this list and when I posted my query for the
> first
> time, I got the following reply :
>
> Hi. This is the deliver program at bjtu.edu.cn.
> I'm afraid I wasn't able to deliver your message to the following
> addresses.
> This is a permanent error; I've given up. Sorry it didn't work out.
>
> 02211071@(protected)
> quota exceed
> --- Attachment is a copy of the message.
>
> [这是服务器 bjtu.edu.cn 的投递程序返回的提示信息]
>
> 到下列地址的信件投递失败,对方服务器无法正常接受或者拒绝接受这封邮件,
> 这是一个永久性的错误,服务器已经放弃继续投递。
> 02211071@(protected)
>
> 对方服务器返回错误提示:
> quota exceed
> --
> [附件是您所发送信件的原件]
>
> Hence thinking that my message was not posted (owing to length), I went
> about
> modifying my query and tried posting it repeatedly, each time getting
> the same
> reply
> as above. Finally frustrated that my message is not going through at all
> and that I get do not spam replies, I unsubscribed from the mailing
> list..
>
> When the message gets posted successfully, why would you send a
> auto-reply like
> above which perplexes the new user... If you could fix this, then there
> won't be confusion to the newbies who post.
>
> Regards
> Arul
>
>
>
>
> The INTERNET now has a personality. YOURS! See your Yahoo!
> Homepage. http://in.yahoo.com/
--
Stephen Turner
Senior Programmer/Analyst - SAIS
MIT IS&T

Attachment:
user_204957.ezm (zipped)On Thu, Feb 4, 2010 at 6:10 AM, Arulmani V A <arulmani_s@(protected):
> Hi,
>
> Apologies for having posted the same query 5 times - it was purely
> UNINTENTIONAL. I'm new to this list and when I posted my query for the
> first
> time, I got the following reply :
>
> Hi. This is the deliver program at bjtu.edu.cn.
> I'm afraid I wasn't able to deliver your message to the following
> addresses.
> This is a permanent error; I've given up. Sorry it didn't work out.
>
> 02211071@(protected)
> quota exceed
> --- Attachment is a copy of the message.
>
> [这是服务器 bjtu.edu.cn 的投递程序返回的提示信息]
>
> 到下列地址的信件投递失败,对方服务器无法正常接受或者拒绝接受这封邮件,
> 这是一个永久性的错误,服务器已经放弃继续投递。
> 02211071@(protected)
>
> 对方服务器返回错误提示:
> quota exceed
> --
> [附件是您所发送信件的原件]
>
> Hence thinking that my message was not posted (owing to length), I went
> about
> modifying my query and tried posting it repeatedly, each time getting the
> same
> reply
> as above. Finally frustrated that my message is not going through at all
> and that I get do not spam replies, I unsubscribed from the mailing list..
>
> When the message gets posted successfully, why would you send a auto-reply
> like
> above which perplexes the new user... If you could fix this, then there
> won't be confusion to the newbies who post.
>
> Regards
> Arul
>
>
>
>
That's definitely not a Struts mailing list message. Looks more like a
problem with one list-subscriber's mailbox -- like they got mailbombed or
quit checking their mail or something.
(by the way, I'm sorry I can't help with your validation issue. I normally
hate posting when I don't have anything helpful to say.)
- Brian

Attachment:
user_204962.ezm (zipped)Hi,
I've similar problem with you and posted the similar question just not long ago, but still not found any solution yet.
Look like struts2 not supporting this feature anymore :(
Pls let me know if you find any solution. Thanks.
LV
________________________________
From: Arulmani V A <arulmani_s@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Wed, February 3, 2010 8:27:27 PM
Subject: Struts 2 - Global Validation
Hi,
Any idea how to do global validation in Struts 2 ?
For example, in Struts 1, I can define all global regular expression validations in a file called validation-regexpr.xml such as :
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE form-validation PUBLIC
"-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN"
"http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd">
<form-validation>
<global>
<constant>
<constant-name>alpha</constant-name>
<constant-value>[A-Za-z]*</constant-value>
</constant>
</global>
</form-validation>
The above global regular expressions can be reused in other validation files as follows :
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE form-validation PUBLIC
"-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.2.0//EN"
"http://jakarta.apache.org/commons/dtds/validator_1_2_0.dtd">
<form-validation>
<formset>
<form name="EmployeeForm">
<field property="EmployeeName" depends="mask">
<msg name="mask" key="errors.invalid" />
<arg position="0" key="label.EmployeeName" />
<var>
<var-name>mask</var-name>
<var-value>${alpha}</var-value>
</var>
</field>
</form>
</formset>
</form-validation>
I could not get information on how to do this in Struts 2, no luck with the Struts2 e-books also. Any help in this regard will be greatly appreciated ....
Regards
Arul
Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/

Attachment:
user_204947.ezm (zipped)If the struts validator is really not working for you try using a modern bean validation framework like jsr-303 that lets you take advantage of the entire Java platform.
http://www.jcp.org/en/jsr/summary?id=303
I started a project on google code to simplify the integration of struts 1 with jsr-303 bean validation. It is licensed under a Apache 2 license. Here is the URL:
http://code.google.com/p/sbva/
check it out. It contains examples of its use in a simple struts app and shows how unit test your validation rules easily in JUnit,
If you find this site useful or at least interesting, please link to it to increase my page rank.
Thanks.

Attachment:
user_204948.ezm (zipped)Hello.
is anyone using successfully Struts 2.1.8.1 using a CUSTOM freemarker
template path (placed in the Web Application and not in the
classpath)?
I mean:
<constant name="struts.ui.theme" value="css_xhtml" />
<constant name="struts.ui.templateDir" value="customdirectory" />
It seems that if I just extract the themes from the struts jar and I
put it in the Web Application paths it stops work.
The syntom is that "template inheritance" doesn't work, freemarker
can't handle the "a" template for css_xhtml.
In fact "a" template css_xthml doesn't exist and freemarker doesn't
look for it in the parent templates.
Thank You

Attachment:
user_204950.ezm (zipped)I am using struts 2 and I am trying to use the validation framework. I
am having difficulty trying to validate a list.
e.g
workspaces[0].name
workspaces[1].name
workspaces[2].name
workspaces[3].name
workspaces[4].name
workspaces[5].name
I would like to require name.
I have tried the following but it does not seem to work.
<field name="workspaces.name">
<field-validator type="required">
<field name="workspaces[].name">
<field-validator type="required">
Any help would be appreciated.

Attachment:
user_204951.ezm (zipped) I am using struts 2 and I am trying to use the validation framework. I
am having difficulty trying to validate a list.
e.g
workspaces[0].name
workspaces[1].name
workspaces[2].name
workspaces[3].name
workspaces[4].name
workspaces[5].name
I would like to require name.
I have tried the following but it does not seem to work.
<field name="workspaces.name">
<field-validator type="required">
<field name="workspaces[].name">
<field-validator type="required">
Any help would be appreciated.
Steve

Attachment:
user_204952.ezm (zipped) I am using struts 2 and I am trying to use the validation framework. I
am having difficulty trying to validate a list.
e.g
workspaces[0].name
workspaces[1].name
workspaces[2].name
workspaces[3].name
workspaces[4].name
workspaces[5].name
I would like to require name.
I have tried the following but it does not seem to work.
<field name="workspaces.name">
<field-validator type="required">
<field name="workspaces[].name">
<field-validator type="required">
Any help would be appreciated.
Steve

Attachment:
user_204953.ezm (zipped)
Attachment:
user_204955.ezm (zipped)
Attachment:
user_204956.ezm (zipped)2010/2/4 Saeed Iqbal <saeedcs@(protected)>:
> Any ideas why my application is throwing this error on Google App Engine
Take a look on struts2-convention-archetype
Regards
--
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl

Attachment:
user_204958.ezm (zipped)That archetype doesnt exist anymore.
On Thu, Feb 4, 2010 at 7:17 PM, Lukasz Lenart
<lukasz.lenart@(protected):
> 2010/2/4 Saeed Iqbal <saeedcs@(protected)>:
> > Any ideas why my application is throwing this error on Google App Engine
>
> Take a look on struts2-convention-archetype
>
>
> Regards
> --
> Łukasz
> http://www.lenart.org.pl/
> Kapituła Javarsovia 2010
> http://javarsovia.pl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
Saeed Iqbal
Independant Consultant
J2EE - Application Architect / Developer

Attachment:
user_204959.ezm (zipped)Thanks.
On Thu, Feb 4, 2010 at 7:17 PM, Cimballi <cimballi.cimballi@(protected):
> Look here, there are 2 tips, about security and swing, you will need :
>
>
> http://whyjava.wordpress.com/2009/08/30/creating-struts2-application-on-google-app-engine-gae/
>
> Cimballi
>
>
> On Thu, Feb 4, 2010 at 9:14 AM, Saeed Iqbal <saeedcs@(protected):
> > Any ideas why my application is throwing this error on Google App Engine
> >
> > Uncaught exception from servlet
> >
java.lang.NullPointerException> > at
>
org.apache.struts2.dispatcher.mapper.DefaultActionMapper.getUriFromActionMapping (
DefaultActionMapper.java:533)
> > at
>
org.apache.struts2.dispatcher.ServletActionRedirectResult.execute (
ServletActionRedirectResult.java:172)
> > at
>
com.opensymphony.xwork2.DefaultActionInvocation.executeResult (
DefaultActionInvocation.java:362)
> > at
>
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:266)
> > at
> >
> >
> >
> > --
> > Saeed Iqbal
> > Independant Consultant
> > J2EE - Application Architect / Developer
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
Saeed Iqbal
Independant Consultant
J2EE - Application Architect / Developer

Attachment:
user_204960.ezm (zipped)i'm using the <sx:tabbedpanel/> in the struts2-dojo-plugin. i have a
few questions on controlling the display/rendering of this component.
1. can i make the <sx:tabbedpanel/> expand 100% in height? i've tried
several things: a) place the <sx:tabbedpanel/> inside a <table> and
set the height of the table to 100%, b) set the <body/> height to
100%, c) set the <sx:tabbedpanel/> height to 100% (with combinations
of a and/or b). none of these seem to work unless i explicitly set the
height in px (i.e. <sx:tabbedpanel cssStyle="width: 100%; height:
400px;"/>), but then this doesn't expand 100% in height.
2. how can i control how the actual tabs inside <sx:tabbedpanel/> gets
displayed (the <sx:div/>)? from looking at the TLD and generated HTML,
it seems the rendering is controlled through CSS. however, at which
level, <sx:tabbedpanel/> or <sx:div/>, do i set the CSS? my problem is
that i don't particularly like the rounded, blue tab display. i want
to change it to something more linear/rectangular. when i look at the
HTML generated, there is a link to
/<my-context>/struts/TabbedPanel.css, but looking at this CSS file, i
just see something defined for, .strutsDisabledTab div span.
any help is appreciated. thanks.

Attachment:
user_204961.ezm (zipped)Hello,
I need to iterate over a list of objects, and the name property of each
object needs to be i18nzed.
<s:property value="%{getText('%{name}')}" /> doesn't seem to do the trick.
It just prints out the property value.
Can someone tell which is the proper way to accomplish this?
Could e.g. changing the place of the i18n interceptor in the interceptor
stack make a difference?
Regards,
Peter

Attachment:
user_204963.ezm (zipped)2010/2/4 Peter Symoens <peter.symoens@(protected)>:
> <s:property value="%{getText(%{name})}" /> doesn't seem to do the trick.
Did you try
<s:property value="%{getText(%{name})}" />
Regards
--
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl

Attachment:
user_204964.ezm (zipped)Sorry, my message was incorrect.
<s:property value="%{getText('%{name}')}" /> prints out the (non-i18nzed) property value.
<s:property value="%{getText(%{name})}" /> prints out nothing.
On 04/02/2010 16:59, Lukasz Lenart wrote:
> 2010/2/4 Peter Symoens<peter.symoens@(protected)>:
>
>> <s:property value="%{getText(%{name})}" /> doesn't seem to do the trick.
>>
> Did you try
> <s:property value="%{getText(%{name})}" />
>
>
> Regards
>

Attachment:
user_204965.ezm (zipped)What do you get when you try <s:property value="%{getText(name)}" /> ?
-Brian
On Thu, Feb 4, 2010 at 10:09 AM, Peter Symoens <peter.symoens@(protected):
> Sorry, my message was incorrect.
>
> <s:property value="%{getText('%{name}')}" /> prints out the (non-i18nzed)
> property value.
>
>
> <s:property value="%{getText(%{name})}" /> prints out nothing.
>
>
>
>
>
>
> On 04/02/2010 16:59, Lukasz Lenart wrote:
>
>> 2010/2/4 Peter Symoens<peter.symoens@(protected)>:
>>
>>
>>> <s:property value="%{getText(%{name})}" /> doesn't seem to do the trick.
>>>
>>>
>> Did you try
>> <s:property value="%{getText(%{name})}" />
>>
>>
>> Regards
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>