[ 
http://issues.apache.org/struts/browse/SHALE-316?page=comments#action_38474 ] 
            
Gary VanMatre commented on SHALE-316:
-------------------------------------

>1. do you think an issue should be created for this on the myfaces/tomahawk 
>jira? 

Yes, I agree.  We should take it up on tomahawk's jira.

>2. What would you suggest for a navigation component, something similar to 
>panelNavigation2 that would work with the "layout_bad.html" layout? I've got 
>this html template I want to use where the navigation div is placed almost at 
>the end of the file, which causes the problem with panelNavigation2 and clay 
>:-( 

It's really has a greater scope that just Clay.  It's pretty easy to recreate 
in JSP.  But, I would suggest that the component try harder to find itself in 
the previous view.  Maybe if the first call fails using clientId's, try using 
the component id by scanning the tree.

    private UIComponent findComponent(UIComponent parent, String id) {
        if (parent == null) {
            return null;
        }

        if (parent.getId() != null && parent.getId().equals(id)) {
            return parent;
        } else {
            Iterator ci = parent.getChildren().iterator();
            while (ci.hasNext()) {
                UIComponent child = (UIComponent) ci.next();
                UIComponent target = findComponent(child, id);
                if (target != null) {
                    return target;
                }
            }
        }

        return null;
    }



>3. even if I swapped the divs so that navigation div was before the content 
>div but there was/were other divs above it (i.e. header) with variable content 
>this would still break the state saving/restoring functionality of 
>panelNavigation2, right? 

Yeah, I think you are right.  Adding content would through off the generated 
id's.


> tomahawk's panelNavigation2 doesn't keep state when navigating between views
> ----------------------------------------------------------------------------
>
>                 Key: SHALE-316
>                 URL: http://issues.apache.org/struts/browse/SHALE-316
>             Project: Shale
>          Issue Type: Bug
>          Components: Clay
>    Affects Versions: 1.0.0, 1.0.1, 1.0.2, 1.0.4-SNAPSHOT, 1.0.3
>         Environment: tomcat 5.5.17, myfaces 1.1.4, tomahawk 1.1.3, shale 
> 1.0.4-SNAPSHOT
>            Reporter: Tom Pasierb
>         Assigned To: Gary VanMatre
>         Attachments: clayTests-2.zip, clayTests.zip
>
>
> I prepared an example which is attached to the issue entry. Use maven to 
> build the war or exploded app directory and run it. It should start fine. I 
> described briefly what goes wrong and what causes it in my opinion.
> Basically clay behaves differently if the order in which the panelNavigation2 
> and symbols are placed in the template file changes. This probably doesn't 
> explain much - just look at the example.
> I hope that the example I provided will be enough to correct the problem ;-)
> Regards,

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to