You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Christian Kölle <ko...@gmx.de> on 2007/01/25 21:42:38 UTC

My 1.1.5 looses its state.

Hello,

Prenotes: 
I am not very familiar into the JSF-Myfaces deep-ends. I consider myself
more as a pure user.

Problem: 
Under certain conditions, my <t:panelNavigation2> looses its state. More
precisely: Sometimes I receive a page response, where the panalNavigation is
collapsed, also the previously selected sub-item should stay selected.

"Sometimes" and "under certain conditions" means, that the problem only
occurs when i write something into the managed beans from within my
java-code, i.e. like adding an error-message to the context
[context.addMessage("", errMsg);] or when I retrieve a managed bean from
application's variable resolver and amend the content of the managed bean.

The problem did not occur with 
- tomahawk 1.1.2 and 
- myfaces 1.1.3
With those versions mentioned, the <panelNavigation2> behaved exactly as I
expected.

The problem occurs with 
- tomahawk-1.1.5-SNAPSHOT and 
- tomahawk-sandbox-1.1.5-SNAPSHOT
with either myfaces-core 1.1.3 or myfaces-core 1.1.5-snapshot.

You might ask, why I use 1.1.5-SNAPSHOT? Well I want to have a try on the
Sandbox's <autoUpdateDataTable>. Therefore I need
tomahawk-sandbox-1.1.5-SNAPSHOT. For me it seems that I cannot use
tomahawk-sandbox-1.1.5-SNAPSHOT in combination with tomahawk-1.1.2, where
the <panelNavigation2> is defined.

Any ideas, quick hacks?
Thanks in advance & regards
Christian


Re: panelLayout and Facelets

Posted by Catalin Kormos <ca...@gmail.com>.
Hi,

Didn't try it out, but i would set it up like this:

    <tag>
        <tag-name>panelLayout</tag-name>
        <component>
            <component-type>org.apache.myfaces.HtmlPanelLayout
</component-type>
            <renderer-type>org.apache.myfaces.Layout</renderer-type>
        </component>
    </tag>

You get these values from the component's source file, in this case
org.apache.myfaces.custom.layout.HtmlPanelLayout.

HTH,
Catalin

On 1/26/07, Francesco Consumi <co...@istitutodeglinnocenti.it> wrote:
>
> Hi all,
>
> I'm trying to use Facelets in test project.
> We make heavy use of t:panelLayout, but there isn't any declaration of
> that tag in tomahawk.taglib.xml.
> what's the correct declaration for panelLayout ?
>
> thanks,
>
> --
> Francesco Consumi
> Istituto degli Innocenti
>

panelLayout and Facelets

Posted by Francesco Consumi <co...@istitutodeglinnocenti.it>.
Hi all,

I'm trying to use Facelets in test project.
We make heavy use of t:panelLayout, but there isn't any declaration of 
that tag in tomahawk.taglib.xml.
what's the correct declaration for panelLayout ?

thanks,

--
Francesco Consumi
Istituto degli Innocenti

AW: My 1.1.5 looses its state.

Posted by Christian Kölle <ko...@gmx.de>.
Hello,

I tried to play a bit around with the components, like:

UIComponent tempcomp2 =
context.getViewRoot().findComponent("frmmenu:nav1:nav111");
[...]
HtmlCommandNavigationItem comp = (HtmlCommandNavigationItem)tempcomp2;
comp.setActive(true);
[...]
But it did not work with my experience and I ran out of time.

#

Solution for me: 
I went back to my old version but added SNAPSHOT-components only as far as
needed:
- JSF-Core 1.1.3
- Tomahawk 1.1.2
- Tomahawk-Sandbox 1.1.5-SNAPSHOT
- Tomahawk 1.1.5-SNAPSHOT-MODIFIED
After removing the  <h:form> around <t:panelNavigation2> and going back to
the old 
TilesViewHandler, my application works again as expected, including the
<autoupdatetable>, which works nicely.

Thanks & regards
Christian

