Hello,
Is it possible to force using only the up and down buttons of the p:spinner component?
I want to ensure that the value is only from start value (min) up to n-times the step e.g. min=0 max=30 step=10 only 0,10,20,30 should be accepted with no change of manuell input of the user via the textfield.
I know that I could use a validator but I even don't want to give the change to try a non valid input.
p:spinner only step - no manuell input
Try these
you can replace the value into the backing bean method
Code: Select all
<p:spinner value="0" onkeydown="return false;"/>
Code: Select all
<p:spinner value="#{myBean.data}" onkeydown="return false;"/>
I like to explore new things. There's a way for everything. I believe.
Yeah maybe should add a new attribute such as
<p:spinner value="#{myBean.data} typeable="false" />
or something.
<p:spinner value="#{myBean.data} typeable="false" />
or something.
I like to explore new things. There's a way for everything. I believe.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 17 guests