on 2007 Mar 23 8:21 AM
Hi Everybody,
I have a view (view 1) which is being mapped with another view(view2). When I trigger my firePlug from View 1, the UI element should be a InputField with STRING as Datatype. and Similarly when I load the View2 thru wdinit(), it should dynamically change into InputField with Date...
Regards/Guru
Request clarification before answering.
Hi Kumara Guru,
As mentioned by Monalisa you can have two Input Field one binded to a context attribute of type String and other Input Field element binded to a context attribute of type date and both having there visible property binded to two context attribute both of type Visibility now before navigating to view two change the visibility property of the appropriate Input Field.
Regards
Sid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Instead of changing same input field's type you can have two input fields (one for taking date type input and another for taking string type data) at design time and map their visibility property to two context value attributes.At runtime set one value attribute to WDVisibility.Visible and another to WDVisibility.None .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why do you want to do that? Can you describe the use case?
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kumara,
it is not possible to change the Input field type. But if create a second field in the component controller with the type date and than copy the string with the method new date (year, mm, dd) to the this new field.
You must transfrom the String in 3 int field. (2007-03-20)
year = 2007; mm = 03 ; dd = 20 )
Map this date field to the view2 an you get in this view the Date
Component Controller
Field 1 --> type String
Field 2--> type date
View 1 --> Controller
Field1 is mapped to the controller Field 1
View 2 --> controller
Field 2 is mapped to the controller field 2
I hope this helps
Regads
Gunter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
for input field with string, create a context attribute with string datatype , and follow the code,
IWDTransparentContainer tCont = (IWDTransparentContainer)view.getRootElement();
IWDInputField inFld = (IWDInputField)view.createElement(IWDInputField.class, <name>);
//bind this with string context attribue
inFld.bindValue(<context element>);
tCont.addChild(inFld;)
write this code in fireplug form view1.
for date do the same with context attribute as date and with value set for current date . write this in wdinit()
regards,
abhijeet
Message was edited by:
abhijeet mukkawar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
29 | |
9 | |
7 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.