...">

Link to external url using interfaces

At the moment I am showing the ticket number.

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

      

Instead, I want a hyperlink to the url.

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

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

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

      

+2


source to share


1 answer


command*

Typically, UICommand

instance controls are for invoking server-side logic. Use outputLink :



<h:outputLink
    value="http://testserver.com/viewer.jsp?ticket=#{ticket.ticketNumber}">
  <h:outputText value="#{ticket.ticketNumber}" />
</h:outputLink>

      

+5


source







All Articles