문제

I've searched around the net but I have not found a solution. Is there something like numeric up down, for numeric selection in Grails? How can I create it?

도움이 되었습니까?

해결책

You can achieve your requirement via simple html as:

 <input type="number" name="quantity">

you can set range also as:

 <input type="number" name="quantity" min="1" max="5"> 

and If you want you can add value attribute to be shown as:

 <input type="number" name="quantity" min="1" max="5" value="${domainInstace.attribute}">

and Enjoy.......

다른 팁

Within a gsp ?

<g:select id="orderby" name="orderby" from="${1..10}"  noSelection="['':'-Define Display Order 1 top 10 bottom-']" required="" value="${youdomainClassInstance?.orderby}" class="many-to-one"/>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top