Henry,
The .jspx extension is used to indicate that file is a JSP XML file as
opposed to a plain JSP file. XML files can be validated against a
schema definition and IDEs can show errors and do tag completion on
them. Because of that I think that .jspx are a better choice than
.jsp
You can't mix HTML tags and JSF tags without surrounding the HTML with
special JSF tags such as <f:verbatim> because the tags are processed
during different phases of the JSF lifecycle.
You can put long text messages in an outputText tag by putting the
message in a message bundle and then referencing the bundle in the
page with a <f:loadBundle
basename="com.yourcompany.resources.messages" var="bundle"/> tag in
your page and a outputText tag that references the bundle with the EL
expression: "#{bundle.yourMessageKey}". This enables you to put your
messages in one location where they can be spell-checked and be
available for localization . You can also use HTML markup in your
messages too. You just have to use the escape="true" attribute in the
outputText tag.
-Richard
On Wed, Jul 9, 2008 at 9:40 AM, Henry Chang <[EMAIL PROTECTED]> wrote:
> Hi Richard,
>
> Surrounding the text with a <tr:panelGroupLayout> works just fine. Thank you
> very much. I have tried the <nobr> and it does not work.
>
> By the way, what's the difference between .jspx and .jsp extensions? Which
> one is better?
>
> Also, if I do not just put text in the page but rather put them inside
> <tr:outputText> component, how could I do that if the texts are very long
> like a paragraph? It would look very cumbersome to put a long paragraph
> inside the value attribute of the <tr:outputText> component.
>
>
> Best Regards,
> Henry Chang
>
> -----Original Message-----
> From: Richard Yee [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 09, 2008 7:21 PM
> To: MyFaces Discussion
> Subject: Re: How to layout the page with commandLink?
>
> Are you using the .jspx or .jsp extension to your page?
>
> Try this:
> <tr:panelPage>
> <tr:panelGroupLayout>
> <tr:outputText escape="false" value="Please login
> "/><tr:commandLink text=" here" action="login" />
> <tr:outputText value="."/>
> </tr:panelGroupLayout>
> </tr:panelPage>
>
> It works in my .jspx page
>
> I don't think that you can have text in your page that aren't in a jsf
> tag b/c of the difference in when the tags are evaluated from when the
> page is evaluated.
>
> -Richard
>
> On Wed, Jul 9, 2008 at 1:31 AM, Guy Bashan <[EMAIL PROTECTED]> wrote:
>> This behavior is probably due to the nature of your page. Other elements
>> also want space so the text is being wrapped.
>>
>> Have you tried <nobr> tag?
>>
>>
>>
>> <tr:panelPage>
>>
>> <p><nobr>Please login <tr:commandLink text="here" action="login"
>> />.</nobr<</p>
>>
>> </tr:panelPage>
>>
>>
>>
>> Guy.
>>
>>
>>
>> From: Henry Chang [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, July 09, 2008 5:26 AM
>> To: MyFaces Discussion
>> Subject: How to layout the page with commandLink?
>>
>>
>>
>> Hi, I have a very simple question since it is my first time to use
> Trinidad
>> components.
>>
>>
>>
>> I would like to have a <tr:commandLink> and other text messages to appear
> on
>> the same line of a page. I use the following:
>>
>>
>>
>> <tr:panelPage>
>>
>> <p>Please login <tr:commandLink text="here" action="login" />.</p>
>>
>> </tr:panelPage>
>>
>>
>>
>> However, the effect of this is that the link appear on the second line
> which
>> looks very odd. Could anybody help to fix this? Thanks.
>>
>>
>>
>> Best Regards,
>>
>> Henry Chang
>
>