inputText in datatable (solved)

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
serenne
Posts: 98
Joined: 21 Jul 2015, 07:43

17 Jun 2017, 14:24

I have an inputText with maxlentgh =40.

Code: Select all

<p:cellEditor>
	<f:facet name="output">
		<h:outputText value="#{site.sitCode}" />
	</f:facet>
	<f:facet name="input">
		<p:inputText value="#{site.sitCode}" required="true" maxlength="40"/>
	</f:facet>
</p:cellEditor>
Despite of this, when I enter rowEdit mode The visible number of character in the input field is 24

Displayed text :
Image

When entrering edit :
Image

Any idea ?

Kindest regards
Last edited by serenne on 29 Jun 2018, 13:35, edited 1 time in total.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

19 Jun 2017, 23:20

I couldn't replicate it. Could you please try h:inputText?

serenne
Posts: 98
Joined: 21 Jul 2015, 07:43

23 Jun 2017, 14:03

Hi Aragorn,

with h:inputText I get the following (bad look but still the same problem for the length of the h:inputText
Image

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

25 Jun 2017, 02:00

I suggest you use the following style instead of maxlength for p:inputText component;

Code: Select all

<p:cellEditor>
	<f:facet name="output">
		<h:outputText value="#{site.sitCode}" />
	</f:facet>
	<f:facet name="input">
		<p:inputText value="#{site.sitCode}" required="true" style="width: 80%; box-sizing: border-box;"/>
	</f:facet>
</p:cellEditor>

serenne
Posts: 98
Joined: 21 Jul 2015, 07:43

26 Jun 2017, 20:11

ok,

just have to add the maxlenght again to limit input size !!

Code: Select all

<p:cellEditor>
	<f:facet name="output">
		<h:outputText value="#{site.sitCode}" />
	</f:facet>
	<f:facet name="input">
		<p:inputText value="#{site.sitCode}" required="true" maxlength="40" style="width: 80%; box-sizing: border-box;"/>
	</f:facet>
</p:cellEditor>
thanks a lot !

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

26 Jun 2017, 21:36

Thanks a lot for the update!

Post Reply

Return to “Ultima - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests