Author Login
Post Reply
user Digest 16 Aug 2008 01:46:38 -0000 Issue 8195
Topics (messages 190072 through 190088):
Select tag questions
190072 by: David Barron
Re: Datetimepicker conversion problem
190073 by: JC Oosthuizen
190076 by: Martin Gainty
[OT] Re: Disabling input based on other input with Struts/javascript
190074 by: Dave Newton
Re: [S2]Validation with xml file not working
190075 by: "Stephan Schröder"
Re: Validation referencing problem, using annotations
190077 by: Randy Burgess
Re: Struts2 tags loops
190078 by: Zart Colwing
Re: Session ID
190079 by: Hrvoje Ban
validation: fieldexpression doesn't get executed if stringlength validation fails
190080 by: natalia_
190084 by: Gabriel Belingueres
190085 by: Martin Gainty
190086 by: Dave Newton
190087 by: Martin Gainty
190088 by: Dave Newton
Object put in HttpSession can't be found by S2
190081 by: Ylva Degerfeldt
190082 by: Musachy Barroso
190083 by: Martin Gainty
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_190072.ezm (zipped)I'm not exactly a newbie with struts but I do have what probably amount
to newbie questions about the select tag and how to populate it.
My action form contains fields called selectedTabs and unselectedTabs,
both of which are arrays of Strings. I'd like to build a jsp page that
displays the contents of those fields in select tags where I can select
multiple rows. There are some somewhat helpful examples of single
select tags but I haven't found any for multiple select.
Here is my jsp code, greatly abbreviated:
<html:form action="/SaveTabs.action">
<table>
<tr>
<td>
<br/>
<b>Unavailable Tabs:</b><br/>
<html:select style="width:350" property="unselectedTabs" size="10"
multiple="true">
</html:select>
</td>
<td>
<br/><br/>
<td>
<br/>
<b>Available Tabs:</b><br/>
<html:select style="width:350" property="selectedTabs" size="10"
multiple="true">
</html:select>
</td>
</tr>
</table>
</html:form>
The action form is getting populated before the jsp is displayed but how
do I populate the select tags? Do I use option tags or optioncollection
tags?
If there are any web sites that contain some good SIMPLE examples that
would help too.
Thanks
David Barron
Consultant
Zencos Consulting
david.barron@(protected)
www.zencos.com
work: 919-459-4600 x 119
mobile: 919-995-2356
fax: 919-287-2335
______________________________________________________________
The information in this e-mail and any attached files is confidential.
It is intended solely for the use of the addressee. Any unauthorized
disclosure or use is prohibited. If you are not the intended recipient
of the message, please notify the sender immediately and do not disclose
the contents to any other person, use it for any purpose, or store or
copy the information in any medium. The views of the author may not
necessarily reflect those of the company.

