on 02-06-2008 1:31 PM
Hello !
Following situation is given.
I want to add all these Order into Component Contollers Context, but how ?
They are mutiple Orders
Order[] arrq = wdThis.wdGetOrdersModelInterface().orderGetCached();
Please notice state also this informatiom Type and cardinality !
Name of Context Node : SalesOrder cardinality ????
Name of Context Attribute : salor Type???
Thanks
Sas Erdem
Sas,
Order[] arrq = wdThis.wdGetOrdersModelInterface().orderGetCached();
Create context variable SalesOrder, Change Type to Java Native Type -> ArrayList or any other util object.
Set Value to the variable like this.
wdThis.wdGetOrdersModelInterface().wdGetContext().currentContextElement().setSalesOrder(arrq );
Get Object like this.
if(wdThis.wdGetOrdersModelInterface().wdGetContext().currentContextElement().getSalesOrder()){
Order[] arrq1 = (Order[]) wdThis.wdGetOrdersModelInterface().wdGetContext().currentContextElement().getSalesOrder();
}
Hope it is clear to you, write me back if you need any thing more.
Regards,
Sridhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ayyapparaj Thank you!
How can I contact to you ?
Regards
sas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
They are mutiple Orders
Order[] arrq = wdThis.wdGetOrdersModelInterface().orderGetCached();
As you want to add the orders returned
Create a context node lets say "Orders" cardinality 0..n
and create the attributes as they exists in your Oder bean. Ex as you mentioned salesordertype
then iterate through this Order array and populate the orders node created in previous step.
for(int x=0;x<arrq.length; x++)
{
IOrdersElement ordersElement = wdContext.nodeOrders().createAndAddOrdersElement();
ordersElement.setOrderType(arrq.getOrderType); //Guess that your OrderType returns from your bean
}
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.