You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2007/07/05 23:07:04 UTC
[jira] Created: (TOMAHAWK-1047) Myfaces example PanelNavigation
Item toggles activ/open depending on ViewId (with Trinidad)
Myfaces example PanelNavigation Item toggles activ/open depending on ViewId (with Trinidad)
-------------------------------------------------------------------------------------------
Key: TOMAHAWK-1047
URL: https://issues.apache.org/jira/browse/TOMAHAWK-1047
Project: MyFaces Tomahawk
Issue Type: Bug
Components: Panel Navigation2
Reporter: Leonardo Uribe
Attachments: patch5.patch
When you mix tomahawk and trinidad, and you use <t:panelNavigation2> with
Item toggles activ/open depending on ViewId (like in the example in myfaces-simple-example)
throws the following error:
2007-07-04 20:19:29,790 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/myfaces-skins].[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.ClassCastException: org.apache.myfaces.component.html.ext.HtmlOutputText cannot be cast to org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlCommandNavigationItem
at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu.restoreOpenActiveStates(HtmlPanelNavigationMenu.java:93)
at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu.restoreOpenActiveStates(HtmlPanelNavigationMenu.java:105)
at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu.encodeBegin(HtmlPanelNavigationMenu.java:71)
at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:467)
The solution that I have probed is this:
Class HtmlPanelNavigationMenu
public void restoreOpenActiveStates(FacesContext facesContext,
UIViewRoot previousRoot,
List children)
{
for (Iterator it = children.iterator(); it.hasNext(); )
{
UIComponent child = (UIComponent)it.next();
if (child instanceof HtmlCommandNavigationItem)
{
HtmlCommandNavigationItem previousItem = (HtmlCommandNavigationItem)previousRoot.findComponent(child.getClientId(facesContext));
The last line get the same component instance as child.
I have replace the last line with this:
HtmlCommandNavigationItem previousItem = null;
try {
previousItem = (HtmlCommandNavigationItem)previousRoot.findComponent(child.getClientId(facesContext));
}catch (ClassCastException ex){
previousItem = (HtmlCommandNavigationItem) child;
}
Works the same, but in case of error, cast directly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (TOMAHAWK-1047) Myfaces example PanelNavigation
Item toggles activ/open depending on ViewId (with Trinidad)
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TOMAHAWK-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonardo Uribe updated TOMAHAWK-1047:
-------------------------------------
Status: Open (was: Patch Available)
> Myfaces example PanelNavigation Item toggles activ/open depending on ViewId (with Trinidad)
> -------------------------------------------------------------------------------------------
>
> Key: TOMAHAWK-1047
> URL: https://issues.apache.org/jira/browse/TOMAHAWK-1047
> Project: MyFaces Tomahawk
> Issue Type: Bug
> Components: Panel Navigation2
> Reporter: Leonardo Uribe
>
> When you mix tomahawk and trinidad, and you use <t:panelNavigation2> with
> Item toggles activ/open depending on ViewId (like in the example in myfaces-simple-example)
> throws the following error:
> 2007-07-04 20:19:29,790 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/myfaces-skins].[jsp]] Servlet.service() for servlet jsp threw exception
> java.lang.ClassCastException: org.apache.myfaces.component.html.ext.HtmlOutputText cannot be cast to org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlCommandNavigationItem
> at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu.restoreOpenActiveStates(HtmlPanelNavigationMenu.java:93)
> at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu.restoreOpenActiveStates(HtmlPanelNavigationMenu.java:105)
> at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu.encodeBegin(HtmlPanelNavigationMenu.java:71)
> at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:467)
> The solution that I have probed is this:
> Class HtmlPanelNavigationMenu
> public void restoreOpenActiveStates(FacesContext facesContext,
> UIViewRoot previousRoot,
> List children)
> {
> for (Iterator it = children.iterator(); it.hasNext(); )
> {
> UIComponent child = (UIComponent)it.next();
> if (child instanceof HtmlCommandNavigationItem)
> {
> HtmlCommandNavigationItem previousItem = (HtmlCommandNavigationItem)previousRoot.findComponent(child.getClientId(facesContext));
> The last line get the same component instance as child.
> I have replace the last line with this:
> HtmlCommandNavigationItem previousItem = null;
>
> try {
> previousItem = (HtmlCommandNavigationItem)previousRoot.findComponent(child.getClientId(facesContext));
> }catch (ClassCastException ex){
> previousItem = (HtmlCommandNavigationItem) child;
> }
>
> Works the same, but in case of error, cast directly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (TOMAHAWK-1047) Myfaces example PanelNavigation
Item toggles activ/open depending on ViewId (with Trinidad)
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TOMAHAWK-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonardo Uribe updated TOMAHAWK-1047:
-------------------------------------
Status: Patch Available (was: Open)
> Myfaces example PanelNavigation Item toggles activ/open depending on ViewId (with Trinidad)
> -------------------------------------------------------------------------------------------
>
> Key: TOMAHAWK-1047
> URL: https://issues.apache.org/jira/browse/TOMAHAWK-1047
> Project: MyFaces Tomahawk
> Issue Type: Bug
> Components: Panel Navigation2
> Reporter: Leonardo Uribe
> Attachments: patch8.patch
>
>
> When you mix tomahawk and trinidad, and you use <t:panelNavigation2> with
> Item toggles activ/open depending on ViewId (like in the example in myfaces-simple-example)
> throws the following error:
> 2007-07-04 20:19:29,790 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/myfaces-skins].[jsp]] Servlet.service() for servlet jsp threw exception
> java.lang.ClassCastException: org.apache.myfaces.component.html.ext.HtmlOutputText cannot be cast to org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlCommandNavigationItem
> at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu.restoreOpenActiveStates(HtmlPanelNavigationMenu.java:93)
> at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu.restoreOpenActiveStates(HtmlPanelNavigationMenu.java:105)
> at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu.encodeBegin(HtmlPanelNavigationMenu.java:71)
> at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:467)
> The solution that I have probed is this:
> Class HtmlPanelNavigationMenu
> public void restoreOpenActiveStates(FacesContext facesContext,
> UIViewRoot previousRoot,
> List children)
> {
> for (Iterator it = children.iterator(); it.hasNext(); )
> {
> UIComponent child = (UIComponent)it.next();
> if (child instanceof HtmlCommandNavigationItem)
> {
> HtmlCommandNavigationItem previousItem = (HtmlCommandNavigationItem)previousRoot.findComponent(child.getClientId(facesContext));
> The last line get the same component instance as child.
> I have replace the last line with this:
> HtmlCommandNavigationItem previousItem = null;
>
> try {
> previousItem = (HtmlCommandNavigationItem)previousRoot.findComponent(child.getClientId(facesContext));
> }catch (ClassCastException ex){
> previousItem = (HtmlCommandNavigationItem) child;
> }
>
> Works the same, but in case of error, cast directly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (TOMAHAWK-1047) Myfaces example PanelNavigation
Item toggles activ/open depending on ViewId (with Trinidad)
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TOMAHAWK-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonardo Uribe updated TOMAHAWK-1047:
-------------------------------------
Status: Patch Available (was: Open)
> Myfaces example PanelNavigation Item toggles activ/open depending on ViewId (with Trinidad)
> -------------------------------------------------------------------------------------------
>
> Key: TOMAHAWK-1047
> URL: https://issues.apache.org/jira/browse/TOMAHAWK-1047
> Project: MyFaces Tomahawk
> Issue Type: Bug
> Components: Panel Navigation2
> Reporter: Leonardo Uribe
> Attachments: patch5.patch
>
>
> When you mix tomahawk and trinidad, and you use <t:panelNavigation2> with
> Item toggles activ/open depending on ViewId (like in the example in myfaces-simple-example)
> throws the following error:
> 2007-07-04 20:19:29,790 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/myfaces-skins].[jsp]] Servlet.service() for servlet jsp threw exception
> java.lang.ClassCastException: org.apache.myfaces.component.html.ext.HtmlOutputText cannot be cast to org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlCommandNavigationItem
> at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu.restoreOpenActiveStates(HtmlPanelNavigationMenu.java:93)
> at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu.restoreOpenActiveStates(HtmlPanelNavigationMenu.java:105)
> at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu.encodeBegin(HtmlPanelNavigationMenu.java:71)
> at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:467)
> The solution that I have probed is this:
> Class HtmlPanelNavigationMenu
> public void restoreOpenActiveStates(FacesContext facesContext,
> UIViewRoot previousRoot,
> List children)
> {
> for (Iterator it = children.iterator(); it.hasNext(); )
> {
> UIComponent child = (UIComponent)it.next();
> if (child instanceof HtmlCommandNavigationItem)
> {
> HtmlCommandNavigationItem previousItem = (HtmlCommandNavigationItem)previousRoot.findComponent(child.getClientId(facesContext));
> The last line get the same component instance as child.
> I have replace the last line with this:
> HtmlCommandNavigationItem previousItem = null;
>
> try {
> previousItem = (HtmlCommandNavigationItem)previousRoot.findComponent(child.getClientId(facesContext));
> }catch (ClassCastException ex){
> previousItem = (HtmlCommandNavigationItem) child;
> }
>
> Works the same, but in case of error, cast directly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (TOMAHAWK-1047) Myfaces example PanelNavigation
Item toggles activ/open depending on ViewId (with Trinidad)
Posted by "Grant Smith (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TOMAHAWK-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Grant Smith updated TOMAHAWK-1047:
----------------------------------
Resolution: Fixed
Fix Version/s: 1.1.7-SNAPSHOT
Status: Resolved (was: Patch Available)
Applied. Thank you!
> Myfaces example PanelNavigation Item toggles activ/open depending on ViewId (with Trinidad)
> -------------------------------------------------------------------------------------------
>
> Key: TOMAHAWK-1047
> URL: https://issues.apache.org/jira/browse/TOMAHAWK-1047
> Project: MyFaces Tomahawk
> Issue Type: Bug
> Components: Panel Navigation2
> Reporter: Leonardo Uribe
> Assignee: Grant Smith
> Fix For: 1.1.7-SNAPSHOT
>
> Attachments: patch8.patch
>
>
> When you mix tomahawk and trinidad, and you use <t:panelNavigation2> with
> Item toggles activ/open depending on ViewId (like in the example in myfaces-simple-example)
> throws the following error:
> 2007-07-04 20:19:29,790 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/myfaces-skins].[jsp]] Servlet.service() for servlet jsp threw exception
> java.lang.ClassCastException: org.apache.myfaces.component.html.ext.HtmlOutputText cannot be cast to org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlCommandNavigationItem
> at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu.restoreOpenActiveStates(HtmlPanelNavigationMenu.java:93)
> at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu.restoreOpenActiveStates(HtmlPanelNavigationMenu.java:105)
> at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu.encodeBegin(HtmlPanelNavigationMenu.java:71)
> at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:467)
> The solution that I have probed is this:
> Class HtmlPanelNavigationMenu
> public void restoreOpenActiveStates(FacesContext facesContext,
> UIViewRoot previousRoot,
> List children)
> {
> for (Iterator it = children.iterator(); it.hasNext(); )
> {
> UIComponent child = (UIComponent)it.next();
> if (child instanceof HtmlCommandNavigationItem)
> {
> HtmlCommandNavigationItem previousItem = (HtmlCommandNavigationItem)previousRoot.findComponent(child.getClientId(facesContext));
> The last line get the same component instance as child.
> I have replace the last line with this:
> HtmlCommandNavigationItem previousItem = null;
>
> try {
> previousItem = (HtmlCommandNavigationItem)previousRoot.findComponent(child.getClientId(facesContext));
> }catch (ClassCastException ex){
> previousItem = (HtmlCommandNavigationItem) child;
> }
>
> Works the same, but in case of error, cast directly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.