Re: Architecture question
A related architechture question I sometimes wonder about is:Should the model POJO:s be kept as clean DTO:s or should they have member functions for operations also, andif there are operations, how complex should they be allowed to be before I should break them into e.g. static calls ina business logic class? If they are not separated, the model and the businessl logic melts into a mess.
Re: [other]Borland want to sell its IDE products.....
Sean Schofield schrieb: I personally love JBuilder but it is very pricey. I think you brought up the main point, now that the enterprise stuff finally again is moving into sane domains pricewise (Thanks to Sun and MyEclipse) Borland simply cannot afford to charge this money for their stuff anymore. Borland started as a tools vendor with moderate prices at a time where tools simply cost a fortune. So lots of people who wanted to learn programming started to use their tools, lots of professionals as well who could not afford the heavy priced alternatives. Once Kahn was kicked out they lost this strategy and pushed a high price strategy with Enterprise plastered all over it (probably a stupid idea of some MBAs taking over internally) By JBuilder X they really worked out most of the kinks. I tried Eclipse but everything was too much of a PITA to get working. Every time I try switching to another IDE I just keep going back to good 'ole JBuilder. Well it never was the quality, yes JBuilder had some kinks but overall the quality always was okay, the problem with Borland always was with the management, not really knowing where there core assets and core market was. (The whole Inprise fiasco was self made, for the same reasons why people were moving away from JBuilder in masses the last years) The funny thing is that others like MyEclipse currently have huge success with the same strategy Borland had 20 years ago. But those companies are not driven by MBAs but by people who saw a need for something like a cheap tool alternative to the expensive enterprise IDEs because many developers simply cannot afford that stuff. And just to sum it up, I have seen about 10 companies in the recent past using MyEclipse and none using JBuilder anymore. The reason for most was that the price was right and the tool was good enough.
integration problem with s:inputSuggestAjax and portlet
Hi dear all, I am using portlet and want to insert a tag s:inputSuggestAjax into one of my .jsp page. However, it doesnt work due to a _javascript_ error element.getClassName has no properties in firefox. I have read the generated html file, even jumped deeply into the source codes of myfaces and found following problem: Within the generated html page, myfaces generates following _javascript_ codes for inputSuggestAjax: SCRIPT type=text/_javascript_!-- new Ajax.MyFacesAutocompleter('Pluto_ProcessOverviewPortlet_r1_c1_p1__id0:Pluto_ProcessOverviewPortlet_r1_c1_p1__id2','Pluto_ProcessOverviewPortlet_r1_c1_p1__id0:Pluto_ProcessOverviewPortlet_r1_c1_p1__id2_auto_complete','/pluto/portal/ProcessOverviewPortlet/_ac_ProcessOverviewPortlet_r1_c1_p1/AC/_pid/ProcessOverviewPortlet_r1_c1_p1?org.apache.myfaces.portlet.MyFacesGenericPortlet.VIEW_ID=%2Fview.jsp?affectedAjaxComponent=Pluto_ProcessOverviewPortlet_r1_c1_p1__id0:Pluto_ProcessOverviewPortlet_r1_c1_p1__id2', { method: 'post', asynchronous: true, parameters: '', callback: function(element,entry) {return entry+'jsf_tree_64='+encodeURIComponent(document.getElementById('jsf_tree_64').value)+'jsf_state_64='+encodeURIComponent(document.getElementById('jsf_state_64').value)+'jsf_viewid='+encodeURIComponent(document.getElementById('jsf_viewid').value)} }) //--/SCRIPT Note that the third parameter of the js function, which should be an encodeURL, contains TWO ?, the first is generated by the portlet, the second by the myfaces! Therefore it is no more a valid encodeURL to parse by myfaces! So it seems that inputSuggestAjax does not support any call by a page whose URL already contains parameters. Any tips or suggestions how to resolve this problem? Mit freundlichen Grüßen / Kindest regards Haihua Luo Entwicklung BIS / Development BIS --- SEEBURGER AG, Edisonstrasse 1, D-75015 Bretten, Germany Fon:+49(0)7252 96-1614 mail.to:[EMAIL PROTECTED] http://www.seeburger.de/ We integrate B2B Solutions
RE: NavigationHandler fails to find navigation rule
Hi Tony, I am not an expert, but have you tried moving the default rule to the end of the list? Otherwise you could specify some from-view-id's in your navigation-case's? HTH, Fintan -Original Message- From: Tonio Caputo [mailto:[EMAIL PROTECTED] Sent: 08 February 2006 21:28 To: MyFaces-Users-List Subject: NavigationHandler fails to find navigation rule Hi, I implemented a custom NavigationHandler, that just do some stuff and them call the default Implementation. The application is running correctly with Sun Faces implementation. What is happening is that NavigationHandler is not matching any rule and always going to the default rule. I've checked the outcome parameter, it is correct. I've checked that my Navigation Handler is called, yes. I send you a portion if my navigation configuration to see if it helps: navigation-rule navigation-case !-- This is the default destination -- to-view-id/PageSessionExpired.jsp/to-view-id /navigation-case navigation-case from-outcomeindex/from-outcome to-view-id/index.jsp/to-view-id /navigation-case navigation-case from-outcomestateSignout/from-outcome to-view-id/PageSignout.jsp/to-view-id /navigation-case navigation-case from-outcomestateInqCriteria/from-outcome to-view-id/PageQuoteSearchCrit.jsp/to-view-id /navigation-case navigation-case from-outcomestateInqList/from-outcome to-view-id/PageInquirySearchLst.jsp/to-view-id /navigation-case navigation-case from-outcomestatePnowEntry/from-outcome to-view-id/PagePriceNow.jsp/to-view-id /navigation-case Any Ideas will be great Thanks tonio * ** *** ** * ** *** ** * ** *** ** * This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any views or opinions presented are solely those of the author, and do not necessarily represent those of ESB. If you have received this email in error please notify the sender. Although ESB scans e-mail and attachments for viruses, it does not guarantee that either are virus-free and accepts no liability for any damage sustained as a result of viruses. * ** *** ** * ** *** ** * ** *** ** *
Re: AW: Problem with evaluation of Tomahawk HtmlSelectOneRadio components inside UIData (programmatically created UI)
Hi Matthias, just an idea, may work or not, but worth a try imho: put the HtmlSelectOneRadio component(s) somewhere out of the uidata (e.g. as child of viewRoot) and set a id, also set a id to all parent namingcontainers. in the for attribute of the HtmlRadio components use a absolute id (e.g. :[id_of_viewRoot]:[id_of_HtmlSelectOneRadio], if HtmlSelectOneRadio is on top level). Not sure if this will work, but after a short look into HtmlRadioRenderer.java and implementation of findComponent() i think this could work. Regards, Volker Matthias Kahlau wrote: For UIData, not a thousand components represent thousand rows, but only one. But I didn't use only one HtmlSelectOneRadio component for all rows. Instead, I use many HtmlSelectOneRadio components, one component for one row. Using one HtmlSelectOneRadio component for all rows had only been a potential solution. Your explanation kills this idea for the moment, but I think it doesn't explain why my current solution doesn't work... Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Martin Marinschek Gesendet: Mittwoch, 8. Februar 2006 23:24 An: Matthias Kahlau Cc: MyFaces Discussion Betreff: Re: Problem with evaluation of Tomahawk HtmlSelectOneRadio components inside UIData (programmatically created UI) Yes, it has somehting to do with UIData. For UIData, not a thousand components represent thousand rows, but only one. Much like in Swing... So it's a little different there... regards, Martin On 2/8/06, Matthias Kahlau [EMAIL PROTECTED] wrote: Thanks Martin, but do you know, why I might get components that aren't properly initialized? I wonder about that, because processing the user input after locating the components by using findComponent works for all the other question types I use (without UIData), e. g. by using - only one HtmlSelectOneRadio component and some HtmlRadio components, - only one HtmlSelectManyCheckbox component and some HtmlCheckbox components, - only one HtmlInputText or HtmlInputTextarea Has this sth. to do with UIData? Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Martin Marinschek Gesendet: Mittwoch, 8. Februar 2006 23:05 An: MyFaces Discussion Betreff: Re: Problem with evaluation of Tomahawk HtmlSelectOneRadio components inside UIData (programmatically created UI) Ok, I do think I know now what your problem is: the findComponent will deliver a component which is not properly initialized (it will return the stamp, but not the actual initialized component for this row...) So what you're really looking for is the functionality I implemented a few weeks ago for findComponent, to return a properly initialized component for this row. But: I can't help you out with fixing this in the radio-renderer right now, sorry. And you're in stress, too, to get your thesis finished, right? So I really don't know how to fix this. no clue. Anyone else able to help? regards, Martin On 2/8/06, Matthias Kahlau [EMAIL PROTECTED] wrote: Hi Martin! If you can't imagine the cause of the problem, maybe you can give me a hint to a workable solution using HtmlDataTable ... Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Matthias Kahlau Gesendet: Mittwoch, 8. Februar 2006 20:45 An: MyFaces Discussion; [EMAIL PROTECTED] Betreff: AW: Problem with evaluation of Tomahawk HtmlSelectOneRadio components inside UIData (programmatically created UI) I didn't use JSP, the UI is programmatically created. This is a part of the method which adds HtmlSelectOneRadio components to the HtmlDataTable: HtmlDataTable table = new HtmlDataTable(); this.form.getChildren().add(table); table.setId(this.viewRoot.createUniqueId()); table.setVar(row); table.setBorder(1); table.setCellspacing(0); table.setCellpadding(5); // the snippet which creates the HtmlSimpleUIColumn components for the table: for (int i = 0; i columns; i++) { column[i] = new HtmlSimpleColumn(); table.getChildren().add(column[i]); if (i == 0) { HtmlOutputText hot = new HtmlOutputText(); hot.setId(this.viewRoot.createUniqueId()); ValueBinding vb = app.createValueBinding(#{row.matrixfragetext}); hot.setValueBinding(value, vb); hot.setEscape(false); column[i].setWidth(150); column[i].getChildren().add(hot); } else { String text = ((Auswahlmoeglichkeit)sortedAm.get(i - 1)).getText(); HtmlOutputText header = this.createHtmlOutputText(text, null); column[i].setHeader(header); HtmlRadio radio = new HtmlRadio(); radio.setId(this.viewRoot.createUniqueId()); ValueBinding vb = app.createValueBinding(#{row.htmlSelectOneRadioId}); radio.setValueBinding(for, vb); radio.setIndex(i - 1);
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: integration problem with s:inputSuggestAjax and portlet
Hi, i think this can be solved by adding the parameters as post parameter to the options, instead of empty. I will give it a try this afternoon (german time). Regards, Volker Luo. Haihua wrote: Hi dear all, I am using portlet and want to insert a tag s:inputSuggestAjax into one of my .jsp page. However, it doesn’t work due to a javascript error “element.getClassName has no properties” in firefox. I have read the generated html file, even jumped deeply into the source codes of myfaces and found following problem: Within the generated html page, myfaces generates following javascript codes for inputSuggestAjax: SCRIPT type=text/javascript!-- new Ajax.MyFacesAutocompleter('Pluto_ProcessOverviewPortlet_r1_c1_p1__id0:Pluto_ProcessOverviewPortlet_r1_c1_p1__id2','Pluto_ProcessOverviewPortlet_r1_c1_p1__id0:Pluto_ProcessOverviewPortlet_r1_c1_p1__id2_auto_complete','*/pluto/portal/ProcessOverviewPortlet/_ac_ProcessOverviewPortlet_r1_c1_p1/AC/_pid/ProcessOverviewPortlet_r1_c1_p1**?**org.apache.myfaces.portlet.MyFacesGenericPortlet.VIEW_ID=%2Fview.jsp**?**affectedAjaxComponent=Pluto_ProcessOverviewPortlet_r1_c1_p1__id0:Pluto_ProcessOverviewPortlet_r1_c1_p1__id2*', { method: 'post', asynchronous: true, parameters: '', callback: function(element,entry) {return entry+'jsf_tree_64='+encodeURIComponent(document.getElementById('jsf_tree_64').value)+'jsf_state_64='+encodeURIComponent(document.getElementById('jsf_state_64').value)+'jsf_viewid='+encodeURIComponent(document.getElementById('jsf_viewid').value)} }) //--/SCRIPT Note that the third parameter of the js function, which should be an encodeURL, contains TWO “?”, the first is generated by the portlet, the second by the myfaces! Therefore it is no more a valid encodeURL to parse by myfaces! So it seems that inputSuggestAjax does not support any call by a page whose URL already contains parameters. Any tips or suggestions how to resolve this problem? Mit freundlichen Grüßen / Kindest regards Haihua Luo Entwicklung BIS / Development BIS --- SEEBURGER AG, Edisonstrasse 1, D-75015 Bretten, Germany Fon:+49(0)7252 96-1614 mail.to: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://www.seeburger.de/ blocked::http://www.seeburger.de/ We integrate B2B Solutions -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain.
Re: Problems using jenia4faces
Yes you are absolutely right. It only creates a form when it doesnt find a parent form. Cheers... :) On 2/8/06, Mike Kienenberger [EMAIL PROTECTED] wrote: Have you tried explictly creating an enclosing form?Maybe it only creates a form if it doesn't find a parent form. h:formblah blah blah/h:formOn 2/8/06, Hasnain Badami [EMAIL PROTECTED] wrote: Hi I have tried creating the pages. When you create a panelTabbedPane it generates a form tag. I used the following code !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib prefix=c uri = http://java.sun.com/jstl/core % %@ taglib prefix=f uri =http://java.sun.com/jsf/core % %@ taglib prefix=h uri =http://java.sun.com/jsf/html % %@ taglib uri= http://myfaces.apache.org/tomahawk prefix=t% f:view f:loadBundle basename=com.prytania.resource.Messages var=messages/ html head titleh:outputText value=#{messages['title']}// title t:stylesheet path=/report.css / /head body t:panelTabbedPane selectedIndex=#{TabSupport.selectedTabIndex} styleClass=tabbedPane width=100% bgcolor=#CC activeTabStyleClass=activeTab inactiveTabStyleClass=inactiveTab activeSubStyleClass=activeSub inactiveSubStyleClass=inactiveSub tabContentStyleClass=tabContent t:panelTab label= #{messages['portfolio_summary']} f:verbatim hi how are you /f:verbatim /t:panelTab t:panelTab label= #{messages['portfolio_detail']} f:verbatim hi how are you /f:verbatim /t:panelTab t:panelTab label= #{messages['portfolio_statistics']} f:verbatim hi how are you /f:verbatim /t:panelTab /t:panelTabbedPane /body html /f:view On 2/8/06, Mike Kienenberger [EMAIL PROTECTED] wrote: I remember seeing this problem posted on the jenia4 mailing lists. I'm still confused about it. As far as I know, myfaces:panelTabbedPane does not generate a form. Admittedly, I'm a bit behind on running the latest myfaces snapshot, but as of the Dec 11th snapshot (maybe even the Jan 2nd snapshot -- my version control contains conflicting information), this was true. I recommend being sure about what's generating the forms. Try creating a page with just a panelTabbedPane, a page with just a popupFrame, and a page with both and compare them. On 2/8/06, Hasnain Badami [EMAIL PROTECTED] wrote: Hi I am using jenia4faces popupFrame ( which requires a parent h:form) inside a myfaces:panelTabbedPane. But due to some reason I am not able to open the popup. Looking at the html source of the generated page i can see that panelTabbedPane generates a form and inside that form resides the form which jenia4faces requires. So form inside a form. Also in the source the following _javascript_ is generatedfunction clear_tabportfoliosummary_3A_5Fid22() { var f = document.forms ['tabportfoliosummary:_id22']; f.elements['__jeniaPopupFrame'].value=''; f.elements['tabportfoliosummary:_id22:_link_hidden_'].value=''; f.target=''; } Now because the tabportfoliosummary:_id22 form (the jenia4faces popupFrame parent) is inside the tabbed pane form the _javascript_ code generates error at var f = document.forms['tabportfoliosummary:_id22']; Has anybody encountered anything like this before? Is there any solution to it? Best Regards Hassnain
Re: JSCookMenu and SUN's RI
I am quite sure that the extension filter stuff is not the reason for the problem concerning the jsCookMenu and Suns RI. All _javascript_ and CSS stuff is loaded properly. So, can you please open an issue concerning this? Thanks Bye, Daniel 2006/2/8, Mike Kienenberger [EMAIL PROTECTED]: Actually, the new extensions filter web page probably explains itbetter than the examples.Try the instructions listed at http://myfaces.apache.org/tomahawk/extensionsFilter.htmlIf they aren't clear or don't work for you, let me know how we can improve them. -MikeOn 2/8/06, Martin Marinschek [EMAIL PROTECTED] wrote: Hi Daniel, yes you do: you'll need to add the /faces/* mapping as well - see the examples. regards, Martin On 2/8/06, Daniel Loebbe [EMAIL PROTECTED] wrote: Hi Martin, these are my filter settings: filter filter-nameMyFacesExtensionsFilter /filter-name filter-class org.apache.myfaces.component.html.util.ExtensionsFilter /filter-class init-param param-nameuploadMaxFileSize /param-name param-value100m /param-value /init-param init-param param-nameuploadThresholdSize /param-name param-value100k /param-value /init-param /filter filter-mapping filter-nameMyFacesExtensionsFilter /filter-name url-pattern*.faces /url-pattern /filter-mapping filter-mapping filter-nameMyFacesExtensionsFilter /filter-name url-pattern*.js /url-pattern /filter-mapping filter-mapping filter-nameMyFacesExtensionsFilter /filter-name url-pattern*.css /url-pattern /filter-mappingMaybe I miss somthing? Bye, Daniel 2006/2/8, Martin Marinschek [EMAIL PROTECTED]: Bruno should have fixed that by moving all special stuff out to the extensions-filter. You're including the extensions-filter, right? regards, Martin On 2/8/06, Daniel Loebbe [EMAIL PROTECTED] wrote:Any news concerning this issue? The last nightly builds did not contain acorrection. Bye, Daniel 2006/2/1, Daniel Loebbe [EMAIL PROTECTED]: Great to hear this. Thanks a lot! Looking forward, Daniel 2006/2/1, Martin Marinschek [EMAIL PROTECTED] : Yeah, there is YAB (yet another bug) open on this. Bruno will fix this together with me, sometime today or tomorrow. regards, Martin On 2/1/06, Daniel Loebbe [EMAIL PROTECTED] wrote: And I got the following output con the console: WARN util.AddResource - MyFaces special _javascript_ could not beretrieved from request-map. ERROR util.MyFacesResourceLoader - Unparsable lastModified :@lastModified@ Did the filter settings change in the meantime? Bye, Daniel 2006/1/30, Martin Marinschek [EMAIL PROTECTED] :Done! regards, Martin On 1/30/06, Daniel Loebbe [EMAIL PROTECTED] wrote: Hi, I tried that, but the error message is the same. Here is the html-code I get now: form id=jsCookMenuForm method=post action=""> enctype=application/x-www-form-urlencoded script type=text/_javascript_var jsCookMenuForm_jsCookMenu_menu = [[null, 'Information', 'jsCookMenuForm_jsCookMenu_menu:', 'linkDummyForm', null,[null, 'Aktuelle Informationen', 'jsCookMenuForm_jsCookMenu_menu:information', 'linkDummyForm', null], [null, 'Benachrichtigungen', 'jsCookMenuForm_jsCookMenu_menu:bulletinBoard', 'linkDummyForm', null], [null, 'Kontakt', 'jsCookMenuForm_jsCookMenu_menu:contact', 'linkDummyForm', null], ... ];/script div id=jsCookMenuForm_jsCookMenu_menu/div script type=text/_javascript_ cmDraw ('jsCookMenuForm_jsCookMenu_menu', jsCookMenuForm_jsCookMenu_menu, 'hbr', cmThemeOffice, 'ThemeOffice');/script input type=hidden name= com.sun.faces.VIEW value=X / input type=hidden name=jsCookMenuForm value=jsCookMenuForm //form The form 'linkDummyForm' is still there but not rendered into thepage. Bye, Daniel 2006/1/26, Martin Marinschek [EMAIL PROTECTED]: Can you try to wrap the whole jscookmenu in a form? the dummyform should only be rendered if necessary... regards, Martin On 1/26/06, Daniel Loebbe [EMAIL PROTECTED] wrote: Hi, seems that I found the reason. The form linkDummyForm andthe js function clear_linkDummyForm are missing / not rendered. Has anyone a solution for this (both seems to be rendered bythe MyFaces JSF implementation but not by Sun's RI)? Thanks, Daniel
Re: Architecture question
You put all the view related logic there, ie sorting data, calling some services to update the data, ... If you use a layered architecture (well you should usually), the clue here is to think is this logic local to this page (or more if it is a session bean) ? Is this logic still make sense if I totally change the way the information is rendered? When you answer yes it's mean this logic is strongly related to the view and should be keep inside backing beans, if it is no, well it is a good clue this code should be moved inside the application business logic layer. If you have Struts experience, thinks of backing beans as a mix of DispatchAction and ActionForm. Basically what they do is call services and expose the data in a way that make sense to the next page. BTW, if you use a tool for your persistance like Hibernate that support lazy loading and you are not going to deploy your business logic layer remotly, you don't DTO. IMO you can expose your business objects in the backing beans instead of constructing dumb DTOs. On 2/9/06, Nicklas Karlsson [EMAIL PROTECTED] wrote: A related architechture question I sometimes wonder about is: Should the model POJO:s be kept as clean DTO:s or should they have member functions for operations also, and if there are operations, how complex should they be allowed to be before I should break them into e.g. static calls in a business logic class? If they are not separated, the model and the businessl logic melts into a mess. -- Alexandre Poitras Québec, Canada
AW: integration problem with s:inputSuggestAjax and portlet
Hi Volker, thanks for ur always warm-hearted reply!:) Do you mean sth. like this in InputSuggestAjaxRenderer.java? out.writeText(', {\n + method: 'post',\n + ... parameters: 'affectedAjaxComponent= + clientId + ',\n + ... It seems that it still not work... Cheers, Haihua -Ursprüngliche Nachricht- Von: Volker Weber [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 9. Februar 2006 11:50 An: MyFaces Discussion Betreff: Re: integration problem with s:inputSuggestAjax and portlet Hi, i think this can be solved by adding the parameters as post parameter to the options, instead of empty. I will give it a try this afternoon (german time). Regards, Volker Luo. Haihua wrote: Hi dear all, I am using portlet and want to insert a tag s:inputSuggestAjax into one of my .jsp page. However, it doesn't work due to a javascript error element.getClassName has no properties in firefox. I have read the generated html file, even jumped deeply into the source codes of myfaces and found following problem: Within the generated html page, myfaces generates following javascript codes for inputSuggestAjax: SCRIPT type=text/javascript!-- new Ajax.MyFacesAutocompleter('Pluto_ProcessOverviewPortlet_r1_c1_p1__id0:Pluto_ProcessOverviewPortlet_r1_c1_p1__id2','Pluto_ProcessOverviewPortlet_r1_c1_p1__id0:Pluto_ProcessOverviewPortlet_r1_c1_p1__id2_auto_complete','*/pluto/portal/ProcessOverviewPortlet/_ac_ProcessOverviewPortlet_r1_c1_p1/AC/_pid/ProcessOverviewPortlet_r1_c1_p1**?**org.apache.myfaces.portlet.MyFacesGenericPortlet.VIEW_ID=%2Fview.jsp**?**affectedAjaxComponent=Pluto_ProcessOverviewPortlet_r1_c1_p1__id0:Pluto_ProcessOverviewPortlet_r1_c1_p1__id2*', { method: 'post', asynchronous: true, parameters: '', callback: function(element,entry) {return entry+'jsf_tree_64='+encodeURIComponent(document.getElementById('jsf_tree_64').value)+'jsf_state_64='+encodeURIComponent(document.getElementById('jsf_state_64').value)+'jsf_viewid='+encodeURIComponent(document.getElementById('jsf_viewid').value)} }) //--/SCRIPT Note that the third parameter of the js function, which should be an encodeURL, contains TWO ?, the first is generated by the portlet, the second by the myfaces! Therefore it is no more a valid encodeURL to parse by myfaces! So it seems that inputSuggestAjax does not support any call by a page whose URL already contains parameters. Any tips or suggestions how to resolve this problem? Mit freundlichen Grüßen / Kindest regards Haihua Luo -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain.
validator Tag Problem in MyFaces 1.1.1 ?
Hi all, I am experiencing some problems with the usage of the validator attribute inside a h:inputText element and would like to know if ther are known issues. The way I am solving it right now is to use application level validation, e.g. I call a validate method from one of my commandButton action MethodBindings. problem 1: when I tried to access a bean-local property that should have been set in the apply request values phase, this was still null problem 2: I created a ValidatorException and threw it, but the FacesMessage included was not correctly rendered. Strangely, the css information (color:red) was not used... the message was black). Thanx! Sven -- Sven Haiges Technology Manager Vodafone Group Research Development .DE Tel:+49 89 95410-586 Fax:+49 89 95410-111 Mobile: +49 172 849-6359 mailto:[EMAIL PROTECTED] http://www.vodafone-rnd.com Vodafone Pilotentwicklung GmbH Registered Office: Chiemgaustrasse 116, 81549 München, Germany Registered in Germany Amtsgericht München HRB 98516
RE: dataTable item is not changed
Many thanks for your help. I applied all of your suggestions but i have still same problem: the entered value in t:inputText is lost. But i got some new ideas! I replaced the commandlinks with commandbuttons and it works but my nice buttons are gone! I don't know what's difference between the commandbutton and the commandlink, but in this case their behaviour is complete different. Does anybody know why? t:column f:facet name=header t:outputText value=Action/ /f:facet t:commandButton value=delete id=button_delete actionListener=#{userListBean.deleteUserFromDB}/ f:verbatimbr //f:verbatim t:commandButton value=edit id=button_edit action=#{user.edit} rendered=#{not user.editable}/ t:commandButton value=save id=button_save action=#{user.save} rendered=#{user.saveable}/ /t:column There's another problem with my table. As you can see my table is sortable. Assuming i have 6 rowes: When i press the edit button on row 1, row 6 gets editable. When i press 2, row 5 gets editable, and for 3 row i get 4, etc. When i make the table not sortable then all works as expected. Kind regards Dominique -Original Message- From: Mike Kienenberger [mailto:[EMAIL PROTECTED] Sent: Mittwoch, 8. Februar 2006 23:03 To: MyFaces Discussion Subject: Re: dataTable item is not changed My recommendation would be to use action instead of action + actionListener. I'm not sure -- is it even legal to be calling both? Why would you want to? I'd also recommend that you create both an editable and save button rather than reusing the same button for both. h:commandLink action=setEditable id=edit rendered=#{not user.editable} h:graphicImage value=/graphics/edit.png alt=edit style=border:0/ /h:commandLink h:commandLink action=save id=save rendered=#{user.saveable} h:graphicImage value=/graphics/save.png alt=edit style=border:0/ /h:commandLink Note that, in any case, the value of #{not user.editable} and #{user.saveable} should remain constant between requests (maybe that's why you chose to use a single button, but that seems like a hack to me). Ie, the value can't change between the time the button is rendered and the next response when the button action is executed on click. On 1/27/06, Boeckli, Dominique [EMAIL PROTECTED] wrote: Hi all, I have a datatable with a edit column which contains a delete and a edit button. The delete button works fine (when pressed the row is deleted). When the edit button is pressed all items in this row gets editable. Works perfect as well. The edit button is replaced by a save button. Now i can edit something in the row. When i finished editing the save button can be pressed to save the new values, but they get lost and the old value are displayed again (the actionlistener method was called, but in tracing i saw the the actionlistener gets the old value as well instead of the old value. So in fact the old value is Saved). Following the code: t:dataTable id=users value=#{userListBean.users} var=user border=0 cellspacing=1 cellpadding= 10 sortColumn=#{userListBean.sort} sortAscending=#{userListBean.ascending} preserveDataModel=true preserveSort=true renderedIfEmpty=false styleClass=users headerClass=usersHeader rowClasses=evenRow,oddRow t:column f:facet name=header h:outputText value=Select/ /f:facet t:selectBooleanCheckbox id=select value=#{user.selected} valueChangeListener=#{userListBean.setSelected}/ /t:column t:column f:facet name=header t:commandSortHeader columnName=userid arrow=true styleClass=usersHeader t:outputText value=userid/ /t:commandSortHeader /f:facet t:outputText value=#{user.userid}/ /t:column t:column f:facet name=header t:commandSortHeader columnName=firstname arrow=true styleClass=usersHeader h:outputText value=Firstname/ /t:commandSortHeader /f:facet t:outputText value=#{user.firstname} rendered=#{not user.editable}/ t:inputText value=#{user.firstname} rendered=#{user.editable}/ /t:column t:column f:facet name=header t:commandSortHeader columnName=lastname arrow=true styleClass=usersHeader t:outputText value=Lastname/ /t:commandSortHeader /f:facet t:outputText value=#{user.lastname} rendered=#{not user.editable}/ t:inputText value=#{user.lastname} rendered=#{user.editable} required=true / /t:column t:column f:facet name=header t:commandSortHeader columnName=password arrow=true styleClass=usersHeader t:outputText value=Password/ /t:commandSortHeader /f:facet t:outputText value=#{user.password} rendered=#{not user.editable}/ t:inputText value=#{user.password} rendered=#{user.editable}/ /t:column t:column f:facet name=header t:commandSortHeader columnName=contact
Re: validator Tag Problem in MyFaces 1.1.1 ?
Hi Sven, can you provide some code to the list? Btw. the Apply Request Value Phase is populating the UIComponents w/ submitted values. Your backing bean properties are populated during model update phase. Regards, Matthias On 2/9/06, Haiges, Sven, Vodafone Group RD [EMAIL PROTECTED] wrote: Hi all, I am experiencing some problems with the usage of the validator attribute inside a h:inputText element and would like to know if ther are known issues. The way I am solving it right now is to use application level validation, e.g. I call a validate method from one of my commandButton action MethodBindings. problem 1: when I tried to access a bean-local property that should have been set in the apply request values phase, this was still null problem 2: I created a ValidatorException and threw it, but the FacesMessage included was not correctly rendered. Strangely, the css information (color:red) was not used... the message was black). Thanx! Sven -- Sven Haiges Technology Manager Vodafone Group Research Development .DE Tel:+49 89 95410-586 Fax:+49 89 95410-111 Mobile: +49 172 849-6359 mailto:[EMAIL PROTECTED] http://www.vodafone-rnd.com Vodafone Pilotentwicklung GmbH Registered Office: Chiemgaustrasse 116, 81549 München, Germany Registered in Germany Amtsgericht München HRB 98516 -- Matthias Wessendorf Zülpicher Wall 12, 239 50674 Köln http://www.wessendorf.net mwessendorf-at-gmail-dot-com
RE: dataTable item is not changed
I think i know more or less how the sortable-problem with my table can be explained: 1. edit button of a row is pressed 2. sort method is called (order is now descending) 3. the row is made editable (the wrong one, because the table is descending) 4. sort method is called again (order is now ascending). -Original Message- From: Boeckli, Dominique [mailto:[EMAIL PROTECTED] Sent: Donnerstag, 9. Februar 2006 15:32 To: MyFaces Discussion Subject: RE: dataTable item is not changed Many thanks for your help. I applied all of your suggestions but i have still same problem: the entered value in t:inputText is lost. But i got some new ideas! I replaced the commandlinks with commandbuttons and it works but my nice buttons are gone! I don't know what's difference between the commandbutton and the commandlink, but in this case their behaviour is complete different. Does anybody know why? t:column f:facet name=header t:outputText value=Action/ /f:facet t:commandButton value=delete id=button_delete actionListener=#{userListBean.deleteUserFromDB}/ f:verbatimbr //f:verbatim t:commandButton value=edit id=button_edit action=#{user.edit} rendered=#{not user.editable}/ t:commandButton value=save id=button_save action=#{user.save} rendered=#{user.saveable}/ /t:column There's another problem with my table. As you can see my table is sortable. Assuming i have 6 rowes: When i press the edit button on row 1, row 6 gets editable. When i press 2, row 5 gets editable, and for 3 row i get 4, etc. When i make the table not sortable then all works as expected. Kind regards Dominique -Original Message- From: Mike Kienenberger [mailto:[EMAIL PROTECTED] Sent: Mittwoch, 8. Februar 2006 23:03 To: MyFaces Discussion Subject: Re: dataTable item is not changed My recommendation would be to use action instead of action + actionListener. I'm not sure -- is it even legal to be calling both? Why would you want to? I'd also recommend that you create both an editable and save button rather than reusing the same button for both. h:commandLink action=setEditable id=edit rendered=#{not user.editable} h:graphicImage value=/graphics/edit.png alt=edit style=border:0/ /h:commandLink h:commandLink action=save id=save rendered=#{user.saveable} h:graphicImage value=/graphics/save.png alt=edit style=border:0/ /h:commandLink Note that, in any case, the value of #{not user.editable} and #{user.saveable} should remain constant between requests (maybe that's why you chose to use a single button, but that seems like a hack to me). Ie, the value can't change between the time the button is rendered and the next response when the button action is executed on click. On 1/27/06, Boeckli, Dominique [EMAIL PROTECTED] wrote: Hi all, I have a datatable with a edit column which contains a delete and a edit button. The delete button works fine (when pressed the row is deleted). When the edit button is pressed all items in this row gets editable. Works perfect as well. The edit button is replaced by a save button. Now i can edit something in the row. When i finished editing the save button can be pressed to save the new values, but they get lost and the old value are displayed again (the actionlistener method was called, but in tracing i saw the the actionlistener gets the old value as well instead of the old value. So in fact the old value is Saved). Following the code: t:dataTable id=users value=#{userListBean.users} var=user border=0 cellspacing=1 cellpadding= 10 sortColumn=#{userListBean.sort} sortAscending=#{userListBean.ascending} preserveDataModel=true preserveSort=true renderedIfEmpty=false styleClass=users headerClass=usersHeader rowClasses=evenRow,oddRow t:column f:facet name=header h:outputText value=Select/ /f:facet t:selectBooleanCheckbox id=select value=#{user.selected} valueChangeListener=#{userListBean.setSelected}/ /t:column t:column f:facet name=header t:commandSortHeader columnName=userid arrow=true styleClass=usersHeader t:outputText value=userid/ /t:commandSortHeader /f:facet t:outputText value=#{user.userid}/ /t:column t:column f:facet name=header t:commandSortHeader columnName=firstname arrow=true styleClass=usersHeader h:outputText value=Firstname/ /t:commandSortHeader /f:facet t:outputText value=#{user.firstname} rendered=#{not user.editable}/ t:inputText value=#{user.firstname} rendered=#{user.editable}/ /t:column t:column f:facet name=header t:commandSortHeader columnName=lastname arrow=true styleClass=usersHeader t:outputText value=Lastname/ /t:commandSortHeader /f:facet t:outputText value=#{user.lastname} rendered=#{not user.editable}/ t:inputText
JSF Design Question
Hi- I have run into a few problems moving from the struts way of thinking to JSF. I'm hoping that the many smart people on this list have made that jump. I'm stuck trying to design the most elegant way to implement a piece of functionality I'll call Update Document. I would appreciate it if anybody can help. I'm sure many people have run into a similar design question. Here are the relevant objects: -Document (this is the domain object being updated) -DocumentRepository (this is like a DAO object - it retrieves and persists the Document) -DocumentController (this is a POJO JSF-managed bean with request scope) -UpdateDocument.jsp (this is the JSF view that displays the Update Document form) Here are my constraints: - My DocumentController (a managed bean) should not use any Faces/Http objects. That is, no Request, no FacesContext, etc. All request parameters should automatically map to objects - I don't want to store anything in the session - I want to write the least code possible (while still being manageable) Here's what I would like to have happen (but can't figure out how to do it): 1) On the Update Document page, the user update the document title and clicks save 2) JSF instantiates a new documentController (request scope) 3) JSF passes the documentID to the controller 4) The documentController loads the Document from the DocumentRepository 5) JSF calls documentController.getDocument() and maps the values from the Update Document form to the Document domain object (e.g., h:inputText id=title value=#{documentController.document.title}/) What I like about my approach is that JSF just sets the values directly on my domain object. I don't want to have to create a dummy FormBean that JSF uses to set the parameters because then I would be forced to do a second round of copying from the FormBean to the domain object. The domain object is actually just an interface that only the repository can instantiate. My problem is that I can't ever get JSF to execute step 3 before step 5 gets called. I've tried using the updateActionListener, but that gets invoked after the values are set. I've tried using a hidden parameter to pass the documentID to the documentController, but that didn't seem to work either. Below I've included a simplified DocumentController and the Update Document form. Does anybody have any advice?? Thanks, Adam public class DocumentController { // if the documentID is set, this will load the Document from the repository public Document getDocument(); public void setDocumentID(long id); // action method to save Document to the repositor public String save(); } This is what my UpdateDocument form looks like: h:form id=updateDocument h:panelGrid columns=2 h:column h:outputLabel value=#{msgs.title} for=title / /h:column h:column h:inputText id=title value=#{documentController.document.title} required=true f:validateLength minimum=3 maximum=25 / /h:inputText h:message for=title styleClass=errorMessage / /h:column h:column h:outputLabel value=#{msgs.email} for=email / /h:column h:column h:inputText id=email value=#{documentController.document.email} required=true / h:message for=email styleClass=errorMessage / /h:column /h:panelGrid h:commandButton id=submit action=#{documentController.save} value=#{msgs.enter} / h:commandButton id=cancel action=cancel value=#{msgs.cancel} / /h:form
RE: Architecture question
In our application, a typical model object is a slightly enhanced DTO containing the obvious primitives, other domain objects, getters and setters, but also methods that can be fully completed just by using data on the object itself (e.g. validate object fields, cloning the object...). Every other functionality like using the object in some use case flow or saving the object to persistency is done elsewhere (the object is passed as a parameter to other objects that do all the required work with this object). This way the object can travel safely between tiers without the risk of exposing a method on the wrong tier (e.g. call to save to persistency on the presentation tier). Hope that helps... Uri. On 2/9/06, Nicklas Karlsson [EMAIL PROTECTED] wrote: A related architechture question I sometimes wonder about is: Should the model POJO:s be kept as clean DTO:s or should they have member functions for operations also, and if there are operations, how complex should they be allowed to be before I should break them into e.g. static calls in a business logic class? If they are not separated, the model and the businessl logic melts into a mess. -- Alexandre Poitras Québec, Canada __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __
Decorators and generated JavaScript
Hi, I'm currently moving from RI to myfaces1.1 - and I am encountering some problems with sitemesh. Sitemesh decorates the pages after they were rendered. It does so by parsing the page and then giving you tags to place the head and the body. Works like a charm and has the big bonus over tilesfacelets, that the decorated page does not know, that it gets decorated. Unfortunately, I noticed that some functionality now does not work anymore with decorated pages. The simplest problem is a commandlink, that is not submitted because of a javascript-error. After some investigation, I found that the generated javascript (in this case the getScrolling()) is placed outside the body of the page - and there, it gets lost when the page is decorated. I can fix that by manually adding the getScrolling() to the Decorator, but I'm sure, there will be other problems with other generated scripts. Is there a hidden concept in the fact that the scripts are placed outside? And can I change this behaviour somehow? Have all scripts rendered into the head or the body?! Cheers stf
RE: validator Tag Problem in MyFaces 1.1.1 ?
Ah! Of course... I made the error that I expected my backing bean to be updated... but of course this is happening AFTER my validations. As I changed the code now, I cannot proved any code snippets now, but as I said, I move the validation already to an action-method. Cheers\ Sven -Original Message- From: Matthias Wessendorf [mailto:[EMAIL PROTECTED] Sent: Thursday, February 09, 2006 3:43 PM To: MyFaces Discussion Subject: Re: validator Tag Problem in MyFaces 1.1.1 ? Hi Sven, can you provide some code to the list? Btw. the Apply Request Value Phase is populating the UIComponents w/ submitted values. Your backing bean properties are populated during model update phase. Regards, Matthias On 2/9/06, Haiges, Sven, Vodafone Group RD [EMAIL PROTECTED] wrote: Hi all, I am experiencing some problems with the usage of the validator attribute inside a h:inputText element and would like to know if ther are known issues. The way I am solving it right now is to use application level validation, e.g. I call a validate method from one of my commandButton action MethodBindings. problem 1: when I tried to access a bean-local property that should have been set in the apply request values phase, this was still null problem 2: I created a ValidatorException and threw it, but the FacesMessage included was not correctly rendered. Strangely, the css information (color:red) was not used... the message was black). Thanx! Sven -- Sven Haiges Technology Manager Vodafone Group Research Development .DE Tel:+49 89 95410-586 Fax:+49 89 95410-111 Mobile: +49 172 849-6359 mailto:[EMAIL PROTECTED] http://www.vodafone-rnd.com Vodafone Pilotentwicklung GmbH Registered Office: Chiemgaustrasse 116, 81549 München, Germany Registered in Germany Amtsgericht München HRB 98516 -- Matthias Wessendorf Zülpicher Wall 12, 239 50674 Köln http://www.wessendorf.net mwessendorf-at-gmail-dot-com
formatted values in param
Hi all, I wondered how to store formatted values in a parameter. Say I would like to set a formatted date as a message property... Something like this: //---// h:outputFormat value=#{messages['searchresults.lastModified']} f:param value=#{searchObject.lastModified} f:convertDateTime pattern=d MMM locale=nl_NL / /f:param /h:outputFormat //---// this doesn't work since the param tag doesn't allow body content... and it doesn't seem to have support for using converters Is it possible to temporarely store the results of a conversion into a reusable variable? -P
h:message problem
Adding a message to the context for a clientId is not working. I saw in the wiki page that the example matches my code. Can somebody give me a hint what may be wrong? Jsp: h:inputText id=refreshminutes binding=#{backingBean.myComponent} size=5 value=#{backingBean.refreshMinutes} / h:message for=refreshminutes showDetail=true/ Code: FacesContext context = FacesContext.getCurrentInstance(); context.addMessage(myComponent.getClientId(context), new FacesMessage(test, test)); The test message never displays. But error messages from the validator do, for example, when I enter a non-numeric value into the refreshMinutes inputText. Btw, if I use h:messages globalOnly=false, then the test message displays. I tried version 1.09-m9 and 1.1.1. *** Bear Stearns is not responsible for any recommendation, solicitation, offer or agreement or any information about any transaction, customer account or account activity contained in this communication. ***
Re: formatted values in param
If you are using facelets, you could use an EL function to format the valueOn 2/9/06, Peter Maas [EMAIL PROTECTED] wrote:Hi all, I wondered how to store formatted values in a parameter. Say I would like to set a formatted date as a message property... Something like this: //---// h:outputFormat value=#{messages['searchresults.lastModified']} f:param value=#{searchObject.lastModified} f:convertDateTime pattern=d MMM locale=nl_NL / /f:param /h:outputFormat //---// this doesn't work since the param tag doesn't allow body content... and it doesn't seem to have support for using converters Is it possible to temporarely store the results of a conversion into a reusable variable? -P
Re: h:message problem
Are you using subviews or tiles perhaps? Before I switched to facelets I saw many problems like this where components fell out of local scope and the message tag could not locate a component due to the view/subview structure of a page. On 2/9/06, Virtudazo, Dennis (Exchange) [EMAIL PROTECTED] wrote: Adding a message to the context for a clientId is not working. I saw inthe wiki page that the example matches my code. Can somebody give me ahint what may be wrong?Jsp:h:inputText id=refreshminutesbinding=#{ backingBean.myComponent}size=5 value=#{backingBean.refreshMinutes} /h:message for="" showDetail=true/Code:FacesContext context = FacesContext.getCurrentInstance();context.addMessage(myComponent.getClientId(context), newFacesMessage(test, test));The test message never displays. But error messages from the validator do, for example, when I enter a non-numeric value into therefreshMinutes inputText.Btw, if I use h:messages globalOnly=false, then the test messagedisplays.I tried version 1.09-m9 and 1.1.1.***Bear Stearns is not responsible for any recommendation, solicitation,offer or agreement or any information about any transaction, customer account or account activity contained in this communication.***
Re: h:message problem
Hm, This code should work it looks my code except one but I think this should not be the problem but maybe:FacesMessage errMsg = new FacesMessage( FacesMessage.SEVERITY_INFO, shortMsg, longMsg);I used an other Constructor. Maybe there is a problem with missing Severtiy.best regards Hans 2006/2/9, Andrew Robinson [EMAIL PROTECTED]: Are you using subviews or tiles perhaps? Before I switched to facelets I saw many problems like this where components fell out of local scope and the message tag could not locate a component due to the view/subview structure of a page. On 2/9/06, Virtudazo, Dennis (Exchange) [EMAIL PROTECTED] wrote: Adding a message to the context for a clientId is not working. I saw inthe wiki page that the example matches my code. Can somebody give me ahint what may be wrong?Jsp:h:inputText id=refreshminutesbinding=#{ backingBean.myComponent}size=5 value=#{backingBean.refreshMinutes} /h:message for="" showDetail=true/Code:FacesContext context = FacesContext.getCurrentInstance();context.addMessage(myComponent.getClientId(context), newFacesMessage(test, test));The test message never displays. But error messages from the validator do, for example, when I enter a non-numeric value into therefreshMinutes inputText.Btw, if I use h:messages globalOnly=false, then the test messagedisplays.I tried version 1.09-m9 and 1.1.1.***Bear Stearns is not responsible for any recommendation, solicitation,offer or agreement or any information about any transaction, customer account or account activity contained in this communication.*** -- mfg Hans Sowamailto:[EMAIL PROTECTED]
Re: Using Tobago with facelet?
Hi, Arvid, I am trying to reach the same point than you but I am having problems. I built and deployed the example demo and it works great but when I try to insert a sample in my facelet web application (even the simplest hello world example) I keep getting : [benevole.info] ERROR [http-80-Processor24] ResourceManagerImpl.getPaths(323) | Path not found, and no fallback. Using empty string. mainDirs = '[org/apache/myfaces/tobago/renderkit]' contentType = 'html' theme = 'speyside' browser = 'mozilla_5_0' subDir = 'tag' name = 'org.apache.myfaces.StylesheetRenderer' suffix = '' key = 'null' [benevole.info] ERROR [http-80-Processor24] ResourceManagerImpl.getRenderer(429) | name = 'org.apache.myfaces.StylesheetRenderer' clientProperties = 'html/speyside/mozilla_5_0' java.lang.NullPointerException at org.apache.myfaces.tobago.context.ResourceManagerImpl.getRenderer(ResourceManagerImpl.java:424) at org.apache.myfaces.tobago.renderkit.TobagoRenderKit.getRenderer(TobagoRenderKit.java:63) at javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:744) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:509) at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:544) at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:551) at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:457) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:372) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:109) . 9 fvr. 2006 16:55:04 com.sun.facelets.FaceletViewHandler handleRenderException GRAVE: Error Rendering View java.lang.RuntimeException: org.apache.myfaces.StylesheetRenderer at org.apache.myfaces.tobago.context.ResourceManagerImpl.getRenderer(ResourceManagerImpl.java:433) at org.apache.myfaces.tobago.renderkit.TobagoRenderKit.getRenderer(TobagoRenderKit.java:63) at javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:744) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:509) at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:544) at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:551) at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:457) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:372) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:109) ... Caused by: java.lang.NullPointerException at org.apache.myfaces.tobago.context.ResourceManagerImpl.getRenderer(ResourceManagerImpl.java:424) ... 71 more 9 fvr. 2006 16:55:04 com.sun.facelets.FaceletViewHandler handleRenderException Has anybody some clue about the reason of this problem? Thanks, Thomas Arvid Hlsebus a crit: Yes, thanks a lot! I just came home from work and updated the example. Now the gridLayout works: But I still get this warning: 08.02.2006 23:33:16 com.sun.facelets.tag.jsf.ComponentRule warnAttr WARNUNG: /helloWorld.xml @10,43 columns="fixed;*" Property 'columns' is not on type: org.apache.myfaces.tobago.component.UIGridLayout Unfortunately I'm pretty tired and have to go to bed... I will look into the other problems tomorrow night -- like the missing SPAN tag around the label content: span class="tobago-out-default"Hello World/span Regards, Arvid
Re: Using Tobago with facelet?
I would check in my example, but there seems to be no facelets artifact on the default Maven repository. Is CDDL compatible to AL2? Is it planned to put facelets on Ibiblio? If this is the case we could temporarily put an artifact on www.atanion.com/maven2. Regards, Arvid Thomas Gaudin wrote: Hi, Arvid, I am trying to reach the same point than you but I am having problems. I built and deployed the example demo and it works great but when I try to insert a sample in my facelet web application (even the simplest hello world example) I keep getting : [benevole.info] ERROR [http-80-Processor24] ResourceManagerImpl.getPaths(323) | Path not found, and no fallback. Using empty string. mainDirs = '[org/apache/myfaces/tobago/renderkit]' contentType = 'html' theme = 'speyside' browser = 'mozilla_5_0' subDir = 'tag' name = 'org.apache.myfaces.StylesheetRenderer' suffix = '' key = 'null' [benevole.info] ERROR [http-80-Processor24] ResourceManagerImpl.getRenderer(429) | name = 'org.apache.myfaces.StylesheetRenderer' clientProperties = 'html/speyside/mozilla_5_0' java.lang.NullPointerException at org.apache.myfaces.tobago.context.ResourceManagerImpl.getRenderer(ResourceManagerImpl.java:424) at org.apache.myfaces.tobago.renderkit.TobagoRenderKit.getRenderer(TobagoRenderKit.java:63) at javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:744) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:509) at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:544) at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:551) at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:457) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:372) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:109) . 9 févr. 2006 16:55:04 com.sun.facelets.FaceletViewHandler handleRenderException GRAVE: Error Rendering View java.lang.RuntimeException: org.apache.myfaces.StylesheetRenderer at org.apache.myfaces.tobago.context.ResourceManagerImpl.getRenderer(ResourceManagerImpl.java:433) at org.apache.myfaces.tobago.renderkit.TobagoRenderKit.getRenderer(TobagoRenderKit.java:63) at javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:744) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:509) at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:544) at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:551) at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:457) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:372) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:109) ... Caused by: java.lang.NullPointerException at org.apache.myfaces.tobago.context.ResourceManagerImpl.getRenderer(ResourceManagerImpl.java:424) ... 71 more 9 févr. 2006 16:55:04 com.sun.facelets.FaceletViewHandler handleRenderException Has anybody some clue about the reason of this problem? Thanks, Thomas Arvid Hülsebus a écrit : Yes, thanks a lot! I just came home from work and updated the example. Now the gridLayout works: But I still get this warning: 08.02.2006 23:33:16 com.sun.facelets.tag.jsf.ComponentRule warnAttr WARNUNG: /helloWorld.xml @10,43 columns=fixed;* Property 'columns' is not on type: org.apache.myfaces.tobago.component.UIGridLayout Unfortunately I'm pretty tired and have to go to bed... I will look into the other problems tomorrow night -- like the missing SPAN tag around the label content: span class=tobago-out-defaultHello World/span Regards, Arvid --- Wanadoo vous informe que cet e-mail a ete controle par l'anti-virus mail. Aucun virus connu a ce jour par nos services n'a ete detecte. No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/253 - Release Date: 07/02/2006
RE: h:message problem
no, I had right constructor, my example just missed the severity From: Hans Sowa [mailto:[EMAIL PROTECTED] Sent: Thursday, February 09, 2006 10:38 AMTo: MyFaces DiscussionSubject: Re: h:message problem Hm, This code should work it looks my code except one but I think this should not be the problem but maybe:FacesMessage errMsg = new FacesMessage( FacesMessage.SEVERITY_INFO, shortMsg, longMsg);I used an other Constructor. Maybe there is a problem with missing Severtiy.best regards Hans 2006/2/9, Andrew Robinson [EMAIL PROTECTED]: Are you using subviews or tiles perhaps? Before I switched to facelets I saw many problems like this where components fell out of "local scope" and the message tag could not locate a component due to the view/subview structure of a page. On 2/9/06, Virtudazo, Dennis (Exchange) [EMAIL PROTECTED] wrote: Adding a message to the context for a clientId is not working. I saw inthe wiki page that the example matches my code. Can somebody give me ahint what may be wrong?Jsp:h:inputText id="refreshminutes"binding="#{ backingBean.myComponent}"size="5" value="#{backingBean.refreshMinutes}" /h:message for="" showDetail="true"/Code:FacesContext context = FacesContext.getCurrentInstance();context.addMessage(myComponent.getClientId(context), newFacesMessage("test", "test"));The test message never displays. But error messages from the validator do, for example, when I enter a non-numeric value into therefreshMinutes inputText.Btw, if I use h:messages globalOnly="false", then the test messagedisplays.I tried version 1.09-m9 and 1.1.1.***Bear Stearns is not responsible for any recommendation, solicitation,offer or agreement or any information about any transaction, customer account or account activity contained in this communication.***-- mfg Hans Sowamailto:[EMAIL PROTECTED] *** Bear Stearns is not responsible for any recommendation, solicitation, offer or agreement or any information about any transaction, customer account or account activity contained in this communication. ***
RE: h:message problem
not using subviews or tiles. it's not a problem of not being able to locate the component, because the built-in validator's error message is getting displayed. but my explicitly added message is not. From: Andrew Robinson [mailto:[EMAIL PROTECTED] Sent: Thursday, February 09, 2006 10:29 AMTo: MyFaces DiscussionSubject: Re: h:message problem Are you using subviews or tiles perhaps? Before I switched to facelets I saw many problems like this where components fell out of "local scope" and the message tag could not locate a component due to the view/subview structure of a page. On 2/9/06, Virtudazo, Dennis (Exchange) [EMAIL PROTECTED] wrote: Adding a message to the context for a clientId is not working. I saw inthe wiki page that the example matches my code. Can somebody give me ahint what may be wrong?Jsp:h:inputText id="refreshminutes"binding="#{ backingBean.myComponent}"size="5" value="#{backingBean.refreshMinutes}" /h:message for="" showDetail="true"/Code:FacesContext context = FacesContext.getCurrentInstance();context.addMessage(myComponent.getClientId(context), newFacesMessage("test", "test"));The test message never displays. But error messages from the validator do, for example, when I enter a non-numeric value into therefreshMinutes inputText.Btw, if I use h:messages globalOnly="false", then the test messagedisplays.I tried version 1.09-m9 and 1.1.1.***Bear Stearns is not responsible for any recommendation, solicitation,offer or agreement or any information about any transaction, customer account or account activity contained in this communication.*** *** Bear Stearns is not responsible for any recommendation, solicitation, offer or agreement or any information about any transaction, customer account or account activity contained in this communication. ***
Re: JSF Design Question
There is no need for such a complicated approach what you try to achieve is a state saving and scoping over the database. MyFaces tomahawk has a x:saveState construct which first restores the entire object and then sets the altered values. No id nothing is needed once you have the data (which you obviously had before otherwise your approach would not work. As for the calling order, I had a similar problem recently, and I solved it with the fact that the calling order basically is resembled by the element order in the tree. Which means if you have your document id on to with a hidden field the setters and getters are called before the rest so you can use the setters and getters of your controller bean for preinitialization. That is very dirty however (I am not sure if this is a behavior working over all implementations it works however on MyFaces) The cleaner way would be to use a phase listener which gets the data from the request and does some preinitialization or use something like shale which sets clear interception points in the controller itself) But as for your problem you probably can settle down to x:saveState instead of having such a complicated construct where you try to achieve a scoping via db surrogates and db state saving. Werner Adam Brod schrieb: Hi- I have run into a few problems moving from the struts way of thinking to JSF. I'm hoping that the many smart people on this list have made that jump. I'm stuck trying to design the most elegant way to implement a piece of functionality I'll call Update Document. I would appreciate it if anybody can help. I'm sure many people have run into a similar design question. Here are the relevant objects: -Document (this is the domain object being updated) -DocumentRepository (this is like a DAO object - it retrieves and persists the Document) -DocumentController (this is a POJO JSF-managed bean with /request/ scope) -UpdateDocument.jsp (this is the JSF view that displays the Update Document form) Here are my constraints: - My DocumentController (a managed bean) should not use any Faces/Http objects. That is, no Request, no FacesContext, etc. All request parameters should automatically map to objects - I don't want to store anything in the session - I want to write the least code possible (while still being manageable) Here's what I would like to have happen (but can't figure out how to do it): 1) On the Update Document page, the user update the document title and clicks save 2) JSF instantiates a new documentController (request scope) 3) JSF passes the documentID to the controller 4) The documentController loads the Document from the DocumentRepository 5) JSF calls documentController.getDocument() and maps the values from the Update Document form to the Document domain object (e.g., h:inputText id=title value=#{documentController.document.title}/) What I like about my approach is that JSF just sets the values directly on my domain object. I don't want to have to create a dummy FormBean that JSF uses to set the parameters because then I would be forced to do a second round of copying from the FormBean to the domain object. The domain object is actually just an interface that only the repository can instantiate. My problem is that I can't ever get JSF to execute step 3 before step 5 gets called. I've tried using the updateActionListener, but that gets invoked after the values are set. I've tried using a hidden parameter to pass the documentID to the documentController, but that didn't seem to work either. Below I've included a simplified DocumentController and the Update Document form. Does anybody have any advice?? Thanks, Adam public class DocumentController { // if the documentID is set, this will load the Document from the repository public Document getDocument(); public void setDocumentID(long id); // action method to save Document to the repositor public String save(); } This is what my UpdateDocument form looks like: h:form id=updateDocument h:panelGrid columns=2 h:column h:outputLabel value=#{msgs.title} for=title / /h:column h:column h:inputText id=title value=#{documentController.document.title} required=true f:validateLength minimum=3 maximum=25 / /h:inputText h:message for=title styleClass=errorMessage / /h:column h:column h:outputLabel value=#{msgs.email} for=email / /h:column h:column h:inputText id=email value=#{documentController.document.email} required=true / h:message for=email styleClass=errorMessage / /h:column /h:panelGrid h:commandButton id=submit action=#{documentController.save} value=#{msgs.enter} / h:commandButton id=cancel
Re: Using Tobago with facelet?
It looks like you didn't add the Tobago resources to your WAR. If you look into the tobago-example-demo WAR, you will see the directory /tobago, which contains the resources needed by the themes. You will need to add these to your WAR, too. Udo is currently working on simplifying this. Afterwards the themes will packaged as archives and you won't need to unpack them. If you use maven this is currently done automatically. Regards, Arvid Thomas Gaudin wrote: Hi, Arvid, I am trying to reach the same point than you but I am having problems. I built and deployed the example demo and it works great but when I try to insert a sample in my facelet web application (even the simplest hello world example) I keep getting : [benevole.info] ERROR [http-80-Processor24] ResourceManagerImpl.getPaths(323) | Path not found, and no fallback. Using empty string. mainDirs = '[org/apache/myfaces/tobago/renderkit]' contentType = 'html' theme = 'speyside' browser = 'mozilla_5_0' subDir = 'tag' name = 'org.apache.myfaces.StylesheetRenderer' suffix = '' key = 'null' [benevole.info] ERROR [http-80-Processor24] ResourceManagerImpl.getRenderer(429) | name = 'org.apache.myfaces.StylesheetRenderer' clientProperties = 'html/speyside/mozilla_5_0' java.lang.NullPointerException at org.apache.myfaces.tobago.context.ResourceManagerImpl.getRenderer(ResourceManagerImpl.java:424) at org.apache.myfaces.tobago.renderkit.TobagoRenderKit.getRenderer(TobagoRenderKit.java:63) at javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:744) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:509) at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:544) at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:551) at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:457) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:372) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:109) . 9 févr. 2006 16:55:04 com.sun.facelets.FaceletViewHandler handleRenderException GRAVE: Error Rendering View java.lang.RuntimeException: org.apache.myfaces.StylesheetRenderer at org.apache.myfaces.tobago.context.ResourceManagerImpl.getRenderer(ResourceManagerImpl.java:433) at org.apache.myfaces.tobago.renderkit.TobagoRenderKit.getRenderer(TobagoRenderKit.java:63) at javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:744) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:509) at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:544) at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:551) at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:457) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:372) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:109) ... Caused by: java.lang.NullPointerException at org.apache.myfaces.tobago.context.ResourceManagerImpl.getRenderer(ResourceManagerImpl.java:424) ... 71 more 9 févr. 2006 16:55:04 com.sun.facelets.FaceletViewHandler handleRenderException Has anybody some clue about the reason of this problem? Thanks, Thomas Arvid Hülsebus a écrit : Yes, thanks a lot! I just came home from work and updated the example. Now the gridLayout works: But I still get this warning: 08.02.2006 23:33:16 com.sun.facelets.tag.jsf.ComponentRule warnAttr WARNUNG: /helloWorld.xml @10,43 columns=fixed;* Property 'columns' is not on type: org.apache.myfaces.tobago.component.UIGridLayout Unfortunately I'm pretty tired and have to go to bed... I will look into the other problems tomorrow night -- like the missing SPAN tag around the label content: span class=tobago-out-defaultHello World/span Regards, Arvid --- Wanadoo vous informe que cet e-mail a ete controle par l'anti-virus mail. Aucun virus connu a ce jour par nos services n'a ete detecte. No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/253 - Release Date: 07/02/2006
best solution for partial page refresh
Hi, I've been looking into different ways to partially refresh a JSF page (actually a Facelets page) to get more responsive components (datagrids, etc.), and have come up with a few options. Thought I'd see if anyone on this list had strong opinions on one versus the others. I'm willing to do client-side JS if necessary, but ideally the solution would be as simple as adding an attribute in a JSF-ish tag. Here's what I've found: 1) ADF Faces. Jacob Hookom did a blog entry in September with the following code snippet from Oracle's ADF: af:commandButton action=#{bean.method} partialSubmit=true/ af:commandButton text=Refresh Some Things partialSubmit=true id=refresh/ af:outputText value=#{oneValue} partialTriggers=refresh/ af:outputText value=#{anotherValue} partialTriggers=refresh otherRefresh/ This is exactly what I'm looking for (assuming there are af:datagrid, af:xxx components for all the regular components), but I wasn't sure whether or not the donated Oracle components include this partial refresh capability. I've heard some components are only available in the commercial release ... is this one of them? 2) ajaxanywhere http://ajaxanywhere.sourceforge.net/. A pretty clean way to designate parts of the page to refresh. This project looks like an option, but it does seem like triggering the partial refresh requires you to call an ajaxanywhere-specific JS function--which is not a dealbreaker, but less nice than the ADF method. My sense is I could definitely make this work if the other two options aren't feasible yet. 3) JSF Avatar. Not much info out there about Avatar, but it seems to be a Sun-powered extension of JSF that allows you to designate a ProcessingContext, so that JSF can organically create just the components that're asked for by an AJAX request. This one is conceptually appealing, but it seems very nascent and I'm not sure how usable it is. (only available in a Glassfish container? I need something I can drop into Tomcat or Resin) I've read that the server-side piece is implemented somewhere at Sun, and I'd be willing to homebrew the client piece if necessary. Has anybody here actually used Avatar? Do the Blueprints examples use Avatar? (haven't looked yet) I know about some others (ajax tags, some jhook plan on the horizon for a custom partial-page rendering engine), but these seem like the most practical options for a project migrating to JSF today. Only other requirement is that it works in Facelets. I'm even willing to switch to RI (I know, I know- it's a MyFaces list) if that's required for Avatar. Any thoughts would be much appreciated. Thanks in advance- Rogers
Re: best solution for partial page refresh
Hi Rogers, The donation includes this functionality. The parts that are available in the commercial solution (and not in the donation) are RenderKits for Wireless and Telnet. Partial Page Rendering should work out of the box :) Thanks, Jonas Rogers Reilly wrote: Hi, I've been looking into different ways to partially refresh a JSF page (actually a Facelets page) to get more responsive components (datagrids, etc.), and have come up with a few options. Thought I'd see if anyone on this list had strong opinions on one versus the others. I'm willing to do client-side JS if necessary, but ideally the solution would be as simple as adding an attribute in a JSF-ish tag. Here's what I've found: 1) ADF Faces. Jacob Hookom did a blog entry in September with the following code snippet from Oracle's ADF: af:commandButton action="" partialSubmit="true"/ af:commandButton text="Refresh Some Things" partialSubmit="true" id="refresh"/ af:outputText value="#{oneValue}" partialTriggers="refresh"/ af:outputText value="#{anotherValue}" partialTriggers="refresh otherRefresh"/ This is exactly what I'm looking for (assuming there are af:datagrid, af:xxx components for all the regular components), but I wasn't sure whether or not the donated Oracle components include this partial refresh capability. I've heard some components are only available in the commercial release ... is this one of them? 2) ajaxanywhere http://ajaxanywhere.sourceforge.net/. A pretty clean way to designate parts of the page to refresh. This project looks like an option, but it does seem like triggering the partial refresh requires you to call an ajaxanywhere-specific JS function--which is not a dealbreaker, but "less nice" than the ADF method. My sense is I could definitely make this work if the other two options aren't feasible yet. 3) JSF Avatar. Not much info out there about Avatar, but it seems to be a Sun-powered extension of JSF that allows you to designate a ProcessingContext, so that JSF can organically create just the components that're asked for by an AJAX request. This one is conceptually appealing, but it seems very nascent and I'm not sure how usable it is. (only available in a Glassfish container? I need something I can drop into Tomcat or Resin) I've read that the server-side piece is implemented somewhere at Sun, and I'd be willing to homebrew the client piece if necessary. Has anybody here actually used Avatar? Do the Blueprints examples use Avatar? (haven't looked yet) I know about some others (ajax tags, some jhook plan on the horizon for a custom partial-page rendering engine), but these seem like the most practical options for a project migrating to JSF today. Only other requirement is that it works in Facelets. I'm even willing to switch to RI (I know, I know- it's a MyFaces list) if that's required for Avatar. Any thoughts would be much appreciated. Thanks in advance- Rogers -- Jonas Jacobi Author: Pro JSF and Ajax: Building Rich Internet Components Blog: http://www.orablogs.com/jjacobi
Re: [other]Borland want to sell its IDE products.....
MyEclipse is a commercial IDE built on Eclipse right? I'm curious to know a fellow developer's opinion on what some of the improvements over free Eclipse are ... Sean On 2/9/06, Werner Punz [EMAIL PROTECTED] wrote: Sean Schofield schrieb: I personally love JBuilder but it is very pricey. I think you brought up the main point, now that the enterprise stuff finally again is moving into sane domains pricewise (Thanks to Sun and MyEclipse) Borland simply cannot afford to charge this money for their stuff anymore. Borland started as a tools vendor with moderate prices at a time where tools simply cost a fortune. So lots of people who wanted to learn programming started to use their tools, lots of professionals as well who could not afford the heavy priced alternatives. Once Kahn was kicked out they lost this strategy and pushed a high price strategy with Enterprise plastered all over it (probably a stupid idea of some MBAs taking over internally) By JBuilder X they really worked out most of the kinks. I tried Eclipse but everything was too much of a PITA to get working. Every time I try switching to another IDE I just keep going back to good 'ole JBuilder. Well it never was the quality, yes JBuilder had some kinks but overall the quality always was okay, the problem with Borland always was with the management, not really knowing where there core assets and core market was. (The whole Inprise fiasco was self made, for the same reasons why people were moving away from JBuilder in masses the last years) The funny thing is that others like MyEclipse currently have huge success with the same strategy Borland had 20 years ago. But those companies are not driven by MBAs but by people who saw a need for something like a cheap tool alternative to the expensive enterprise IDEs because many developers simply cannot afford that stuff. And just to sum it up, I have seen about 10 companies in the recent past using MyEclipse and none using JBuilder anymore. The reason for most was that the price was right and the tool was good enough.
Re: [other]Borland want to sell its IDE products.....
Werner Punz wrote: Sean Schofield schrieb: I personally love JBuilder but it is very pricey. I think you brought up the main point, now that the enterprise stuff finally again is moving into sane domains pricewise (Thanks to Sun and MyEclipse) Borland simply cannot afford to charge this money for their stuff anymore. Borland started as a tools vendor with moderate prices at a time where tools simply cost a fortune. So lots of people who wanted to learn programming started to use their tools, lots of professionals as well who could not afford the heavy priced alternatives. Once Kahn was kicked out they lost this strategy and pushed a high price strategy with Enterprise plastered all over it (probably a stupid idea of some MBAs taking over internally) I think the problem started when Niels Jensen left and started JPI (one of the founders of Borland, don't know when the others left, Kahn is not the founder btw). Normally when the soul leaves the company, the company changes. Mvgr, Martin
Re: JSCookMenu and SUN's RI
Daniel, It'd be best if you opened the issue since you have the best understanding of the problem and can provide examples showing the problem. (You also are the one who's most interested in seeing a solution). I don't know anything about jsCookMenu -- I've never used it. On 2/9/06, Daniel Loebbe [EMAIL PROTECTED] wrote: I am quite sure that the extension filter stuff is not the reason for the problem concerning the jsCookMenu and Suns RI. All Javascript and CSS stuff is loaded properly. So, can you please open an issue concerning this? Thanks Bye, Daniel 2006/2/8, Mike Kienenberger [EMAIL PROTECTED]: Actually, the new extensions filter web page probably explains it better than the examples. Try the instructions listed at http://myfaces.apache.org/tomahawk/extensionsFilter.html If they aren't clear or don't work for you, let me know how we can improve them. -Mike On 2/8/06, Martin Marinschek [EMAIL PROTECTED] wrote: Hi Daniel, yes you do: you'll need to add the /faces/* mapping as well - see the examples. regards, Martin On 2/8/06, Daniel Loebbe [EMAIL PROTECTED] wrote: Hi Martin, these are my filter settings: filter filter-nameMyFacesExtensionsFilter /filter-name filter-class org.apache.myfaces.component.html.util.ExtensionsFilter /filter-class init-param param-nameuploadMaxFileSize /param-name param-value100m /param-value /init-param init-param param-nameuploadThresholdSize /param-name param-value100k /param-value /init-param /filter filter-mapping filter-nameMyFacesExtensionsFilter /filter-name url-pattern*.faces /url-pattern /filter-mapping filter-mapping filter-nameMyFacesExtensionsFilter /filter-name url-pattern*.js /url-pattern /filter-mapping filter-mapping filter-nameMyFacesExtensionsFilter /filter-name url-pattern*.css /url-pattern /filter-mapping Maybe I miss somthing? Bye, Daniel 2006/2/8, Martin Marinschek [EMAIL PROTECTED]: Bruno should have fixed that by moving all special stuff out to the extensions-filter. You're including the extensions-filter, right? regards, Martin On 2/8/06, Daniel Loebbe [EMAIL PROTECTED] wrote: Any news concerning this issue? The last nightly builds did not contain a correction. Bye, Daniel 2006/2/1, Daniel Loebbe [EMAIL PROTECTED]: Great to hear this. Thanks a lot! Looking forward, Daniel 2006/2/1, Martin Marinschek [EMAIL PROTECTED] : Yeah, there is YAB (yet another bug) open on this. Bruno will fix this together with me, sometime today or tomorrow. regards, Martin On 2/1/06, Daniel Loebbe [EMAIL PROTECTED] wrote: And I got the following output con the console: WARN util.AddResource - MyFaces special javascript could not be retrieved from request-map. ERROR util.MyFacesResourceLoader - Unparsable lastModified : @lastModified@ Did the filter settings change in the meantime? Bye, Daniel 2006/1/30, Martin Marinschek [EMAIL PROTECTED] : Done! regards, Martin On 1/30/06, Daniel Loebbe [EMAIL PROTECTED] wrote: Hi, I tried that, but the error message is the same. Here is the html-code I get now: form id=jsCookMenuForm method=post action=/Gasoline_Web/pages/main.faces enctype=application/x-www-form-urlencoded script type=text/javascriptvar jsCookMenuForm_jsCookMenu_menu = [[null, 'Information', 'jsCookMenuForm_jsCookMenu_menu:', 'linkDummyForm', null,[null, 'Aktuelle Informationen', 'jsCookMenuForm_jsCookMenu_menu:information', 'linkDummyForm', null], [null, 'Benachrichtigungen', 'jsCookMenuForm_jsCookMenu_menu:bulletinBoard', 'linkDummyForm', null], [null, 'Kontakt', 'jsCookMenuForm_jsCookMenu_menu:contact', 'linkDummyForm', null], ... ];/script div id=jsCookMenuForm_jsCookMenu_menu/div script type=text/javascript cmDraw ('jsCookMenuForm_jsCookMenu_menu', jsCookMenuForm_jsCookMenu_menu, 'hbr', cmThemeOffice, 'ThemeOffice');/script input type=hidden name= com.sun.faces.VIEW value=X / input type=hidden name=jsCookMenuForm
Re: AW: integration problem with s:inputSuggestAjax and portlet
Hi, yes this and related changes in myFaces.js was my first idea, but this did not work right. I added a additional field to the options. Seems you have the sources? please try the attached files, it works on my tomcat, but i can't test on a portlet. If this works i can commit this into svn. Regards, Volker PS: please rename myFaces.js-xxx as myFaces.js, js files are blocked from my firewall. Luo. Haihua wrote: Hi Volker, thanks for ur always warm-hearted reply!:) Do you mean sth. like this in InputSuggestAjaxRenderer.java? out.writeText(', {\n + method: 'post',\n + ... parameters: 'affectedAjaxComponent= + clientId + ',\n + ... It seems that it still not work... Cheers, Haihua -Ursprüngliche Nachricht- Von: Volker Weber [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 9. Februar 2006 11:50 An: MyFaces Discussion Betreff: Re: integration problem with s:inputSuggestAjax and portlet Hi, i think this can be solved by adding the parameters as post parameter to the options, instead of empty. I will give it a try this afternoon (german time). Regards, Volker Luo. Haihua wrote: Hi dear all, I am using portlet and want to insert a tag s:inputSuggestAjax into one of my .jsp page. However, it doesn't work due to a javascript error element.getClassName has no properties in firefox. I have read the generated html file, even jumped deeply into the source codes of myfaces and found following problem: Within the generated html page, myfaces generates following javascript codes for inputSuggestAjax: SCRIPT type=text/javascript!-- new Ajax.MyFacesAutocompleter('Pluto_ProcessOverviewPortlet_r1_c1_p1__id0:Pluto_ProcessOverviewPortlet_r1_c1_p1__id2','Pluto_ProcessOverviewPortlet_r1_c1_p1__id0:Pluto_ProcessOverviewPortlet_r1_c1_p1__id2_auto_complete','*/pluto/portal/ProcessOverviewPortlet/_ac_ProcessOverviewPortlet_r1_c1_p1/AC/_pid/ProcessOverviewPortlet_r1_c1_p1**?**org.apache.myfaces.portlet.MyFacesGenericPortlet.VIEW_ID=%2Fview.jsp**?**affectedAjaxComponent=Pluto_ProcessOverviewPortlet_r1_c1_p1__id0:Pluto_ProcessOverviewPortlet_r1_c1_p1__id2*', { method: 'post', asynchronous: true, parameters: '', callback: function(element,entry) {return entry+'jsf_tree_64='+encodeURIComponent(document.getElementById('jsf_tree_64').value)+'jsf_state_64='+encodeURIComponent(document.getElementById('jsf_state_64').value)+'jsf_viewid='+encodeURIComponent(document.getElementById('jsf_viewid').value)} }) //--/SCRIPT Note that the third parameter of the js function, which should be an encodeURL, contains TWO ?, the first is generated by the portlet, the second by the myfaces! Therefore it is no more a valid encodeURL to parse by myfaces! So it seems that inputSuggestAjax does not support any call by a page whose URL already contains parameters. Any tips or suggestions how to resolve this problem? Mit freundlichen Grüßen / Kindest regards Haihua Luo -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain. /* * 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.custom.inputsuggestajax; import org.apache.commons.lang.StringUtils; import org.apache.myfaces.renderkit.html.util.AddResource; import org.apache.myfaces.renderkit.html.util.AddResourceFactory; import org.apache.myfaces.custom.ajax.api.AjaxPhaseListener; import org.apache.myfaces.custom.ajax.api.AjaxRenderer; import org.apache.myfaces.custom.prototype.PrototypeResourceLoader; import org.apache.myfaces.renderkit.JSFAttr; import org.apache.myfaces.renderkit.RendererUtils; import org.apache.myfaces.renderkit.html.HTML; import org.apache.myfaces.renderkit.html.HtmlRendererUtils; import org.apache.myfaces.renderkit.html.util.UnicodeEncoder; import org.apache.myfaces.renderkit.html.ext.HtmlTextRenderer; import javax.faces.application.ViewHandler; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import javax.faces.el.MethodBinding; import javax.faces.el.MethodNotFoundException; import java.io.IOException; import java.util.Collection; import java.util.Iterator; import java.util.List;
Re: best solution for partial page refresh
Thanks Jonas, that's great news. I've got the zip here http://wiki.apache.org/myfaces/adfproposal and am going to give it a shot. Is Facelets supported baked into that archive (the one from wiki.apache/myFaces) somewhere, or do I need a separate jar to get ADF tags working in .xhtml files? on a side note- I just realized the book I preordered a couple days ago is yours. Hope it's good! :-) Jonas Jacobi wrote: Hi Rogers, The donation includes this functionality. The parts that are available in the commercial solution (and not in the donation) are RenderKits for Wireless and Telnet. Partial Page Rendering should work out of the box :) Thanks, Jonas Rogers Reilly wrote: Hi, I've been looking into different ways to partially refresh a JSF page (actually a Facelets page) to get more responsive components (datagrids, etc.), and have come up with a few options. Thought I'd see if anyone on this list had strong opinions on one versus the others. I'm willing to do client-side JS if necessary, but ideally the solution would be as simple as adding an attribute in a JSF-ish tag. Here's what I've found: 1) ADF Faces. Jacob Hookom did a blog entry in September with the following code snippet from Oracle's ADF: af:commandButton action=#{bean.method} partialSubmit=true/ af:commandButton text=Refresh Some Things partialSubmit=true id=refresh/ af:outputText value=#{oneValue} partialTriggers=refresh/ af:outputText value=#{anotherValue} partialTriggers=refresh otherRefresh/ This is exactly what I'm looking for (assuming there are af:datagrid, af:xxx components for all the regular components), but I wasn't sure whether or not the donated Oracle components include this partial refresh capability. I've heard some components are only available in the commercial release ... is this one of them? 2) ajaxanywhere http://ajaxanywhere.sourceforge.net/. A pretty clean way to designate parts of the page to refresh. This project looks like an option, but it does seem like triggering the partial refresh requires you to call an ajaxanywhere-specific JS function--which is not a dealbreaker, but less nice than the ADF method. My sense is I could definitely make this work if the other two options aren't feasible yet. 3) JSF Avatar. Not much info out there about Avatar, but it seems to be a Sun-powered extension of JSF that allows you to designate a ProcessingContext, so that JSF can organically create just the components that're asked for by an AJAX request. This one is conceptually appealing, but it seems very nascent and I'm not sure how usable it is. (only available in a Glassfish container? I need something I can drop into Tomcat or Resin) I've read that the server-side piece is implemented somewhere at Sun, and I'd be willing to homebrew the client piece if necessary. Has anybody here actually used Avatar? Do the Blueprints examples use Avatar? (haven't looked yet) I know about some others (ajax tags, some jhook plan on the horizon for a custom partial-page rendering engine), but these seem like the most practical options for a project migrating to JSF today. Only other requirement is that it works in Facelets. I'm even willing to switch to RI (I know, I know- it's a MyFaces list) if that's required for Avatar. Any thoughts would be much appreciated. Thanks in advance- Rogers -- *Jonas Jacobi Author*: Pro JSF and Ajax: Building Rich Internet Components http://apress.com/book/bookDisplay.html?bID=10044 *Blog*: http://www.orablogs.com/jjacobi
RE: NavigationHandler fails to find navigation rule
Hi Conway, Thanks very much for your help, IT WORKED !! Two things: 1 - When I copied the example in the e-mail I thought: What if I put it at the end ? I told me: No its stupid it has nothing to do Good lesson: Try all solutions no matter how trivial they look like. 2 - Of course this is not how faces Navigation Algorithm should work, at least what Core JAVA SERVER FACES describes. It's ok for my application, but it will cause a lot of trouble to many others. Thanks again tonio. On Thu, 2006-02-09 at 09:29 +, Conway. Fintan (IT Solutions) wrote: Hi Tony, I am not an expert, but have you tried moving the default rule to the end of the list? Otherwise you could specify some from-view-id's in your navigation-case's? HTH, Fintan -Original Message- From: Tonio Caputo [mailto:[EMAIL PROTECTED] Sent: 08 February 2006 21:28 To: MyFaces-Users-List Subject: NavigationHandler fails to find navigation rule Hi, I implemented a custom NavigationHandler, that just do some stuff and them call the default Implementation. The application is running correctly with Sun Faces implementation. What is happening is that NavigationHandler is not matching any rule and always going to the default rule. I've checked the outcome parameter, it is correct. I've checked that my Navigation Handler is called, yes. I send you a portion if my navigation configuration to see if it helps: navigation-rule navigation-case !-- This is the default destination -- to-view-id/PageSessionExpired.jsp/to-view-id /navigation-case navigation-case from-outcomeindex/from-outcome to-view-id/index.jsp/to-view-id /navigation-case navigation-case from-outcomestateSignout/from-outcome to-view-id/PageSignout.jsp/to-view-id /navigation-case navigation-case from-outcomestateInqCriteria/from-outcome to-view-id/PageQuoteSearchCrit.jsp/to-view-id /navigation-case navigation-case from-outcomestateInqList/from-outcome to-view-id/PageInquirySearchLst.jsp/to-view-id /navigation-case navigation-case from-outcomestatePnowEntry/from-outcome to-view-id/PagePriceNow.jsp/to-view-id /navigation-case Any Ideas will be great Thanks tonio * ** *** ** * ** *** ** * ** *** ** * This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any views or opinions presented are solely those of the author, and do not necessarily represent those of ESB. If you have received this email in error please notify the sender. Although ESB scans e-mail and attachments for viruses, it does not guarantee that either are virus-free and accepts no liability for any damage sustained as a result of viruses. * ** *** ** * ** *** ** * ** *** ** *
Re: validator Tag Problem in MyFaces 1.1.1 ?
Sven, I am not really sure about what's happening, when throwing a ValidatorException in Phase 5. Since converters and validators are invoke two phases earlier. However, it is possible to add FacesMessage objects during phase 5 (inside of your action method). Use something like: FAcesContext.getCurrentInstance().addMessage(null, new FacesMessage(...)); -Matthias On 2/9/06, Haiges, Sven, Vodafone Group RD [EMAIL PROTECTED] wrote: Ah! Of course... I made the error that I expected my backing bean to be updated... but of course this is happening AFTER my validations. As I changed the code now, I cannot proved any code snippets now, but as I said, I move the validation already to an action-method. Cheers\ Sven -Original Message- From: Matthias Wessendorf [mailto:[EMAIL PROTECTED] Sent: Thursday, February 09, 2006 3:43 PM To: MyFaces Discussion Subject: Re: validator Tag Problem in MyFaces 1.1.1 ? Hi Sven, can you provide some code to the list? Btw. the Apply Request Value Phase is populating the UIComponents w/ submitted values. Your backing bean properties are populated during model update phase. Regards, Matthias On 2/9/06, Haiges, Sven, Vodafone Group RD [EMAIL PROTECTED] wrote: Hi all, I am experiencing some problems with the usage of the validator attribute inside a h:inputText element and would like to know if ther are known issues. The way I am solving it right now is to use application level validation, e.g. I call a validate method from one of my commandButton action MethodBindings. problem 1: when I tried to access a bean-local property that should have been set in the apply request values phase, this was still null problem 2: I created a ValidatorException and threw it, but the FacesMessage included was not correctly rendered. Strangely, the css information (color:red) was not used... the message was black). Thanx! Sven -- Sven Haiges Technology Manager Vodafone Group Research Development .DE Tel:+49 89 95410-586 Fax:+49 89 95410-111 Mobile: +49 172 849-6359 mailto:[EMAIL PROTECTED] http://www.vodafone-rnd.com Vodafone Pilotentwicklung GmbH Registered Office: Chiemgaustrasse 116, 81549 München, Germany Registered in Germany Amtsgericht München HRB 98516 -- Matthias Wessendorf Zülpicher Wall 12, 239 50674 Köln http://www.wessendorf.net mwessendorf-at-gmail-dot-com -- Matthias Wessendorf Zülpicher Wall 12, 239 50674 Köln http://www.wessendorf.net mwessendorf-at-gmail-dot-com
jsValueChangeListener not saving data of target field
Hi, I was wondering if anyone has any insight to my question below. I am trying to use jsValueChangeListener to dynamically enable another selectOneMenu on the same form. What I'm trying to do : Per the code below, if id=myActionType = 3 then enable the field where id=newMyStatusLabel The JavaScript that I used below seems to work fine. If one of my options in my select menu are selected, it runs a JavaScript function to enable another select menu and its label and also set disabled = false; However, When I save (submit the form), the value for the 2nd field (newMyStatus) is null, even if I pick option where value = 3 where it gets enabled and I pick a value. As a sanity test, I enabled newMyStatus by default when the JSP loads and submitted the form. The data saved properly. So, it seems that it doesn't like it if the field started off disabled and submits as enabled. Is this a bug in this component or a behavior of JSF/MyFaces that I am not familiar with? I need the second field's disabled property to be driven by the selecton of the first field. Has anyone been doing this and if so, what do you recommend as a best practice in MyFaces? Has anyone used jsValueChangeListener successfully? Many thanks! Code sample below. h:outputText id=myActionTypeLabel value=#{labels.myActionType} styleClass=labeldisabled#{myActionsBacking.myActionTypeDisabled}/ h:selectOneMenu id=myActionType value=#{sessionBean.myActions.myActionType} onchange=javascript:markChanged(); disabled=#{myActionsBacking.myActionTypeDisabled} styleClass=fielddisabled#{myActionsBacking.myActionTypeDisabled} f:selectItems value=#{lookUpBean.myActionTypeDefaultItems} / t:jsValueChangeListener for=newMyStatus expressionValue=($srcElem.options[$srcElem.selectedIndex].value=='3')?disabledFieldRequested($destElem,false):disabledFieldRequested($destElem,true);/ /h:selectOneMenu h:outputText id=newMyStatusLabel value=#{labels.newMyStatus} (newMyStatus-dynamicTODO) styleClass=labeldisabled#{myActionsBacking.newMyStatusDisabled} / h:selectOneMenu id=newMyStatus value=#{sessionBean.myActions.newMyStatus} onchange=javascript:markChanged(); disabled=#{myActionsBacking.newMyStatusDisabled} styleClass=fielddisabled#{myActionsBacking.newMyStatusDisabled} f:selectItems value=#{lookUpBean.myActionstatusTypes} / /h:selectOneMenu This is the JavaScript function that it calls. And that works. But, the data for newMyStatus doesn't save upon submission. script language=JavaScript function disabledFieldRequested(theObject, disabled) { var theLabel; theLabel = document.getElementById(theObject.name + Label); if(disabled) { theObject.className='fielddisabledtrue'; theObject.disabled=true; theObject.value=''; theLabel.className='labeldisabledtrue'; } else { theObject.className='fielddisabledfalse'; theObject.disabled=false; theLabel.className='labeldisabledfalse'; } } /script Many thanks, Kevin Hutson
AW: AW: Problem with evaluation of Tomahawk HtmlSelectOneRadio components inside UIData (programmatically created UI)
Hi Volker, many thanks, it works now. I already tested it with the HtmlSelectOneRadio components outside of UIData, but I got runtime errors because they hadn't been found for the related HtmlRadio components. That's why I added them as children to UIData, what solved the error, but the evaluation didn't work. Using the HtmlSelectOneRadio components outside of UIData and specifying absolute IDs in the for attribute did the trick... Now I can use a table with table headers for each column, what hadn't been possible with HtmlPanelGrid. Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Donnerstag, 9. Februar 2006 11:18 An: MyFaces Discussion Betreff: Re: AW: Problem with evaluation of Tomahawk HtmlSelectOneRadio components inside UIData (programmatically created UI) Hi Matthias, just an idea, may work or not, but worth a try imho: put the HtmlSelectOneRadio component(s) somewhere out of the uidata (e.g. as child of viewRoot) and set a id, also set a id to all parent namingcontainers. in the for attribute of the HtmlRadio components use a absolute id (e.g. :[id_of_viewRoot]:[id_of_HtmlSelectOneRadio], if HtmlSelectOneRadio is on top level). Not sure if this will work, but after a short look into HtmlRadioRenderer.java and implementation of findComponent() i think this could work. Regards, Volker Matthias Kahlau wrote: For UIData, not a thousand components represent thousand rows, but only one. But I didn't use only one HtmlSelectOneRadio component for all rows. Instead, I use many HtmlSelectOneRadio components, one component for one row. Using one HtmlSelectOneRadio component for all rows had only been a potential solution. Your explanation kills this idea for the moment, but I think it doesn't explain why my current solution doesn't work... Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Martin Marinschek Gesendet: Mittwoch, 8. Februar 2006 23:24 An: Matthias Kahlau Cc: MyFaces Discussion Betreff: Re: Problem with evaluation of Tomahawk HtmlSelectOneRadio components inside UIData (programmatically created UI) Yes, it has somehting to do with UIData. For UIData, not a thousand components represent thousand rows, but only one. Much like in Swing... So it's a little different there... regards, Martin On 2/8/06, Matthias Kahlau [EMAIL PROTECTED] wrote: Thanks Martin, but do you know, why I might get components that aren't properly initialized? I wonder about that, because processing the user input after locating the components by using findComponent works for all the other question types I use (without UIData), e. g. by using - only one HtmlSelectOneRadio component and some HtmlRadio components, - only one HtmlSelectManyCheckbox component and some HtmlCheckbox components, - only one HtmlInputText or HtmlInputTextarea Has this sth. to do with UIData? Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Martin Marinschek Gesendet: Mittwoch, 8. Februar 2006 23:05 An: MyFaces Discussion Betreff: Re: Problem with evaluation of Tomahawk HtmlSelectOneRadio components inside UIData (programmatically created UI) Ok, I do think I know now what your problem is: the findComponent will deliver a component which is not properly initialized (it will return the stamp, but not the actual initialized component for this row...) So what you're really looking for is the functionality I implemented a few weeks ago for findComponent, to return a properly initialized component for this row. But: I can't help you out with fixing this in the radio-renderer right now, sorry. And you're in stress, too, to get your thesis finished, right? So I really don't know how to fix this. no clue. Anyone else able to help? regards, Martin On 2/8/06, Matthias Kahlau [EMAIL PROTECTED] wrote: Hi Martin! If you can't imagine the cause of the problem, maybe you can give me a hint to a workable solution using HtmlDataTable ... Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Matthias Kahlau Gesendet: Mittwoch, 8. Februar 2006 20:45 An: MyFaces Discussion; [EMAIL PROTECTED] Betreff: AW: Problem with evaluation of Tomahawk HtmlSelectOneRadio components inside UIData (programmatically created UI) I didn't use JSP, the UI is programmatically created. This is a part of the method which adds HtmlSelectOneRadio components to the HtmlDataTable: HtmlDataTable table = new HtmlDataTable(); this.form.getChildren().add(table); table.setId(this.viewRoot.createUniqueId()); table.setVar(row); table.setBorder(1);
HtmSelectOneRadio setting style per component
Hi, I'm trying to make my application implemented and tested with sun reference implementation run with myfaces- 1.1.1 After some basic problems all seems to work ok. There is only a difference: HtmlSelectOneRadio Style renderer I'm setting the style of the component with the HtmlSelectOneRadio.setStyle() method, what happens: * Sun implementations generates a span tag with style information surrounding all the input elements * My faces is setting the style attribute of every component to the style information. I'm using XY Layout, so imagine that instead of positioning all elements in a box, all Radio Buttons with the size of all elements. My question: Is this a correct difference between implementations, or shoul one of them change the way it is rendered. The solution I suppose is putting this components inside a HtmlPanelGrid. Thanks in advance tonio.
AW: HtmSelectOneRadio setting style per component
Sun implementations generates a span tag with style information surrounding all the input elements That's what I need, too (and also for HtmlSelectManyCheckbox), but I think that's only possible when not using spread layout. Maybe rendering a span element around each input element would be an alternative. Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Tonio Caputo Gesendet: Donnerstag, 9. Februar 2006 20:56 An: MyFaces-Users-List Betreff: HtmSelectOneRadio setting style per component Hi, I'm trying to make my application implemented and tested with sun reference implementation run with myfaces- 1.1.1 After some basic problems all seems to work ok. There is only a difference: HtmlSelectOneRadio Style renderer I'm setting the style of the component with the HtmlSelectOneRadio.setStyle() method, what happens: * Sun implementations generates a span tag with style information surrounding all the input elements * My faces is setting the style attribute of every component to the style information. I'm using XY Layout, so imagine that instead of positioning all elements in a box, all Radio Buttons with the size of all elements. My question: Is this a correct difference between implementations, or shoul one of them change the way it is rendered. The solution I suppose is putting this components inside a HtmlPanelGrid. Thanks in advance tonio.
jscookmenu usage problems
hello all,i am currently try to use jscookmenu along with my JSF app which uses tiles.jscookmenu should redirect to a page in which there is another form to be submitted.I followed advices on the list to embed jscookmenu and my other data under the same form..for example, heres' my base layout*** tiles layout HTML HEAD %-- link rel=stylesheet href="" type=text/css --% titletiles:getAsString name=title//title link rel=stylesheet href="" / /HEADbody bgcolor=#ff text=#00 link=#023264 alink=#023264 vlink=#023264 table border=0 width=100% cellspacing=5tr td colspan=2tiles:insert attribute=header //td/tr tr tiles:insert attribute='body'//tr /trtr td colspan=2 tiles:insert attribute=footer / /td /tr/table/body/html end of tile layout ***my jsp is then like this**jsp **tiles:insert definition=budgetLayout tiles:put name=title value=Insert Entry/ tiles:put name=body value=/insertBody.jsp//tiles:insertand my insertBody is ** insertBody *f:view h:form id=insertForm f:loadBundle basename=resources.MessageResources var=msgs/ h:panelGrid id=body_container_grid style=vertical-align:top border=0 cellpadding=0 cellspacing=1 columns=2 f:subview id=body_horizontal_menu_bar jsp:include page=/common/jscookmenu.jsp/ /f:subview f:subview id=body_content f:subview id=msg jsp:include page=statusMsg.jsp/ /f:subviewh:panelGrid columns=3 style=vertical-align:center h:outputLabel value=#{msgs.date} for=""> t:inputCalendar id=date monthYearRowClass=yearMonthHeader weekRowClass=weekHeader currentDayCellClass=currentDayCell value=#{entryBean.entry.date} renderAsPopup=true renderPopupButtonAsImage=true popupDateFormat=dd-MMM- / h:message for=""> h:outputLabel value=#{msgs.description} for=""> h:inputText id=description value=#{ entryBean.entry.description} required=true/h:message for=""> h:outputText value=#{msgs.type}/ h:selectOneMenu id=type value=#{entryBean.entry.type} required=true f:selectItems value=#{applicationBean.expenseTypes } / f:converter converterId=javax.faces.Integer/ /h:selectOneMenu h:message for="">h:outputLabel value=#{ msgs.amount} for=""> h:inputText id=amount value=#{entryBean.entry.amount} required=true/h:message for="" /h:panelGridh:panelGroup h:commandButton id=submitInsert action="" value=Insert/ /h:panelGroup /f:subview /h:panelGrid /h:form/f:view ** end of insertBody *Problem is that somehow even if in different pages i use a new form id, it looks like it is being cached and being instead like the form above..ha sanyone had any issues with jscookmenu and forms ?thanks in advanc and regardsmarcoPS i got jscookmenu from nightly built of last week... i am not aware if there are some changes...
Re: HtmSelectOneRadio setting style per component
Have you read up what the spec says about this? Is there a way to set an item style in the RI? It seems to me that that would be important in many cases... regards, Martin On 2/9/06, Tonio Caputo [EMAIL PROTECTED] wrote: Hi, I'm trying to make my application implemented and tested with sun reference implementation run with myfaces- 1.1.1 After some basic problems all seems to work ok. There is only a difference: HtmlSelectOneRadio Style renderer I'm setting the style of the component with the HtmlSelectOneRadio.setStyle() method, what happens: * Sun implementations generates a span tag with style information surrounding all the input elements * My faces is setting the style attribute of every component to the style information. I'm using XY Layout, so imagine that instead of positioning all elements in a box, all Radio Buttons with the size of all elements. My question: Is this a correct difference between implementations, or shoul one of them change the way it is rendered. The solution I suppose is putting this components inside a HtmlPanelGrid. Thanks in advance tonio. -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: Problems with ValueChangeEvent and ValueBinding
Andy, when you say ValueBinding and Binding do you mean the binding attribute or the value attribute? On 1/27/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Perhaps I haven't described my problem exactly so that it's unterstandable... My problem is the following: If I add a Binding attribute to a inputText component, I can't update the value of this Textfield by an ValueChangeEvent of another InputText Component.(if the Page is new loaded, the inputTextfield is still empty= If I try to set the value with the appropriate setter method, just nothing happens. The inputtext field stays empty and the value isn't updated. When I remove the Binding attribute then everything works... (But I need the binding) Do I have to set the value in another way? Regards, Andy -Ursprüngliche Nachricht- Von:Mitter Andreas, ISX Gesendet: Donnerstag, 26. Januar 2006 14:10 An: MyFaces (E-Mail) Betreff:Problems with ValueChangeEvent and ValueBinding Hi all! In my application I have a inputText Component with a ValueChangeEvent. The ValueChangeMethod starts a Database query and if some data is found, then the founded records are written into other inputText Components on the mask. The problem now is, that if I add a ValueBinding attribute to this other inputText fields, the new data from the query isn't written into the fields. If I remove the Valuebinding everything works... How can I overcome this problem? Here my jsp with two InputText Fields t:htmlTag value=td rendered=#{showTags.showLfnr} h:inputText binding=#{beziehungsDto.ITlfnr} id=lfnr value=#{beziehungsDto.lfnr} styleClass=mustfield required=true size=35 rendered=#{showTags.showLfnr} immediate=true valueChangeListener=#{querySelectHelper.selectSamData} onchange=submit() f:validateLength maximum=35/f:validateLength /h:inputText /t:htmlTag In this second field some data should be written. If I remove the binding attribute, it works, if I leave it, the field isn't updated... t:htmlTag value=td h:inputText binding=#{beziehungsDto.ITpartnername} id=partnernameneu value=#{beziehungsDto.namepartner} styleClass=mustfield required=true size=35 f:validateLength maximum=35/f:validateLength /h:inputText /t:htmlTag Here is the ValueChangeMethod: public void selectSamData(ValueChangeEvent event) { beziehungsDto = (BeziehungDto)FacesUtil.getManagedBean(beziehungsDto); qh = (QueryHelper)FacesUtil.getManagedBean(queryHelper); Session session = HibernateSAMUtil.currentSession(); Transaction tx = null; try { tx = session.beginTransaction(); String sqlstring = Select a.firmNr, a.firmNamKurz, a.bdtKndNr, + a.lfvUebArt, a.sfDunsNr from Eklist a where a.firmNr=:liefnr; Query q =session.createQuery(sqlstring); q.setString(liefnr, (String)event.getNewValue()); Iterator it = q.list().iterator(); while(it.hasNext()) { Object[] row = (Object[])it.next(); //beziehungsDto.setNamepartner((String)row[1]); beziehungsDto.getITpartnername().setValue((String)row[1]); beziehungsDto.setNamepartner((String)row[1]); ... } } String viewId = /popupAddBeziehung.jsp; FacesContext context = FacesContext.getCurrentInstance(); UIViewRoot view = context.getApplication().getViewHandler() .createView(context, viewId); view.setViewId(viewId); context.setViewRoot(view); context.renderResponse(); tx.commit(); } catch (Exception ex) { if (tx != null) tx.rollback(); MessageUtils.addMessage(FacesMessage.SEVERITY_WARN, errorListDataForAdminDB, null, context);// TODO ex.printStackTrace(); } finally { HibernateSAMUtil.closeSession(); } } __ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system manager. This footnote also confirms that this email message has been swept
Re: internal date conversion slackness?
On 1/25/06, Nicklas Karlsson [EMAIL PROTECTED] wrote: Is the internal String - Date convertor supposed to be so forgiving that it wraps 66.01.2006 (dd.MM.) into 07.03.2006 without as much as a complaint? I have a custom validator but it only kicks in after an OK date has been generated. I don't know the answer as to how lenient it is supposed to be, but you can use a custom converter to make it less lenient. You can probably make your custom converter a subclass of the original converter, maybe with a setLenient(false) call on the date formatter. I haven't looked at the source to see how hard that'd be.
Re: HtmSelectOneRadio setting style per component
Martin, Finally I was able to find the specs (http://java.sun.com/j2ee/javaserverfaces/1.1/docs/renderkitdocs/index.html) here is what it says regarding my problem: Render a table element. If the styleClass is specified, render the value of the styleClass attribute as the value of the class attribute on the table element. If the style, border attributes are specified, pass them thru. ... Well it seems myfaces is ok, as I understand (its not very clear) styleClass (class attribute) corresponds to the element surrounding all elements style,border attributes I suppose they mean put them in the input elements (Not sure what they mean with pass them thru) Well really I would prefer the other way round (styleClass/style) but specs are specs. Regards tonio On Thu, 2006-02-09 at 21:30 +0100, Martin Marinschek wrote: Have you read up what the spec says about this? Is there a way to set an item style in the RI? It seems to me that that would be important in many cases... regards, Martin On 2/9/06, Tonio Caputo [EMAIL PROTECTED] wrote: Hi, I'm trying to make my application implemented and tested with sun reference implementation run with myfaces- 1.1.1 After some basic problems all seems to work ok. There is only a difference: HtmlSelectOneRadio Style renderer I'm setting the style of the component with the HtmlSelectOneRadio.setStyle() method, what happens: * Sun implementations generates a span tag with style information surrounding all the input elements * My faces is setting the style attribute of every component to the style information. I'm using XY Layout, so imagine that instead of positioning all elements in a box, all Radio Buttons with the size of all elements. My question: Is this a correct difference between implementations, or shoul one of them change the way it is rendered. The solution I suppose is putting this components inside a HtmlPanelGrid. Thanks in advance tonio. -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: [other]Borland want to sell its IDE products.....
I think , who will buy these stuff , All company that has money to by these product line has their own stuff (IBM ,BEA ,SUN ,MS,ORACLE) , is there any other company that has enough cash to buy those products ? how much those products costs ? for example how much should buyer pay to get Jbuilder ? can any one suggest , or read something some where ? Martin van den Bemt wrote: Werner Punz wrote: Sean Schofield schrieb: I personally love JBuilder but it is very pricey. I think you brought up the main point, now that the enterprise stuff finally again is moving into sane domains pricewise (Thanks to Sun and MyEclipse) Borland simply cannot afford to charge this money for their stuff anymore. Borland started as a tools vendor with moderate prices at a time where tools simply cost a fortune. So lots of people who wanted to learn programming started to use their tools, lots of professionals as well who could not afford the heavy priced alternatives. Once Kahn was kicked out they lost this strategy and pushed a high price strategy with Enterprise plastered all over it (probably a stupid idea of some MBAs taking over internally) I think the problem started when Niels Jensen left and started JPI (one of the founders of Borland, don't know when the others left, Kahn is not the founder btw). Normally when the soul leaves the company, the company changes. Mvgr, Martin
RE: calendar with tomahawk
Hi Yes thats right.You need to add some more too. So the final one should look like filter filter-nameextensionsFilter/filter-name filter-classorg.apache.myfaces.component.html.util.ExtensionsFilter/filter-class /filter filter-mapping filter-nameextensionsFilter/filter-name url-pattern*.faces/url-pattern /filter-mapping filter-mapping filter-nameextensionsFilter/filter-name url-pattern/faces/*/url-pattern /filter-mapping Also it will be better if you can post ur replies to the Group, so that others with this issue cand find thsi helpful. Regards Balaji -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]Sent: Friday, 10 February 2006 2:03 AMTo: Balaji KalyansundaramSubject: RE: calendar with tomahawk Thanks for the answer. So that means that if I have this code: %@ taglib uri=http://myfaces.apache.org/extensions prefix=x % tr tdh:outputText value="#{Fmsg.birthday}"/:/td td h:form x:inputCalendar id="calendar" value="#{DateBean.date}" renderAsPopup="true" / /h:form /td /tr I also need to add a filter in my web.xml? How should I write it: filter-mapping filter-nameMyFilter/filter-name url-patternhttp://myfaces.apache.org/extensions/url-pattern /filter-mapping ?? And then I will have a popup, will be able to pass from a month to another and select a date? Thanks in advance for your answer Best Sophie De: Balaji Kalyansundaram [mailto:[EMAIL PROTECTED] Envoyé: mercredi 8 février 2006 23:54À: MyFaces Discussion; [EMAIL PROTECTED]Objet: RE: calendar with tomahawk Hi Though I did not see the code, I can tell that "calendarBean" should be a backing bean. And they are saving the state of it.You can look at the WIKI for more info on t:saveState To use the Calendar you do not need to saveState. But make sure you unclude the extension filetrs in web.xml, so that MyFaces can add the .js and .css files for the popup calendar. HIH Balaji -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Sent: Thursday, 9 February 2006 12:17 AMTo: users@myfaces.apache.orgSubject: calendar with tomahawk Hello everybody! I am new on this list. And I am writing to you for an advice. I am trying to add a calendar to my jsp page using the example of MyFaces. However I do not understand what is this calendarBean in t:saveState value="#{calendarBean}"/ Is there a file calendarBean.java somewhere in this example? Thanks in advance for your help. Best, Sophie __ NOD32 1.1400 (20060208) Information __This message was checked by NOD32 antivirus system.http://www.eset.com This correspondence is for the named persons only. It may contain confidential or privileged information or both. No confidentiality or privilege is waived or lost by any mis transmission. If you receive this correspondence in error please delete it from your system immediately and notify the sender. You must not disclose, copy or relay on any part of this correspondence, if you are not the intended recipient. Any opinions expressed in this message are those of the individual sender except where the sender expressly, and with the authority, states them to be the opinions of the Department of Emergency Services, Queensland. This correspondence is for the named persons only. It may contain confidential or privileged information or both. No confidentiality or privilege is waived or lost by any mis transmission. If you receive this correspondence in error please delete it from your system immediately and notify the sender. You must not disclose, copy or relay on any part of this correspondence, if you are not the intended recipient. Any opinions expressed in this message are those of the individual sender except where the sender expressly, and with the authority, states them to be the opinions of the Department of Emergency Services, Queensland.
Re: Tobago t:tree : visual indicator for the current node.
Not in the moment, but it should, so I've added an issue: https://issues.apache.org/jira/browse/MYFACES-1107 Regards Udo Iryna Stetska schrieb: I'm using t:tree. I would like to have some visual indicator (different backgroung, color or style) for the tree node currently selected (which is changed when TreeState.setMarker(DefaultMutableTreeNode node) is called). Is it possible??
jsValueChangeListener radio buttons.
Hello,some time ago there's been a post of somebody struggeling to put jsValueChangeListener to work with radio buttons. Now I have similar problem. I use the snippet:x:selectOneRadio id=locationType layout=spread value=locationProdvided f:selectItem itemLabel=#{bun.newTask_location_matters} itemValue=locationProvided / f:selectItem itemLabel=#{bun.newTask_location_doesnt_matter} itemValue=locationNA / x:jsValueChangeListener for="" property=value expressionValue=$srcElem[1].value //x:selectOneRadiox:radio for="" index=0 / x:radio for="" index=1 / But then I get _javascript_ exception on the client. After some debugging I figured out that the problem seems to be the fact that unlike for other form controls, radio buttons are not accessible via document.getElementById('radioName') call which is used by jsValueChangeListener. document.formName.radioName seems to work though. Any ideas on how to make jsValueChangeListener to work with radio buttons? (ie. make a inputText that will be filled with the id/name/whatever of the choosen radio button). Any help greatly appreciated! Adam K. -- =[EMAIL PROTECTED], ICQ: 3204612 http://www.win.tue.nl/~akoprowsThe difference between impossible and possiblelies in determination (Tommy Lasorda)=
Re: [other]Borland want to sell its IDE products.....
It takes some high level bookkeeping to determine the real value.. Mvgr, Martin Legolas Woodland wrote: I think , who will buy these stuff , All company that has money to by these product line has their own stuff (IBM ,BEA ,SUN ,MS,ORACLE) , is there any other company that has enough cash to buy those products ? how much those products costs ? for example how much should buyer pay to get Jbuilder ? can any one suggest , or read something some where ? Martin van den Bemt wrote: Werner Punz wrote: Sean Schofield schrieb: I personally love JBuilder but it is very pricey. I think you brought up the main point, now that the enterprise stuff finally again is moving into sane domains pricewise (Thanks to Sun and MyEclipse) Borland simply cannot afford to charge this money for their stuff anymore. Borland started as a tools vendor with moderate prices at a time where tools simply cost a fortune. So lots of people who wanted to learn programming started to use their tools, lots of professionals as well who could not afford the heavy priced alternatives. Once Kahn was kicked out they lost this strategy and pushed a high price strategy with Enterprise plastered all over it (probably a stupid idea of some MBAs taking over internally) I think the problem started when Niels Jensen left and started JPI (one of the founders of Borland, don't know when the others left, Kahn is not the founder btw). Normally when the soul leaves the company, the company changes. Mvgr, Martin
Re: Javascript not loaded : Using Tomahawk with JSF RI
I don't think you're allowed to alternate filter and filter-mapping sections. You have to define all of your filter elements, and then all of your filter-mapping elements. Note that the order you list the filter-mappings is the other that they get executed. I recommend making the myfaces extension filter the last filter mapping. On 2/9/06, Raj Rajendran [EMAIL PROTECTED] wrote: Please help !! I am using t:inputDate type=date popupCalendar=true/ but getting Javascript errors like Error: loadPopupScript is not defined Error: Error in parsing value for property 'display'. Declaration dropped. Error: jscalendarPopUpCalendarForInputDate is not defined Error: Error in parsing value for property 'width'. Declaration dropped. Parts of my web.xml : (Please not that I have another Filter, does the order in which you define them matter ? ?xml version=1.0? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd web-app display-name/display-name descriptionx/description context-param param-namesaveStateInClient/param-name param-valuefalse/param-value /context-param context-param param-namejavax.faces.application.CONFIG_FILES/param-name param-value/WEB-INF/faces-config.xml/param-value /context-param context-param param-namecom.sun.faces.validateXml/param-name param-valuetrue/param-value /context-param context-param param-nameorg.apache.myfaces.ALLOW_JAVASCRIPT/param-name param-valuetrue/param-value description This parameter tells MyFaces if javascript code should be allowed in the rendered HTML output. If javascript is allowed, command_link anchors will have javascript code that submits the corresponding form. If javascript is not allowed, the state saving info and nested parameters will be added as url parameters. Default: true /description /context-param context-param param-nameorg.apache.myfaces.DETECT_JAVASCRIPT/param-name param-valuefalse/param-value /context-param context-param param-nameorg.apache.myfaces.PRETTY_HTML/param-name param-valuetrue/param-value description If true, rendered HTML code will be formatted, so that it is human readable. i.e. additional line separators and whitespace will be written, that do not influence the HTML code. Default: true /description /context-param !-- Begin - My Faces Extensions -- filter filter-nameMyFacesExtensionsFilter/filter-name filter-classorg.apache.myfaces.component.html.util.ExtensionsFilter/filter-class init-param param-namemaxFileSize/param-name param-value20m/param-value descriptionSet the size limit for uploaded files. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB /description /init-param /filter filter-mapping filter-nameMyFacesExtensionsFilter/filter-name url-pattern/faces/*/url-pattern /filter-mapping filter-mapping filter-nameMyFacesExtensionsFilter/filter-name url-pattern/faces/myFacesExtensionResource/*/url-pattern /filter-mapping !-- End - My Faces Extensions -- filter filter-nameAuthenticationFilter/filter-name filter-classcom.xxx.AuthenticationFilter/filter-class /filter filter-mapping filter-nameAuthenticationFilter/filter-name url-pattern*.do/url-pattern /filter-mapping servlet servlet-nameTiles Servlet/servlet-name servlet-classorg.apache.struts.tiles.TilesServlet/servlet-class init-param param-namedefinitions-config/param-name param-value/WEB-INF/tiles.xml/param-value /init-param load-on-startup2/load-on-startup /servlet !-- Faces Servlet -- servlet servlet-nameFaces Servlet/servlet-name servlet-classjavax.faces.webapp.FacesServlet/servlet-class load-on-startup1/load-on-startup /servlet !-- Faces Servlet Mapping -- servlet-mapping servlet-nameFaces Servlet/servlet-name url-pattern*.do/url-pattern /servlet-mapping !-- add a welcome-file-list to ensure our index page goes through the Face Servlet as well! -- welcome-file-list welcome-file welcome.do/welcome-file /welcome-file-list error-page exception-typejava.lang.Throwable/exception-type location/errorPage.jsp/location /error-page error-page error-code500/error-code location/errorPage.jsp/location /error-page session-config session-timeout30/session-timeout /session-config taglib taglib-uri http://corejsf.com/pager/taglib-uri taglib-location/WEB-INF/pager.tld/taglib-location /taglib taglib taglib-uri http://corejsf.com/pager/taglib-uri taglib-location/WEB-INF/pager.tld/taglib-location /taglib /web-app
myfaces + ajax question
Hi all, The refresh has always been a big problem for web app design. In my JSF program, I was trying to use ajaxanywhere to slove that problem. But unfortunately ajaxanywhere does not work quite well with JSF, especially with tree2 component of myfaces. So I decided to use the simplest way of ajax (dom tree + _javascript_ +servlet). Now I have a question, how to add options to h:SelectOneMenu component by using _javascript_ and DOM tree? Thank you! YM
probs with dataScroller and CommandSortHeader working together
I put preserveDataModel = true and then click on next page on scroller, I get an error message java.lang.ClassCastException: javax.faces.model.ListDataModel org.apache.myfaces.component.html.ext.HtmlDataTable.updateModelFromPreservedDataModel(HtmlDataTable.java:254) org.apache.myfaces.component.html.ext.HtmlDataTable.processUpdates (HtmlDataTable.java:240) javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:935) javax.faces.component.UIForm.processUpdates(UIForm.java:196) javax.faces.component.UIComponentBase.processUpdates (UIComponentBase.java:935) javax.faces.component.UIViewRoot.processUpdates(UIViewRoot.java:363) com.sun.faces.lifecycle.UpdateModelValuesPhase.execute(UpdateModelValuesPhase.java:81) com.sun.faces.lifecycle.LifecycleImpl.phase (LifecycleImpl.java:200) com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)My bean has the scrollerActionEvent and it extends SortableList.When I make preserveDataModel= false at least the scroller works, however when I click on sortable column, id goes to the back page.Can someone please shed some light on making these two componenets work together?If you have an example could you please share it?I am pulling data only from a List. - Anu I have a jsp code for t:dataTable as t:dataTable id=data styleClass=scrollerTable headerClass=standardTable_Header footerClass=standardTable_Header rowClasses=standardTable_Row1,standardTable_Row2 columnClasses=col1,col2,col3 var=pr value=#{projectColBean.projects} sortColumn=#{projectColBean.sort} sortAscending=#{projectColBean.ascending} preserveDataModel=true preserveSort=true rows=10 border=1 h:column f:facet name=header t:commandSortHeader columnName=name arrow=true h:outputText value=name / /t:commandSortHeader /f:facet h:outputText value=#{pr.name} / /h:column
Re: formatted values in param
Or use c:set to store it into a bean. Andrew Robinson wrote: If you are using facelets, you could use an EL function to format the value On 2/9/06, Peter Maas [EMAIL PROTECTED] wrote: Hi all, I wondered how to store formatted values in a parameter. Say I would like to set a formatted date as a message property... Something like this: //---// h:outputFormat value=#{messages['searchresults.lastModified']} f:param value=#{searchObject.lastModified} f:convertDateTime pattern=d MMM locale=nl_NL / /f:param /h:outputFormat //---// this doesn't work since the param tag doesn't allow body content... and it doesn't seem to have support for using converters Is it possible to temporarely store the results of a conversion into a reusable variable? -P
expired session or new session?
I like to display a message to user saying "Session Expired" when a session expires. After a session expired, everything in session scope are gone. So my question actually becomes:How to tell the difference between "Expired Session" and new session?Thanks! Brings words and photos together (easily) with PhotoMail - it's free and works with Yahoo! Mail.
RE: expired session or new session?
Dave, There are multiple ways provided by the Servlet API which will tell you whether the current session is valid (is not expired). The HttpServletRequest has a method called isRequestedSessionIdValid() (http://java.sun.com/j2ee/1.4/docs/api/index.html). A false return from this method indicates that the request is associated with an expired session. You can also query the HttpSession object by calling the isNew() method which will tell you whether you have a new session as opposed to an expired session. Hope this helps, Swarn From: Dave [mailto:[EMAIL PROTECTED] Sent: Thursday, February 09, 2006 9:49 PMTo: users@myfaces.apache.orgSubject: expired session or new session? I like to display a message to user saying "Session Expired" when a session expires. After a session expired, everything in session scope are gone. So my question actually becomes: How to tell the difference between "Expired Session" and new session? Thanks! Brings words and photos together (easily) withPhotoMail - it's free and works with Yahoo! Mail.
Re: MyFaces + Weblogic = Classloading Problems
Have you tried to setup your context-listener in the web.xml directly? regards, Martin On 2/9/06, Adam Brod [EMAIL PROTECTED] wrote: Hi- I am running into a problem with Classloading with MyFaces 1.1.1 on Weblogic 9. Weblogic allows you to deploy your webapp in an exploded directory format. That means that you can modify a JSP (or Facelet xhtml) and copy it to the deployment directory to be automatically redeployed. This functionality works fine in the old Struts/JSP world. Now that I'm using MyFaces, I'm running into problems with the FactoryFinder. As I understand it, FacesServlet or FactoryFinder stores the Factories based on the current classloader. When Weblogic redeploys a JSP, it drops the current ClassLoader and creates a new one. That means that the next time I hit a JSF page, I get an IllegalStateException (see full stack trace below). I looked at the code in FacesServlet and I see this comment, //TODO: null-check for Weblogic, that tries to initialize Servlet before ContextListener. Obviously I'm not the first to run into this problem. I browsed the source of the trunk online and I see the same code is still there. Does anybody have a fix for this? Is there any work around other than doing a full redeploy for each JSP modification? Thanks for your help. Adam java.lang.IllegalStateException: No Factories configured for this Application - typically this is because a context listener is not setup in your web.xml. A typical config looks like this; listener listener-classorg.apache.myfaces.webapp.StartupServletContextListener/listener-class /listener at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:84) at javax.faces.webapp.FacesServlet.init(FacesServlet.java:84) at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:265) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:61) at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58) at weblogic.servlet.internal.StubLifecycleHelper.(StubLifecycleHelper.java:48) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:502) at weblogic.servlet.internal.ServletStubImpl.checkForReload(ServletStubImpl.java:429) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:221) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:165) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3022) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1925) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1848) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1288) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207) at weblogic.work.ExecuteThread.run(ExecuteThread.java:179) Adam Brod Product Development Team -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces