[Trinidad] Re-populating DataTable after sorting, results in empty table
Hi, I encountered the following problem: I have a data table with several columns (each sortable) looking like e.g. |Name|Street|City|... There are also input fields with which the user can filter the contents of the table. E.g. in the city input field when he enters L* and hits an update-button only rows are displayed where city starts with an 'L'. So far this is working fine UNTIL one tries to sort the table first and filter afterwards. This weirdly results in an empty table. If all the filter input fields are cleared and the update-button hit again the table is filled as if nothing happened. This is really a showstopper for as and I have no idea what might cause the problem. At least on managed bean side, I don't see anything that might cause the problem. Cheers Simon -- View this message in context: http://old.nabble.com/-Trinidad--Re-populating-DataTable-after-sorting%2C-results-in-empty-table-tp29148077p29148077.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
AW: [Trinidad] Re-populating DataTable after sorting, results in empty table
Hi! This maybe because the table model doesn't get sorted in the background. Does your table have more than one page (with t:datascroller)? Matthias -Ursprüngliche Nachricht- Von: users-return-57036-matthias.leis=sid.sachsen...@myfaces.apache.org [mailto:users-return-57036-matthias.leis=sid.sachsen...@myfaces.apache.org] Im Auftrag von schneidc Gesendet: Dienstag, 13. Juli 2010 10:52 An: users@myfaces.apache.org Betreff: [Trinidad] Re-populating DataTable after sorting, results in empty table Hi, I encountered the following problem: I have a data table with several columns (each sortable) looking like e.g. |Name|Street|City|... There are also input fields with which the user can filter the contents of the table. E.g. in the city input field when he enters L* and hits an update-button only rows are displayed where city starts with an 'L'. So far this is working fine UNTIL one tries to sort the table first and filter afterwards. This weirdly results in an empty table. If all the filter input fields are cleared and the update-button hit again the table is filled as if nothing happened. This is really a showstopper for as and I have no idea what might cause the problem. At least on managed bean side, I don't see anything that might cause the problem. Cheers Simon -- View this message in context: http://old.nabble.com/-Trinidad--Re-populating-DataTable-after-sorting%2C-results-in-empty-table-tp29148077p29148077.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: AW: [Trinidad] Re-populating DataTable after sorting, results in empty table
Hi Matthias! Sometimes the table has several pages but no datascroller (what's that, never heard of?). And should the sort-feature of the table also sort the according list? Simon Leis, Matthias - SID-NLKM wrote: Hi! This maybe because the table model doesn't get sorted in the background. Does your table have more than one page (with t:datascroller)? Matthias -- View this message in context: http://old.nabble.com/-Trinidad--Re-populating-DataTable-after-sorting%2C-results-in-empty-table-tp29148077p29148389.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
AW: AW: [Trinidad] Re-populating DataTable after sorting, results in empty table
Hi Simon, Datascroller is a feature of tomahawk. I didn't see your post was about Trinidad, sorry. I have no experience with trinidad, but as far as I know it from the tomahawk datatable, sorting the table in the view doesn't sort the model in the background. A couple days ago I ran into this problem. I bind the table to a bean property, get the sort column and sort direction and sort the list manually according to this values. So the displayed table and the model are in sync. Regards, Matthias -Ursprüngliche Nachricht- Von: users-return-57038-matthias.leis=sid.sachsen...@myfaces.apache.org [mailto:users-return-57038-matthias.leis=sid.sachsen...@myfaces.apache.org] Im Auftrag von schneidc Gesendet: Dienstag, 13. Juli 2010 11:29 An: users@myfaces.apache.org Betreff: Re: AW: [Trinidad] Re-populating DataTable after sorting, results in empty table Hi Matthias! Sometimes the table has several pages but no datascroller (what's that, never heard of?). And should the sort-feature of the table also sort the according list? Simon Leis, Matthias - SID-NLKM wrote: Hi! This maybe because the table model doesn't get sorted in the background. Does your table have more than one page (with t:datascroller)? Matthias -- View this message in context: http://old.nabble.com/-Trinidad--Re-populating-DataTable-after-sorting%2C-results-in-empty-table-tp29148077p29148389.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: [Tobago] calling of renderer class
Hallo Hani, I'm not know exactly what you need. I assume, you have a sheet with headers, and the headers should have more than one row? Do you needed wrapping of the text in one header element, or do you need to have two header elements (with border etc.?). A feature like this will be added in Tobago 1.5, but is not scheduled yet. Regards, Udo Am 25.06.10 10:38, schrieb Abushammala, Hani (EXTERN: FTP): Thanks for the Info. I`m trying now to extend the sheet renderer to visualize a label in two rows (or one label for each header row) in the header of the sheet. Is this the best way or is there another way to solve it? Regards, Hani -Ursprüngliche Nachricht- Von: Udo Schnurpfeil [mailto:u...@schnurpfeil.de] Gesendet: Freitag, 25. Juni 2010 07:46 An: users@myfaces.apache.org Betreff: Re: [Tobago] calling of renderer class Hi, there is also an example-theme in the project (https://svn.apache.org/repos/asf/myfaces/tobago/branches/tobago-1.0.x/example/tobago-theme-example/) which overrides the InRenderer. Regards Udo Am 23.06.10 09:45, schrieb Volker Weber: Hi Hani, the easiest way to overwrite a Renderer is to put your own int the tobago-resource-path into your application. e.g. if you use the speyside theme put your renderer, which must be named SheetRenderer, into the package tobago-resource-path/html/standard/speyside/tag/ Regards, Volker 2010/6/21 Abushammala, Hani (EXTERN: FTP) extern.hani.abushamma...@volkswagen.de: Another question. How can i configure another renderer for the tobago component like the sheet component. Any ideas or solutions? Regards, Hani -Ursprüngliche Nachricht- Von: Abushammala, Hani (EXTERN: FTP) [mailto:extern.hani.abushamma...@volkswagen.de] Gesendet: Montag, 21. Juni 2010 09:52 An: MyFaces Discussion Betreff: [Tobago] calling of renderer class Hi, I`ve developed a component to create a dynamic panel with a renderer class, but the renderer could not be called. The rendering works if the compoent class renders the output stream. I don`t know how i can configure the renderer for the new component in tobago. faces-config.xml: component descriptionThe dynamic panel component./description display-nameDynamicPanel/display-name !-- The name for registering the component. -- component-typeextn.DynamicPanel/component-type !-- The implementation class. -- component-classweb.components.UIDynamicPanel/component-class component-extension renderer-typeextn.DynamicPanelRenderer/renderer-type /component-extension /component render-kit renderer descriptionRenderer for DynamicPanel./description component-familyextn.DynamicPanelFamily/component-family renderer-typeextn.DynamicPanelRenderer/renderer-type renderer-classweb.components.DynamicPanelRenderer/renderer-class /renderer /render-kit Regards, Hani
Tiles Richfaces with Myfaces 1.2.9
Hi all, My application is built on JSF 1.2 and I am using Myfaces 1.2.9 as implementation for JSF. Further I am using Tomahawk 1.1.9 as JSF extension. I need to know which version of Tiles and RichFaces would be more compatible in this case? Any help will be appreciated.
Re: [Tobago] Problem using tc:tree and request parameters
Hi Alf, I think the request parameters are working like expected. Only in the case of reload it will depend, if you make a reload of the get or the reload of a later post request. A reload of a post will normally reposted after the browser has asked the user (may depends on browser and configuration). For solving the problem, I want to understand why you use the get request with the non-jsf parameter (see the last section from my last mail). Regards, Udo Am 17.06.10 13:01, schrieb Alf Felis: Hi Udo, sorry... I forgot the environment information: MyFaces 1.1.6 Tobago 1.0.24 and 1.0.27 The bean has session scope. managed-bean managed-bean-nametobagoTreeTestBean/managed-bean-name managed-bean-classTobagoTreeTestBean/managed-bean-class managed-bean-scopesession/managed-bean-scope /managed-bean I have attached my test bean and the jsp page to this mail. First I thought that the request always contains the state of the navigation, but I checked the request parameters (using a servlet filter) and figured out that the state information will only be sent when I click the navigation tree. Nevertheless reloading the page (browser reload) collapses the tree when using parameters and saves the state without using parameters. In both situations there are no request parameters from the navigation state. Request parameters using parameters: Parameters: param: 123 Request parameters without parameters: Parameters: Request parameters when clicking the tree: Parameters: _idJsp0::form-action: _idJsp0:nav:Number1 jsf_tree: 5 _idJsp0::action-position: 0px,0px,0px,0px _idJsp0::context-path: /Tobago jsf_viewid: /TobagoTreeTest.jsp _idJsp0::form-clientDimension: 913;700 _idJsp0:nav: ;Home;Number1; _idJsp0:nav-marker: _idJsp0:nav:Number1 tobago.dummy: _idJsp0:nav-scrollPosition: Regards, Alf -Ursprüngliche Nachricht- Von: Udo Schnurpfeilu...@schnurpfeil.de Gesendet: 17.06.2010 09:59:42 An: MyFaces Discussionusers@myfaces.apache.org Betreff: Re: [Tobago] Problem using tc:tree and request parameters Hi Alf, I've some questions: Which Tobago version and which JSF implementation and version you are using (and which container)? In which scope is the managed bean that holds the state? I don't exactly know what happens, because I've not the sources of you code. But I can try some supposition... The usual usage of Tobago is to write an application, with one or more pages that will be called by clicking on some controls on the page. It was a difference of calling the URL and clicking atc:button. The click on a button will submit the current expansion state of the tree and sends it to the server (via a hidden input field), which manipulates the tree state object. When calling the URL (manually) the expansion state information is not part of the request. When JSF now restores the UIViewRoot and begins to decode the request it clears the expand state and tries to apply the new information from the browser (which are not available in this case). It is correct, that you want to provide external links (non faces request to faces response)? Are you also use internal actions? If not, you don't need to save the expansion state for each user. You can try to put the tree state in the none scope. Regards, Udo Am 15.06.10 15:51, schrieb Alf Felis: Any idea? Original-Nachricht Datum: Thu, 03 Jun 2010 13:31:44 +0200 Von: Alf Felis[ An: MyFaces Discussion Betreff: [Tobago] Problem using tc:tree and request parameters Hi all, I have a problem with tc:tree. In my code I expand the tree after creation using the TreeState: state.expand(tree, 1); This works fine till I use a request parameter... e.g. http://localhost:8080/Tobago/faces/TobagoTreeTest.jsp?param=123 In this case the first/initial call will show an expanded tree... the second call shows a collapsed tree. - first and second call with parameter: - 1.) Call the URL - tree expanded 2.) Reload the URL - tree collapsed - first call with, second without parameter: - 1.) Call the URL - tree expanded 2.) Call http://localhost:8080/Tobago/faces/TobagoTreeTest.jsp - tree expanded 3.) any call/reload without parameter - tree expanded I figured out that the method 'TreeState.clearExpandState()' will be called, but I can't find any hints on that issue. Regards, Alf
Re: AW: AW: [Trinidad] Re-populating DataTable after sorting, results in empty table
Ok, I'll try to solve this via manual sorting. Thanks, Simon Leis, Matthias - SID-NLKM wrote: Hi Simon, Datascroller is a feature of tomahawk. I didn't see your post was about Trinidad, sorry. I have no experience with trinidad, but as far as I know it from the tomahawk datatable, sorting the table in the view doesn't sort the model in the background. A couple days ago I ran into this problem. I bind the table to a bean property, get the sort column and sort direction and sort the list manually according to this values. So the displayed table and the model are in sync. Regards, Matthias -- View this message in context: http://old.nabble.com/-Trinidad--Re-populating-DataTable-after-sorting%2C-results-in-empty-table-tp29148077p29149112.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
PreRenderView Event with post navigation
Hi, is there a possiblity to trigger PreRenderView event when I navigate via action to another page? small example: I'm on page1.xhtml an there's a button: h:commandButton action=page2/ page2.xhtml includes: f:metadata f:event type=preRenderView/ /f:metadata When I use the button then page2 is shown but the PreRenderView event is not triggerd. The metadata section is only processed in restore view phase. So the event is triggerd with method GET or with POST without switching page. Is it possible to trigger this event when I navigate via action? Thx, regards Marcus
Re: PreRenderView Event with post navigation
Why do you need to put f:event into f:metadata? If you put it outside this works like a charm. I didn't look into the details but I think f:metadata is not processed for all requests. As you want to register this listener to the view root it should be a child of f:view (or at least a top level tag if you don't use f:view). regards Michael Am 13.07.2010 14:37, schrieb Marcus Büttner: Hi, is there a possiblity to trigger PreRenderView event when I navigate via action to another page? small example: I'm on page1.xhtml an there's a button: h:commandButton action=page2/ page2.xhtml includes: f:metadata f:event type=preRenderView/ /f:metadata When I use the button then page2 is shown but the PreRenderView event is not triggerd. The metadata section is only processed in restore view phase. So the event is triggerd with method GET or with POST without switching page. Is it possible to trigger this event when I navigate via action? Thx, regards Marcus
Re: PreRenderView Event with post navigation
Hi Michael, thanks for your response. Ok, it makes sence and it works! Thanks Marcus 2010/7/13 Michael Kurz michi.k...@gmx.at Why do you need to put f:event into f:metadata? If you put it outside this works like a charm. I didn't look into the details but I think f:metadata is not processed for all requests. As you want to register this listener to the view root it should be a child of f:view (or at least a top level tag if you don't use f:view). regards Michael Am 13.07.2010 14:37, schrieb Marcus Büttner: Hi, is there a possiblity to trigger PreRenderView event when I navigate via action to another page? small example: I'm on page1.xhtml an there's a button: h:commandButton action=page2/ page2.xhtml includes: f:metadata f:event type=preRenderView/ /f:metadata When I use the button then page2 is shown but the PreRenderView event is not triggerd. The metadata section is only processed in restore view phase. So the event is triggerd with method GET or with POST without switching page. Is it possible to trigger this event when I navigate via action? Thx, regards Marcus
Re: PreRenderView Event with post navigation
Hi Marcus, According to the JSF 2.0 spec, paragraph 10.4.1.3: This tag must reside within the top level XHTML file for the given viewId, not in a template. Is this true in your case? I've seen f:metadata work in the past... Regards, Jan-Kees 2010/7/13 Michael Kurz michi.k...@gmx.at Why do you need to put f:event into f:metadata? If you put it outside this works like a charm. I didn't look into the details but I think f:metadata is not processed for all requests. As you want to register this listener to the view root it should be a child of f:view (or at least a top level tag if you don't use f:view). regards Michael Am 13.07.2010 14:37, schrieb Marcus Büttner: Hi, is there a possiblity to trigger PreRenderView event when I navigate via action to another page? small example: I'm on page1.xhtml an there's a button: h:commandButton action=page2/ page2.xhtml includes: f:metadata f:event type=preRenderView/ /f:metadata When I use the button then page2 is shown but the PreRenderView event is not triggerd. The metadata section is only processed in restore view phase. So the event is triggerd with method GET or with POST without switching page. Is it possible to trigger this event when I navigate via action? Thx, regards Marcus
Re: AW: AW: [Trinidad] Re-populating DataTable after sorting, results in empty table
Hi again, unfortunately it didn't work. I attached a sortListener from which I could get the sort criterion and sorting on its own worked like a charm. But again, when I tried to filter, all I could see was an empty table. It also doesn't seem to be just a display problem as after the filtering the table contents don't even get send to the browser. I'd try to debug myself to figure out where the data get's lost but a point where to start in the shallows of MyFaces and Trinidad would be much appreciated :) Simon Leis, Matthias - SID-NLKM wrote: Hi Simon, Datascroller is a feature of tomahawk. I didn't see your post was about Trinidad, sorry. I have no experience with trinidad, but as far as I know it from the tomahawk datatable, sorting the table in the view doesn't sort the model in the background. A couple days ago I ran into this problem. I bind the table to a bean property, get the sort column and sort direction and sort the list manually according to this values. So the displayed table and the model are in sync. Regards, Matthias -- View this message in context: http://old.nabble.com/-Trinidad--Re-populating-DataTable-after-sorting%2C-results-in-empty-table-tp29148077p29150797.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: PreRenderView Event with post navigation
Hi Jan-Kees, yes, f:metadata is in the top level xhtml. and it works as expected. It is just processed in restore view phase, which makes sence to trigger the complete jsf lifecycle if some view parameters exists. I didn't have the problem that f:metadata does not work correctly but rather that I need the preRenderView event when I render a new view after post actions. Michael's solution works for me. Thanks for your help. Marcus 2010/7/13 Jan-Kees van Andel jankeesvanan...@gmail.com Hi Marcus, According to the JSF 2.0 spec, paragraph 10.4.1.3: This tag must reside within the top level XHTML file for the given viewId, not in a template. Is this true in your case? I've seen f:metadata work in the past... Regards, Jan-Kees 2010/7/13 Michael Kurz michi.k...@gmx.at Why do you need to put f:event into f:metadata? If you put it outside this works like a charm. I didn't look into the details but I think f:metadata is not processed for all requests. As you want to register this listener to the view root it should be a child of f:view (or at least a top level tag if you don't use f:view). regards Michael Am 13.07.2010 14:37, schrieb Marcus Büttner: Hi, is there a possiblity to trigger PreRenderView event when I navigate via action to another page? small example: I'm on page1.xhtml an there's a button: h:commandButton action=page2/ page2.xhtml includes: f:metadata f:event type=preRenderView/ /f:metadata When I use the button then page2 is shown but the PreRenderView event is not triggerd. The metadata section is only processed in restore view phase. So the event is triggerd with method GET or with POST without switching page. Is it possible to trigger this event when I navigate via action? Thx, regards Marcus
Re: PortletBridge starting portlet problem
This feels more environmental than anything else. Is this still just the situation when accessing from an iPhone user-agent? The regular user-agent still works fine? Can you send me a complete description of your environment? I.e. Specific Trinidad version, Faces make (Mojarra or Myfaces?) and version, appserver version which includes portlet container make (pluto ???) and version? What has me stumped here is that the line you indicate is throwing the null pointer exception: switch ((Bridge.PortletPhase) mPortletRequest.getAttribute(Bridge.PORTLET_LIFECYCLE_PHASE)) The instance is constructed with the requestObject which is passed by the bridge's externalContext which gets it in its constructor -- so unless a release() occurred I don't see how its null. Likewise the bridge's doFacesRender (further down the stack) has already set the request attribute we are looking for here -- which means it should be around unless a spurious release occurred. We have encountered problems releasing attributes in some servers which the portal server/container is treating specially because of their prefix like javax.* -- but I haven't seen any issues in setting/retrieving. So first thing we need to do is figure out what is causing the NPE. Is the request in fact null here? Or the attribute not there? (My bet is on the later). And if the later, why it isn't there as its clearly been set. Are you able to do some debugging to answer some of these questions? If not let me know as i can build you one-of bridge jars that will write extra info to the logs to get us the info -- it will just take a much longer time as we get each new piece of information we will have to dig deeper/send a new jar (and I only work Tues-Thurs). Another idea is to try a different environment. Maybe try running this is in the Tomcat/Pluto environment and see if the behavior is the same or not. That will at least rule out the app server (and portlet container -- though if I recall its Pluto anyway). FYI ... The bridge does work with Trinidad as its used heavily here at Oracle and I also do random testing on my own however everyone's situation is different so it likely not bug free ... just want you to know you aren't the first. -Mike- On 7/12/2010 1:51 AM, Yves Deschamps wrote: Thank you Michael, I change little things and now, i have this NPE: Caused by: java.lang.NullPointerException at org.apache.myfaces.portlet.faces.util.map.PortletRequestHeaders.initHeaderMap(PortletRequestHeaders.java:109) at org.apache.myfaces.portlet.faces.util.map.PortletRequestHeaders.getHeader(PortletRequestHeaders.java:48) at org.apache.myfaces.portlet.faces.util.map.PortletRequestHeaderMap.getAttribute(PortletRequestHeaderMap.java:38) at org.apache.myfaces.portlet.faces.util.map.PortletRequestHeaderMap.getAttribute(PortletRequestHeaderMap.java:26) at org.apache.myfaces.portlet.faces.util.map.PortletAbstractMap.get(PortletAbstractMap.java:88) at org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit.isAjaxRequest(CoreRenderKit.java:148) at org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit.isPartialRequest(CoreRenderKit.java:163) at org.apache.myfaces.trinidadinternal.config.xmlHttp.XmlHttpConfigurator.getExternalContext(XmlHttpConfigurator.java:61) at org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl.getExternalContext(GlobalConfiguratorImpl.java:353) at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit.init(FacesContextFactoryImpl.java:86) at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:64) at org.apache.myfaces.portlet.faces.bridge.BridgeImpl.getFacesContext(BridgeImpl.java:943) at org.apache.myfaces.portlet.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:513) So: 1) the portletBridge needs a FacesContext from trinidad... 2) trinidad needs an element from external context: static public boolean isAjaxRequest(ExternalContext ec) { return true.equals(ec.getRequestHeaderMap().get(_PPR_REQUEST_HEADER)); } 3) the portletBridge fails to return this boolean: // can't assume portlet container overrides these headers to reflect portlet constraints -- so do so ensurePortletAcceptHeader(); ensurePortletAcceptLanguage(); switch ((Bridge.PortletPhase) mPortletRequest.getAttribute(Bridge.PORTLET_LIFECYCLE_PHASE)) --- May be, have I missed something in config files ? I think there is something wrong between trinidad and portletBridge... Michael Freedman a écrit : Looks like its failing in this line in Trinidad: org.apache.myfaces.trinidadinternal.renderkit.RenderKitDecorator.getRenderKit(RenderKitDecorator.java:119) ConcurrentMapString, Object appMap =