Setting ui_choicelist value

fraser_thomson
Kilo Explorer

Hey guys,

 

I'm currently creating a UI page and using <g:ui_choicelist>, the parameters I have are name, table and field.

I was wondering if there was a way to set the value of this choicelist? It always defaults to the first in sequence?

 

Thanks

1 ACCEPTED SOLUTION

Anurag Tripathi
Mega Patron
Mega Patron

Hi Fraser,



I have a ui page where i did create a dropdown, its the simple HTML code and its working just fine:


<select id="approvers" onchange="test()" style="width:200px">


<option value=''> -- None --   </option>


<option value='a'> A   </option>


<option value='b'> B   </option>


</select>


-Anurag

View solution in original post

17 REPLIES 17

Thanks Kalai.
I've managed to do it within the Jelly using a choose loop, not sure what's best practice though!



Edit: My choicelist names are dynamic too, so creating a further function to process the logic behind setting the values seems to me not best practice. Seeing as it can only be one or two values I think the choose loop is the greater choice than iterating through all of the potential choicelist names contained within the UI Page.


Hi,



Its been a long post and you have achieved a lot, can you just point to what part is left??


-Anurag

I've done it with a <choose> loop within the Jelly so it would seem your first suggestion of using an HTML select box was technically the correct answer