ahh was using <h:message>. once i used tr:message the message showed. but
the behavior is very inconsistent.
first the inlinestyle of the message sometimes work and sometimes it
doesnot. I want to show the messages in red but most of the time the messges
are shown in black colour.

below is the .xhtml file content which i am using.



<ui:composition xmlns:ui=*"http://java.sun.com/jsf/facelets";
*

xmlns:tr=*"http://myfaces.apache.org/trinidad";
*

xmlns:trh=*"http://myfaces.apache.org/trinidad/html";
*

xmlns:h=*"http://java.sun.com/jsf/html";
*

xmlns:f=*"http://java.sun.com/jsf/core";
*

xmlns:t=*"http://myfaces.apache.org/tomahawk";
*

xmlns:jsp=*"http://java.sun.com/JSP/Page"*>

<tr:document id=*"docid"*>

<tr:form id=*"frmdemo"*>

<tr:panelBorderLayout>

<tr:panelHorizontalLayout id=*"panelhr1"*>

<tr:outputLabel value=*"Email"* id=*"emaillabel"* />

<tr:inputText id=*"email"* required=*"true"* simple=*"true"
*

requiredMessageDetail=*"email cannot be left blank"*>

<f:validator validatorId=*"emailValidator"* />

</tr:inputText>

<tr:message for=*"email"* inlineStyle=*"color: red;"* id=*"msgemail"*/>

</tr:panelHorizontalLayout>

<tr:panelHorizontalLayout id=*"panelhr2"*>

<tr:outputLabel value=*"Quantity"* id=*"qtylabel"* />

<tr:inputText id=*"qty"* value="#{loginBean.qty}" simple=*"true"* required=*
"true"* requiredMessageDetail=*"qty cannot be left blank"*>

</tr:inputText>

<tr:message for=*"qty"* inlineStyle=*"color: red;"* id=*"msgqty"*/>

</tr:panelHorizontalLayout>

<tr:commandButton id=*"login"* text=*"Click me"*/>

</tr:panelBorderLayout>

</tr:form>

</tr:document>

</ui:composition>


On Wed, Jun 1, 2011 at 9:54 PM, parthiv pradhan
<parthiv.prad...@gmail.com>wrote:

>
> thanks Cedric for the reply.
> if I set the required and simple attribute to true and try to show a custom
> message using tr:message then instead of the message appearing on the page
> itself..the message appears on a popup.
>
> have been breaking my head over this but no luck yet.
> thanks
> Parthiv
>
>   On Sun, May 29, 2011 at 1:36 AM, Cédric Durmont <cdurm...@gmail.com>wrote:
>
>> Hi Prathiv,
>> The easiest way to customize the position of your message is to add
>> simple="true" to your tr:inputText, then add a tr:message component,
>> linked to the inputText. See the Trinidad component guide for more
>> details.
>> I can't find the selector keys for skinning the messages, but they do
>> exist : for instance, af|panelFormLayout:message-cell when the
>> inputText is in a panelFormLayout. Check the generated source of your
>> page.
>>
>> Hope this helps,
>> Regards,
>> Cedric Durmont
>>
>> 2011/5/28 parthiv pradhan <parthiv.prad...@gmail.com>:
>>  > Hi All,
>> >
>> > If a tr:inputbox has required="true" then the error message by default
>> > appears at the bottom of the text box.
>> > i) Can the postion of this in-built error message be changed?
>> > ii) Can the appearance of this error message be changed by using a
>> custom
>> > stylesheet?
>> >
>> > I cannot write a custom blank check validator because it would never be
>> > called in case the text box is blank, instead the inbuilt blank check
>> would
>> > be called.
>> >
>> > thanks
>> > Parthiv
>>
>
>

Reply via email to