jsp - NetUI select adds zero select option -


i have following code:

<netui:select datasource="actionform.mytype" defaultvalue="1">     <netui:selectoption value="1">not stuff</netui:selectoption>     <netui:selectoption value="2">my stuff</netui:selectoption>     <netui:selectoption value="4">random</netui:selectoption> </netui:select> 

i expecting 3 options drop-down. instead getting option 4, 1 0 - 0 , selected default! 0 coming from? how rid of it? tried disable option, tried select else default 0 option persists , behaves default option.

here resulting html:

<select name="someportlet_2wlw-select_key:{actionform.mytype}">     <option value="1">not stuff</option>     <option value="2">my stuff</option>     <option value="4">random</option>     <option value="0">0</option>  </select> 

p.s: please no javascript work around, know possible not desirable right now.

the solution problem ended being following:

in jpf, form bean, declaring id this?

private int id; 

if so, try declaring valid value, like:

private int id = 1; 

found via: https://community.oracle.com/thread/803595?start=0&tstart=0


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -