on 09-15-2009 6:42 AM
HI Gurus,
I have tabstrip in my application and in that tabstrip i have 3 tabs like tab1,tab2 ,tab3.
When i click on tab1 the layout displays like in table format and i have two buttons in the down of that table i.e. 'NEW'
and 'EXIT'.
When i click on NEW button another screen will appear with some fields.Here i entered the data in that fields and clicking on SAVE than the new record will appear in the tab1 table.
Up to here my application is working good.
if i clicks on row in tab1 table than the records are appear in another screen .here records in this screen like
emp name ,emp address i clicks on another tab i.e.tab2 or tab3 and then clicks back onto the tab1 button and then clicks NEW to create a new record and enter data in that fields and clicking on SAVE button, here the record is saving in existing record in the tab1 table first row.
Can any one give your valuable inputs to clear this bug.
Regards,
Suresh.
Hi suresh,
if i clicks on row in tab1 table than the records are appear in another screen .here records in this screen like
emp name ,emp address i clicks on another tab i.e.tab2 or tab3 and then clicks back onto the tab1 button and then clicks NEW to create a new record and enter data in that fields and clicking on SAVE button, here the record is saving in existing record in the tab1 table first row.
I believe, u are adding the new record to the existing node element instead of creating a new element.
while saving the data, create a new nodeElement and add it to Node.
let say ur node is "Test".
ITestElement element = wdContext.nodeTest().createTestElement();
element.setInputParameters("");
element.setInputParameters1("");
wdContext.nodeTest().addElement(element);
instead of creating a new NodeElement and adding it to node collection, u might be using ccurrentTestElement.thats why the lead selected row row is replaced with new element.
Hope it helps,
Thanks and Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Fazal,
Thanks for reply,
No, i adding separalty to the table node.When i click on tab1 and clicks on NEW button and enters date and SAVE then
its working fine creating one record and storing that record in table.
But when i open the e row to edit and with out doing anything and clicks on TAB2 or TAB3 and click on again TAB1
and NEW the the record saving int he existing reocrd in the table.
Can you please give you inputs.
Regards,
Suresh
Hi Suresh,
But when i open the e row to edit and with out doing anything and clicks on TAB2 or TAB3 and click on again TAB1
and NEW the the record saving int he existing reocrd in the table.
1. How u are editing the Table Row ? on click Edit Button , are u making bthe particular row to editable ?
2. can u post the code for adding the new data record for adding it to table .
3. on click New button, are u feeding the data for new record in Pop Up window? if yes , what is the context structure? and similarly for edit button also?
can u please explain ur query in detail and even context structure for New, Edit button?
Thanks and Regards
Hi Suresh,
On click on 'NEW' button are you (1) setting the values to the table node or (2)creating the new table element>setting the values to that element->and adding the element to the table node.
Follow the procedure (2). for the data to be available in table.
If the above procedure does't solve your issue, paste the code so that we can help you.
Regards,
Kiran Kumar
HI FAZAL,
I using below code on SAVE action.
wdThis.wdGetTest_CustController().wdGetContext().currentBAPI_InputElement().set();
wdThis.wdGetTest_CustController().wdGetContext().currentBAPI_InputElement().set();
wdThis.wdGetTest_CustController().wdGetContext().currentBAPI_InputElement().set();
wdThis.wdGetTest_CustController().wdGetContext().currentBAPI_InputElement().set();
wdThis.wdGetTest_CustController().wdGetContext().currentBAPI_InputElement().set();
I think i have change the code here?
I need to create element for this below bapi ?
wdThis.wdGetTest_CustController().wdGetContext().currentBAPI_InputElement
Could you please help onthis bug.
Regards,
Suresh
Edited by: suresh111 on Sep 15, 2009 8:37 AM
HI Fazal and Kiran,
Thaks for reply,
FAZAL:In the table i have one column with "LINKTOACTION",so when i click on this paticular column the entire
row will get for EDIT mode.Here clicking on EDIT and NEW buttons 2 screens are both.one is for create record and
another for edit record.
Kiran: I think in my previous post you can see the code using on clicking on SAVE button.
Regards,
Suresh
Hi suresh,
I have a doubt whether the BAPI_inpurElement is a value node or model node ? if it is model node and have u bind the model node to data source property fo Table ?
Whether ur requirement is save the new data in the backend and again read all the data from backend and display it in ur table?
or
if it the BAPI_inputElement is a value node , then u should use createBapi_InputElement instead of currentBapi_InputElement();
can u describe ur requirements clearly ?
HI FAZAL,
My BAPI_inpurElement is a model node and i have created one valuenode and i bind that value node to the table.
Requirement is save the new data in the backend and again read all the data from backend and display in my table.
If you need nay information pleaselet me know.
Regards,
Suresh
Hi suresh,
Please follow these steps for ur requirements:
1. create a method in custom controller, say "createNewRecord", in this method, u can execute the model for newly created record. for creating a new record , u have a value node say "NewRecord" of cardinality 1:1,create the same node in custom controller and do the context mapping.
2. in the above method , u can access the value node "NewRecord" and set it to the model attributes and execute the model.
3. after executing the model , u need to do two thing: 1. invalidate the value node "NewRecord" which holds the newly added record. 2. invalidate the value node bound to table and read all the data and populate to the value node bound to table.
4. for edit functionality, please furnish some more details?
Thanks and Regards
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.