Originally posted by Prashanth Chandra: Hi I am new to struts. Could someone please help me of what is a dyna validator form and how to use it.
thanks in advance Prashanth
To my understanding, a Dyna Validator Form is used whenever you have several form pages whereby the values involved are of the same type.
Using the Dyna Validator Form, you can make validation through the struts-config.xml file with optimised performance instead of creating individual .java classes which serves the same functionality.
For example, you have this page whereby requires the user to re-authorise themself in order to enter some special functionality, (e.g. Admin page), you can use a dyna validator form to link up the validation steps required with the standard login page and the admin page. By doing so, you need not create two different .java files just to achieve this result, instead, using a dyna validator form will be able to get the same desired results.
Hope these information helps...
If you can't convince them, confuse them!
Joined: Dec 07, 2005
Hi Aaron Ting, Thanks for the reply.
I am trying to call the model class where i have some 3 or 4 methods from a jsp page by using the .tld defined as part of struts. I am not getting how to invoke a particular method from the model class.
you said that you said that you are trying to call methods in jsp... it is not at all recommended to write java code in the jsp file... model is nothing but a jaba bean how can you call java bean methods in jsp..
from tld file it is too dificult but not impossible for that you need to create your own tld file in that you define your own uri and prefix and with our own class name and atttributes
and develop your TagHandler Class which extends Predefined class called TagSupport pad in the taghandler class write setters and getter methods then doEnd() in the do end tag write a code which will create object of model and which can call methods also
then import that userdefined taglib in to your jsp like <% taglib uri="" prefix="'%>