10 Replies Latest reply on Feb 18, 2009 9:07 PM by Tony Herstell

    How to get a bookmarkable link

    Tony Herstell Master

      How do I get this to be a bookmarkable link?


      <s:link value="#{messages.more_info}" 
              action="#{newsItemController.enter()}" propagation="none" converter="javax.faces.Long">
              <f:param name="eventId" value="1"/>
      </s:link>




      The page that you go to does not show the id url encoded.


      link is on this page


      Home page


      and takes you to this page


      Entry Page



      using:



      @SuppressWarnings("serial")
      @Stateful
      @Conversational
      @Name("newsItemController")
      public class NewsItemControllerImpl implements NewsItemController, Serializable {
              
      @RequestParameter
      Long eventId;
      
      /**
       * Inject and leverage the Seam Logger.
       */
      @Logger
      private Log log;
      
      /**
       * Inject the EJB3 Persistence context.
       */
      @PersistenceContext(type=PersistenceContextType.EXTENDED)
      private EntityManager entityManager;
      
      @Out(required=false)
      private Event event;
      
      /* (non-Javadoc)
      * @see nz.co.selwynequestriancentre.action.news.NewsItemController#enter()
      */
      @Override
      @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
      @Begin
      public String enter() {
              String nextPageToReturn = null;
              log.info(">enter");
              this.event=null;
              if (eventId != null) {
                      log.info("Param was :"+eventId);
                      event = (Event)entityManager.createQuery("from Event e where e.id = :id").setParameter("id", eventId).getSingleResult();
                      if (event != null) {
                              nextPageToReturn = "showEvent";
                      }
              }
              log.info("<enter");
              return nextPageToReturn;
      }





      conveniently losing the Param.


      ?