Handle model nodes in a generic way
Hello,
Is there any way to manage model nodes and model attributes in somewhat generic way?
I am trying to build a generic component which can handle generic model objects execution. For example, using a generic method executeModelObject(IWDNode node) who initilialize a model node, populates it and execute it, but without using specifical custom classes generated by WebDynpro Framework. I think, that the code must be specifical to a particualr model node.
Any help?
David,
You can switch off 'TypedAccessRequired' property for any node at design time and then these nodes can be accessed with generic API - you need to know the name of node and element index though.
See [this presentation|http://www.google.com/url?sa=t&source=web&ct=res&cd=7&url=http%3A%2F%2Fwww.bus.ucf.edu%2Frhightower%2Fism4154%2FNotes%2FWD%2FContext%2520Programming.ppt&ei=L1tNSa-BPJiU8wT47uiZDw&usg=AFQjCNGlcTAwGMrxidkcothQOl-U6Kf6rw&sig2=3M03WTUxex4EBWJCeCfIIA] (Slides 6 and 7 in particular).
Hope this helps.
Vishwas.
Similar Messages
-
How to bindi a UI element to 2 model nodes different in the same view
I want to know how I can bind a set of inputfields, in a form view, to 2 different model nodes ?
<u>example:</u>
Im working with 2 adaptional RFC, both working, in my Custom Context.
Ztest_Search
Ztest_Update
In my ResultView I have 2 Model nodes (one for each RFC) I show a set of inputfields in a form view, binded to the Ztest_Search_output of Ztest_Search. This works.
now I want to update the changes, but I can't find the ways of binding the same inputfields to my other Model node (Ztest_Update) in the context of ResultView.
Note: If I create a duplicate set of inputfields , one for Ztest_Search binded to the Ztest_Update_output and the other to the Ztest_Update_Input Works. But I wanna avoid this duplicated set of inputfields.
ThxRodrigo,
If I understood correctly, your problem is to get the data from the input fields which are bound to a
model node, Ztest_Search_output and set it to the model node of another RFC, Ztest_Update.
This can be done by getting the suitable values from the model attributes of Ztest_Search_output
and setting it to Ztest_Update.
<b>/**
* valueOne, valueTwo are the name of the model
* attributes that are bound to the Input fields.
*/</b>
String firstValue = wdContext.currentZtest_Search_outputElement
().get<valueOne>;
String secondValue = wdContext.currentZtest_Search_outputElement
().get<valueTwo>;
Ztest_Update_Input update = new Ztest_Update_Input();
wdContext.nodeZtest_Update_Input().bind(update);
<b>/*
*<b>Zstructure is the structure of the model node under
*Ztest_Update_Input to which the values have to be
*updated.</b>
*/</b>
ZStructure structure = new ZStruture();
structure.setValueOne(valueOne);
structure.setValueTwo(valueTwo);
update.addZStructure(structure);
try
update.execute();
catch (Exception ex)
wdComponentAPI.getMessageManager().reportException(ex.getMessage(), false);
wdContext.nodeZtest_Update_Output().invalidate();
Bala -
Hello Friends,
To display the field on the View, we can create the field via 3 ways:
1) By creating the model attribute
2) By creating the model node using the GENIL object and using its attributes in view
3) Creating the field in Database structure using AET
But, i am not aware that in exactly what kind of business scenarios we use the above 3 methods to create the field.
Could you help me out to clarify the same.Hi Dev,
1). By creating the model attribute: we will use this option in case of the field is avaibla in stanadrd sap system. It might be in another under child context nodes and we will use BOL relations to access the attribute.
2). By creating the model node using the GENIL object and using its attributes in view: We will use this option incase of there is no standard provision to use. Means you want to create any custom assignment block with custom attributes then you can go for this option. More over we can use AET to create custom genil object. We have an option Create Table in AET.
3).Creating the field in Database structure using AET: We will use this option incase of there is no attribute in database relevant to your requirement then we will go for AET enhancement.
Hope this might give you little clarification..
Best Regards,
Dharmakasi. -
How to set the Model Class for a newly created Model Node ?
Hello All,
I am trying to map a Model node from SourceA to DestinationB.
To do so, I created a model node for Destination B in the interface controller (set the isInputElement to true). However why I try to map the node, I get an error saying that "Both context nodes have to be bound to a model class". Upon a closer look, I realised that the model node that I created in DestinationB has no entries under the properties.
Does anyone knows/advise how I can add the model class entry to the model node that I have created as I am not able to do so. Or otherwise, is there a way to map a model node to another model node across different components ? Thank you very much.
from
Kwok Wei
from
Kwok WeiHello Pascal
The instructioons that you gave are for mapping the model between the view controller and the component controller within the same component is that right ?
I am tryng to map a model node in the component controller of SourceA to another model node that belongs to another Component. I do believe that in this case I will need to create a model node in the interface controller of DestinationB and map that to the component controller of SourceA. However, by creating my own model node, how do I change the property modelClass in the context ?
Thanks !
from
Kwok Wei -
Problems in Instantiating the Model Node
Hi All,
I Have a problem with creating the instance of a Model Node which needs an urgent solution, This is the Scenario:
I Have created a WebDynpro Project using NetWeaver CE Environment and Java EE 5.0 where i am using an Adaptive WebService Model. I have successfully created the model using the WSDL files and have also added to the Controller,
But when I try to create an Instance of the Request Node in my controller ie after writing this line:
Request_MI_Nwce007_AS_SOAPReq objReq = null;
objReq = new Request_MI_Nwce007_AS_SOAPReq();
This is the Request Structure from the WSDL - Request_MI_Nwce007_AS_SOAPReq
it gives me an Error saying The constructor Request_MI_Nwce007_AS_SOAPReq() is undefined.
Please let me know the exact problem and also the way to overcome this problem.
Its Quite URGENT!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Points Rewarded for helpful answers.
Regards,
Poojith MVHi Poojitha,
If your imported Webservice has any structure like this Request_MI_Nwce007_AS_SOAPReq_Input then instantiate the input structure.
else
Try instantiating along with the package name, for example if your package name is: com.sdn then try this:
"com.sdn.*Request_MI_Nwce007_AS_SOAPReq objReq = null;
objReq = new com.sdn.Request_MI_Nwce007_AS_SOAPReq();
Hope this solves your problem.
Thanks n Regards,
Jhansi Miryala -
How to set value to Model Node of cardinality 0..N
hi
I am looking for a way to set value to a model node of cardinality 0..N
i imported a WSDL into my applicaion , which has the following Node Structure.
Context
--- ModelNode_Request
---ModelNode2_Input
---ModleNode3_Roles [ cardinality 0..n singleton 1..1]
****Model_Attribute RoleID <<<<<<<<<<<<
****Model_Attribute SysID <<<<<<<<<<<<
---ModelNode_Response
i tried with the below code but effort went in vain.
i tried following ways to set the value but , i get Nullpointer expection error.
wdContext.nodeRequest__SubmitRequest().nodeRequestDetails().nodeRoles().
currentRolesElement().setRoleId("BASIC");
wdContext.nodeRequest__SubmitRequest().nodeRequestDetails().nodeRoles().
currentRolesElement().setSysId("R3_220");
i aslo looked into the forum https://www.sdn.sap.com/irj/scn/thread?messageID=2035342 but couldnt find any solid solution.
It would be great if some one can throw some snippets on the same.
Thanks
Edited by: RR on Dec 22, 2008 5:48 PMHi RR,
As far as i know u can set model nodes and values nodes are different. whats shown in the link is for values node. u should do differently for model node..
Since this is a model node...u first need to create an object of the node type. then create an arraylist for that and then add values..
try this..
// Create an object for structures in the node to be used
Yweb_Po_Items objPOItems = null; // where Yweb_Po_Items is the structure of the node...
// Create an abstractlist for structures in the RFC node to be used, if u are planning to give single or multiple rows (in node/table) as input to the RFC
AbstractList POObjAbsList = new Yweb_Po_Items.Yweb_Po_Items_List();
objPOItems = new Yweb_Po_Items();
// /set first set of values
objPOItems.setColumn1(u201Cabcu201D); // here hard codede for example
objPOItems.setColumn2(u201Cabcfghu201D);
// add the object to the abstract list
POObjAbsList.add(objPOItems);
// /set second set of values
objPOItems.setColumn1(u201Cnewabcu201D);
objPOItems.setColumn2(u201Cnewabcfghu201D);
// add the object to the abstract list again
POObjAbsList.add(objPOItems); // now u got 2 records
// now set the abstractlist to the node in the RFC
objGoodsReceiptPO.setPo_Items_In(POObjAbsList);
Hope this information is useful...
Thanks
Md. Yusuf -
Duplicate records in input structure of model node
Hi,
Following is the way, I am assigning data to a model node:
//Clearing the model input node
for (int i = wdContext.nodeInsppointdata().size(); i > 0; i--)
wdContext.nodeInsppointdata().removeElement(wdContext.nodeInsppointdata().getElementAt(i - 1));
//Creating element of the input model node
IPrivateResultsView.IInsppointdataElement eleInspPointData;
//START A
Bapi2045L4 objBapi2045L4_1 = new Bapi2045L4(); //Instance of the input structure type
//Populating data
eleInspPointData = wdContext.nodeInsppointdata().createInsppointdataElement(objBapi2045L4_1);
wdContext.nodeInsppointdata().addElement(eleInspPointData);
eleInspPointData.setInsplot(wdContext.currentContextElement().getInspectionLotNumber());
eleInspPointData.setInspoper("0101");
//Inspection_Validate_Input is the model node. Adding instance to main node
wdContext.currentInspection_Validate_InputElement().modelObject().addInsppointdata(objBapi2045L4_1);
//STOP A
//Now executing the RFC
Above code seems to be fine. Works very well for the first time. But, when the user clicks on the same button for the second time, I can see duplicate records getting passed to RFC [Debugged using external breakpoint]. When I am sending 4 records, I can see there are total of 6 records. The number keeps increasing when clicked on the button.
I am adding multiple records to input model node using the code from START A to STOP A. Does the code look fine? Why do I see multiple records?
Thanks,
ShamIssue solved.
After executing RFC, I used following code to clear the input model node:
try
wdContext.current<yourBAPI>_InputElement().modelObject().get<yourinputnode>().clear();
catch (Exception e1) -
Hello All,
I was wondering whether there is a way to force users to become a model
node in a given environment rather than give them the choice of specifying
model node or an individual node name. What happens is that our
developers, all on the same identical platform and setup, at one time or
another log in with their machine name as the node name and we end up with
tons of nodes in the environment which slows everything down (according to
Forte).
If we could just turn off that option for clients and force the use of a
model node depending on platform that would be great.
Thanks in advance for any info!
Sincerely,
Joe Seeley
QAD, Inc.
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>Is anybody using MODEL in production?
How is the performance - is there any real problems?I used a MODEL query last year to simulate a FIFO queue and calculate average stock prices.
It performs pretty well, but the volume of data is small though (~200k rows processed per batch session). -
How to addRecord in Web Dynpro to Model node (Entity Service ref)
Hi,
1) I create Entity Service in CAF and try to write web dynpro Table UI for it.
2) is it possible with using Model Node? or I MUST use Value Node - Table must have possibilities for Add, Edit and Delete records.
Now I can edit, and delete records, but I can't add records with AddRecord method
Code below
public void NewTS( )
//@@begin NewTS()
IServiceFacade serviceFacade;
// Add new Model object TS
ATS ts = TSServiceProxy.create();
ts.setDate( new Date(System.currentTimeMillis()));
ts.getAspect().sendChanges();
serviceFacade = CAFServiceFactory.getServiceFacade(tsDefinition.class);
// try to addRecord to Controller context
IWDNodeElement n = wdContext.nodeTS().createElement(ts);
wdContext.nodeTS().addElement(n);
The error is: com.sap.caf.rt.exception.CAFBaseRuntimeException:
Aspect row is invalid for aspect: <Aspect name="TS" >
Thx for any helpHi Nikolai,
implement it in the following way:
wdInit()
IAspect originalAspect = TSServiceProxy.FindByName(employee) ;
wdContext.nodeTS().bind(originalAspect)
//just create new attribute this java native type IAspect
wdContext.currentContextElement().setOriginalAspect() ;
public void NewTS( )
//@@begin NewTS()
IAspect originalAspect = wdContext.currentContextElement().getOriginalAspect() ;
IAspectRow newTS = originalAspect.createAspectRow() ;
newTS.setAttributeValue("date", new Date(System.currentTimeMillis())) ;
or
public void NewTS( )
IAspect originalAspect = wdContext.currentContextElement().getOriginalAspect() ;
IAspectRow newTS = originalAspect.createAspectRow() ;
ITSElement tsElem = wdContext.nodeTS().getTSElementAt(originalAspect.indexOf(newTS)) ;
tsElem.setAttributeValue("date", new Date(System.currentTimeMillis())) ;
Best regards,
Aliaksei -
Business Graphics and model nodes
Hello,
is it possible to bind a business graphics UI element in Java WebDynpro to a model node or does it have to be a value node?
Thanks,
Michaelexactly!
many ways to do this
1.U can use WDCopyService(Source ,Target) here Source : return node of model data
Target : Your temporary value node which bound to BG.
Note : Each time when ever model data get updated(CRUD) u have to call this node.
2. Use Mapping type node and bind it to BG ui element exe : when we create any node It has 4 options one of them is Mapping select this and provide the model node
(mapping of node with model node is replica of the content there in model node, here u don't have to worry about updated content since its replica and get changed eveytime when model operations is performed)
Best Regards
Satish Kumar -
Model Nodes? What for?
Hello Everybody,
why is there a distinction between model and value nodes? I never quite crasped the concept.
Usually I prefer the value nodes wherever I can. Often I have to manipulate the data I get from the model and that is really akward with model nodes.
An example for that is when you get Char1-fields instead of real booleans from the backend. My solution is to copy model model nodes to value nodes which is neither elegant nor desirable. But I can add custom attributes or even manipulate the data with calculated attirbutes. Copying nodes is a real pain because the WDCopyService is no help either. Often there's just no way around it though.
So why is there a distinction in the first place?
Best Regards,
Michael> The only gotcha I experienced myself is that it is
> impossible to map non-model node to model one in
> designer, however it is possible for dynamically
> created context (here there is no notion of "model
> node" at all)
And this is exactly what eliminating the difference between model and value nodes means. The design time approaches the run time and only speaks of nodes.
But the basic difference between value and model nodes remains: Value nodes keep the data themselves whereas model nodes hold references to another object, the "model instance" and take the attribute values from there. Which also means, that they will put changes from the UI there.
Regards, Uwe. -
Instantiating Model Node in Component Controller with new Abstractlist()
Hi All,
We have the following issue.
When we instantiate a Node - Po_Items using Element.setPo_Items( new AbstractList() )
We get an error "The Type AbstractList Cannot be instantiate" .
So how to successfully instantiate AbstractList() so that ultimately the BAPI_NODE_INPUT can be instantiated.
Best Regards,
Roby...Hi Murtuza,
Thanks alot for the response.
I tried initializing Node using
Element.addPo_Items(new Bapiekpoc());
But its not getting initialized and I get following errror when I run the application.
500 Internal Server Error
Web Dynpro Container/SAP J2EE Engine/6.40
Failed to process request. Please contact your system administrator
Is there any other way to initialize the Po_Items Node which which is inside the Model Node BAPI_PO_CREATE_INPUT.
BAPI_PO_CREATE_INPUT ( Model Node )
-- Po_Items ( Subnode which is an input table inside the BAPI )
Thanks again & Best Regards,
Roby.... -
How to expose model node to other dc
hi, now i want to expose model node to other dc. so i create data link from interface controller to model.in fact,the model node is exposed to other dc,but when i use it, i can not use it. please tell me the right way to do it.thanks
Hi Puneet
Write a method in the interface controller of DC1 where you have created your message pool. This method should take the Message id as input and return the message string.
Expose this interface as the public part and try accessing the message pool from this exposed method. Evey time you call this method just pass the message id.
Use the local component messagemanager to display the message.
Regards
NagaKishore V -
Activation Failed: The context model node has not been bound to a model cla
Hi Experts,
I have created a DC for Models and created a DC for the Application.
Have done all the steps that are required for getting the Model DC into the Application DC.
Have made all the binding to the Controller and View, But durring the activation, I am receiving an error as given below
[wdgen] [Info] Initialize generation templates from configuration jar:file:/usr/sap/NWI/JC63/j2ee/cluster/server1/temp/CBS/22/.B/11457/DCs/sap.com/tc/bi/extwd/_comp/gen/default/public/def/lib/java/SapWebDynproGenerationCore.jar!/WebDynproGenerationConfigurationCompiled.xml
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelNode Zmm_Bapi_Get_Material_Input [modelClass]: The context model node has not been bound to a model class (Hint: A Context model node has to be bound to a model class or mapped to a model node of another controller.)
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Im_Maktg [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Im_Werks [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Im_Matnr [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelNode Output [modelClass]: The context model node has not been bound to a model class (Hint: A Context model node has to be bound to a model class or mapped to a model node of another controller.)
[wdgen] [Info] XXX.sampledc.CN_SAMPLEDC --> ContextModelNode Output [supplyingRelationRole]: Supply function or supplying relation role missing (Hint: A child node which is not mapped must have either a supplying relation role or a supply function or one of its parent nodes must have a supply function.)
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Ex_Message [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Ex_Flag [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelNode It_Outtab2 [modelClass]: The context model node has not been bound to a model class (Hint: A Context model node has to be bound to a model class or mapped to a model node of another controller.)
[wdgen] [Info] XXX.sampledc.CN_SAMPLEDC --> ContextModelNode It_Outtab2 [supplyingRelationRole]: Supply function or supplying relation role missing (Hint: A child node which is not mapped must have either a supplying relation role or a supply function or one of its parent nodes must have a supply function.)
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Picture [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Waers [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Infnr [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Netpr [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Inco1 [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Ekorg [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Lifnr [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Price_Unit [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Maktx [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Name1 [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Filep [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Matnr [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Werks [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Inco2 [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelNode It_Outtab [modelClass]: The context model node has not been bound to a model class (Hint: A Context model node has to be bound to a model class or mapped to a model node of another controller.)
[wdgen] [Info] XXX.sampledc.CN_SAMPLEDC --> ContextModelNode It_Outtab [supplyingRelationRole]: Supply function or supplying relation role missing (Hint: A child node which is not mapped must have either a supplying relation role or a supply function or one of its parent nodes must have a supply function.)
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Picture [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Ebeln [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Waers [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Netpr [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Inco1 [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Lifnr [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Price_Unit [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Ebelp [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Name1 [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Filep [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Matnr [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Txz01 [referencedProperty]: The context model attribute has not been bound to a model property
[wdgen] [Error] XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Inco2 [referencedProperty]: The context model attribute has not been bound to a model property
Thanks & Regards,
PalaniHi Palani,
May be something is missed while checking in the activity. This is what you can do:
1) Note the error.
2) You will have to forcefully activate the activity since its already checked in.
3) Create a dummy activity and do the following:
Right click on the DC in the Webdynpro Perspective and Click on Repair and chose Project Structure and Classpath.
Right click on the DC in the Webdynpro Perspective and Click on Rebuild.
Right click on the DC in the Webdynpro Perspective and Click on Reload.
Close the DC and then open the DC again.
Add these files to repository in the following way: Go to DC Perspective Expend the DC node Right Click on the src folder Chose DTR Chose Add Chose
Subtree. It will add the changes to the central repository and now if you Checkin the activity and see the results the changes will be effective.
4) Also map the context attribute once again.
5) Now check in the activity and try to activate.
Regards.
Rajat -
Invalidate concept for value node and model node
Hello everybody,
We have invalidate method for value node and model node.
I want to know basic concept behind this method.
What this method acually does?
Regards,
BhavikHi Pran and all,
I figured out the problem. Input parameters are going multple times. So, depending upon that it gives multiple values.
My scenario is:
Root Node
|_ Input_node1
|_Attr1
|_ Input_Node2
|_Attr2
|_Output_node
|_Result
I am passing values in Attr1 and Attr2 attributes.
For this, first of all, i wrote following code.
In controller, i have initialized Root node:
Root_Node model = new Root_Node();
wdcontext.nodeRoot_Node().bind(model);
In view, I set values for attr1 and attr2 using following code:
Ipublic<View>.IInput_node1Element ele = wdcontext.createInput_node1Element();
ele.setAttr1("<value>");
wdcontext.nodeInput_node1().addElement(ele);
Ipublic<View>.IInput_node2Element ele1 = wdcontext.createInput_node2Element();
ele1.setAttr2("<value>");
wdcontext.nodeInput_node2().addElement(ele);
But this code didnt work. Model was executed without data in this case.
So, i thought that these elements were created at view level only. And corresponding model objects were not created.
So, I have changed code like following way:
I have removed initialization code for Input_Node1 and Input_Node2 from view. Now, I am getting input values in two different value nodes. And before calling custom controller's method to execute model, I am making two ArrayLists and filling data in it. Now, i am passing these ArrayList objects as parameters to controller's method.
In this method, i am setting both values as follows:
wdcontext.currentRoot_NodeElement().modelObject().setInput_Node1(List1);
wdcontext.currentRoot_NodeElement().modelObject().setInput_Node2(List2);
Then i am executing my model.
But, When i am setting values for Input_Node1 and Input_Node2 as shown above, values are appended instead of overwritting the value. Because of this appended values, it gives mupltiple results.
Means, Both ways are not proper. What should be the proper and best way to pass values in this case?
Thanks,
Bhavik
Maybe you are looking for
-
I have created an imovie with still photos and have my Mac mini connected to a TV and would really like to loop the movie. Does anyone know anyway to have a movie continuously play over and over again?
-
Shared Services doesnt show my Essbase server
Hi, im wondering if anyone out there can help. I have been working on a new System9 Installation. I have installed all of the Foundation software (Shared Services), Web analysis on a windows 2003 32 bit server and installed the Essbase application on
-
Hi, Can we suppress the output of a select statement. I mean suppose i fire a select statement, but i want that the output should not be visible. Is it possible. I know this sound weird but is it possible in Oracle.
-
Hello Team, We are monitoring 1000 servers in our environment and out of 1000 servers, we have approximately 100 servers showing as critical state on the server state view. We can get the critical servers list from SCOM console, but we are not able t
-
Hi, I have an imac G5 17" 1.8 GHz. When I got up today a loud fan noise was blaring and a blank, light blue screen was fixed in place. I restarted and eventually got a normal startup mode. Then any applications I opened started crashing again and aga