on 07-10-2007 2:25 PM
Hi,
I dynamically created attributes using the following method,
IWDNodeInfo cbOptions = wdContext.getNodeInfo().addChild("cbOpt"+count, null, true, true, false, false, false, true, null, null, null);
cbOptions.addAttribute("opt"+critEle.getQuest_Critid(), "ddic:com.sap.dictionary.string");
How do i assign a value to it now, since the node/attribute cannot be accessed via wdcontext?
On a side note, it seems really troublesome if i need to use a checkbox grp(s) dynamically. I actually need to dynamically create a seperate node + attribute for each checkbox grp i have. Is there any better way to do this?
Thanx in advance
Ok, found the answer to the first part of the question but the second part still stands
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My page is suppose to have many multiple choice questions on it. however, the exact number of questions and the choices for each question is known only at run time.
Lets say i am suppose to have 3 questions. Each with 3,4,5 options respectively. That will mean i have to dynamically create 3 seperate nodes with a single attribute. and with 3,4,5 elements in each node respectively correct?
Hi
Steps:
1) Create the action click is done statically (you cannot create action dyanmically)
2) binding the action click to checkbox dynamically
code
public static void wdDoModifyView(IPrivateDynamicProgrammingView wdThis, IPrivateDynamicProgrammingView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
{
//@@begin wdDoModifyView
if(firstTime){
IWDTransparentContainer con=(IWDTransparentContainer)view.getElement("RootUIElementContainer");
IWDCheckBox checkBox=(IWDCheckBox)view.createElement(IWDCheckBox.class,"ck");
IWDAction act=wdThis.wdCreateAction(IPrivateDynamicProgrammingView.WDActionEventHandler.CLICK,"");
checkBox.setOnToggle(act);
con.addChild(checkBox);
}
//@@end
}
Thanks and Regards,
Arun
Thx Arun for the detailed reply. I actually have done all that. My problem is with a unknown amount of checkboxGroup each needing its own action ==> i need a unknown amount of actions at design time. Anyways i found the solution to my problem.. got to use parameter mapping on a generic action... silly me
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.