Attachment:
user_190073.ezm (zipped)
Hi All,
I managed to get a workaround and understands the problem a bit better now.
The displayFormat is not only used to format the date on the display side
but is also used to format the data that comes from the action. If I specify
a value, the registered converter will be called but the datepicker will
still try to format according to the displayFormat, which is mostly not an
issue but creates problems when my date is null. This happens because the
null date is converted as an empty string which cannot be parsed according
to the displayFormat.
The workaround is to change the tag to:
<s:datetimepicker cssClass="text medium" name="miniSub.installDate"
label="%{getText('miniSub.installDate')}"
displayFormat="%{getText('date.format')}" value="%{miniSub.installDate ==
null ? '00/00/00' : miniSub.installDate}"/>
This solves my problem but I think the date picker should not give
exceptions when the value is set to a empty string.
Regards,
JC Oosthuizen
JC Oosthuizen wrote:
>
> 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_190076.ezm (zipped)
you can modify the /simple/datetimepicker.ftl to check the dojo value for null e.g.
assuming your jsp references a nameValue parameter
<s:datetimepicker nameValue="" .../>
change
<#if parameters.nameValue?if_exists != "">
value="${parameters.nameValue?html}"<#rt/>
</#if>
assyming you want the default to be 01/01/2001 change the assignment for value to
<#if parameters.nameValue?if_exists != "">
value="dojo.${parameters.nameValue?html:"01/01/2001"}"<#rt/>
inputNameValue="${parameters.nameValue?html:"01/01/2001"}"<#rt/>
</#if>
?
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 06:17:15 -0700
> From: jc.oosthuizen@(protected)
> To: user@(protected)
> Subject: Re: Datetimepicker conversion problem
>
>
> Hi All,
>
> I managed to get a workaround and understands the problem a bit better now.
>
> The displayFormat is not only used to format the date on the display side
> but is also used to format the data that comes from the action. If I specify
> a value, the registered converter will be called but the datepicker will
> still try to format according to the displayFormat, which is mostly not an
> issue but creates problems when my date is null. This happens because the
> null date is converted as an empty string which cannot be parsed according
> to the displayFormat.
>
> The workaround is to change the tag to:
> <s:datetimepicker cssClass="text medium" name="miniSub.installDate"
> label="%{getText('miniSub.installDate')}"
> displayFormat="%{getText('date.format')}" value="%{miniSub.installDate ==
> null ? '00/00/00' : miniSub.installDate}"/>
>
> This solves my problem but I think the date picker should not give
> exceptions when the value is set to a empty string.
>
> Regards,
>
> JC Oosthuizen
>
>
> JC Oosthuizen wrote:
> >
> > 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
> >
>
> --
> View this message in context: http://www.nabble.com/Datetimepicker-conversion-problem-tp18996354p18998475.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)
>
_________________________________________________________________
Get thousands of games on your PC, your mobile phone, and the web with Windows®.
http://clk.atdmt.com/MRT/go/108588800/direct/01/

Attachment:
user_190074.ezm (zipped)Personally I'd use something like jQuery, set the onclick handlers in the document load, and use styles more effectively. Maybe asking on a client-oriented group/list would give you more ideas.
Dave
--- On Fri, 8/15/08, DominicGarda wrote:
> 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?
> --
> View this message in context:
> http://www.nabble.com/Disabling-input-based-on-other-input-with-Struts-javascript-tp18998174p18998174.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_190075.ezm (zipped)> Stephan, are you getting this exception ("URI is not hierarchical") too?
actually i did, i just checked the logs (catalina.out). But the last time was on July 22th.
But i have some more straight forward errors now:
Caught exception while loading file actions/security/Login-register-validation.xml
www.opensymphony.com - Class:
java.net.PlainSocketImplFile: PlainSocketImpl.java
Method: connect
Line: 177 - java/net/PlainSocketImpl.java:177:-1
at
com.opensymphony.xwork2.util.DomHelper.parse (
DomHelper.java:123)
...
Caused by:
java.net.UnknownHostException: www.opensymphony.com
at
java.net.PlainSocketImpl.connect (
PlainSocketImpl.java:177)
...
Important Information: when i tested the webapp on my laptop the laptop wasn't online (local Tomcat6) :-)
So does that mean validation will always fail when the server has no internet connection?! Probably because it tries to check if the xml-file is well formed and fails to get the DTD? What could be done as workaround for this problem?
/Stephan
-------- Original-Nachricht --------
> Datum: Fri, 15 Aug 2008 13:02:20 +0200
> Von: "Ylva Degerfeldt" <ylva.degerfeldt@(protected)>
> An: "Struts Users Mailing List" <user@(protected)>
> Betreff: Re: RE: [S2]Validation with xml file not working
> 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)>
> wrote:
> >
> > 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)
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

