1 Reply Latest reply on Sep 4, 2008 4:46 PM by Guillaume Jeudy

    Newbie: passing instance around.

    felix shnir Newbie
      Hi! I am probably missing an explanation somewhere here, but for the life of me I can't get how this is not working.

      Ok, so I have a showContent.xhtml that all it contains is this: <h:outputText value="#{contentHome.instance.contentContents}" escape="false"/>  Th value is is loaded from EntityHome bean mapped to contentHome

      Now, it shows a page that has content, and now, I want to forward this content for editing in my editContent.xhtml.

      I added this: to showContent:
      <s:link rendered="#{identity.hasRole('admin') or identity.hasRole('editor')}" view="/contentEdit.xhtml">
           <f:param name="content" value="#{contentHome.instance}"/>Edit content
      </s:link>

      But the content on editContent remains blank when i test it like so: id: <h:outputText value="#{content.contentId}" styleClass="formtext"></h:outputText>, However, id: <h:outputText value="#{contentHome.instance.contentId}" styleClass="formtext"></h:outputText> contains forwarded content...  How do I map the "contentHome.instance" into just "content"?  Am I missing something?  Maybe my approach is wrong?

      Any help is appreciated!