on 03-03-2008 10:00 AM
Hello All,
I want to add row dynamically when press enter on the Input field without null.
Please help .
Thanks in Advance.
CSP
Hallo CSP,
there will be a new UI-Element named TableRowCreator to be associated with a Table-UI-Element which exactly does what you want. This new ViewElement will first be available in NW CE 7.1 SP4:
Here is an extract from the IWDTableRowCreator-JavaDoc-API:
Web Dynpro TableRowCreator API.
The TableRowCreator is used to provide a feature which eases the handling of the table for rapid user input. When this feature is enabled by TableRowCreator.Enabled an additional row is shown up at the end of the collection. If the user enters this row by TAB key or by mouseclick an action TableRowCreator.OnCreate is fired. This gives the application the opportunity to add a new NodeElement to the collection. The application has to take care about the focus settings and the right scroll position after the event is fired.
Restrictions:
This feature is only available for the standard table. The TableRowCreator cannot be used in the combination with TableRowArrangement.
Regards, Bertram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello,
bind the conext attribute of your table column to the inputfield value property.so when u click on particular row,onleadaction performed and selected row will add on inputfield.
hope your problem will solve.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hai pradeep,
To add an empty row here is the coding,
public void onActionaddrow(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionaddrow(ServerEvent)
try
{
IPrivateSalesdet.ITablepartnersNode noder=wdContext.nodeTablepartners();
IPrivateSalesdet.ITablepartnersElement elem;
for(int i=0;i<1;i++)
{
elem= noder.createTablepartnersElement();
noder.addElement(elem);
}
}
catch(Exception e)
{
}
call this method on action enter of the inputfield.
Regards
Sharanya.R
Edited by: Sharanya R on Mar 3, 2008 12:35 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Create a action for the input field for which on pressing "Enter" key a row will be created dynamically and the respective data in the input field should will be added in the table.
Example:
Create the following nodes
vnInputNode (vaName1) 1:1 cardinality
vnTableNode(vaName2) 0:n cardinality
Bind the input field with the value attribute vaName1
For that Input field create an action for that , let it be "AddData"...
Implement the following code
public void onActionAddData(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionAddData(ServerEvent)
IPrivateTestView.IVnTableNodeElement tableNodeEle = wdContext.nodeVnTableNode().createVnTableNodeElement();
tableNodeEle.setVaName2( wdContext.currentVnInputNodeElement().getVaName1());
wdContext.nodeVnTableNodeData().addElement(tableNodeEle);
//@@end
}
Regards
Chandran S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
On Enter do the following
In the following Name of the node is Orders and the name of the attribute is ordertype, replace this with yours
IOrdersElement element = wdContext.nodeOrders().createAndAddOrdersElement();
element.setOrderType(0);
Regards
Ayyapparaj
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 an action and bind it to your input field's OnAction property.
2. Write this code to add row to your table
IPrivate<viewname>.I<tablenode>Element ele = wdContext.node<tablenode>().create<tablenode>Element();
ele.set<attribute>(<value>);
wdContext.node<tablenode>().addElement(ele);
Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In the eventhandler method for the onEnter event for the inputfield, just add one more element to the node bound to the datasource attribute of the table.
Regards,
Satyajit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Create an action for onEnter for the inputField. In that you can create an element of the node to which your table is mapped.
IPrivate<View>.I<Node>Element element = wdContext.create<Node>Element();
element.set<attr>("1");
element.set<attr>("2");
*
*
wdContext.node<Node Name>().add(element);
thanks & regards,
Manoj
Edited by: Manoj Kumar on Mar 3, 2008 3:43 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi.
Add a action to the "onEnter" property in your inputfield.
In your action method, add a row to the table.
/Mikael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.