Attachment:
user_190077.ezm (zipped)You need to use the VisitorFieldValidator annotation for objects referenced
from the action. See
http://struts.apache.org/2.0.11.2/docs/visitorfieldvalidator-annotation.html
. The form doesn't look right nor does your annotation; why do you have
asterisks in the field name and why is type<%7B@(protected)
the annotation? That should be type=RequiredStringValidator. Maybe it got
screwed up posting to the list.
Regards,
Randy Burgess
Sr. Software Architect
D5 Systems, LLC
> From: "dug ." <dugdugdugdug@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Fri, 15 Aug 2008 14:16:36 +1000
> To: <user@(protected)>
> Subject: Validation referencing problem, using annotations
>
> 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_190078.ezm (zipped)Filipe David Manana-2 wrote:
>
> Nop. Neither way works.
>
> <s:iterate value="pageCount">
> <s:property />
> </s:iterate>
>
> This has a single iteration, and the value outputted is the value of
> the variable (10 for example).
>
You can achieve what you expect with the following code in your JSP:
<s:bean name="
org.apache.struts2.util.Counter" var="counter">
<s:param name="last" value="%{pageCount}" />
</s:bean>
<s:iterator value="#counter">
<s:property />
</s:iterator>
--- OR --- you can publish a Counter directly from your java code
public class TestIterator2 extends ActionSupport {
Counter counter;
public Counter getCounter() {
return counter;
}
@Override
public String execute() throws Exception {
counter = new Counter();
counter.setFirst(0);
counter.setLast(40);
return SUCCESS;
}
}
that can be iterated from your JSP like this:
<s:iterator value="counter">
<s:property />
</s:iterator>
ZartC
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_190079.ezm (zipped)On Fri, Aug 15, 2008 at 2:39 PM, "Stephan Schröder" <simon.void@(protected):
> Try this one:
> ServletActionContext.getRequest().getSession().getId();
>
> /Stephan
That's what I was looking for. Thanks!

Attachment:
user_190080.ezm (zipped)
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>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_190084.ezm (zipped)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)
>
>

Attachment:
user_190085.ezm (zipped)
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

Attachment:
user_190086.ezm (zipped)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

Attachment:
user_190087.ezm (zipped)
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/

Attachment:
user_190088.ezm (zipped)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/

Attachment:
user_190081.ezm (zipped)Hi!
Shouldn't Struts 2 be able to find objects stored at session level
just by using the name?
In my action I put a Set called "skillsFound" in the HttpSession. Then
I want to access it (and iterate through it) from a jsp, but this line
of code gives a False result:
<s:if test = "skillsFound != null">
Is there something I've forgotten to do or have I misunderstood things?
Thanks in advance!
/Ylva

Attachment:
user_190082.ezm (zipped)use "#session.skillsFound" or "#session[''skillsFound']"
musachy
On 8/15/08, Ylva Degerfeldt <ylva.degerfeldt@(protected):
> Hi!
>
> Shouldn't Struts 2 be able to find objects stored at session level
> just by using the name?
>
> In my action I put a Set called "skillsFound" in the HttpSession. Then
> I want to access it (and iterate through it) from a jsp, but this line
> of code gives a False result:
>
> <s:if test = "skillsFound != null">
>
> Is there something I've forgotten to do or have I misunderstood things?
>
> Thanks in advance!
>
> /Ylva
>
> ---------------------------------------------------------------------
> 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_190083.ezm (zipped)
bookmark this page!
http://struts.apache.org/2.x/docs/accessing-application-session-request-objects.html
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 16:31:47 -0400
> From: musachy@(protected)
> To: user@(protected)
> Subject: Re: Object put in HttpSession can't be found by S2
>
> use "#session.skillsFound" or "#session[''skillsFound']"
>
> musachy
>
> On 8/15/08, Ylva Degerfeldt <ylva.degerfeldt@(protected):
> > Hi!
> >
> > Shouldn't Struts 2 be able to find objects stored at session level
> > just by using the name?
> >
> > In my action I put a Set called "skillsFound" in the HttpSession. Then
> > I want to access it (and iterate through it) from a jsp, but this line
> > of code gives a False result:
> >
> > <s:if test = "skillsFound != null">
> >
> > Is there something I've forgotten to do or have I misunderstood things?
> >
> > Thanks in advance!
> >
> > /Ylva
> >
> > ---------------------------------------------------------------------
> > 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
>
> ---------------------------------------------------------------------
> 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