You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Korhonen, Kalle" <kk...@cisco.com> on 2005/06/03 01:50:27 UTC
RE: HTML-Frames, "one-way" commandLinks and forced frame reloads
You could run your pages through a filter that would make them valid
xhtml. JTidy for example works fine.
Kalle
> -----Original Message-----
> From: hendrik-neumann@web.de [mailto:hendrik-neumann@web.de]
> Sent: Monday, May 30, 2005 2:00 PM
> To: MyFaces Discussion
> Subject: HTML-Frames, "one-way" commandLinks and forced frame reloads
>
> Hi,
>
> I'm still migrating from from x:panelLayout to classic
> html-frames because I have the problem, that I need 100%
> valid xhtml-code which is valid for the mime type
> application/xhtml+xml but this is extremly hard because JSF
> produces invalid xhtml code (I have descriped this problem in
> the "Serious problems with MyFaces ID allocation which is not
> conform to XHTML!"-mail).
> THerefore I try to seperate my whole web-app into several
> frames with minimal, but valid xhtml-code.
>
> Now I have the following (simplified) situation: I have 2
> frames: one navigation-frame on the left side and one big
> mainframe. The navigation frame contains a tree2-component
> which loads folders and documents from a database and gernate
> for each tree-item a navigation case which targets the
> mainframe and loads a new site in the mainframe. This new
> loaded mainframe-site then contains a self-made
> article-renderer or a folder-renderer which renders the
> content. Now if the user clicks on the an item in the
> tree2-component in the navigation-frame, the mainframe is
> loaded and the navigation-frame is of course NOT reloaded
> (because I have frames). If the user then clicks again in the
> nav-frame on a link, the jsf-site will just be reloaded (and
> showed in the mainframe) instead of processing the
> action-link. Only after this forced reload the commandLinks
> are working again. So I have to reload the navigation frame
> ON EVERY CLICK in the tree2-components which causes A LOT of troubles.
>
> This seems to be a generally problem, that after clicking on
> a rendered commandLink the site which contains this link must
> to be reloaded. Is there a reason why it is like this? Is
> there a workaround?
>
> Greetings,
> Hendrik
>
ForcedID is not working
Posted by Hendrik Neumann <he...@web.de>.
Hi everybody,
I need specific, predictable IDs for the links in my tree2-component.
Therefore I played a little bit with forcedID and forcedIDIndex; for example
I tried something like this:
<x:tree2 value="#{currentUser.myTree}" id="myTree" var="node"
varNodeToggler="t">
<f:facet name="category">
<x:commandLink actionListener="#{t.setNodeSelected}"
action="#{currentUser.userSelectsCategory}"
immediate="true" [...]>
<x:outputText value="#{node.description}"
forceIdIndex="category-#{node.identifier}"
forceId="category-#{node.identifier}"/>
[...]
I need this predictable IDs because I want to adress the tree-links in the
HTML-page with a javascript-methods (something like:
"document.anchors[category-4711].xyz..").
But I always get these extremly ugly jsf-specific IDs with "_" and ":" and so
on. Therefore I can not use something like
"document.anchors[category-4711].xyz.." because the IDs are still dynamicly
generated...
What am I doing wrong???
Greetings,
hendrik