on 10-22-2007 8:43 AM
Hi folks,
We have an error in wd that we cant solve, appreciate your help.
we have one View containing input fields and table of results.
when the user pick his selection from the input fields [drop down lists ...] and click "search" button ,
we take the current node and add to it's input the selections of the user ... and then finally execute .
everything works fine but ...
we add manually node [RowIcon] that will be used for a supply function ...
when we connect this node to a table column we get the error :
com.sap.tc.webdynpro.progmodel.context.ContextException: Node(ApplicationTraceView.Zcrmf_Follow_Up_Rep_Prep_Tran_Input.Output_Zcrmf_Follow_Up_Rep_Prep_Tran_Input.Output_Et_Tran_Data_T.0.RowIcon): must not bind an empty collection to a Node of cardinality 1..1 or 1..n
Some code :
when clicking the "search" button we do :
Zcrmf_Back_Ofice_Rep_Prep_Tran_Input tansIn = wdContext.currentZcrmf_Back_Ofice_Rep_Prep_Tran_InputElement().modelObject();
tansIn.setIv_Period(some data ....);
and so on ....
RowIcon node :
cardinality : 1..1
selection : 0..1
initialize lead selection = true
and has a supply function that create an icon ...
public void supplyRowIcon(IPrivateCRMOrderReportView.IRowIconNode node, IPrivateCRMOrderReportView.IEt_Tran_Data_TransElement parentElement)
{
//@@begin supplyRowIcon(IWDNode,IWDNodeElement)
if (parentElement.getProd_Exist().equalsIgnoreCase("X")){
IPrivateCRMOrderReportView.IRowIconElement elem = node.createRowIconElement();
node.addElement(elem);
elem.setIcon("IconA.gif");
}
//@@end
}
Regards
Hadar Morchi.
Hi,
Try adding an else part too which populates the node.
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 Ayyapparaj ,
Thanks for a short and wonderful answer , it works great .
Points awarded
if I change the cardinality to be 0..1 it's also works fine ,
but my question is why I have to createRowIconElement [or , like u say : Try adding an else part too which populates the node] even if I want to leave this node empty ?
Hadar
Hi Hadar,
As you mentioned that "if I change the cardinality to be 0..1 it's also works fine "
here the actual issue is the cardinality of the node.
When you set the cardinality 1..n . You should have atleast one element.
here you have a condition in the supply function that is failing it from creating the one needed....
Regards
Ayyapparaj
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.