Hi Jeff,

the problem with the <t:panelNavigation2/>-tag can be reproduced as follows:

I defined a tiles template containing a <t:panelNavigation2/>

<f:view>
<h:form>

        <t:div id="menu" forceId="true">
        <t:div id="lftBar" forceId="true">
        
                <f:loadBundle
                        basename="resources.example_messages"
                        var="example_messages" />

                <t:div id="subnavigation_outer" forceId="true">
                        
                        <t:div id="subnavigation" forceId="true">
                                
                                <t:panelNavigation2 id="nav1" layout="list" 
itemClass="mypage"
                                        activeItemClass="selected" 
openItemClass="selected">
                                        <t:navigationMenuItems
                                                
value="#{navigationMenu.panelNavigationItems}" />
                                </t:panelNavigation2>
                                
                        </t:div>
        
                </t:div>

        </t:div>

        <f:subview id="contentView">
                <div id="content">
                        <tiles:insert name="body" flush="false" />
                </div>
        </f:subview>

        </t:div>

</h:form>
</f:view>


Now there can be distinguish two cases:

1.) When I include a page1.jsp for the content-placeholder with a
<h:commandLink/> inside, the menu works as it should.

        Example for page1.jsp:
        
        <%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
        <%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>
        <%@ taglib uri="http://myfaces.apache.org/tomahawk"; prefix="t"%>

        <h:outputText value="Page2"/>
        <h:outputText escape="false" value="<br/>"/>
        <h:commandLink value="Link" action="test"/>

        
2.) When I include page2.jsp for the content-placeholder without link,
but just textoutput, the menu dosn't work. It dosn't trigger the
faces-lifecycle on the server.

        Example for page2.jsp:
        
        <%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
        <%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>
        <%@ taglib uri="http://myfaces.apache.org/tomahawk"; prefix="t"%>

        <h:outputText value="Page2"/>
        
If this is realy an error, could't you please report it as a bug?


Thank you,
Rudi


On 4/5/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote:
Hi Rudi, comments inline.

[2] http://people.apache.org/builds/myfaces/nightly/
[3] https://issues.apache.org/jira/browse/MYFACES-1414

Rudi Steiner wrote:
> Hi Jeff,
>
> testing again the current version bevor taliking about bugs is a great
> idea ;)
>
> The problem for beginners like me is, that on the myFaces website is
> described, that the fastest way to get a project up and running is to
> take one of the example-apps (in my case the tiles-app) and take this
> structure to start the own project. The problem is, that the sample
> apps dont use the latest version 1.1.5 of myFaces but version 1.1.1.
> If the sample apps would use the latest versions, the sample-apps
> would be a big help for beginners to construct a new app.
>

Actually, mon ami, they do. :)

You must be grabbing the wrong examples file. Try going to link [2] and
grabbing the file "tomahawk-examples-1.1.5-SNAPSHOT-bin". You are
probably thinking "but that's tomahawk, not myfaces?" Well they are the
same example apps as what you've downloaded, just newer. You can read a
more detailed explanation from [3]. The confusion is not your fault: we
need to release a new Tomahawk which includes the examples directly on
the download page. We also then need to update that getting started page
so it points to these tomahawk examples, instead of confusing you into
thinking you need the old 1.1.1 examples. I have just now added a
comment to issue [3] to that effect.

> One more question: As I'm using tiles, is it good practice to enclose
> the <h:form/> - tag within the template, surrounding all the
> placeholders and subviews. In this way, I wouldn't have to use a
> second <form/> for all pages?
>

Sorry, I don't use Tiles but if it's anything like the other mechanisms
I have used, then yes you can do this.

> With my new, version 1.1.5-based application I found out, that the
> <t:panelNavigation2/>-tag dosn't render a dummyForm if enclosed in a
> <h:form/>-tag but the navigation just works, if there is one "regular"
> link on the site (for example a <h:commandLink/>). If there is no
> link, the navigation dosn't trigger the lifecycle on the server. Is
> this a known problem?
>

Hmm this sounds familiar, as if someone else mentioned this on another
thread earlier.  However, a quick search of JIRA and the mail archives
didn't turn up anything relevant... Any chance you could provide a
small, contained example of this problem? Then we could start a JIRA for
it to get fixed.

> Thank you in advance,
> Rudi
>
> On 4/4/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote:
>> I'm sorry I meant to say Rudi. ;)
>>
>> Jeff Bischoff wrote:
>> > Ridu, what version of MyFaces and Tomahawk are you using?
>> >
>>
>>
>>
>>
>
>
>




Reply via email to