on 01-06-2006 10:58 AM
Hey
I got a question with binding inputfields.
I got a table that is binded to my context. Under this table i got a button that opens a new VIEW with a form. This form is binded to the context. My problem is that old contextinput is still in the form if im using it serveral time. How is it possibple to "empty" the context? cause the fields in the forms has olds values
Please post the context structure and the data binding of the UI elements.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not sure if I understand your use case correctly.
You have a table filled with data, you want to add a new entry by filling out a form?
In the action handler of the button, create and add a new node element, set the lead selection to the index of this element. Then you can use your existing data binding.
Armin
yes thats correct. I want to add a new entry by filling out a form..
I tried this code on the view with the table:
public void onActiontoNewPersonView(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActiontoNewPersonView(ServerEvent)
IPersonNode bNode = wdContext.nodePerson();
IPersonElement bElement = bNode.createPersonElement();
bNode.addElement(bElement);
int leadSel = bNode.getLeadSelection();
if(leadSel == -1)
++leadSel;
bNode.setLeadSelection(leadSel);
wdThis.wdFirePlugToNewPersonView();
//@@end
}
But im still getting the old value
thanx, but i cant find that method on the currentContextElement. This form is suppose to create a new element on the node, but each time i open the form, i get the last element i had opened on the form
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kristoffer,
you put following code in your onPlugIn event.
wdContext.currentContextElement().setInputContext("");
That will solve your purpose.
Ashutosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
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.