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?
Yes your approach is wrong, you can only pass simple types with f:param.
Read more on scopes and bijection in Seam reference doc. You need a conversational backing bean to hold state across showContent and editContent pages.