srujanmiryala
asked on
Flex Repeater
Hello every one,
please use cairngorm.swc file
my question is.
select the number of passengers and when you click on submit button i am going to show the data like passenger DateofBirth field and age feild in the second page.
when i change the date feild to the passenger date of birth i need to populate the age feild with the age of passenger (this should be calculated according to the date selected in date feild) and that should show in years(like if age is one year and two months it should show as 1.2)
and when i click the submit button in second page i need to check whether all the feilds are entered in the repeater.
can anybody help me in this.
Thanks in advance
RepTest.txt
first.txt
second.txt
last.txt
AppModelLocator.txt
please use cairngorm.swc file
my question is.
select the number of passengers and when you click on submit button i am going to show the data like passenger DateofBirth field and age feild in the second page.
when i change the date feild to the passenger date of birth i need to populate the age feild with the age of passenger (this should be calculated according to the date selected in date feild) and that should show in years(like if age is one year and two months it should show as 1.2)
and when i click the submit button in second page i need to check whether all the feilds are entered in the repeater.
can anybody help me in this.
Thanks in advance
RepTest.txt
first.txt
second.txt
last.txt
AppModelLocator.txt
ASKER
Hello ZZynx,
Sorry for the late reply.i was waiting for the confirmation how the age should be displayed.
it should be disaplayed in months(i.e one year and 1 month = 13).
Sorry for the late reply.i was waiting for the confirmation how the age should be displayed.
it should be disaplayed in months(i.e one year and 1 month = 13).
In second.mxml there's
for(var i:int=0;i<modellocator.num berofPasse ngers;i++) {
while numberofPassengers is undefined in AppModelLocator.
Same for
passinfArrayColl
and
LAST
for(var i:int=0;i<modellocator.num
while numberofPassengers is undefined in AppModelLocator.
Same for
passinfArrayColl
and
LAST
ASKER
package
{
import com.adobe.cairngorm.model. IModelLoca tor;
import mx.collections.ArrayCollec tion;
[Bindable]
public class AppModelLocator implements IModelLocator
{
public static var instance:AppModelLocator;
public function AppModelLocator(enforcer:S ingletonEn forcer)
{
if (enforcer == null)
{
throw new Error("You can only have one modal locator");
}
}
public static function getinstance():AppModelLoca tor
{
if (instance == null)
{
instance = new AppModelLocator(new SingletonEnforcer);
}
return instance;
}
// Define Variablea
public var workflowState:uint = 0;
// Number of passengers
public var numberofPassengers:int;
public var passinfArrayColl:ArrayColl ection;
// Define Constants
public static const FIRST:uint = 0;
public static const SECOND:uint = 1;
public static const LAST:uint = 2;
}
}
class SingletonEnforcer{}
{
import com.adobe.cairngorm.model.
import mx.collections.ArrayCollec
[Bindable]
public class AppModelLocator implements IModelLocator
{
public static var instance:AppModelLocator;
public function AppModelLocator(enforcer:S
{
if (enforcer == null)
{
throw new Error("You can only have one modal locator");
}
}
public static function getinstance():AppModelLoca
{
if (instance == null)
{
instance = new AppModelLocator(new SingletonEnforcer);
}
return instance;
}
// Define Variablea
public var workflowState:uint = 0;
// Number of passengers
public var numberofPassengers:int;
public var passinfArrayColl:ArrayColl
// Define Constants
public static const FIRST:uint = 0;
public static const SECOND:uint = 1;
public static const LAST:uint = 2;
}
}
class SingletonEnforcer{}
ASKER
hey zzynx:
Did you find any solution for this i have kept the model locator code in previous comment
Did you find any solution for this i have kept the model locator code in previous comment
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hey You are Excellent
Thank you very much.
Onemore Question after clicking the proceed button and before navigating to last page i need to check whether all the feild in the repeater are entered or not. how to do this.
Thank you very much.
Onemore Question after clicking the proceed button and before navigating to last page i need to check whether all the feild in the repeater are entered or not. how to do this.
thanx 4 axxepting
>> Onemore Question after clicking the proceed button and before navigating to last page i need to check whether all the feild in the repeater are entered or not. how to do this.
http://livedocs.adobe.com/flex/3/html/help.html?content=validators_2.html
http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/
>> Onemore Question after clicking the proceed button and before navigating to last page i need to check whether all the feild in the repeater are entered or not. how to do this.
http://livedocs.adobe.com/flex/3/html/help.html?content=validators_2.html
http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/
???
one year and 1 month = 1.1
one year and 10 months = 1.10 also?
Since 2 months = 2/12 or 1/6 or 0.16666 year shouldn't that be 1.1666666?