Hi Floks,
I had a situation where in i need to populate the drop down depending on the action perfomed by user in menus.
An action method is triggered to load the scneario specific values to drop down
here is that
[code]
PSSBuilder pssbuilder = new PSSBuilder();
pssbuilder.getPlanTypesForCreateScenarioSnapshot(this,"S");
getCCMPPSessionBean().setSelectedPlanType("0");
this.getDrpPlanType().setRendered(true);
this.getLblPlanType().setRendered(true);
this.getDrpPlanType().setDisabled(false);
Option[] opt = getCCMPPSessionBean().getPlanTypeOptions();
Option[] tmp = new Option[opt.length-2];
int j = 0 ;
for(int i = 0 ; i < opt.length ; i++){
if((opt[i].getValue().toString().trim()).equalsIgnoreCase("SSMP") ||
(opt[i].getValue().toString().trim()).equalsIgnoreCase("SRECON")){
}else{
tmp[j] = opt[i];
j++;
}
}
getCCMPPSessionBean().setPlanTypeOptions(tmp);
// For debug
opt = pssDetails.getCCMPPSessionBean().getPlanTypeOptions();
for (int i = 0; i < opt.length; i++) {
CCMPPLogger.getLogger().debug(
"Value [ " + opt[i].getValue() + " ] Label [ "
+ opt[i].getLabel() + " ]");
}
[/code]
in my JSP im doing this
[code]
<ui:dropDown id="drpPlanType"
binding="#{PSSDetails.drpPlanType}"
items="#{CCMPPSessionBean.planTypeOptions}"
selected="#{CCMPPSessionBean.selectedPlanType}"/>
[/code]
i can see the logs with the values i expected from my action method.
where as comming to the jsp its showing some other things other than which i see in logs..
Please help me
Thanks & Regards,
Shivaji Byrapaneni.
[Message sent by forum member 'shivaji9' (shivaji9)]
http://forums.java.net/jive/thread.jspa?messageID=337850