cancel
Showing results for 
Search instead for 
Did you mean: 

remove Blank value from DropDownByIndex

Former Member
0 Kudos

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

}

Accepted Solutions (1)

Accepted Solutions (1)

abhijeet_mukkawar
Active Contributor
0 Kudos

Hi,

go to the node's properties and change its 'selection' property from 0..1 to 1..1

regards,

Abhijeet

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

change selection cardinality of the node from 0..1 to 1..1

Regards,Anilkumar