on 03-28-2007 1:10 PM
I am trying to create a sales order application. It has Sales Order Header and Line Items & Sub-Line-Items.
Sales Order
Sales Order Header (cardinality: 1:1)
Line-Item (cardinality : 1:n)
Sub-LineItem (cardinality: 0:n)
Line-Item has 8-10 input fields where user can enter the values. He can also add sub-items to the LineItems; the sub Items also contains the input fields.
I would like to design the flexible GUI so that it can be change based on the items selected.
Pls can you suggest the way to implement it. It will be nice if you can provide the sample application which will cover required functionality.
Hi Abhijit,
Thanks for reply.
I have created multiple Line-Items & Sub-Items with visibility property. It will be visible based on users input. I was not able to map multiple Line items with the single context node. If I map it then I am getting last entered value only.
Can you please explain how to map the UI elements with the context node in this case? Do I need to create as many node as Line-Items/Sub-Line Items I have created during design time?
Thanks,
Vineet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
You can create one value node named Sales Order,
it will have its attribute along with another value node Line Item,
this in term will hold value node Line SubItem.
If user wants to create another sub item then you will create new element of value node Line subitem. If user ends up with creation of sub items ane wants to create line item then go one step above to create new element of LineItem and so on.
this way u can create the element of particular node.
IPrivate<view name>.I<value node> nodeObj = wdContext.node<value node>();
IPrivate<view name>.I<value node>Element eleObj = nodeObj.create<valu node>Element();
<set values for the element here>
eg. eleObj.set<value attribute name > = "";
Remember whenever you create any element dont forget to bind it with the node.
wdContext.node<value node>.addElement(<new element>)
hope it helps
appreciate if it helps
regards,
abhijeet
Hi Abhijit,
I have followed the steps suggested by you. I am stuck at following point.
1. User clicks on Add New Item link
2. Created Element for the Item node. (Item node already created in init method)
3. Added item Element to the Item Node.
<b> How to map/ associate this dynamically created element to the UI element (Which is going to be visible)?</b>
hi,
goto Layout of view,
in outline view, right click on RootUIElementContainer, choose option Apply Template, choose form, from the context hierarchy select the attributes you want to bind to UI element, click next, then from Editor column you can select the proper UI element for your context attribute.
hope it helps
regards,
abhijeet
Vineet,
there wont be any template for creating flexible Ui for any application. It all depends upon the requirement of application.
but just for your reference here is the tutorial saying the guidelines recommendation for UI development.
https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/webcontent/uuid/5c8500cd-0401-0010-d49e-af15579891... [original link is broken]
for displaying data you can use table control, use linktoaction UI element for asking user if he wants to add line item ot sub item, according to selected option you can make relevant input fields visible or invisible.(assuming creating them design time and making them visible runtime)
regards,
abhijeet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
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.