on 02-22-2007 11:04 AM
Hi!
I´m filling a DropDown with hours and minutes as in the code below. When i see the results, the code fills the dopdown as i expect, but i have an empty value at the beginning.
How can I remove this empty value??
I´ve read about the cardinality, but i don´t know how to change.
Can anyone help me? i think it should be pretty easy, but i don´t have much experience with this.
Thanks in advance
Ruben
public void supplyDisplayHour(IPrivatePostmsgView.IDisplayHourNode node, IPrivatePostmsgView.IContextElement parentElement)
{
//@@begin supplyDisplayHour(IWDNode,IWDNodeElement)
Vector v=new Vector();
IPrivatePostmsgView.IDisplayHourElement newNode=null;
try{
String hour="";
int index=0;
for(int i=0;i<=23;i++){
newNode=node.createDisplayHourElement();
hour=new Integer(i).toString();
if(hour.length()==1){
hour="0"+hour;
}
if(index%2==0){
hour+=":00";
i--;
}
else{
hour+=":30";
}
index++;
newNode.setHour(hour);
v.add(newNode);
}
//TODO: remove the top
//v.remove(0);
node.clearSelection();
node.bind(v);
/*node.getNodeInfo()
node.toString()
node.
node.getLeadSelection();
node.clearSelection();
node.getCurrentElement()
node.moveFirst()
node.LEAD_SELECTION
node.NO_SELECTION*/
}catch(Exception ex){
this.logger.error(Category.APPLICATIONS,ex.getMessage());
}
//@@end
}
Hi,
go to the node's properties and change its 'selection' property from 0..1 to 1..1
regards,
Abhijeet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
change selection cardinality of the node from 0..1 to 1..1
Regards,Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.