[SOLVED] Spinner problem

UI Components for JSF
Post Reply
User avatar
Hericksnake
Posts: 47
Joined: 21 Jan 2011, 22:45
Location: Brasil

03 Feb 2011, 19:53

Hello,

I think I have found an error on the Spinner component.
I'm using it on my application, but the buttons to increase and decrease are not displayed. It's just a little line with the button, you can't see the up and dow images.
So, the problem was solved when I put the

Code: Select all

style="height: 10px"

inside my Spinner tag.

I have looked in the Showcase and this problem doesn't happen. I'm using the last Snapshot, tested with the default and bluesky themes.

My code with the correction:

Code: Select all

<h:outputLabel for="spinner" value="Some Value" />
<p:spinner id="spinner" value="#{myMB.value}" min="0" max="#{myMB.myBean.maxValue}" stepFactor="0.01" style="height: 10px"/>
When I remove the style from the spinner, this happens:

Image
Last edited by Hericksnake on 03 Feb 2011, 19:56, edited 1 time in total.
Primefaces 3.2
JSF 2.0
Glassfish Server 3.1.2
Netbeans7.1.1

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

03 Feb 2011, 19:54

That is a known limitation of spinner at the moment, when it is placed inside a hidden container like dialog, it cannot do width and height calculations. We'll work to fix this limitation in 3.0.

User avatar
Hericksnake
Posts: 47
Joined: 21 Jan 2011, 22:45
Location: Brasil

03 Feb 2011, 19:55

Thank's for your answer! ;)
Primefaces 3.2
JSF 2.0
Glassfish Server 3.1.2
Netbeans7.1.1

User avatar
bumble.bee
Posts: 723
Joined: 29 Sep 2010, 21:39
Location: United States

07 Feb 2011, 19:21

You may want to check out this thread too:

http://primefaces.prime.com.tr/forum/vi ... f=3&t=5051

Sometimes setting the height isn't enough because the component is positioned incorrectly.

User avatar
Hericksnake
Posts: 47
Joined: 21 Jan 2011, 22:45
Location: Brasil

09 Feb 2011, 13:11

The same problem occurs on the Password component (feedback) if inside a dialog.
Primefaces 3.2
JSF 2.0
Glassfish Server 3.1.2
Netbeans7.1.1

Roriro
Posts: 2
Joined: 08 Feb 2011, 21:18

09 Feb 2011, 19:43

Another solution is to modify the file spinner.js, exactly at line 123 with the follow code:

height = input.outerHeight() <= 15?15:input.outerHeight(),


Regards
Rodrigo Troy

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 54 guests