casinova guy

Greenhorn
+ Follow
since Dec 04, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by casinova guy

Hi all,

Please clear my thought about strtus validation Framwork.

I have a index form , in that i have buttons to transfer user to particular form like Form1 , form2 ....

as examples will take form1.
Form1 contain two tabs
tab1-->viewTab (default tab-- which loads the DB data in tables format )
tab2--> AddTab( here user can add new record )

Now when user is on index form i.e on the application start up form...he will click Form1 so user directed to Form1 with Tab1 loaded Data...(when user click Form1..the action called up and in action it will get the data from DB in ArrayList and it will be added as requestParameter(arrayList)....so in Form1 will get the Data and we can load data in viewTab .....I have same FORMBEAN for view as well as the add feature

this above scenario works fine.....

Now i want to validate the data for Tab2 which is on Form1...i configured validationFramwork for above scenation succesfully ..

i have extended ValidatorForm for FORMBEAN and deleted Validate Method from FORMBEAN to configure validationFramwork...and did all configuration..i tested with sample application ..its work fine

now the problem is:

when user is on index form and click Form1 then i am getting error that the arrayList is not found which arrayList loads the data in viewTab which is default tab...

as per my view this error because , the validationFramwork first validate the data before calling any Action.....so i am not getting the arrayList which build in Action ...

is that so???
[ December 18, 2008: Message edited by: casinova guy ]
15 years ago
thanks a lot ..i know its old post but great fundas...i just stuck with internationalization and i found this post after 2 days of googling , and its work for me...thanks a loootttttttttttt
15 years ago
thanks for reply..

arraylist contain the the object of formbean ...and form bean has different attributes..

FormBean formBean = new FormBean();
formBean.setHealthSupplyCode(rs.getInt("db_column_1"));
testArrayList.add(formBean);

return testArrayList;
15 years ago
Hi all,
I tiered of html:select and html ptions or html ptionsCollection tags...

I have FORMBEAN

for example

TestFormBean
{
String name:
int id;

getter and setter methods
}

ACTION CLASS
{
ArrayList testList = DaoClass.getArrayList();
request.setAttribute("testList",testList);

}

DAO CLASS
{
ArrayList testList;
TestFormBean testFormBean;

while(next)
{
testFormBean = new TestFormBean();
testFormBean.setName(rs.get('name'));
testFormBean.setId(rs.get('id'));

testList.add(testFormBean);

}
return testList
}


so arrayList contains objects of formbean.
i am not getting what to write in all thease props..which make drop down list of db values
and when user submit this dropdown it will automatically sets the formbeans values so we can get the user selected value...



now in jsp

<html:select property='???'>
<html ptions collection='?' name='???' value='???'/>
</html:select>



please help me..

thanks in advance
15 years ago