views:

584

answers:

1

I am currently displaying a ticket number like so.

<h:outputText value="#{ticket.ticketNumber}" />

Instead of this I want a hyper-link to a URL.

The address will look similar to this: http://testserver.com/viewer.jsp?ticket=#{ticket.ticketNumber}

So, the new code might look something like this (note the code below doesn't work, just a concept).

<a4j:commandLink action="http://testserver.com/viewer.jsp?ticket=#{ticket.ticketNumber}"
                 value="#{ticket.ticketNumber}" />
+1  A: 

command* controls are generally UICommand instances - for invoking server-side logic. Use an outputLink:

<h:outputLink
    value="http://testserver.com/viewer.jsp?ticket=#{ticket.ticketNumber}"&gt;
  <h:outputText value="#{ticket.ticketNumber}" />
</h:outputLink>
McDowell
exactly what i needed. thank you for the answer and quick response.
Berek Bryan