pe:inputNumber - text-align not applied in v3 [unsolved]

Community Driven Extensions Project
neilrichards
Posts: 67
Joined: 10 Jan 2012, 14:18

15 Apr 2015, 11:50

Hi,

I recently upgraded from version 1.2.1 to 3.0.0 and have noticed that using the inline style "text-align:right" no longer works. Looking at the generated html, it seems that the style is applied to the <span> wrapper and not to the <input> tag. Any chance this could be fixed?

Many thanks,
Neil
Last edited by neilrichards on 19 May 2015, 17:17, edited 1 time in total.
PrimeFaces 5.3.5 | Extensions 3.2.0 | MyFaces 2.2.10 | Payara 1.6.3 (GlassFish 4.1.1)

jorgeiten
Posts: 2
Joined: 14 Mar 2013, 19:27

19 Apr 2015, 23:37

Same problem here, any news?

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

20 Apr 2015, 08:52

every style/styleClass applies to the outer container. So no.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

neilrichards
Posts: 67
Joined: 10 Jan 2012, 14:18

27 Apr 2015, 15:43

Sorry - that sounds like a Monday morning comment :). For buttons and the calendar for example, the style property applies to the component.

With this element, and I'm guessing others like it, it used to apply to the component itself but now doesn't. There's no additional parameters to enable you to specify the style of the component, and inline styling doesn't work any longer, which only leaves writing customised style classes to override default values.

I can't see what benefit there is in applying the style to the container (a <span>) in this instance, when common style properties like alignment, colour, font and size have no impact on it, and are not inherited by the component either. Why not apply the same rules to these input components as to the buttons and the calendar? The style property as it is is worthless.
PrimeFaces 5.3.5 | Extensions 3.2.0 | MyFaces 2.2.10 | Payara 1.6.3 (GlassFish 4.1.1)

neilrichards
Posts: 67
Joined: 10 Jan 2012, 14:18

14 May 2015, 11:44

Hi again,

I feel like there's a fairly compelling argument for changing this, although I'm happy to be corrected if I am wrong. Without any change it seems that we will have to declare a style class for each style combination that is required. If there is no chance of there being a change, then i will go with that - however it would be great if this could be done. Appreciate confirmation :)

Many thanks,
Neil
PrimeFaces 5.3.5 | Extensions 3.2.0 | MyFaces 2.2.10 | Payara 1.6.3 (GlassFish 4.1.1)

Népomucène
Posts: 3
Joined: 23 May 2015, 16:28

23 May 2015, 16:58

Hello : same problem

I have to make a financial intranet application with a lot of inputNumber (in euros).
the style parameter with "text-align:right" doesn't work.

I tried to make a css without any result ...


I am using PF 5.2 and PF extensions 3.1

If I use PF extensions 2.0 it works ... but I cannot imagine that it is a good solution.

Any idea of a walkaround solution with PF extensions 3.1 ?
Primefaces 5.2
Primefaces-extensions 3.1
Glassfish 4

ltelegescu
Posts: 9
Joined: 04 Mar 2013, 20:50

28 May 2015, 22:43

It's only one solution. Use external css file.

.nameClass .pe-inputNumber {
...
}
and apply nameClass to pe:inputNumber with styleClass="nameClass". With primefaces-extensions v2.0 inline css work fine.

Primefaces 5.2
Primefaces-extensions 3.1.0
Glassfish 4.1
Mojarra 2.1.10

Népomucène
Posts: 3
Joined: 23 May 2015, 16:28

01 Jun 2015, 22:06

ltelegescu wrote:It's only one solution. Use external css file.

.nameClass .pe-inputNumber {
...
}
and apply nameClass to pe:inputNumber with styleClass="nameClass". With primefaces-extensions v2.0 inline css work fine.

Primefaces 5.2
Primefaces-extensions 3.1.0
Glassfish 4.1
Mojarra 2.1.10
It works !!! :D
Thank you very much ltelegescu !
Primefaces 5.2
Primefaces-extensions 3.1
Glassfish 4

raho
Posts: 27
Joined: 05 Feb 2016, 21:08

25 Nov 2016, 10:57

Népomucène wrote:
ltelegescu wrote:It's only one solution. Use external css file.

.nameClass .pe-inputNumber {
...
}
and apply nameClass to pe:inputNumber with styleClass="nameClass". With primefaces-extensions v2.0 inline css work fine.
I do it this way, but this does not work with Primefaces 6.0 and p:inputNumber?!

Code: Select all

.numberRight .ui-inputnumber {
	text-align:right !important;
}
<p:inputNumber styleClass="numberRight" .../>
The generated HTML looks like this:

Code: Select all

<span class="ui-inputnumber ui-widget numberRight>
  <input class="ui-inputfield ui-inputtext ui-widget ui-state-default ui-corner-all" ... />
</span>
PF 12.0.4
WildFly 23.0.2.Final


Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 14 guests