Christian Kölle wrote:
| Thanks a lot for your response.
| 
| My case: I am just using a static <t:panelNavigation2> Panel, just as
| in IRIAN's examples, i.e. the static version but with tiles. During
| migration  
|| from 1.1.2. > 1.1.5-Snapshot, I had to wrap the <t:panelNavigation2>
|| with
| <form>, otherwise the stylesheets did not apply on the
| <t:panelNavigation2>.
| 
| My project ends this month. So
| a.) I will check wether <autoupdatetable> works as intended. If not,
| I will go back to to tomahawk-1.1.2. I have no other need for
| 1.1.5-SNAPSHOT.  
| b.) If <autoupdatetable> works as intended, I will try to retrieve
| HtmlPanelNavigationMenu.java from context and call methods on it, out
| of my code. Hopefully this works otherwise I will kick all this.  
| 
| Regards,
| Christian
| 
| Madhav Bhargava wrote:
|| I faced a similar problem. I included the source code of tomahawk
|| and debugged it. 
|| 
|| I found that the encodeBegin has a method which will restore opened
|| states. Now this method will not be called when the tree is
|| constructed afresh. 
|| 
|| 
|| Check to see if the tree is getting constructed again. In my case I
|| had a panelNavigation2 inside a custom component and therefore it
|| made it easier for me to debug it. I am not sure what is the case
|| with you.
|| 
||| -----Original Message-----
||| From: Christian Kölle [mailto:koellemcchrisi@gmx.de]
||| Sent: Friday, January 26, 2007 2:13 AM
||| To: users@myfaces.apache.org
||| Subject: My 1.1.5 <t:panelNavigation2> looses its state.
||| 
|| 
||| Hello,
||| 
|| 
||| Prenotes:
||| I am not very familiar into the JSF-Myfaces deep-ends. I consider
||| myself more as a pure user. 
||| 
|| 
||| Problem:
||| Under certain conditions, my <t:panelNavigation2> looses its state.
||| More precisely: Sometimes I receive a page response, where the
||| panalNavigation is collapsed, also the previously selected sub-item
||| should stay selected. 
||| 
|| 
||| "Sometimes" and "under certain conditions" means, that the problem
||| only occurs when i write something into the managed beans from
||| within my java-code, i.e. like adding an error-message to the
||| context [context.addMessage("", errMsg);] or when I retrieve a
||| managed bean from application's variable resolver and amend the
||| content of the managed bean. 
||| 
|| 
||| The problem did not occur with
||| - tomahawk 1.1.2 and
||| - myfaces 1.1.3
||| With those versions mentioned, the <panelNavigation2> behaved
||| exactly as I expected. 
||| 
|| 
||| The problem occurs with
||| - tomahawk-1.1.5-SNAPSHOT and
||| - tomahawk-sandbox-1.1.5-SNAPSHOT
||| with either myfaces-core 1.1.3 or myfaces-core 1.1.5-snapshot.
||| 
|| 
||| You might ask, why I use 1.1.5-SNAPSHOT? Well I want to have a try
||| on the Sandbox's <autoUpdateDataTable>. Therefore I need
||| tomahawk-sandbox-1.1.5-SNAPSHOT. For me it seems that I cannot use
||| tomahawk-sandbox-1.1.5-SNAPSHOT in combination with tomahawk-1.1.2,
||| where the <panelNavigation2> is defined.
||| 
|| 
||| Any ideas, quick hacks?
||| Thanks in advance & regards
||| Christian




AW: My 1.1.5 looses its state.

Posted by Christian Kölle <ko...@gmx.de>.
Thanks a lot for your response. 

My case: I am just using a static <t:panelNavigation2> Panel, just as in
IRIAN's examples, i.e. the static version but with tiles. During migration
from 1.1.2. > 1.1.5-Snapshot, I had to wrap the <t:panelNavigation2> with
<form>, otherwise the stylesheets did not apply on the
<t:panelNavigation2>.   

My project ends this month. So
a.) I will check wether <autoupdatetable> works as intended. If not, I will
go back to to tomahawk-1.1.2. I have no other need for 1.1.5-SNAPSHOT.
b.) If <autoupdatetable> works as intended, I will try to retrieve
HtmlPanelNavigationMenu.java from context and call methods on it, out of my
code. Hopefully this works otherwise I will kick all this.

Regards,
Christian

