Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java Open Source > Struts
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Struts section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 2nd, 2006, 07:50 PM
Authorized User
 
Join Date: Apr 2005
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default problen struts 1.1 validator.xml

Hello guys
(sorry for my grammar)

i have a form in a jsp related with a ValidatorActionForm call WorkerForm (many Actions Share the same WorkerForm)
why i use ValidatorActionForm instead of ValidatorForm???
http://www.oracle.com/technology/ora...ev_struts.html
or
http://www.devarticles.com/c/a/Java/Validator/3/

i have this sequence of calls


1)index.jsp (just have some link (just a menu) to call an Action LoadFormWorkerAction )
2)LoadFormObreroAction

just make these few lines
try{
            ArrayList niveles=obrerobo.getNivelesDesepeno();
            ArrayList tiposdocs=obrerobo.getTiposDocumentosIdentidad();

            request.setAttribute("ListaTipoDocs",tiposdocs);
            request.setAttribute("ListaNiveles",niveles);
}

their job is fill 2 html:select with 2 ArrayList as u can see,
then the Forward go to insertWorker.jsp

3)insertWorker.jsp

which is related or validate with validator.xml;
here i show one of the 2 select, the other have the same format, but of course with a referecne to other
"property"

<logic:present name="ListaTipoDocs" scope="request">
 <html:select property="tipodocumentoObrero" >
    <html:optionsCollection name="ListaTipoDocs" label="nombre" value="iddocumento" />
</html:select>
</logic:present>

the joke is that, when i press submit in insertWorker.jsp (really happen a validaton
, ie white fields, bad format etc etc are detected) and showed with html:errors
in the same jsp
but the NO APPEAR ANYMORE THE 2 HTML:SELECT

if i delete <logic:present name="ListaTipoDocs" scope="request"> </logic:present>
appear a error message from the tomcat that says that "ListaTipoDocs"
can't be found it any scope
so the 2 Attributes i think that are lost

so, friends, how i can resolve this???

p.d: i cant add 2 properties just ArrayList to the WorkerForm , because maybe in the future
the List can be very long and kill my performance when i press submit, so i need work
in the way with request.setAttribute();


Thanks a lot for your time


LIVE AT POMPEII 1972
__________________
LIVE AT POMPEII 1972





Similar Threads
Thread Thread Starter Forum Replies Last Post
XML + Schema Validator newbieboobers XML 3 August 28th, 2008 11:28 AM
where is the "validator-rules.xml" in ch-19? satanest BOOK: Beginning JavaServer Pages 0 August 10th, 2008 01:19 AM
problem in using struts validator skmmail Struts 0 September 4th, 2007 06:00 AM
Struts Validator Framework karthikres Struts 0 September 5th, 2006 04:36 AM
app problen in network msrnivas .NET Web Services 1 January 28th, 2004 11:01 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.