Hello Sandeep, thanks so far!

> I guess the content style is causing the issue. I am not sure if you
>really require the content style to be set for a read-only field.
Yes, I think we do: We want to be able to use the same pages for input or 
read-only just by flipping a switch (readOnly would then of course be 
connected to a boolean property in the backing bean...). We want those
pages to have the same input field width in both cases. Thus, the
contentStyle...

In my opinion, the behaviour of the input-enabled field (concerning "too
long" texts)
would be ideal for the
read-only version as well , i.e. showing as much of the text as the defined
width allows 
and making the rest accessible via mouse/keyboard actions. By the way, the
outputText
doesn't seem to offer this, neither. As far as I am aware, it can only
truncate long
texts... (well, via tooltip / shortDescription you can at least offer the
complete text).

Best regards, Carsten


sandeep gururaj wrote:
> 
> Hello Carsten,
> 
> I guess the content style is causing the issue. I am not sure if you
> really require the content style to be set for a read-only field. So,
> you have three options - remove the content style for read-only fields,
> or increase the width (problem can still exist if the value is of
> greater length), or use tr:outputText when you want it to be read-only(I
> guess this is the best).
> 
> Thanks.
> 
> ~Sandeep
> 
> -----Original Message-----
> From: Carsten Pieper [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, August 08, 2007 1:59 PM
> To: users@myfaces.apache.org
> Subject: [Trinidad] inputText with readOnly="true" and limited width
> shows strange behaviour
> 
> 
> Hello everyone,
> 
> is this a bug or am I missing something? The situation is as follows:
> 
>       <tr:inputText label="My short inputText" value="Hello inputText"
>               contentStyle="width: 50px;" readOnly="true">
>         </tr:inputText>
> 
> The text then exceeds the actual text area as shown in the screenshot
> (note
> that
> the read-only text area background is slightly darker than the rest...).
> 
> http://www.nabble.com/file/p12049157/inputTextReadOnly.jpg 
> 
> If readOnly isn't set (or false), then everything is as expected as
> again
> shown in the screenshot (only 50 px of text are shown, but you can
> access
> the rest via mouse/keyboard):
> 
> http://www.nabble.com/file/p12049157/inputText.jpg 
> 
> Any ideas? 
> 
> Thanks in advance,
> Carsten
> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/-Trinidad--inputText-with-readOnly%3D%22true%22-an
> d-limited-width-shows-strange-behaviour-tf4234891.html#a12049157
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-Trinidad--inputText-with-readOnly%3D%22true%22-and-limited-width-shows-strange-behaviour-tf4234891.html#a12050833
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Reply via email to