Madhav Bhargava wrote:
| I faced a similar problem. I included the source code of tomahawk and
| debugged it. 
| 
| I found that the encodeBegin has a method which will restore opened
| states. Now this method will not be called when the tree is
| constructed afresh.  
| 
| 
| Check to see if the tree is getting constructed again. In my case I
| had a panelNavigation2 inside a custom component and therefore it
| made it easier for me to debug it. I am not sure what is the case
| with you.   
| 
|| -----Original Message-----
|| From: Christian Kölle [mailto:koellemcchrisi@gmx.de]
|| Sent: Friday, January 26, 2007 2:13 AM
|| To: users@myfaces.apache.org
|| Subject: My 1.1.5 <t:panelNavigation2> looses its state.
|| 
| 
|| Hello,
|| 
| 
|| Prenotes:
|| I am not very familiar into the JSF-Myfaces deep-ends. I consider
|| myself more as a pure user.
|| 
| 
|| Problem:
|| Under certain conditions, my <t:panelNavigation2> looses its state.
|| More
|| precisely: Sometimes I receive a page response, where the
|| panalNavigation is collapsed, also the previously selected sub-item
|| should stay selected. 
|| 
| 
|| "Sometimes" and "under certain conditions" means, that the problem
|| only occurs when i write something into the managed beans from within
|| my java-code, i.e. like adding an error-message to the context
|| [context.addMessage("", errMsg);] or when I retrieve a managed bean
|| from application's variable resolver and amend the content of the
|| managed bean. 
|| 
| 
|| The problem did not occur with
|| - tomahawk 1.1.2 and
|| - myfaces 1.1.3
|| With those versions mentioned, the <panelNavigation2> behaved exactly
|| as I expected.
|| 
| 
|| The problem occurs with
|| - tomahawk-1.1.5-SNAPSHOT and
|| - tomahawk-sandbox-1.1.5-SNAPSHOT
|| with either myfaces-core 1.1.3 or myfaces-core 1.1.5-snapshot.
|| 
| 
|| You might ask, why I use 1.1.5-SNAPSHOT? Well I want to have a try on
|| the Sandbox's <autoUpdateDataTable>. Therefore I need
|| tomahawk-sandbox-1.1.5-SNAPSHOT. For me it seems that I cannot use
|| tomahawk-sandbox-1.1.5-SNAPSHOT in combination with tomahawk-1.1.2,
|| where the <panelNavigation2> is defined.
|| 
| 
|| Any ideas, quick hacks?
|| Thanks in advance & regards
|| Christian
| 
| 
| **************** CAUTION - Disclaimer *****************
| This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
| solely for the use of the addressee(s). If you are not the intended
| recipient, please notify the sender by e-mail and delete the original
| message. Further, you are not to copy, disclose, or distribute this
| e-mail or its contents to any other person and any such actions are
| unlawful. This e-mail may contain viruses. Infosys has taken every
| reasonable precaution to minimize this risk, but is not liable for
| any damage you may sustain as a result of any virus in this e-mail.
| You should carry out your own virus checks before opening the e-mail
| or attachment. Infosys reserves the right to monitor and review the
| content of all messages sent to or from this e-mail address. Messages
| sent to or from this e-mail address may be stored on the Infosys
| e-mail system. ***INFOSYS******** End of Disclaimer
| ********INFOSYS***            



RE: My 1.1.5 looses its state.

Posted by Madhav Bhargava <Ma...@infosys.com>.
I faced a similar problem. I included the source code of tomahawk and debugged it.

I found that the encodeBegin has a method which will restore opened states. Now this method will not be called when the tree is constructed afresh.

Check to see if the tree is getting constructed again. In my case I had a panelNavigation2 inside a custom component and therefore it made it easier for me to debug it. I am not sure what is the case with you.

> -----Original Message-----
> From: Christian Kölle [mailto:koellemcchrisi@gmx.de]
> Sent: Friday, January 26, 2007 2:13 AM
> To: users@myfaces.apache.org
> Subject: My 1.1.5 <t:panelNavigation2> looses its state.
>
> Hello,
>
> Prenotes:
> I am not very familiar into the JSF-Myfaces deep-ends. I consider myself
> more as a pure user.
>
> Problem:
> Under certain conditions, my <t:panelNavigation2> looses its state. More
> precisely: Sometimes I receive a page response, where the panalNavigation
> is
> collapsed, also the previously selected sub-item should stay selected.
>
> "Sometimes" and "under certain conditions" means, that the problem only
> occurs when i write something into the managed beans from within my
> java-code, i.e. like adding an error-message to the context
> [context.addMessage("", errMsg);] or when I retrieve a managed bean from
> application's variable resolver and amend the content of the managed bean.
>
> The problem did not occur with
> - tomahawk 1.1.2 and
> - myfaces 1.1.3
> With those versions mentioned, the <panelNavigation2> behaved exactly as I
> expected.
>
> The problem occurs with
> - tomahawk-1.1.5-SNAPSHOT and
> - tomahawk-sandbox-1.1.5-SNAPSHOT
> with either myfaces-core 1.1.3 or myfaces-core 1.1.5-snapshot.
>
> You might ask, why I use 1.1.5-SNAPSHOT? Well I want to have a try on the
> Sandbox's <autoUpdateDataTable>. Therefore I need
> tomahawk-sandbox-1.1.5-SNAPSHOT. For me it seems that I cannot use
> tomahawk-sandbox-1.1.5-SNAPSHOT in combination with tomahawk-1.1.2, where
> the <panelNavigation2> is defined.
>
> Any ideas, quick hacks?
> Thanks in advance & regards
> Christian


**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***