Re: dataScroller, checkbox values not updated
try to set t:dataScroller immediate=false regards, Thomas On Wed, Aug 6, 2008 at 11:34 AM, Partha [EMAIL PROTECTED] wrote: Hi all, maybe someone could help me with this. I have a t:dataTable and one column is displaying checkboxes which values are bound to a backing bean property. So when I now check a checkbox and then use dataScroller to scroll to the next page, the value of the checkbox is not updated in the managed bean. With commandSortHeader the value remains. Please find the code below: pt:panelGrid id=mainPanel rendered=#{pc_PeopleFinderPortletView.showData} t:dataTable id=userData binding=#{pc_PeopleFinderPortletView.dataTable} value=#{pc_PeopleFinderPortletView.pagedListDataModel} var=dataItem width=100% border=0 styleClass=scrollerTable headerClass=standardTable_Header footerClass=standardTable_Header rowClasses=standardTable_Row1,standardTable_Row2 columnClasses=standardTable_Column,standardTable_ColumnCentered,standardTable_Column preserveDataModel=false rows=10 t:column id=column20 t:selectBooleanCheckbox id=checkbox1 readonly=false styleClass=selectBooleanCheckbox value=#{dataItem.selected} immediate=true rendered=true onchange=return checkedB(this,'#{dataItem.name}'); /t:selectBooleanCheckbox /t:column /t:panelGrid/p pt:panelGrid id=pp2 columns=1 styleClass=scrollerTable2 columnClasses=standardTable_ColumnCentered rendered=#{pc_PeopleFinderPortletView.showDataScroller} t:dataScroller id=scroll_1 for=userData fastStep=10 pageCountVar=pageCount pageIndexVar=pageIndex styleClass=scroller paginator=true paginatorMaxPages=9 paginatorTableClass=paginator paginatorActiveColumnStyle=font-weight:bold; immediate=true actionListener=#{pc_PeopleFinderPortletView.scrollerAction} rendered=#{pc_PeopleFinderPortletView.showDataScroller} f:facet name=first t:graphicImage url=images/arrow-first.gif border=1 / /f:facet f:facet name=last t:graphicImage url=images/arrow-last.gif border=1 / /f:facet f:facet name=previous t:graphicImage url=images/arrow-previous.gif border=1 / /f:facet f:facet name=next t:graphicImage url=images/arrow-next.gif border=1 / /f:facet f:facet name=fastforward t:graphicImage url=images/arrow-ff.gif border=1 / /f:facet f:facet name=fastrewind t:graphicImage url=images/arrow-fr.gif border=1 / /f:facet /t:dataScroller t:dataScroller id=scroll_2 for=userData rowsCountVar=rowsCount displayedRowsCountVar=displayedRowsCountVar firstRowIndexVar=firstRowIndex lastRowIndexVar=lastRowIndex pageCountVar=pageCount immediate=true pageIndexVar=pageIndex rendered=#{pc_PeopleFinderPortletView.showDataScroller} h:outputText id=pagemsg10 value=#{firstRowIndex}/h:outputText h:outputText id=pagemsg11 value= - /h:outputText h:outputText id=pagemsg12
Re: [ Tobago ] Issues with Back Button
Check the response header's cache-control pragma. If you see something like ... Cache-Control no-store, no-cache, must-revalidate, max-age=0 Pragma no-cache then browser side caching is disabled and the browser (firofox, IE, ...) has to reload the page you navigated to via back button. The only way to show this page is to repost the data to the server. That's why you get this warn message. Instead you may set a max-age property for a jsf response: HttpServletResponse response = (HttpServletResponse) servletResponse; response.setDateHeader(max-age, 60 * 5); // 5 minutes this might help. Thomas On 6/11/07, Madan Narra [EMAIL PROTECTED] wrote: Hi All, I have an issue with Back Button when used in IE and FireFox. When i navigate to the pages and click on Back Button in FireFox , I get a alert message The Page you are trying to view Contains POSTDATA that has expired from cache. This is expected behaviour. But when done the same in IE, when clicked on back button, I get a message saying Page is Expired. If i click on refresh, then am getting an alert message To display the page, IE needs to resend the data again . Cant i get the alert message in IE after i click on back button without getting Page Expired message ? Is this browser specific or has it to do anything with Tobago ? -- Regards, Madan N -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: Trinidad and Portlets
setting up a new sub project for an implementation of JSR-301 is definitely a good idea. I think we should start a discussion at [EMAIL PROTECTED] On 6/7/07, Scott O'Bryan [EMAIL PROTECTED] wrote: So... What are the next steps for this? Much debate and voting? :) Scott Scott O'Bryan wrote: I'm totally cool with that and I'm pretty sure the EG would be fine with that as well. We just can't do things the same way as we did the old bridge. Also, JSR-301 has 1.2 as it's minimum Faces version, so I imagine this could become the bridge implementation for MyFaces' 1.2 implementation since I'm not sure much work was done with the existing bridge on it. I believe Stan Silvert would also be interested in working on this as well. He's currently on the 301 EG as well and wrote the existing MyFaces bridge. Scott Matthias Wessendorf wrote: Well, things like tomahawk, tobago and trinidad are also able to run w/o MyFaces core. So why not making the bridge an own subproject? -M On 6/7/07, Scott O'Bryan [EMAIL PROTECTED] wrote: That's certainly an option except that the Bridge in MyFaces is distributed with MyFaces project. Right now the work that I have time for will be needed for an R.I. This means it'll need to be able to be distributed independently. That being said, I'm all ok with getting it developed as part of MyFaces... Scott Matthias Wessendorf wrote: Scott, since we have already a protlet bridge here in MyFaces, why not making it a 301 bridge? -Matthias On 6/6/07, Scott O'Bryan [EMAIL PROTECTED] wrote: Hey Martin, I am sort of scanning the list but the past few weeks have been spotty. I'll post back to the list. :) To answer your question, documentation is totally not there since most of the work I did for Trinidad was running only in a Proof of Concept environment similar to the bridge that will be provided for JSR-301. I don't think this work currently works with the existing MyFaces bridge. In this proof-of-concept, trinidad works with the following limitations: 1. Some of the popup support does not work. I had a JIRA ticket on this when Trinidad was in incubator but I haven't checked to see if it's still there. I'll check it out. 2. The javascript libraries are not namespaced meaning two trinidad portlets on the screen at the same time may conflict. Again, I had a JIRA ticket on this and I'll check the current status. 3. PPR in Trinidad has been disabled in a portal environment. Things that would normally do a ppr, will do a full-page submit instead Other then that, everything including FileUploads should work. Now I notices in the past month or so there has been much interest in fully supporting Trinidad in a Portlet environment. It's almost there but the biggest hurdle we have is the lack of a JSR-301 compliant bridge (or something that comes close). Some of the preliminary drafts of the spec have been released, but the Project is still looking for a home to host its R.I. Is this something people would be interrested in doing as part of MyFaces or the Bridges project? If so, how do we start the process? Scott O'Bryan Martin Marinschek wrote: Hi Scott, a while ago, I sent the inlined mail to the MyFaces user list - I'm sending it to you personally now, as I thought that maybe you are not scanning the list, and therefore missed it. I don't want to bother you too much - but even a small pointer to any documentation on this would be very helpful... regards, Martin - Hi *, I have skimmed through the online documentation for Trinidad, but haven't found anything useful about portlet compatibility. Is there anyone in the Trinidad team who knows more about using portlets with Trinidad, and can provide a link to more information? Especially I would be interested in: - file-upload - how's that handled in portlets? - including the script/style-elements in the header of the page (obviously, tr:document won't help in a portlet environment, right?) - serving out resources with the resources servlet/filter (it's clear that neither one will work in a portlet environment) I've heard about some jsf-portlet-bridge helping out here, but that's RI, right? regards, Martin -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: conversation-tag
2) is an absolute must. That's why the FacesServlet releases the FacesContext at the end of each request. Martin, are you bypassing the FacesServlet? On 12/5/06, Mario Ivankovits [EMAIL PROTECTED] wrote: Hi Martin! java.lang.IllegalStateException: Null request object org.apache.catalina.connector.RequestFacade.getAttribute(RequestFacade.java:256) org.apache.myfaces.context.servlet.RequestMap.getAttribute(RequestMap.java:44) org.apache.myfaces.context.servlet.AbstractAttributeMap.get(AbstractAttributeMap.java:91) org.apache.myfaces.custom.conversation.ConversationManager.getConversationContextId(ConversationManager.java:202) org.apache.myfaces.custom.conversation.ConversationManager.getConversationContext(ConversationManager.java:330) org.apache.myfaces.custom.conversation.ConversationManager.attachPersistence(ConversationManager.java:503) Yea - maybe I got it. Is it true that we do NOT release (set to null) the thread-local FacesContext._currentInstance after the request? Tomcat do not create new threads, thus - no one will release a ThreadLocal - any ThreadLocal will hold its value and presents this value to other subsequent requests. Not only for GC we should release it. For the above case it looks like the the conversation tag sees a previous instance of the FacesContext which holds a RequestMap which is no longer valid. I see two ways to fix it: 1) avoid using the FacesContext at this point. I can do it, but I would not really like it to do. 2) release the FacesContext at the end of the request. I'd go for 2. Ciao, Mario -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
New component FilterTable
Checkout MyFaces new filterTable component http://www.irian.at/myfaces-sandbox/filterTable.jsf which is based on dojo's filterTable widget. The 2 core features are: - Sorting of multiple columns - Filter to show/hide records based on a criteria -Thomas -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: Tomahawk and trinidad
see http://wiki.apache.org/myfaces/Building_With_Maven for MyFaces build instructions. On 10/9/06, Chaitanya Kadaru [EMAIL PROTECTED] wrote: Thanks Jeff So I shall try to move to the latest snapshot since that may be better. Is there a document or link describing how I checkout myfaces and tomahawk using svn and how I build it using maven for the jars. I do the same thing for trinidad and I would like to do it for all of the above so each time I just need to update svn and then get the latest jars and the fixes that come along with them. Your help is appreciated. Thanks Chaitanya Kadaru -Original Message- From: Jeff Bischoff [mailto:[EMAIL PROTECTED] Sent: Monday, October 09, 2006 12:52 PM To: MyFaces Discussion Subject: Re: Tomahawk and trinidad See [1]. It doesn't include Trinidad in the matrix, but it should get you started (with a compatible combination of MyFaces and Tomahawk) Note that your current combination is not marked as compatible. [1] http://wiki.apache.org/myfaces/CompatibilityMatrix Regards, Jeff Bischoff Kenneth L Kurz Associates, Inc. Chaitanya Kadaru wrote: Martin Thanks for your answer. Should I have to use the latest nightly build of tomahawk or myfaces? Or both? It seems to go into an infinite loop when I use Myfaces 1.1.4 Tomahawk 1.1.2 Trinidad incubator m1 snapshot svn version - 452680 If some one can give me a working combination version numbers of all the above that would be great. Thanks Chaitanya Kadaru -Original Message- From: Martin Marinschek [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 03, 2006 9:07 PM To: MyFaces Discussion Subject: Re: Tomahawk and trinidad If you want to use both Trinidad and Tomahawk, you should use a current nightly build - we've committed a lot of bug-fixes for compatibility of the two frameworks. regards, Martin On 10/3/06, Chaitanya Kadaru [EMAIL PROTECTED] wrote: Hi I am trying to use both trinidad and tomahawk in the same project. Can you please pass me the code snippet for the filters in the web.xml or a link to a sample where they used both. Somehow when I try I don't seem to get the faces components rendered. Thanks Chaitanya Kadaru -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: Problem when deploying trinidad application
You might get help posting to [EMAIL PROTECTED] On 10/10/06, Brian.S [EMAIL PROTECTED] wrote: I just switched over from ADF Faces to Tinidad. I keep getting this stack trace when deploying to JBoss 4.0.4. From the stack trace, it is missing this class: org.apache.myfaces.trinidadinternal.core.desktop.DesktopTableRenderer According to the build I have of Trinidad, the class is in the wrong package, it should be this. org.apache.myfaces.trinidadinternal.renderkit.core.desktop.DesktopTableRenderer 2006-10-10 15:09:47,609 ERROR [org.apache.myfaces.shared_impl.util.ClassUtils] Class org.apache.myfaces.trinidadinternal.core.desktop.DesktopTableRenderer not found java.lang.ClassNotFoundException: org.apache.myfaces.trinidadinternal.core.desktop.DesktopTableRenderer at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at org.apache.myfaces.shared_impl.util.ClassUtils.classForName(ClassUtils.java:138) at org.apache.myfaces.shared_impl.util.ClassUtils.simpleClassForName(ClassUtils.java:157) at org.apache.myfaces.shared_impl.util.ClassUtils.newInstance(ClassUtils.java:265) at org.apache.myfaces.config.FacesConfigurator.configureRenderKits(FacesConfigurator.java:607) at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:131) at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:64) at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:47) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503) at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.apache.catalina.core.StandardContext.init(StandardContext.java:5116) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503) at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:297) at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103) at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371) at org.jboss.web.WebModule.startModule(WebModule.java:83) at org.jboss.web.WebModule.startService(WebModule.java:61) at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289) at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245) at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978) at $Proxy0.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:417) at
Re: LifecycleFactory - no factory DEFAULT configured for this application
please send LightboxBean.java. On 10/10/06, fischman_98 [EMAIL PROTECTED] wrote: Do I need to set something up in the faces-Config.xml file to make this work? Trying to add a phaseListener to a requestScope managedBean and get java.lang.IllegalArgumentException: no factory DEFAULT configured for this application. Thanks. Matt Code: try { LifecycleFactory factory = (LifecycleFactory) FactoryFinder .getFactory(FactoryFinder.LIFECYCLE_FACTORY); Lifecycle lifecycle = factory .getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE); lifecycle.addPhaseListener(new PhaseListener() { public void beforePhase(PhaseEvent event) { ... } public void afterPhase(PhaseEvent event) { ... } public PhaseId getPhaseId() { return PhaseId.RENDER_RESPONSE; } }); } catch (Exception e) { e.printStackTrace(); } And Stack Trace: java.lang.IllegalArgumentException: no factory DEFAULT configured for this application. at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:94) at com.ngsimages.lightbox.LightboxBean.init(LightboxBean.java:56) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at java.lang.Class.newInstance0(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at org.apache.myfaces.shared_impl.util.ClassUtils.newInstance(ClassUtils.java:274) at org.apache.myfaces.shared_impl.util.ClassUtils.newInstance(ClassUtils.java:265) at org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBuilder.java:50) at org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:311) at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42) at org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVariable(ValueBindingImpl.java:574) at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124) at org.apache.myfaces.el.ValueBindingImpl.resolveToBaseAndProperty(ValueBindingImpl.java:455) at org.apache.myfaces.el.ValueBindingImpl.isReadOnly(ValueBindingImpl.java:132) at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:68) at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:41) at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:78) at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:41) at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:78) at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:41) at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:78) at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:41) at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:78) at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:41) at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:78) at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:41) at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:78) at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:41) at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:179) at
Good News:Trinidad Tomahawk
Good news: MyFaces Trinidad and Tomahawk components can now be used together. Major issues regarding tomahawk links have now been fixed. You wil be able to mix Trinidad and Tomahawk components in the same page, putting them into an ADF form. Version note: Get the current MyFaces version from SVN, or use a nightly build = 8/26/2006 http://people.apache.org/builds/myfaces/nightly/ Thomas -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: CANCEL: Drinking beer in Vienna/Austria
Hi, what about having a meeting next week? Location: Ma Pitom Date: 4.4.2006 Time: 18:30 Hasta luego, Thomas On 3/27/06, Mario Ivankovits [EMAIL PROTECTED] wrote: Hi! Some of the MyFaces guys are ill, on vacation or have a project deadline. I thought planning such a event far enough in the future will make the date stable, but unhappily sometimes life can be hard. So I'll cancel this date and inform you about another one as soon as possible. The positive is that we maybe can find a nice outdoor place then :-) So, sorry for this. Ciao, Mario I'll invite everyone who has some time to a meeting in vienna/austria. Location: Ma Pitom Date: 28.3.2006 Time: 18:30 We have no free stickers, no t-shirts or any other gift, just a meeting to drink a beer - or two - maximum. You meet me (if this is of any interest) and some guys from the myfaces (which might me more interesting ;-) ) team. Please send a PM if you plan to come, just to have an oversight of the number of people to await. See you! Ciao, Mario -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: JSCookMenu and f:param
No, you will always get the UINavigationMenuItem. On 2/8/06, Richard Frazer [EMAIL PROTECTED] wrote: OK, I used the daily from today and it is returning the value I was looking for, but not the UINavigationMenuItem like I would expect. It's still returning the HtmlCommandJSCookMenu. Should I be getting the UINavigationMenuItem when I am coding like you said in example a below? From: Richard Frazer [EMAIL PROTECTED] Reply-To: MyFaces Discussion users@myfaces.apache.org Date: Tue, 7 Feb 2006 20:21:58 -0500 To: MyFaces Discussion users@myfaces.apache.org Subject: RE: JSCookMenu and f:param I actually had it like your example a, except instead of an action, I defined and actionListener. This is where the source component was the menu and not the UINavigationMenuItem, as I would have expected. I'll try it with the next nightly build and let you know how that works. thanks. Richard -Original Message- From: Thomas Spiegl [mailto:[EMAIL PROTECTED] Sent: Tue 2/7/2006 6:09 PM To: MyFaces Discussion Subject: Re: JSCookMenu and f:param You can choose between 2 tags to create the menu tree: a) t:navigationMenuItem itemLabel=... action=... / This tag creates an UINavigationMenuItem component. Perfect, this one could be passed to the ActionListener b) t:navigationMenuItems value=#{...} where the value binds a List of NavigationMenuItem(s) (remember a NavigationMenuItem is not a component). As no component will be generated for a NavigationMenuItem in the render phase, the only component that can be passed to the ActionListener is the menu itself. Thomas On 2/7/06, Richard Frazer [EMAIL PROTECTED] wrote: Thanks Thomas. I'll grab the nightly tomorrow and try it out. What do you mean that most of you are using the NavigationMenuItem(s) to create the entire menu tree? Does that mean you aren't using the jscookMenu tag, but some other tag? Does this allow you to achieve the parameter passing approach? If there is a best practice type of approach that I'm not using, I would love to hear it. Thanks, Richard From: Thomas Spiegl [EMAIL PROTECTED] Reply-To: MyFaces Discussion users@myfaces.apache.org Date: Tue, 7 Feb 2006 20:49:18 +0100 To: MyFaces Discussion users@myfaces.apache.org Subject: Re: JSCookMenu and f:param ty richard - this is a bug. I just fixed this issue. The item's value will be returned again instead of the label. I think most of us are using NavigationMenuItem(s) to create the entire menu tree. NavigationMenuItem is not an UIComponent, that's why it can't be passed by the event. regards Thomas Regarding your question, why the HtmlCommandJSCookMenu is returned as source component. Well On 2/7/06, Richard Frazer [EMAIL PROTECTED] wrote: Thanks for your response. I downloaded the nightly yesterday and am seeing strange behavior. I tried adding an action listener to the navigationMenuItem and the event I get in my listener gives me the HtmlCommandJSCookMenu object as the source instead of the MenuItem itself, so I can't determine which item was selected. The strange thing is that the getValue method of the HtmlCommandJSCookMenu returns the label of the selected item. I hate to have to switch on the label though, because it's bound to change. Is this working as intended? Thanks, Richard From: Eduardo Dudu Ivan Pichler [EMAIL PROTECTED] Reply-To: MyFaces Discussion users@myfaces.apache.org Date: Mon, 6 Feb 2006 14:25:46 -0200 To: MyFaces Discussion users@myfaces.apache.org Subject: Re: JSCookMenu and f:param not. You need to use the nightly build of navigationMenuItem, such has actionListener feature. On 2/6/06, Richard Frazer [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Is f:param supported in tandem with jsookMenu/navigationMenuItem? If not, is there a way to achieve the same result? thanks. -- Dudu `P -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: JSCookMenu and f:param
ty richard - this is a bug. I just fixed this issue. The item's value will be returned again instead of the label. I think most of us are using NavigationMenuItem(s) to create the entire menu tree. NavigationMenuItem is not an UIComponent, that's why it can't be passed by the event. regards Thomas Regarding your question, why the HtmlCommandJSCookMenu is returned as source component. Well On 2/7/06, Richard Frazer [EMAIL PROTECTED] wrote: Thanks for your response. I downloaded the nightly yesterday and am seeing strange behavior. I tried adding an action listener to the navigationMenuItem and the event I get in my listener gives me the HtmlCommandJSCookMenu object as the source instead of the MenuItem itself, so I can't determine which item was selected. The strange thing is that the getValue method of the HtmlCommandJSCookMenu returns the label of the selected item. I hate to have to switch on the label though, because it's bound to change. Is this working as intended? Thanks, Richard From: Eduardo Dudu Ivan Pichler [EMAIL PROTECTED] Reply-To: MyFaces Discussion users@myfaces.apache.org Date: Mon, 6 Feb 2006 14:25:46 -0200 To: MyFaces Discussion users@myfaces.apache.org Subject: Re: JSCookMenu and f:param not. You need to use the nightly build of navigationMenuItem, such has actionListener feature. On 2/6/06, Richard Frazer [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Is f:param supported in tandem with jsookMenu/navigationMenuItem? If not, is there a way to achieve the same result? thanks. -- Dudu `P -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: JSCookMenu and f:param
You can choose between 2 tags to create the menu tree: a) t:navigationMenuItem itemLabel=... action=... / This tag creates an UINavigationMenuItem component. Perfect, this one could be passed to the ActionListener b) t:navigationMenuItems value=#{...} where the value binds a List of NavigationMenuItem(s) (remember a NavigationMenuItem is not a component). As no component will be generated for a NavigationMenuItem in the render phase, the only component that can be passed to the ActionListener is the menu itself. Thomas On 2/7/06, Richard Frazer [EMAIL PROTECTED] wrote: Thanks Thomas. I'll grab the nightly tomorrow and try it out. What do you mean that most of you are using the NavigationMenuItem(s) to create the entire menu tree? Does that mean you aren't using the jscookMenu tag, but some other tag? Does this allow you to achieve the parameter passing approach? If there is a best practice type of approach that I'm not using, I would love to hear it. Thanks, Richard From: Thomas Spiegl [EMAIL PROTECTED] Reply-To: MyFaces Discussion users@myfaces.apache.org Date: Tue, 7 Feb 2006 20:49:18 +0100 To: MyFaces Discussion users@myfaces.apache.org Subject: Re: JSCookMenu and f:param ty richard - this is a bug. I just fixed this issue. The item's value will be returned again instead of the label. I think most of us are using NavigationMenuItem(s) to create the entire menu tree. NavigationMenuItem is not an UIComponent, that's why it can't be passed by the event. regards Thomas Regarding your question, why the HtmlCommandJSCookMenu is returned as source component. Well On 2/7/06, Richard Frazer [EMAIL PROTECTED] wrote: Thanks for your response. I downloaded the nightly yesterday and am seeing strange behavior. I tried adding an action listener to the navigationMenuItem and the event I get in my listener gives me the HtmlCommandJSCookMenu object as the source instead of the MenuItem itself, so I can't determine which item was selected. The strange thing is that the getValue method of the HtmlCommandJSCookMenu returns the label of the selected item. I hate to have to switch on the label though, because it's bound to change. Is this working as intended? Thanks, Richard From: Eduardo Dudu Ivan Pichler [EMAIL PROTECTED] Reply-To: MyFaces Discussion users@myfaces.apache.org Date: Mon, 6 Feb 2006 14:25:46 -0200 To: MyFaces Discussion users@myfaces.apache.org Subject: Re: JSCookMenu and f:param not. You need to use the nightly build of navigationMenuItem, such has actionListener feature. On 2/6/06, Richard Frazer [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Is f:param supported in tandem with jsookMenu/navigationMenuItem? If not, is there a way to achieve the same result? thanks. -- Dudu `P -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: DataScroller without form validation ?
Michael, this was a bug. I just fixed it and commited my changes. When setting immediate=true, no validations will take place anymore. regards Thomas On 2/8/06, Michael Heinen [EMAIL PROTECTED] wrote: Hi all, I have a form containing a data table and a data scroller for paging this table. Moreover there are some input fields outside the table with validations. The problem is that these fields are always validated when another page is clicked in the dataScroller. I set the immediate attribute of the t:dataScroller to true, but this did not change anything. I got always validation errors. Here is a snippet: t:dataScroller id=scroll_1 for=items fastStep=3 pageCountVar=pageCount pageIndexVar=pageIndex styleClass=scroller paginator=true paginatorMaxPages=3 paginatorTableClass=paginator paginatorActiveColumnStyle=font-weight:bold; immediate=true … /t:dataScroller … t:inputText id=mynumber value=#{MyControllerBean.mynumber} required=true styleClass=inputField/ h:message for=mynumber styleClass=errorText/ Thanks for any help -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: grey out a jscookmenu item?
hi tony, JSCookMenu does not support this feature, but it would be a nice enhancement. If you could implement it and send us a patch, this woudl be greait! cheers Thomas On 2/2/06, tony kerz [EMAIL PROTECTED] wrote: anyone aware of a way to grey out a jscook menu item dynamically? -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: problems using panelnavigation2
Did you try one of the latest nightly builds? Panelnavigation2 was buggy in MyFaces 1.1.1. You can download the nightly builds from http://cvs.apache.org/builds/myfaces/nightly/ Cheers Thomas On 2/2/06, Marko Huebler [EMAIL PROTECTED] wrote: Hi, I've already tried this: In this case the text is rendered on the correct position but the panelnavigatoin2 looses all its css-styles. Only ordinary html links are displayed. Is there a reason for that? Thanks regards, Marko You must surround the include with a f:subview. regards Thomas On 2/1/06, Marko Huebler [EMAIL PROTECTED] wrote: Hi, I have some problems using the t:panelnavigation tag: In the jsp below a file is included which contains a panelnavigation2 menu. The strange thing is, that the t:outputText value=xyz / is rendered BEFORE the menu. The file menu.jsp does not contain any html, body, view or subview tags. Is there a reason for that? If I nest the [EMAIL PROTECTED] file=menu.jsp % in a subview tag, the output is rendered in the correct order - but - the panelnavigation2 menu looses all the styles (only ordinary html links remain...). So, is it not possible to have a panelnavigation2 menu in a subview? Some hints would be nice... Thanks regards, Marko %@ taglib uri=http://java.sun.com/jsf/html; prefix=h% %@ taglib uri=http://java.sun.com/jsf/core; prefix=f% %@ taglib uri=http://myfaces.apache.org/tomahawk; prefix=t% html [EMAIL PROTECTED] file=inc/head.inc% body f:view [EMAIL PROTECTED] file=menu.jsp % t:outputText value=xyz / /f:view /body /html -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: Master detail
You may use t:safeState value=... to save the manger bean in your worker-detail-page. When returning to the demartment/Workers view, your manger-bean will be restored. cheers Thomas On 2/2/06, Vladimir Coutinho [EMAIL PROTECTED] wrote: I has a bean to represent a worker. When the worker is a manager of a department , the property departmentWorkers lists the workers of that department. When I chose one department worker, how can I go back to the manager choosed in the first page? -- Vladimir M Coutinho -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: Using HtmlPanelGrid with an odd amount of children?
The column count has to be even. Use a panelGroup for empty cells. Thomas On 2/3/06, Dennis Byrne [EMAIL PROTECTED] wrote: Odd, even - whichever you want. Just so much as the number of children is a multiple of the @columns attribute for that grid. Dennis Byrne -Original Message- From: Matthias Kahlau [mailto:[EMAIL PROTECTED] Sent: Thursday, February 2, 2006 07:10 PM To: 'Users MyFaces' Subject: Using HtmlPanelGrid with an odd amount of children? Hi! Is it legal to use HtmlPanelGrid with an odd amount of children? I can recall some warnings shown in the logging output when not all possible cells are used, but it's only a warning - the rendered grid looks correct. Will the warning behaviour change to legal in the future, or shouldn't I use an odd number, but use invisible fillers? Regards, Matthias -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: panelNavigation2 Separator Problem
Christian, please open a jira issue for this http://myfaces.apache.org/issue.html regards Thomas On 1/31/06, Christian Bohn [EMAIL PROTECTED] wrote: Hi List, I need to pass parameters with a t:commandNavigation2 which ist part of a t:panelNavigation2 The passing of the parameters itself works, I do it with f:param (see code below) But now I have the problem, that for each f:param a separator is inserted into the menu which makes it look very ugly. Is there a way to disable the separator-function or any other workaround? My code: t:panelNavigation2 styleClass=nav_table id=nav1 layout=table t:commandNavigation2 value=#{bundle.nav_chiliserver} styleClass=nav_hauptpunkt2 t:commandNavigation2 value=#{bundle.nav_dicomserver} styleClass=nav_unterpunkt2 action=nav_dicomserver /t:commandNavigation2 t:commandNavigation2 value=#{bundle.nav_dbmaint} styleClass=nav_unterpunkt2 action=nav_dbmaint f:param name=id value=dbMaintenance/ f:param name=filename value=$CHILI/conf/dbMaintenance.chili.conf/ /t:commandNavigation2 ...(more items)... /t:commandNavigation2 /t:panelNavigation2 -- Greetings Christian Bohn -- Christian Bohn, Softwareentwicklung Tel.(+49) 6221 - 18079-10 CHILI GmbHFax.(+49) 6221 - 18079-11 Burgstrasse 61 e-mail: [EMAIL PROTECTED] D-69121 Heidelberg, Germany http://www.chili-radiology.com -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: problems using panelnavigation2
You must surround the include with a f:subview. regards Thomas On 2/1/06, Marko Huebler [EMAIL PROTECTED] wrote: Hi, I have some problems using the t:panelnavigation tag: In the jsp below a file is included which contains a panelnavigation2 menu. The strange thing is, that the t:outputText value=xyz / is rendered BEFORE the menu. The file menu.jsp does not contain any html, body, view or subview tags. Is there a reason for that? If I nest the [EMAIL PROTECTED] file=menu.jsp % in a subview tag, the output is rendered in the correct order - but - the panelnavigation2 menu looses all the styles (only ordinary html links remain...). So, is it not possible to have a panelnavigation2 menu in a subview? Some hints would be nice... Thanks regards, Marko %@ taglib uri=http://java.sun.com/jsf/html; prefix=h% %@ taglib uri=http://java.sun.com/jsf/core; prefix=f% %@ taglib uri=http://myfaces.apache.org/tomahawk; prefix=t% html [EMAIL PROTECTED] file=inc/head.inc% body f:view [EMAIL PROTECTED] file=menu.jsp % t:outputText value=xyz / /f:view /body /html -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: problem with jscookmenu / still problems
The nightly build 30/01 does not contain the patch, Martin has commited it a few hours ago. Get the latest version from svn. For information on building MyFaces with Maven see http://wiki.apache.org/myfaces/Building_With_Maven regards Thomas On 1/30/06, Marco Mistroni [EMAIL PROTECTED] wrote: Hello, i m still havingp roblems... i have downloaded the nightly build dated 30/1, version 1.1.2-SNAPSHOT of both myfaces core and tomahawk, and now i am gettign this exception : 19:28:45,468 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception java.lang.NoSuchMethodError: org.apache.myfaces.renderkit.html.util.DummyFormUti ls.getDummyFormResponseWriter(Ljavax/faces/context/FacesContext;)Lorg/apache/myf aces/renderkit/html/util/DummyFormResponseWriter; at org.apache.myfaces.custom.navmenu.jscookmenu.HtmlJSCookMenuRenderer.e ncodeChildren(HtmlJSCookMenuRenderer.java:169) at javax.faces.component.UIComponentBase.encodeChildren (UIComponentBase. java:524) at javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java: 474) at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:361) at org.apache.jsp.common.jscookmenu_jsp._jspService (org.apache.jsp.commo n.jscookmenu_jsp:182) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper .java:322) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3 14) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service (HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:173) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp atcher.java:672) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD ispatcher.java :574) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis patcher.java:499) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary .java:966) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.jav a:604) at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:13 7) at org.apache.struts.tiles.TilesUtil.doInclude (TilesUtil.java:177) at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756 ) at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(Inser tTag.java:881) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473) at org.apache.jsp.layout.VerticalclassicLayout_jsp._jspx_meth_tiles_inse rt_1(org.apache.jsp.layout.VerticalclassicLayout_jsp:162) at org.apache.jsp.layout.VerticalclassicLayout_jsp._jspService(org.apach e.jsp.layout.VerticalclassicLayout_jsp:85) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper .java:322) at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:3 14) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Appl icationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:173) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp atcher.java:672) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD ispatcher.java:574) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis patcher.java :499) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary .java:966) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.jav a:604) at org.apache.struts.tiles.TilesUtilImpl.doInclude (TilesUtilImpl.java:13 7) at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177) at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756 ) at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag (Inser tTag.java:881) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473) at org.apache.jsp.main_jsp._jspx_meth_tiles_insert_0(org.apache.jsp.main _jsp:117) at
Re: Style not getting reflected.
that migth not be the problem, but did you use subviews for inculding the jsp? On 1/31/06, j2ee Developer [EMAIL PROTECTED] wrote: I am using panelnavigation2. The style frrom my css files are not getting reflected when I include the jsp file using panelnavigation2. Please note that if I run the included file independently the styles are getting reflected. also I checked the path to the stylesheet is right as it is getting resolved, its just that the panel What might I be doing wrong? Thanks for your help. -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: Style not getting reflected.
do you use t:div? On 1/31/06, j2ee Developer [EMAIL PROTECTED] wrote: Yes I am using subviews. On 1/30/06, Thomas Spiegl [EMAIL PROTECTED] wrote: that migth not be the problem, but did you use subviews for inculding the jsp? On 1/31/06, j2ee Developer [EMAIL PROTECTED] wrote: I am using panelnavigation2. The style frrom my css files are not getting reflected when I include the jsp file using panelnavigation2. Please note that if I run the included file independently the styles are getting reflected. also I checked the path to the stylesheet is right as it is getting resolved, its just that the panel What might I be doing wrong? Thanks for your help. -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: Style not getting reflected.
do you use t:div in your subview? If so, add the forceId attributes, eg. t:div id=tabs forceId=true forceIdIndex=true regards, Thomas On 1/31/06, Thomas Spiegl [EMAIL PROTECTED] wrote: do you use t:div? On 1/31/06, j2ee Developer [EMAIL PROTECTED] wrote: Yes I am using subviews. On 1/30/06, Thomas Spiegl [EMAIL PROTECTED] wrote: that migth not be the problem, but did you use subviews for inculding the jsp? On 1/31/06, j2ee Developer [EMAIL PROTECTED] wrote: I am using panelnavigation2. The style frrom my css files are not getting reflected when I include the jsp file using panelnavigation2. Please note that if I run the included file independently the styles are getting reflected. also I checked the path to the stylesheet is right as it is getting resolved, its just that the panel What might I be doing wrong? Thanks for your help. -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: JSF support East Asian characters ?
Did you add a locale-config to your faces-config.xml ? application locale-config default-localede/default-locale supported-localede/supported-locale supported-localeen/supported-locale /application Thomas On 12/23/05, Dave [EMAIL PROTECTED] wrote: I have a inputText. when I type some East Asia characters into it, they are displaying correctly. But after clicking submit button, they did not show back correctly. One thing I noticed. I set the browser(IE) encoding to Unicode before typing the East Asia characters, after submit, the browser encoding changed to Western Europe(ISO). From browser view/source, meta HTTP-EQUIV=Content-Type CONTENT=text/html;charset=UTF-8 it says UTF-8. Note: submit did not store data in database, everything is in memory. Browser does character conversion ? or JSF does some conversion? Confused !! What needs to be done for JSF web application to support characters other than English? Thanks in advance for advice. Dave Yahoo! DSL Something to write home about. Just $16.99/mo. or less -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: NavigationMenuItem
I use the current version from svn.Jscookmenu works fine in the examples application and the actionListener is getting called as well. Do you get any java script errors?. Thomas On 12/20/05, Dudu [EMAIL PROTECTED] wrote: Hey I suppose there are no bug then no one responded my question about the NavigationMenuItem that I click and do nothing, no submit... But I it is strange, if I use the current release, it works, but when I use the nightly build, it doesn't works I'm must to use the nightly build , because I need to set the actionListener :( thanks all ___ Yahoo! doce lar. Faça do Yahoo! sua homepage. http://br.yahoo.com/homepageset.html -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: NavigationMenuItem
What kind of menu are you using jscookMenu or panelNavigation2?ThomasOn 12/19/05, Dudu [EMAIL PROTECTED] wrote:Hi,I several NavigationMenuItems, created dinamically. I want when a user click on a menu,I want to create a new tab.But I do not know:1 - How to get what navigationMenuItem was clicked.2 - How to set dynamically a method of a backing bean?Initially is this ___Yahoo! doce lar. Faça do Yahoo! sua homepage.http://br.yahoo.com/homepageset.html -- http://www.irian.atYour JSF powerhouse -JSF Consulting, Development andCourses in English and GermanProfessional Support for Apache MyFaces
Re: NavigationMenuItem
ActionListener does not work with jscookMenu and navigationMenuItem. You may use the navigationMenuItem.action attribute to trigger your backingBean action.RegardsThomasOn 12/19/05, Dudu [EMAIL PROTECTED] wrote: Sorry,JscoockMenups: I'm reading about adf:setActionListener to know if it solve thisproblem, but I'm no sure about it.thanksThomas Spiegl wrote: What kind of menu are you using jscookMenu or panelNavigation2? Thomas On 12/19/05, *Dudu* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, I several NavigationMenuItems, created dinamically. I want when a user click on a menu,I want to create a new tab. But I do not know: 1 - How to get what navigationMenuItem was clicked. 2 - How to set dynamically a method of a backing bean? Initially is this ___ Yahoo! doce lar. Faça do Yahoo! sua homepage. http://br.yahoo.com/homepageset.html -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFacesS___Yahoo! doce lar. Faça do Yahoo! sua homepage. http://br.yahoo.com/homepageset.html-- http://www.irian.atYour JSF powerhouse -JSF Consulting, Development andCourses in English and German Professional Support for Apache MyFaces
Re: NavigationMenuItem
Yes thats right, you cannot pass values to your action Method. The actionListener feature needs to be added to the JSCookMenu.ThomasOn 12/19/05, Dudu [EMAIL PROTECTED] wrote: Thanks Thomas,But do you knowhow I can get whatnavigationMenuItem was clicked,because it are created dinamically, and depending the navigationMenuItemclicked, a tab will be created..I cannot to call a action passing some values? Am I right? I'm stopped because this problem.Thanks again.Thomas Spiegl wrote: ActionListener does not work with jscookMenu and navigationMenuItem. You may use the navigationMenuItem.action attribute to trigger your backingBean action. Regards Thomas On 12/19/05, *Dudu* [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: Sorry, JscoockMenu ps: I'm reading about adf:setActionListener to know if it solve this problem, but I'm no sure about it. thanks Thomas Spiegl wrote: What kind of menu are you using jscookMenu or panelNavigation2? Thomas On 12/19/05, *Dudu* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, I several NavigationMenuItems, created dinamically. I want when a user click on a menu,I want to create a new tab. But I do not know: 1 - How to get what navigationMenuItem was clicked. 2 - How to set dynamically a method of a backing bean? Initially is this ___ Yahoo! doce lar. Faça do Yahoo! sua homepage. http://br.yahoo.com/homepageset.html -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces S ___ Yahoo! doce lar. Faça do Yahoo! sua homepage. http://br.yahoo.com/homepageset.html -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces___Yahoo! doce lar. Faça do Yahoo! sua homepage. http://br.yahoo.com/homepageset.html-- http://www.irian.atYour JSF powerhouse -JSF Consulting, Development andCourses in English and German Professional Support for Apache MyFaces
Re: NavigationMenuItem
Hi,I implemented the actionListener for JSCookMenu. Get the latest version from SVN or use nightly build to get the new feature.Attached you will find an example.1) Example 1 Statict:navigationMenuItem id=nav_2 actionListener=#{navigationMenu.actionListener} itemLabel=#{example_messages['nav_Home']} itemValue=go_home action="" The actionListener JSCookMenuBean.actionListener(ActionEvent event) will be executed. HtmlCommandJSCookMenu is now holding the itemValue of the clicked menu entry. Additionaly the action attribute may be given to trigger a page navigation. 2) Example 2 DynamicShows how to generate menu items 'dynamically' by using NavigationMenuItem(s) + how to define an ActionListener per item (see JSCookMenuBean.getJSCookMenuNavigationItems())The actionListener JSCookMenuBean.actionListener(ActionEvent event) will be executed. HtmlCommandJSCookMenu is now holding the value that was set for the NavigationMenuItem (see JSCookMenuBean.getMenuNaviagtionItem(...))CheersThomas On 12/19/05, Thomas Spiegl [EMAIL PROTECTED] wrote: Yes thats right, you cannot pass values to your action Method. The actionListener feature needs to be added to the JSCookMenu.Thomas On 12/19/05, Dudu [EMAIL PROTECTED] wrote: Thanks Thomas,But do you knowhow I can get whatnavigationMenuItem was clicked,because it are created dinamically, and depending the navigationMenuItemclicked, a tab will be created..I cannot to call a action passing some values? Am I right? I'm stopped because this problem.Thanks again.Thomas Spiegl wrote: ActionListener does not work with jscookMenu and navigationMenuItem. You may use the navigationMenuItem.action attribute to trigger your backingBean action. Regards Thomas On 12/19/05, *Dudu* [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: Sorry, JscoockMenu ps: I'm reading about adf:setActionListener to know if it solve this problem, but I'm no sure about it. thanks Thomas Spiegl wrote: What kind of menu are you using jscookMenu or panelNavigation2? Thomas On 12/19/05, *Dudu* [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, I several NavigationMenuItems, created dinamically. I want when a user click on a menu,I want to create a new tab. But I do not know: 1 - How to get what navigationMenuItem was clicked. 2 - How to set dynamically a method of a backing bean? Initially is this ___ Yahoo! doce lar. Faça do Yahoo! sua homepage. http://br.yahoo.com/homepageset.html -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces S ___ Yahoo! doce lar. Faça do Yahoo! sua homepage. http://br.yahoo.com/homepageset.html -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces___Yahoo! doce lar. Faça do Yahoo! sua homepage. http://br.yahoo.com/homepageset.html-- http://www.irian.atYour JSF powerhouse -JSF Consulting, Development andCourses in English and German Professional Support for Apache MyFaces -- http://www.irian.atYour JSF powerhouse - JSF Consulting, Development andCourses in English and German Professional Support for Apache MyFaces /* * Copyright 2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.myfaces.examples.misc; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.myfaces.custom.navmenu.NavigationMenuItem; import org.apache.myfaces.custom.navmenu.jscookmenu.HtmlCommandJSCookMenu; import javax.faces.event.ActionEvent; import java.util.ArrayList; import java.util.List; /** * @author Thomas Spiegl */ public class JSCookMenuBean { private static final Log log = LogFactory.getLog(JSCookMenuBean.class); public List getJSCookMenuNavigationItems() { List menu = new ArrayList(); menu.add(getMenuNaviagtionItem(Home, go_home)); return menu; } private static NavigationMenuItem getMenuNaviagtionItem(String label, String action) { NavigationMenuItem item = new NavigationMenuItem(label, action); item.setActi
JSCookMenu now supports ActionListener
Hi,I implemented the actionListener for JSCookMenu. Get the latest version from SVN or use nightly build to get the new feature.Attached you will find an example.1) Example 1 Statict:navigationMenuItem id=nav_2 actionListener=#{navigationMenu.actionListener} itemLabel=#{example_messages['nav_Home']} itemValue=go_home action="" The actionListener JSCookMenuBean.actionListener(ActionEvent event) will be executed. HtmlCommandJSCookMenu is now holding the itemValue of the clicked menu entry. Additionaly the action attribute may be given to trigger a page navigation. 2) Example 2 DynamicShows how to generate menu items 'dynamically' by using NavigationMenuItem(s) + how to define an ActionListener per item (see JSCookMenuBean.getJSCookMenuNavigationItems())The actionListener JSCookMenuBean.actionListener(ActionEvent event) will be executed. HtmlCommandJSCookMenu is now holding the value that was set for the NavigationMenuItem (see JSCookMenuBean.getMenuNaviagtionItem(...))CheersThomas-- http://www.irian.atYour JSF powerhouse - JSF Consulting, Development andCourses in English and GermanProfessional Support for Apache MyFaces /* * Copyright 2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.myfaces.examples.misc; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.myfaces.custom.navmenu.NavigationMenuItem; import org.apache.myfaces.custom.navmenu.jscookmenu.HtmlCommandJSCookMenu; import javax.faces.event.ActionEvent; import java.util.ArrayList; import java.util.List; /** * @author Thomas Spiegl */ public class JSCookMenuBean { private static final Log log = LogFactory.getLog(JSCookMenuBean.class); public List getJSCookMenuNavigationItems() { List menu = new ArrayList(); menu.add(getMenuNaviagtionItem(Home, go_home)); return menu; } private static NavigationMenuItem getMenuNaviagtionItem(String label, String action) { NavigationMenuItem item = new NavigationMenuItem(label, action); item.setActionListener(#{navigationMenu.actionListener}); item.setValue(label); return item; } public String actionListener(ActionEvent event) { String outcome = (String)((HtmlCommandJSCookMenu) event.getComponent()).getValue(); log.info(ActionListener: + outcome); return outcome; } }
Re: NavigationMenuItem
I testet it a few hours ago and had no _javascript_ errors, can you download a copy from svn and build a release?On 12/19/05, Dudu [EMAIL PROTECTED] wrote:HmmThen there are this bug really? the yesterday version? Martin Marinschek wrote: Thomas just got this finished 2hours ago. So he actually meant the nightly build of today, not the one of yesterday ;) regards, Martin On 12/19/05, Dudu [EMAIL PROTECTED] wrote: Thomas. he works almost well I only replaced de libs with the nightly builded files. but now, when I click in a navigationMenuItem on menu, is not submited anything, the page do nothing * af:subform x:jscookMenu layout=hbr theme=ThemeOffice styleLocation=jscookmenu/ThemeOffice _javascript_Location=jscookmenu/ThemeOffice/ binding=#{backing_sag_index.jscookMenu1} id=jscookMenu1 x:navigationMenuItems binding=#{backing_sag_index.navigationMenuItems1} id=navigationMenuItems1value=#{backing_sag_index.menu}/ /x:jscookMenu /af:subform and the all _javascript_ generated are like this... * _cmSplit,[null, 'Rotas', 'id3__id5_jscookMenu1_menu:action', '_id3', null], [null, 'Fretes', 'id3__id5_jscookMenu1_menu:action', '_id3', null], _cmSplit,[null, 'Transportes', 'id3__id5_jscookMenu1_menu:action', '_id3', null], [null, 'Unidades', 'id3__id5_jscookMenu1_menu:action', '_id3', null], _cmSplit,[null, 'Seção', 'id3__id5_jscookMenu1_menu:action', '_id3', null], [null, 'Aplicações', 'id3__id5_jscookMenu1_menu:action', '_id3', null], [null, 'Causas', 'id3__id5_jscookMenu1_menu:action', '_id3', null], [null, 'Laboratórios', 'id3__id5_jscookMenu1_menu:action', '_id3', null], [null, 'Atividades', 'id3__id5_jscookMenu1_menu:action', '_id3', null]], *I'm using the build of 18 december.* I'm thinking it is a bug.. Thanks Thomas Spiegl wrote: Hi, I implemented the actionListener for JSCookMenu. Get the latest version from SVN or use nightly build to get the new feature. Attached you will find an example. 1) Example 1Static t:navigationMenuItem id=nav_2 actionListener=#{navigationMenu.actionListener} itemLabel=#{example_messages['nav_Home']} itemValue=go_home action="" The actionListener JSCookMenuBean.actionListener(ActionEvent event) will be executed. HtmlCommandJSCookMenu is now holding the itemValue of the clicked menu entry. Additionaly the action attribute may be given to trigger a page navigation. 2) Example 2 Dynamic Shows how to generate menu items 'dynamically' by using NavigationMenuItem(s) + how to define an ActionListener per item (see JSCookMenuBean.getJSCookMenuNavigationItems()) The actionListener JSCookMenuBean.actionListener(ActionEvent event) will be executed. HtmlCommandJSCookMenu is now holding the value that was set for the NavigationMenuItem (see JSCookMenuBean.getMenuNaviagtionItem(...)) Cheers Thomas On 12/19/05, *Thomas Spiegl* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Yes thats right, you cannot pass values to your action Method. The actionListener feature needs to be added to the JSCookMenu. Thomas On 12/19/05, *Dudu * [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: Thanks Thomas, But do you knowhow I can get whatnavigationMenuItem was clicked, because it are created dinamically, and depending the navigationMenuItem clicked, a tab will be created.. I cannot to call a action passing some values? Am I right? I'm stopped because this problem. Thanks again. Thomas Spiegl wrote: ActionListener does not work with jscookMenu and navigationMenuItem. You may use the navigationMenuItem.action attribute to trigger your backingBean action. Regards Thomas On 12/19/05, *Dudu* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Sorry, JscoockMenu ps: I'm reading about adf:setActionListener to know if it solve this problem, but I'm no sure about it. thanks Thomas Spiegl wrote: What kind of menu are you using jscookMenu or panelNavigation2? Thomas On 12/19/05, *Dudu* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, I several NavigationMenuItems, created dinamically. I want when a user click on a menu,I want to create a new tab. But I do not know: 1 - How to get what navigationMenuItem was clicked. 2 - How to set dynamically a method of a backing bean? Initially is this ___ Yahoo! doce lar. Faça do Yahoo! sua homepage. http://br.yahoo.com/homepageset.html -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces S ___ Yahoo! doce lar. Faça do Yahoo! sua homepage. http://br.yahoo.com/homepageset.html http://br.yahoo.com/homepageset.html
Re: NavigationMenuItem
just applied your patch. It's in svn. Cheers Thomas On 12/19/05, Grigoras Cristinel [EMAIL PROTECTED] wrote: Hi Thomas, Please look to this bug, and merge the fix. http://issues.apache.org/jira/browse/MYFACES-900 Thanks very much. Cristi Thomas Spiegl wrote: Hi, I implemented the actionListener for JSCookMenu. Get the latest version from SVN or use nightly build to get the new feature. Attached you will find an example. 1) Example 1 Static t:navigationMenuItem id=nav_2 actionListener=#{navigationMenu.actionListener} itemLabel=#{example_messages['nav_Home']} itemValue=go_home action="" The actionListener JSCookMenuBean.actionListener(ActionEvent event) will be executed. HtmlCommandJSCookMenu is now holding the itemValue of the clicked menu entry. Additionaly the action attribute may be given to trigger a page navigation. 2) Example 2 Dynamic Shows how to generate menu items 'dynamically' by using NavigationMenuItem(s) + how to define an ActionListener per item (see JSCookMenuBean.getJSCookMenuNavigationItems()) The actionListener JSCookMenuBean.actionListener(ActionEvent event) will be executed. HtmlCommandJSCookMenu is now holding the value that was set for the NavigationMenuItem (see JSCookMenuBean.getMenuNaviagtionItem(...)) Cheers Thomas On 12/19/05, Thomas Spiegl [EMAIL PROTECTED] wrote: Yes thats right, you cannot pass values to your action Method. The actionListener feature needs to be added to the JSCookMenu. Thomas On 12/19/05, Dudu [EMAIL PROTECTED] wrote: Thanks Thomas, But do you knowhow I can get whatnavigationMenuItem was clicked, because it are created dinamically, and depending the navigationMenuItem clicked, a tab will be created.. I cannot to call a action passing some values? Am I right? I'm stopped because this problem. Thanks again. Thomas Spiegl wrote: ActionListener does not work with jscookMenu and navigationMenuItem. You may use the navigationMenuItem.action attribute to trigger your backingBean action. Regards Thomas On 12/19/05, *Dudu* [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: Sorry, JscoockMenu ps: I'm reading about adf:setActionListener to know if it solve this problem, but I'm no sure about it. thanks Thomas Spiegl wrote: What kind of menu are you using jscookMenu or panelNavigation2? Thomas On 12/19/05, *Dudu* [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, I several NavigationMenuItems, created dinamically. I want when a user click on a menu,I want to create a new tab. But I do not know: 1 - How to get what navigationMenuItem was clicked. 2 - How to set dynamically a method of a backing bean? Initially is this ___ Yahoo! doce lar. Faça do Yahoo! sua homepage. http://br.yahoo.com/homepageset.html -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces S ___ Yahoo! doce lar. Faça do Yahoo! sua homepage. http://br.yahoo.com/homepageset.html -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces ___ Yahoo! doce lar. Faça do Yahoo! sua homepage. http://br.yahoo.com/homepageset.html -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces /* * Copyright 2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package org.apache.myfaces.examples.misc;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import org.apache.myfaces.custom.navmenu.NavigationMenuItem;import org.apache.myfaces.custom.navmenu.jscookmenu.HtmlCommandJSCookM
Re: PanelNavigation2 not saving state
Jan, panelNavigation2 works fine in my applications. I cannot really see a problem in your JSPs.If you send me a simple test application, showing the problem, I will have a look at it.CheersThomas On 12/13/05, Jan [EMAIL PROTECTED] wrote: Hi, so I change the sandbox.jar from 20051211 to sandbox.jar form version 1.1.1. Actually I don't really use sandbox features, so this isn't a problem. As you expected the Nullpointer disappeared. 2005-12-13 00:16:54,109 INFO [org.apache.myfaces.custom.scope.ScopeUtils] - ScopeContainer not found - has not been initialized. java.lang.NullPointerException Unfortunately panelNavigation2 still doesn't work correctly. So this Error didn' t have something in common with the navigation problem, I suppose. But why is it just not saving state? Any more ideas? Jan Von: Thomas Spiegl [mailto:[EMAIL PROTECTED] ] Gesendet: Dienstag, 13. Dezember 2005 01:48 An: MyFaces Discussion Betreff: Re: PanelNavigation2 not saving state I see, there is a problem with the AfterScopePhaseListener, which is a sandbox feature. A quick fix would be to remove the sandbox faces-config from your myfaces.jar. (you will find the following line in it phase-listenerorg.apache.myfaces.custom.scope.AfterScopePhaseListener/phase-listener ) Your code looks good, there should not be any problem with panelNavigation2 when using nightly 20051211. Thomas -- http://www.irian.atYour JSF powerhouse -JSF Consulting, Development andCourses in English and German Professional Support for Apache MyFaces
Re: PanelNavigation2 not saving state
Send the archive to my email, attaching it to the mailing list won't work.On 12/13/05, Thomas Spiegl [EMAIL PROTECTED] wrote:Jan, panelNavigation2 works fine in my applications. I cannot really see a problem in your JSPs. If you send me a simple test application, showing the problem, I will have a look at it.CheersThomas On 12/13/05, Jan [EMAIL PROTECTED] wrote: Hi, so I change the sandbox.jar from 20051211 to sandbox.jar form version 1.1.1. Actually I don't really use sandbox features, so this isn't a problem. As you expected the Nullpointer disappeared. 2005-12-13 00:16:54,109 INFO [org.apache.myfaces.custom.scope.ScopeUtils] - ScopeContainer not found - has not been initialized. java.lang.NullPointerException Unfortunately panelNavigation2 still doesn't work correctly. So this Error didn' t have something in common with the navigation problem, I suppose. But why is it just not saving state? Any more ideas? Jan Von: Thomas Spiegl [mailto:[EMAIL PROTECTED] ] Gesendet: Dienstag, 13. Dezember 2005 01:48 An: MyFaces Discussion Betreff: Re: PanelNavigation2 not saving state I see, there is a problem with the AfterScopePhaseListener, which is a sandbox feature. A quick fix would be to remove the sandbox faces-config from your myfaces.jar. (you will find the following line in it phase-listenerorg.apache.myfaces.custom.scope.AfterScopePhaseListener/phase-listener ) Your code looks good, there should not be any problem with panelNavigation2 when using nightly 20051211. Thomas -- http://www.irian.atYour JSF powerhouse -JSF Consulting, Development andCourses in English and German Professional Support for Apache MyFaces -- http://www.irian.atYour JSF powerhouse -JSF Consulting, Development andCourses in English and German Professional Support for Apache MyFaces
Re: PanelNavigation2 not saving state - solved
You're welcome, Jan.CheersThomasOn 12/13/05, Jan [EMAIL PROTECTED] wrote: Hi Thomas, finally I got it working. I thought, if even you can't think of what might be the failure, it has to be something you haven't seen yet. ….so … I had a look into the web.xml and found the missing part: context-param param-namejavax.faces.STATE_SAVING_METHOD/param-name param-valueclient/param-value description State saving method: client or server (= default) See JSF Specification 2.5.2 /description /context-param Now it works like it should. Nevertheless thank you for your support :) Cheers - Jan -- http://www.irian.atYour JSF powerhouse -JSF Consulting, Development andCourses in English and GermanProfessional Support for Apache MyFaces
Re: PanelNavigation2 not saving state
Jan,panelNavigation2 is statefule and it works with tiles.Does your panelNavigation still have the same clientId after navigation to another page?ThomasOn 12/12/05, Jan [EMAIL PROTECTED] wrote: Hi Mario,I don't use redirect/ in my navigation rules.I already thought it might be the use of tiles:insert, but I already moved the panelNavigation2 tags to the main template, so the panelNavigation wouldonly be aware of the same jsp (main template). But this didn't changeanything.Or does panelNavigation2 generally not work with tiles? Any more ideas?Jan-Ursprüngliche Nachricht-Von: Mario Ivankovits [mailto:[EMAIL PROTECTED] ]Gesendet: Montag, 12. Dezember 2005 15:02An: MyFaces Discussion Betreff: Re: PanelNavigation2 not saving stateHi Jan! But if the outcome String in the action of the backingbean matches an navigation-rule, faces changes (redirect/forwards...whatever) the *.jsp / *.jsf as it should do. Unfortunately panelNavigation2 loses its state and all nodes which need to stay opened are closed.Do you use redirect / in your navigation rules?Then this is the cause. ---Mario-- http://www.irian.atYour JSF powerhouse - JSF Consulting, Development andCourses in English and German Professional Support for Apache MyFaces
Re: dynamically adding entries panal navigation
You can dynamically create your menu items by using t:navigationMenuItems value=... Note: The value binding will be evaluated if and only if the menu is not present in the current view. Typically this will happen when the menu is rendered the first time. Hence the menu-tree will keep the same. If a navigation to a new page takes place the new page contains the same panelNavigation2 component (same clientId), then the panelNavigation2 component and it's state will be copied from the previous view. HTH ThomasOn 12/12/05, Balasubramanian R [EMAIL PROTECTED] wrote: Hi, Can you please explain the steps to create dynamically adding entries panal navigation 2 in myfaces. Bala -- http://www.irian.atYour JSF powerhouse -JSF Consulting, Development andCourses in English and GermanProfessional Support for Apache MyFaces
Re: Dynamic JSCOOKMENU with actionListener
sorry, the actionListner is not implemented yet in JSCookMenu, it just works with panelNavigation2 regards, Thomas On 12/13/05, Saumil Mehta [EMAIL PROTECTED] wrote: Hello, I've been using JSCookMenu to dynamically generate menus in my JSP pages. Here is what the JSP looks like, it is pretty simple: t:jscookMenu layout = hbr theme = ThemeOffice t:navigationMenuItems value = #{menuBean.topList}/ / t:jscookMenu My bean getTopList method returns NavigationMenuItem[] to dynamically create the menu. Here is the Java code that creates the array of NavigationMenuItem for (int i=0;ilocales.size();i++) { localeListCustomize[i] = new NavigationMenuItem("HELLO", null,null,true); /*ATTACH ACTION LISTENER TO NAVIGATIONMENUITEM*/ localeListCustomize[i].setActionListener(#{menuBean.startOperation}); } However, the action listener never fires in the final page. I tried attaching the string "#" as an action, that didn't work either. Has anybody been able to get this to work? I've done a decent bit of digging through the tomahawk source (HTMLJSCookMenuRenderer, UINavigationMenuItem, etc), so if this level of detail seems too little, let me know and I'll post again with more details about tomahawk source-level debugging. Thanks, Saumil -- http://www.irian.atYour JSF powerhouse -JSF Consulting, Development andCourses in English and GermanProfessional Support for Apache MyFaces
Re: dataTable, t:dataScroller and large datasets
What if i the business logic returns a custom java.util.List, that dynamically reloads data? size() returns the total rowCount get(i) would reload a new block of data if i is out of scope. The List would need to know about the rows (HtmlDataScroller.rows) displayed, so that reloading can work properly. This should work with the current implementation. Thomas On 11/29/05, Mario Ivankovits [EMAIL PROTECTED] wrote: Simon Kitching wrote: In order to implement paging at the presentation level without loading the entire dataset in memory, the business tier must also support paging in some manner, ie must provide methods that take first/numrows parameters and return the specified subset of available data plus information about the number of available rows.Ah, now I see, you are right.It looks like it isnt a business logic interface as it is so easy to implement with plain sql, but as soon as you have a complicated businesslogic and would like to paginate you have to tell this logic to do so. However if DataPage or an equivalent was part of a non-ui library like commons-collections then this might be acceptable.So we should ask them to do so. Myfaces already use commons-collections,so this wouldnt introduce a new dependency.---Mario -- http://www.irian.atYour JSF powerhouse -JSF Consulting, Development andCourses in English and GermanProfessional Support for Apache MyFaces
Re: Usage of PanelNavigation2
Roland, you can now set the value for your NavigationMenuItem(s) NavigationMenuItem item = new NavigationMenuItem(label, action); item.setActionListener(#{navigationMenu.actionListener}); item.setValue(label); you can access this value in your ActionListener: public String actionListener(ActionEvent event) { log.info(ActionListener: +((HtmlCommandNavigationItem)event.getComponent()).getValue()); return getAction1(); } So you do not need to rely on the menu node indexing. Cheers ThomasOn 11/11/05, Thomas Spiegl [EMAIL PROTECTED] wrote: Thanks for testing! I will not touch the index strings, promised.CheersThomasOn 11/11/05, Roland Oertig [EMAIL PROTECTED] wrote: Thanks Thomas, it works perfectly. I have only one wish. Please keep the menu node indexing (zero base) and index string you return as it is now, because, you know, I and for sure others, defined or will define a split pattern to extract the node information based on the actual string content. You must a great weekend! Cheers Roland. -Original Message- From: Thomas Spiegl [mailto: [EMAIL PROTECTED]] Sent: Mittwoch, 9. November 2005 21:39 To: MyFaces Discussion; [EMAIL PROTECTED] Subject: Re: Usage of PanelNavigation2 You can use the NavigationMenuItems.setActionListener to add an ActionListener to your NavigationMenuItems You will need to checkout the current version of MyFaces to get this feature. eg. navigationItem.setActionListener(#{yourBean.actionListener}); YourBean ...public String actionListener(ActionEvent event) ... regards Thomas On 11/4/05, Alberto Molpeceres [EMAIL PROTECTED] wrote: Hi, We are using PanelNavigation2 to show a menu of actions. We have populated the menu and works pretty well. It gets rendered and it calls backing bean methods as expected. But since we create this menu dinamically in a backing bean, we can't define a diferent outcome for each menu entry in faces-config.xml. So, how can we know in the destination JSP which option has been selected?. Can we pass any kind of parameter to the NavigationMenuItem and retrieve it in the method given as action parameter?. Thank you very much for your attention, al. -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces --http://www.irian.atYour JSF powerhouse -JSF Consulting, Development andCourses in English and GermanProfessional Support for Apache MyFaces -- http://www.irian.atYour JSF powerhouse -JSF Consulting, Development andCourses in English and GermanProfessional Support for Apache MyFaces
Re: Usage of PanelNavigation2
You will have to checkout if you want to use this feature.On 11/25/05, Thomas Spiegl [EMAIL PROTECTED] wrote:Roland, you can now set the value for your NavigationMenuItem(s) NavigationMenuItem item = new NavigationMenuItem(label, action); item.setActionListener(#{navigationMenu.actionListener}); item.setValue(label); you can access this value in your ActionListener: public String actionListener(ActionEvent event) { log.info(ActionListener: +((HtmlCommandNavigationItem)event.getComponent()).getValue()); return getAction1(); } So you do not need to rely on the menu node indexing. Cheers ThomasOn 11/11/05, Thomas Spiegl [EMAIL PROTECTED] wrote: Thanks for testing! I will not touch the index strings, promised.CheersThomasOn 11/11/05, Roland Oertig [EMAIL PROTECTED] wrote: Thanks Thomas, it works perfectly. I have only one wish. Please keep the menu node indexing (zero base) and index string you return as it is now, because, you know, I and for sure others, defined or will define a split pattern to extract the node information based on the actual string content. You must a great weekend! Cheers Roland. -Original Message- From: Thomas Spiegl [mailto: [EMAIL PROTECTED]] Sent: Mittwoch, 9. November 2005 21:39 To: MyFaces Discussion; [EMAIL PROTECTED] Subject: Re: Usage of PanelNavigation2 You can use the NavigationMenuItems.setActionListener to add an ActionListener to your NavigationMenuItems You will need to checkout the current version of MyFaces to get this feature. eg. navigationItem.setActionListener(#{yourBean.actionListener}); YourBean ...public String actionListener(ActionEvent event) ... regards Thomas On 11/4/05, Alberto Molpeceres [EMAIL PROTECTED] wrote: Hi, We are using PanelNavigation2 to show a menu of actions. We have populated the menu and works pretty well. It gets rendered and it calls backing bean methods as expected. But since we create this menu dinamically in a backing bean, we can't define a diferent outcome for each menu entry in faces-config.xml. So, how can we know in the destination JSP which option has been selected?. Can we pass any kind of parameter to the NavigationMenuItem and retrieve it in the method given as action parameter?. Thank you very much for your attention, al. -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces --http://www.irian.atYour JSF powerhouse -JSF Consulting, Development and Courses in English and GermanProfessional Support for Apache MyFaces -- http://www.irian.at Your JSF powerhouse -JSF Consulting, Development andCourses in English and GermanProfessional Support for Apache MyFaces -- http://www.irian.atYour JSF powerhouse -JSF Consulting, Development andCourses in English and German Professional Support for Apache MyFaces
Re: duplicate ids in page with datatable and datascroller
I can't find the include for menu.jsp in contribuintes.jsp. Did you put the inclusion into a Subview (f:subview). If not this is your problem. Cheers Thomas On 11/14/05, Rogerio Pereira [EMAIL PROTECTED] wrote: After put an fixed id for every graphicImage in my dataScroller i got the same error message but now with my fixed component id in the message. -- Yours truly (Atenciosamente), Rogério -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: duplicate ids in page with datatable and datascroller
Sometimes an exception causes the duplicateId problem. Set an ecxeption breakpoint in your debugger and look for the suspect. regards Thomas On 11/14/05, Rogerio Pereira [EMAIL PROTECTED] wrote: This file has menu.jsp included and has the same problem too, i used f:subview in two places but no sucess... 2005/11/14, Thomas Spiegl [EMAIL PROTECTED]: I can't find the include for menu.jsp in contribuintes.jsp. Did you put the inclusion into a Subview (f:subview). If not this is your problem. Cheers Thomas On 11/14/05, Rogerio Pereira [EMAIL PROTECTED] wrote: After put an fixed id for every graphicImage in my dataScroller i got the same error message but now with my fixed component id in the message. -- Yours truly (Atenciosamente), Rogério -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces -- Yours truly (Atenciosamente), Rogério -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: duplicate ids in page with datatable and datascroller
That's really bad - try to get one. Thomas On 11/14/05, Rogerio Pereira [EMAIL PROTECTED] wrote: That's the problem, i don't have debugger here. 2005/11/14, Thomas Spiegl [EMAIL PROTECTED]: Sometimes an exception causes the duplicateId problem. Set an ecxeption breakpoint in your debugger and look for the suspect. regards Thomas On 11/14/05, Rogerio Pereira [EMAIL PROTECTED] wrote: This file has menu.jsp included and has the same problem too, i used f:subview in two places but no sucess... 2005/11/14, Thomas Spiegl [EMAIL PROTECTED]: I can't find the include for menu.jsp in contribuintes.jsp. Did you put the inclusion into a Subview (f:subview). If not this is your problem. Cheers Thomas On 11/14/05, Rogerio Pereira [EMAIL PROTECTED] wrote: After put an fixed id for every graphicImage in my dataScroller i got the same error message but now with my fixed component id in the message. -- Yours truly (Atenciosamente), Rogério -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces -- Yours truly (Atenciosamente), Rogério -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces -- Yours truly (Atenciosamente), Rogério -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: duplicate ids in page with datatable and datascroller
What Java IDE do you use? On 11/14/05, Rogerio Pereira [EMAIL PROTECTED] wrote: Any sugestions? 2005/11/14, Thomas Spiegl [EMAIL PROTECTED]: That's really bad - try to get one. Thomas On 11/14/05, Rogerio Pereira [EMAIL PROTECTED] wrote: That's the problem, i don't have debugger here. 2005/11/14, Thomas Spiegl [EMAIL PROTECTED]: Sometimes an exception causes the duplicateId problem. Set an ecxeption breakpoint in your debugger and look for the suspect. regards Thomas On 11/14/05, Rogerio Pereira [EMAIL PROTECTED] wrote: This file has menu.jsp included and has the same problem too, i used f:subview in two places but no sucess... 2005/11/14, Thomas Spiegl [EMAIL PROTECTED]: I can't find the include for menu.jsp in contribuintes.jsp. Did you put the inclusion into a Subview (f:subview). If not this is your problem. Cheers Thomas On 11/14/05, Rogerio Pereira [EMAIL PROTECTED] wrote: After put an fixed id for every graphicImage in my dataScroller i got the same error message but now with my fixed component id in the message. -- Yours truly (Atenciosamente), Rogério -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces -- Yours truly (Atenciosamente), Rogério -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces -- Yours truly (Atenciosamente), Rogério -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces -- Yours truly (Atenciosamente), Rogério -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: jscookmenu only displays Submit Query menu item
Cameron, just define the renderer-type în your facelet-taglib (tomahawk.taglib.xml) and JSCookMenu will work with facelets. tag tag-namejscookMenu/tag-name component component-typeorg.apache.myfaces.JSCookMenu/component-type renderer-typeorg.apache.myfaces.JSCookMenu/renderer-type /component /tag Cheers Thomas On 11/11/05, Mike Kienenberger [EMAIL PROTECTED] wrote: Cameron, First make sure you are using a facelets taglib.xml file that defines the jscookmenu and navigationMenuItem components. Those aren't defined in the Use_Facelets_with_Tomahawk file yet, so I'm not sure if anyone has successfully used them with facelets. (Seems like a couple of people have had issues with facelets and jscookmenu in the past, but it's unclear if it's working yet). Second, it looks like at least one bug was fixed on Nov 2nd, so you'll need to upgrade to a nightly build since 1.1.1 was released before that. http://issues.apache.org/jira/browse/MYFACES-697?page=all If anyone else is using facelets + jscookmenu successfully, perhaps that person could update the tomahawk.taglib.xml file on the wiki. http://wiki.apache.org/myfaces/Use_Facelets_with_Tomahawk -Mike On 11/11/05, Thomas Spiegl [EMAIL PROTECTED] wrote: Seems to be a problem concerning myfaces facelets. Can you send me a small sample application using facelets instead of jsp? I will have a look at it. regards, Thomas On 11/11/05, Cameron Ross [EMAIL PROTECTED] wrote: I'm trying to use the jscookmenu component from jsf. However, the page is only displaying a single menu item with the label Submit Query. My deployment environment consists of: - version 1.1.1 of myfaces-all.jar - JBoss version 4.0.3 SP1 - sun jdk1.5.0_05 My faclet looks like this: !DOCTYPE composition PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; ui:composition xmlns=http://www.w3.org/1999/xhtml; xmlns:ui=http://java.sun.com/jsf/facelets; xmlns:f=http://java.sun.com/jsf/core; xmlns:t=http://myfaces.apache.org/tomahawk; template=template2.xhtml ui:define name=content2 f:view t:jscookMenu layout=hbr theme=ThemeOffice t:navigationMenuItem id=nav_1 itemLabel=nav_1 action=main/ t:navigationMenuItem id=nav_2 itemLabel=nav_2 action=main t:navigationMenuItem id=nav_2_1 itemLabel=nav_2_1 action=main/ /t:navigationMenuItem t:navigationMenuItem id=nav_3 itemLabel=nav_3 action=main/ /t:jscookMenu /f:view /ui:define /ui:composition The html being generated looks like this: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN SYSTEM http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1/ titleSymboticware Pando/title link href=css/sng.css rel=stylesheet type=text/css/ /head body form id=_tagId0 name=_tagId0 method=post action=/pando/jscookmenu_example.jsf enctype=application/x-www-form-urlencoded input type=hidden name=jsf_tree_64 id=jsf_tree_64 value=H4sIAK1QvUoDQRj8jIYgBEQtbAUFuz2NYJPOQPRComCMIFcc6956uXj7495ejI2dvQ/gE0iewCews/UlbK3dvVw0woEWNh87szPfDN/4HcqJggOhQoQlJn2K2O0lJjQxUMYRwToSHJ0qSrtapUSninYwxyFVm99kQzApOOW6eb729tj6eC3BggeLPulHcaAMDy2vbSKcSYSTRzgzEc5fI+ptWPLJFDVinCQaVtoDPMROjHnoGH3EQyOrfsvc4BruoORBxbfJ2lhWvRnP8cWAEl0fyVTlVf/jGvXn8dbL8v3DUwlgJAFgLrE1ILWzXIDnJ1hq2CuoQNJEC4Y4HjLKU9Rzj/AwCrNKHUO4mjINZfPt78jiIGlnVUPFimpGluPMVJM/RRm5a7rs/95lkBAhrrLnoWaxuQDDPGh1G4a13Uykr3HoBnbfhr37COWLpsdCfWPM3E2h2Jdh2xjWiw099yyiNydCaCk/ARSphsHIAgAA / input type=hidden name=jsf_state_64 id=jsf_state_64 value=H4sIAJVRP2/TQBR/iR2cliKlqVQBEhsLi1PSMQOkhCiWXLVSMyAxpFfnEjs9+8zdc3JhKOIbMCEhBcEH4EsgBjYQLEh8BphYYALbgThNWom+4fTe+d7vn998h0IkYOOhPSBDYjIS9M29owF1sPbsw4NXJXmL5QFUCABa9AhOICl91hlhXFLAerodocfMFpHuLgkLxte37zYPP2mQb8Iq46TbJA5yYcEKuoJKl7OuCu/cTWHWRsX4LCWtSvFKGZ7NHcLoyc/1w8nWr2950C0oujGHw7vUBsPhUYBijFBOHVQSB5UDFF7Qr9lQTMaI9Gki2IifD4nwSIDpqMLfcSEAQp4GydUKwmqrvWt3duoH1j2Ea5WBdDg/9mkQdagifsioqVz0WSJyIxNZF4KMbU+ievr5xov35KUGOQt06T2maXa5kX4qtyzLzSxLBKODpG91t0KcJqDMHnGoNJtc+MmzskxOfSm1HMJVh/umjIJ0g1GUZn1/37buN2KhlaVvXuzEbNAeiRg2p5c362HIxm1+TIPW5GOjFjx/vZb8jtF1KFWQxgsEaXXqPmY0nnz5MVEqPKdSoVdmzrUznBfO6LIMtuMMyvMZ7ESIPPiHj6C5RwLhctulPt3r9TyHztNq59IWZ92ledpCQIad2xl8NiPoPvH+Ml8QsLoAWF0EXMgp9//4Roo3L3n+5pRodUHV2wuqt5cRlfoDNYybFDoEAAA= /input type=hidden name=jsf_viewid id=jsf_viewid value=/jscookmenu_example.xhtml / div id=header/ div id=container2 div id=content2input id
Re: duplicate ids in page with datatable and datascroller
At first sight i cannot see any problem. Can you send a simple application, so that i can reproduce debug your problem? Cheers Thomas On 11/14/05, Rogerio Pereira [EMAIL PROTECTED] wrote: i attached one of the pages that causes the error -- Yours truly (Atenciosamente), Rogério -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: Usage of PanelNavigation2
Thanks for testing! I will not touch the index strings, promised. Cheers Thomas On 11/11/05, Roland Oertig [EMAIL PROTECTED] wrote: Thanks Thomas, it works perfectly. I have only one wish. Please keep the menu node indexing (zero base) and index string you return as it is now, because, you know, I and for sure others, defined or will define a split pattern to extract the node information based on the actual string content. You must a great weekend! Cheers Roland. -Original Message- From: Thomas Spiegl [mailto:[EMAIL PROTECTED] Sent: Mittwoch, 9. November 2005 21:39 To: MyFaces Discussion; [EMAIL PROTECTED] Subject: Re: Usage of PanelNavigation2 You can use the NavigationMenuItems.setActionListener to add an ActionListener to your NavigationMenuItems You will need to checkout the current version of MyFaces to get this feature. eg. navigationItem.setActionListener(#{yourBean.actionListener}); YourBean ... public String actionListener(ActionEvent event) ... regards Thomas On 11/4/05, Alberto Molpeceres [EMAIL PROTECTED] wrote: Hi, We are using PanelNavigation2 to show a menu of actions. We have populated the menu and works pretty well. It gets rendered and it calls backing bean methods as expected. But since we create this menu dinamically in a backing bean, we can't define a diferent outcome for each menu entry in faces-config.xml. So, how can we know in the destination JSP which option has been selected?. Can we pass any kind of parameter to the NavigationMenuItem and retrieve it in the method given as action parameter?. Thank you very much for your attention, al. -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: myfaces 20051109 and jscook serious bug
Yes, you are right. I will fix this. Thomas On 11/11/05, Francesco Consumi [EMAIL PROTECTED] wrote: Hi, I'm using this myfaces snapshot and I think I found a serious bug in jscookmenu : when in action there are methods, they are executed every time the menu is loaded. Just an example: t:jscookMenu layout=hbr theme=ThemeOffice t:navigationMenuItem id=nav_home itemLabel=Home action=go_home t:navigationMenuItem id=nav_home2 itemLabel=Home action=go_home / t:navigationMenuItem id=nav_logout itemLabel=Logout action=#{mb.logout} / /t:navigationMenuItem /t:jscookMenu every time i reload page with this menu, the logout method is executed. -- Francesco Consumi Ufficio Sistemi informativi Istituto degli Innocenti Piazza SS.Annunziata, 12 50122 Firenze consumi at istitutodeglinnocenti.it Tel. +39 055 2037320 ICQ# 12516133 -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: myfaces 20051109 and jscook serious bug
I just fixed the bug commited the changes. Thanks for reporting this issue! regards Thomas On 11/11/05, Thomas Spiegl [EMAIL PROTECTED] wrote: Yes, you are right. I will fix this. Thomas On 11/11/05, Francesco Consumi [EMAIL PROTECTED] wrote: Hi, I'm using this myfaces snapshot and I think I found a serious bug in jscookmenu : when in action there are methods, they are executed every time the menu is loaded. Just an example: t:jscookMenu layout=hbr theme=ThemeOffice t:navigationMenuItem id=nav_home itemLabel=Home action=go_home t:navigationMenuItem id=nav_home2 itemLabel=Home action=go_home / t:navigationMenuItem id=nav_logout itemLabel=Logout action=#{mb.logout} / /t:navigationMenuItem /t:jscookMenu every time i reload page with this menu, the logout method is executed. -- Francesco Consumi Ufficio Sistemi informativi Istituto degli Innocenti Piazza SS.Annunziata, 12 50122 Firenze consumi at istitutodeglinnocenti.it Tel. +39 055 2037320 ICQ# 12516133 -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: jscookmenu only displays Submit Query menu item
Seems to be a problem concerning myfaces facelets. Can you send me a small sample application using facelets instead of jsp? I will have a look at it. regards, Thomas On 11/11/05, Cameron Ross [EMAIL PROTECTED] wrote: I'm trying to use the jscookmenu component from jsf. However, the page is only displaying a single menu item with the label Submit Query. My deployment environment consists of: - version 1.1.1 of myfaces-all.jar - JBoss version 4.0.3 SP1 - sun jdk1.5.0_05 My faclet looks like this: !DOCTYPE composition PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; ui:composition xmlns=http://www.w3.org/1999/xhtml; xmlns:ui=http://java.sun.com/jsf/facelets; xmlns:f=http://java.sun.com/jsf/core; xmlns:t=http://myfaces.apache.org/tomahawk; template=template2.xhtml ui:define name=content2 f:view t:jscookMenu layout=hbr theme=ThemeOffice t:navigationMenuItem id=nav_1 itemLabel=nav_1 action=main/ t:navigationMenuItem id=nav_2 itemLabel=nav_2 action=main t:navigationMenuItem id=nav_2_1 itemLabel=nav_2_1 action=main/ /t:navigationMenuItem t:navigationMenuItem id=nav_3 itemLabel=nav_3 action=main/ /t:jscookMenu /f:view /ui:define /ui:composition The html being generated looks like this: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN SYSTEM http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1/ titleSymboticware Pando/title link href=css/sng.css rel=stylesheet type=text/css/ /head body form id=_tagId0 name=_tagId0 method=post action=/pando/jscookmenu_example.jsf enctype=application/x-www-form-urlencoded input type=hidden name=jsf_tree_64 id=jsf_tree_64 value=H4sIAK1QvUoDQRj8jIYgBEQtbAUFuz2NYJPOQPRComCMIFcc6956uXj7495ejI2dvQ/gE0iewCews/UlbK3dvVw0woEWNh87szPfDN/4HcqJggOhQoQlJn2K2O0lJjQxUMYRwToSHJ0qSrtapUSninYwxyFVm99kQzApOOW6eb729tj6eC3BggeLPulHcaAMDy2vbSKcSYSTRzgzEc5fI+ptWPLJFDVinCQaVtoDPMROjHnoGH3EQyOrfsvc4BruoORBxbfJ2lhWvRnP8cWAEl0fyVTlVf/jGvXn8dbL8v3DUwlgJAFgLrE1ILWzXIDnJ1hq2CuoQNJEC4Y4HjLKU9Rzj/AwCrNKHUO4mjINZfPt78jiIGlnVUPFimpGluPMVJM/RRm5a7rs/95lkBAhrrLnoWaxuQDDPGh1G4a13Uykr3HoBnbfhr37COWLpsdCfWPM3E2h2Jdh2xjWiw099yyiNydCaCk/ARSphsHIAgAA / input type=hidden name=jsf_state_64 id=jsf_state_64 value=H4sIAJVRP2/TQBR/iR2cliKlqVQBEhsLi1PSMQOkhCiWXLVSMyAxpFfnEjs9+8zdc3JhKOIbMCEhBcEH4EsgBjYQLEh8BphYYALbgThNWom+4fTe+d7vn998h0IkYOOhPSBDYjIS9M29owF1sPbsw4NXJXmL5QFUCABa9AhOICl91hlhXFLAerodocfMFpHuLgkLxte37zYPP2mQb8Iq46TbJA5yYcEKuoJKl7OuCu/cTWHWRsX4LCWtSvFKGZ7NHcLoyc/1w8nWr2950C0oujGHw7vUBsPhUYBijFBOHVQSB5UDFF7Qr9lQTMaI9Gki2IifD4nwSIDpqMLfcSEAQp4GydUKwmqrvWt3duoH1j2Ea5WBdDg/9mkQdagifsioqVz0WSJyIxNZF4KMbU+ievr5xov35KUGOQt06T2maXa5kX4qtyzLzSxLBKODpG91t0KcJqDMHnGoNJtc+MmzskxOfSm1HMJVh/umjIJ0g1GUZn1/37buN2KhlaVvXuzEbNAeiRg2p5c362HIxm1+TIPW5GOjFjx/vZb8jtF1KFWQxgsEaXXqPmY0nnz5MVEqPKdSoVdmzrUznBfO6LIMtuMMyvMZ7ESIPPiHj6C5RwLhctulPt3r9TyHztNq59IWZ92ledpCQIad2xl8NiPoPvH+Ml8QsLoAWF0EXMgp9//4Roo3L3n+5pRodUHV2wuqt5cRlfoDNYybFDoEAAA= /input type=hidden name=jsf_viewid id=jsf_viewid value=/jscookmenu_example.xhtml / div id=header/ div id=container2 div id=content2input id=_tagId0:_tagId3 name=_tagId0:_tagId3 type=submit onclick=clear__5FtagId0(); / /div /div div id=footer/ input type=hidden name=_tagId0_SUBMIT value=1 /input type=hidden name=_tagId0:_link_hidden_ /script type=text/javascript!-- function clear__5FtagId0() { var f = document.forms['_tagId0']; f.elements['_tagId0:_link_hidden_'].value=''; f.target=''; } clear__5FtagId0(); //--/script/form /body /html Any help is greatly appreciated. Cheers, Cameron. -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: No tag panelNavigation2
I plan to replace panelNavigation by panelNavigation2 the next days. I didn't want to break panelNavigation during development phase, therefore i invented panelNavigation2. If you want to use panelNavigation2, please use a nightly build = 2005-10-15. panelNavigation2 has a layout attribute: layout=table renders a table (= old behaviour) laout=list renders the menu as list (= default) Thomas On 10/18/05, James McGrath [EMAIL PROTECTED] wrote: Thanks for the quick response. I am using MyFaces 1.1.0. You are right, panelNavigation2 does not appear in META-INF/tomahawk.tld, so it could be something in a new release. I think I will use the panelNavigation tag instead (I'm really not sure what the difference between the two is actually). Anyone know of the differences? The documentation (http://myfaces.apache.org/tlddoc/tomahawk/) for both is exactly the same. Anyone know what version this documentation is for? I think I was making the wrong assumption that the examples to be found on the web (http://www.irian.at/myfaces/) were the same ones as you can download from from the mirrors. It's strange cause the example site say it is MyFaces (version 1.1.0). Does anyone else think this is a mistake? If so, I will let Martin Marinschek know about it. Cheers. Simon Kitching wrote: James McGrath wrote: Hi All, I'm new to using Tomahawk, but have a bit of experience with JSF, anyway I'm having a frustrating time at the moment. I'm sure there is a really simple solution to this - but I have been circling this problem for days and can't find a solution. I have been trying to use the tomahawk library to produce a static menu like the one used in the examples: http://www.irian.at/myfaces/panelnavigation_1.jsf I am getting the following exception: javax.servlet.ServletException: /mainartistcategories.jsp(15,15) /menu.jsp(14,12) No tag panelNavigation2 defined in tag library imported with prefix t Where menu.jsp is a file included in mainartistcategories.jsp with the following statement: %@ include file=menu.jsp % Here is an except from menu.jsp: -- t:div id=subnavigation_outer t:div id=subnavigation t:panelNavigation2 id=menu1 layout=list itemClass=mypage activeItemClass=selected openItemClass=selected Looking at the META-INF/tomahawk.tld file inside the tomahawk.jar file for the 1.1.0 release, I don't see any entry for a panelNavigation2 tag. Perhaps this tag was added after the 1.1.0 release. You don't say what version of myfaces you are using. Regards, Simon
Re: [newbie] How to pass a parameter from one page to another
Great! Thanks for writing this entry!On 9/17/05, Rick Reumann [EMAIL PROTECTED] wrote: On 9/16/05, Martin Marinschek [EMAIL PROTECTED] wrote: If you like it,you might want to document it ;) Created a wiki entry here on it, plus some other techniques. I'm sure I made some mistakes so any corrections welcome. http://wiki.apache.org/myfaces/ExecutingMethodsFromLinkButtonParameters -- Rick
Re: [newbie] How to pass a parameter from one page to another
If your bean is Serializable use t:saveState value=#{yourBean} / to make yourBean available on next page. regards, Thomas On 9/16/05, Rick Reumann [EMAIL PROTECTED] wrote: Martin Marinschek wrote the following on 9/16/2005 8:25 AM: A cool MyFaces specific feature is the t:updateActionListener tag - you can set a value onto a backing bean if a command has been executed. I'm very interested in seeing this tag used or some docs on it. I lookedunder the UpdateActionListenerTag docshttp://myfaces.apache.org/javadoc/tomahawk/ andhttp://myfaces.apache.org/tlddoc/tomahawk/but didn't find anything.Does one of the MyFaces examples show how it's used?--Rick
Re: [newbie] How to pass a parameter from one page to another
Rick, My answer was related to Esther Leimbeck's question. When using the updateActionListener nested inside a commandLink, the backing bean will automatically be updated. Have a look at the Master-Detail example: http://irian.at/myfaces/masterDetail.jsf http://irian.at/myfaces/masterDetail.jsp.source regards,Thomas http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German On 9/16/05, Rick Reumann [EMAIL PROTECTED] wrote: Thomas Spiegl wrote the following on 9/16/2005 10:14 AM: If your bean is Serializable use t:saveState value=#{yourBean} /That's not what I'm asking though. I'm asking about how to use the t:updateActionListener tag. I'm thinking the tag would be used inside ofa commandLink or commandButton tag and when the action is fired that thelink or button represents, it will automatically set and bean properties of the backing bean backing that action? If so, this would be a SUPERBLYnice feature.Currently, for example if you pass in parameters with a commandLink youneed to do the following in the resulting action (assuming foo is the f:param):FacesContext context = FacesContext.getCurrentInstance();Map map = context.getExternalContext().getRequestParameterMap();String foo = (String) map.get(foo);I'm assuming that possibly t:updateActionListener would avoid this construct and that if you had a property in the Action called foo itwould be automagically populated using the tag. This would be very nice- so nice, that I think it should be part of standard JSF. to make yourBean available on next page. regards, Thomas On 9/16/05, *Rick Reumann* [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: Martin Marinschek wrote the following on 9/16/2005 8:25 AM: A cool MyFaces specific feature is the t:updateActionListener tag - you can set a value onto a backing bean if a command has been executed. I'm very interested in seeing this tag used or some docs on it. I looked under the UpdateActionListenerTag docs http://myfaces.apache.org/javadoc/tomahawk/ and http://myfaces.apache.org/tlddoc/tomahawk/ but didn't find anything. Does one of the MyFaces examples show how it's used? -- Rick--Rick
Re: [newbie] How to display dynamic content from a database
the MasterDetail covers your problem http://irian.at/myfaces/masterDetail.jsf http://irian.at/myfaces/masterDetail.jsp.source Just read the data from database, pack it into a java.util.List and pass it to your dataTable t:dataTable value=#{countryList.countries} ... where countryList.countries returns a List regards,Thomas http://www.irian.at Your JSF powerhouse - JSF Trainings in English and GermanOn 9/16/05, Esther Leimbeck [EMAIL PROTECTED] wrote: I would like to write a JSF-application that displays a data-list from a database. The amount of entries in that list, however, differs. My question is: I assume I have to place that data into the backing bean BEFORE the page is rendered. How do I do that? I actually have two use cases: Case 1: Upon its first call, a page has to display such a data list (so somehow I need to be able to place the data from the database into the backing bean BEFORE the page is displayed) Case 2: A page is called by another page which passes a "key" to the new page. The new page has to then use that "key" to query the database (Key can be a search criteria or such. It is usually an integer) How can that be done? Thanks Esther Verschicken Sie romantische, coole und witzige Bilder per SMS!Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
Re: [newbie] Forward to launch page
You could use a redirect instead. If you are using extension mapping *.jsf the following redirect should work. % response.sendRedirect(response.encodeRedirectURL(/pages/launch.jsf)); % Thomas On 9/16/05, Robert Taylor [EMAIL PROTECTED] wrote: Greetings, I'm a current Struts user interested in learning and usingMyFaces and JSF.My dev. env. consists of Tomcat 5.5.9, MyFaces 1.0.9, JDK 1.4.2, Win2K.I've configured MyFaces to use Tiles for view-handler. What I want to do is to have my welcome page (index.jsp), forward to alaunch page for the application.In Struts, I would simply use a jsp:forward page=/app/launch/.In my struts-config.xml file I has an action mapping for actionpath=/launch forward=launch.tile/ which forwarded to a tilesconfiguration which builds the page.I'm trying to do something similar with JSF, but have been unsuccessful. I removed the tiles complexity just to see if it would display anon-tiles .jsp. My wecome page consists of a single line:jsp:forward page=/app/launch/.My faces-context.xml file is as follows:?xml version=1.0?!DOCTYPE faces-config PUBLIC -//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN http://java.sun.com/dtd/web-facesconfig_1_0.dtd faces-config navigation-rule from-view-id/launch/from-view-id navigation-case to-view-id/pages/launch.jsp/to-view-id /navigation-case /navigation-rule/faces-configI keep getting a 404 error. The HTTP request is for /test/app/launch, but the 404 error indicates it cannot find /test/launch.The log files reflect the following:2005-09-15 17:39:05,140 [http-8080-Processor24] DEBUGorg.apache.myfaces.lifecycle.LifecycleImpl - entering restoreView in org.apache.myfaces.lifecycle.LifecycleImpl2005-09-15 17:39:05,187 [http-8080-Processor24] DEBUGorg.apache.myfaces.application.jsp.JspStateManagerImpl - No treestructure state found in client request2005-09-15 17:39:05,234 [http-8080-Processor24] DEBUG org.apache.myfaces.application.jsp.JspViewHandlerImpl - Created view /launch2005-09-15 17:39:05,312 [http-8080-Processor24] DEBUGorg.apache.myfaces.util.DebugUtils - Newly created view UIViewRoot id=NULL family=javax.faces.ViewRoot transient=falserendered=true rendererType=NULL locale=en rendersChildren=false renderKitId=HTML_BASIC viewId=/launch/2005-09-15 17:39:05,359 [http-8080-Processor24] DEBUGorg.apache.myfaces.lifecycle.LifecycleImpl - exiting restoreView inorg.apache.myfaces.lifecycle.LifecycleImpl (-- render response)2005-09-15 17:39:05,359 [http-8080-Processor24] DEBUGorg.apache.myfaces.lifecycle.LifecycleImpl - entering renderResponse in org.apache.myfaces.lifecycle.LifecycleImpl2005-09-15 17:39:05,359 [http-8080-Processor24] DEBUGorg.apache.myfaces.webapp.webxml.WebXmlParser - adding mapping forservlet + Faces Servlet urlpattern = /app/* 2005-09-15 17:39:05,359 [http-8080-Processor24] DEBUGorg.apache.myfaces.application.jsp.JspViewHandlerImpl - Dispatching to/launch2005-09-15 17:39:05,468 [http-8080-Processor24] DEBUGorg.apache.myfaces.util.DebugUtils - View after renderingUIViewRoot id=NULL family=javax.faces.ViewRoot transient=falserendered=true rendererType=NULL locale=en rendersChildren=false renderKitId=HTML_BASIC viewId=/launch/2005-09-15 17:39:05,468 [http-8080-Processor24] DEBUGorg.apache.myfaces.lifecycle.LifecycleImpl - exiting renderResponse inorg.apache.myfaces.lifecycle.LifecycleImplAny ideas, suggestions, RTFM, etc... would be helpful. I have readthrough the JSF spec. regarding the navigation and I still can't figure out what I have misconfigured. I even tried removing thefrom-view-id/launch/from-view-id altogether to make sure thenavigaction-case/ would execute but still get the same error. /robert
Re: setting headers on the response in JSF
If you don't want to implment a PhaseListener or a javax.servlet.Filter for setting response headers, think about using MyFaces Tiles-Support. You'd just need to define a scriptlet in one (maybe a few) JSP templates. Thomas On 9/15/05, Ken Weiner [EMAIL PROTECTED] wrote: What is the best way to set headers on the HttpResponse to control things such as caching directives? For example: response.setHeader(Cache-Control, no-cache); Would I need to implement a PhaseListener? Is this done through config parameters of some kind? Should I just include a scriptlet in each JSP page? -Ken
Re: UIComponent: Not serializable?
see Adam Winer's comment on MYFACES-573: http://issues.apache.org/jira/browse/MYFACES-573?page=comments#action_12329502 ThomasOn 9/15/05, Marios Kerkemezos [EMAIL PROTECTED] wrote: Hello everyone!I have the following question, which I still haven'tanswered...I have a simple MyFaces test application consisting ofa small number of pages and an equal number of backingbeans deployed on Tomcat 5.0.28. All my beans inheritfrom some base class which implementsjava.io.Serializable and some of them containUIComponent subclasses as properties which are usedfor component bindings (e.g. private UIData tableComponent; private UIOutput labelComponent;).I've noticed that when I stop and restart myapplication from Tomcat Manager I get aNotSerializableException for the beans that containcomponent binding properties ( e.g.java.io.NotSerializableException:org.apache.myfaces.component.html.ext.HtmlDataTable )Everything else "seems" to be working ok, but I guessthis exception isn't normal. Any ideas on what I might be overlooking?Any help appreciatedMario___Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com
Re: [BEER] And another one: MyFaces meeting at the ApacheCon Europe
Martin just gave me the exact meeting point time for the get-together at the ApacheCon Europe. Date: Wednesday, 20th of July 2005 Time: 8 pm Location: Haus der Wirschaft / Registration Point Have a nice meeting a couple of german beers. regards, Thomas On 7/17/05, Martin Marinschek [EMAIL PROTECTED] wrote: sorry, sorry...of course ApacheCon ;)regards,MartinOn 7/16/05, Manfred Geiler [EMAIL PROTECTED] wrote: as for the location for our meeting at the JavaOne: does anybody know ApacheCon? Or JavaOne next year? :-) -Manfred