on 06-18-2007 3:37 AM
Hi,
In my application i need to change or edit the existing data .After changing i need
to save it .I have two views DisplayView and EditView .I have one controller named EmployeeComp .There is a UI element in the DisplayView named "EmployeeName" and one value attribute in the view context named "ctx_employeeName" .I have created another context attribute in the component controller and in the second view in the same name and have done the context mapping from view to controller correctly .
There is an action named "onActionChange" which is attached to a button on the DisplayView .On Clicking the change button the action should go to next view i.e EditView .The employee name should be in editable mode and after i change the name and click the submit button on the second view ,it should save the new edited data .
I am facing problem while writing the code for changing the data and then saving it .Can anybody tell me the code to change the data and to save it .
Thanks .
Hi,
There will not be any problems as long as you have mapped the same context across the two views .
If the context is mapped then Context always have the updated data.I don't think you need to write any code for that.
Regards,Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kl,
As far as I see there could be no problem involved in this:
Try the following for the name field :
View 1(Read Only) View 2(Editable)
Context : Attribute Name----
>Name
Once the attribute is mapped.Navigate to another view there is nothing else required.
Regards
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You dont need any coding to set the changed value back to the context attribute.
Since you have mapped the context attribute in the DisplayView and EditView to a context attribute of component controller. So after viewing the name in your DisplayView when you navigate to EditView onActionChange,you can change the value.When you cahnge the value and submit the new value that is entered is update across the component controller and DisplayView context.
To see this create a action onActionSubmit in EditView and navigate to the DisplayView, you will see the updated value.
In webdynpro framework when the value of a context attribute is changed, then the value gets updated across all views to which the context attribute is mapped.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
1)Create attribute as NAME in component controller
2)Context map that attribute to the both the views
3)In both the views,bind that attribute to UI element(Input Field)
4)Insert button to both views and also create action like, click------>
first button----->secondview
click-->second view button--
>firstpage
Try the above steps,
whatever change in first view it will update in seond view,if u change in second view it will update in first view....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.