Hi Gerald, you wrote:
It`s not best practice to have jsf corresponding tags and plain html on the same page ...
Sure, it would be nice to have jsf pages without plain html. But in reallity this wouldn't happen: In 90% of the projects I know, HTML is delivered from web-designer experts. Those people don't know about JSF and components. And I think they don't have to. In real projects this HTML is taken as the view component and the developer enhances the view with bean values and some navigation rules. But it isn't practical to force the developer to remap all the HTML into JSF components (and for complex HTML this doesn't really work). When looking at JSF example-applications I always see mixing of plain html and JSF components. It works for f:view. The question is: Why doesn't it work for f:subview? Is there a workaround without wrapping anything in jsf-tags or using facelets? Greetings Chrisi On 5/20/06, Gerald Müllan <[EMAIL PROTECTED]> wrote:
Hi, I see the main problem in this that you mix up jsf presentation with html markup. It`s not best practice to have jsf corresponding tags and plain html on the same page. Try where ever possible to use only jsf related stuff. Normally it should be possible to get along with your requirements when doing it like this. If not, you can also use tomahawks <t:html> component. Furthermore <t:document> can help out. Apart from your problem, doing it like this makes you independent from html renderkit. cheers, Gerald On 5/20/06, Chrisi <[EMAIL PROTECTED]> wrote: > Hi Andrew, > > thanks for response. > It's a pitty. We can't use facelets in our project currently. > > There must be a way to use subviews without messing the things up > without using facelets, or? > > On 5/20/06, Andrew Robinson <[EMAIL PROTECTED]> wrote: > > Facelets. > > > > Does includes very nicely (no subviews), is faster than JSP and you > > don't need verbatim tags. > > > > On 5/20/06, Chrisi <[EMAIL PROTECTED]> wrote: > > > Hello, > > > > > > I'm driving crazy with myfaces: > > > > > > I've got an JSF page with the following content: > > > > > > <p> > > > Some HTML tags and text > > > </p> > > > <h:outputText value="And here JSF text" /> > > > > > > Let it run and you see > > > " > > > Some HTML tags and text > > > And here JSF text > > > " > > > on your browser. That's ok! > > > > > > > > > Now I wanna make some refactoring and like to put the > > > content into a subview. The content from above is inlcuded als follow: > > > > > > <f:subview id="test"> > > > <jsp:include page="test.jsp" /> > > > </f:subview> > > > > > > I let it run again and you see the output messed up (lines are not in order): > > > " > > > And here JSF text > > > Some HTML tags and text > > > " > > > > > > When putting <f:verbatim> or <t:htmlTag> around the HTML in the > > > subview it seems to work. > > > But that's no adequate way. It messes up you view-code and makes it unreadable! > > > > > > Why is there a different behavior in subview vs. views? > > > > > > What is the way to go????? > > > > > > > > > > > > Thanks and Greetings > > > Chrisi > > > > > > > > -- > Thanks and Greetings > Chrisi > -- Gerald Müllan Schelleingasse 2/11 1040 Vienna, Austria 0043 699 11772506 [EMAIL PROTECTED]

