Re: JWebUnit or Selenium to test JSF applications?
I have used selenium for years and love it! Integrates well with Maven. On Fri, Oct 3, 2008 at 7:38 AM, Rogerio Pereira <[EMAIL PROTECTED]>wrote: > Hi guys! > I would like to know which is the prefered solution to test JSF > applications, someone had evaluated these two solutions? > > -- > Regards, > > Rogério (_rogerio_) > > [Blog: http://faces.eti.br] [Sandbox: http://bmobile.dyndns.org] > [Twitter: http://twitter.com/ararog] > > "Faça a diferença! Ajude o seu país a crescer, não retenha conhecimento, > distribua e aprenda mais." > (http://faces.eti.br/2006/10/30/conhecimento-e-amadurecimento) > -- --- Thank You… Mick Knutson BASE Logic, inc. (415) 354-4215 Website: http://baselogic.com Blog: http://baselogic.com/blog BLiNC Magazine: http://blincmagazine.com Linked IN: http://linkedin.com/in/mickknutson DJ Mick: http://djmick.com MySpace: http://myspace.com/mickknutson Vacation Rental: http://tahoe.baselogic.com
Re: How to connect to a storedProcedure in db2 using Spring and Hibernate Combination
What does this have to do with MyFaces? Should this be posted in the Spring Forum? Or the Hibernate Forum? On Mon, Sep 22, 2008 at 12:17 PM, Nutulapati, Krishna <[EMAIL PROTECTED] > wrote: > Hello All, > Can any of suggest me, how I can call a stored Procedure using spring and > hibernate.The entire Request is getting processed using Spring and > Hibernate. > > Currently the configuration is as follows in web.xml > > > -- --- Thank You… Mick Knutson BASE Logic, inc. (415) 354-4215 Website: http://baselogic.com Blog: http://baselogic.com/blog BLiNC Magazine: http://blincmagazine.com Linked IN: http://linkedin.com/in/mickknutson DJ Mick: http://djmick.com MySpace: http://myspace.com/mickknutson Vacation Rental: http://tahoe.baselogic.com
commandLink navigation issue
I have an issue selecting a row from a dataTable. I have use html, and tomahawk but no luck: ** ** The color in red will submit, but I get an NPE because there is no user selected. The yelow highligh just returns back to the same form itself. Here is my faces-config section: /view/admin/index.xhtml #{userForm.list} /view/admin/listUsers.xhtml /view/admin/listUsers.xhtml #{userForm.prepareForEdit} editProfile /view/member/user.xhtml editProfile /view/member/user.xhtml And my bean meathod debug does not get called: public String prepareForEdit() throws Exception { if (log.isDebugEnabled()) { log.debug("Entering 'prepareForEdit' method"); } user = (User) usersDataModel.getRowData(); -- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.linkedin.com/in/mickknutson http://www.djmick.com http://www.myspace.com/mickknutson http://www.myspace.com/BLiNCMagazine http://tahoe.baselogic.com ---
Re: AW: Tool for testing
Selenium ROCKS. But I have alos used http://www.badboy.com.au for a long time. It can also export jmeter tests. On 7/17/07, Benjamin Björn Bratkus <[EMAIL PROTECTED]> wrote: depends on your focus but you could also try http://www.openqa.org/selenium/ ben > You should try htmlunit. > (http://htmlunit.sourceforge.net/) > As i know there is no recorder available, but there > is no problem with https, forms, etc. > Also any kind of Javascript works fine. > > I tested a german bank portal with excessive > Javascript usage and it did the job. > > > I heard that one of the contributors (I think it was Marc Guillemot) of > the project is working on a > recorder, but I have no idea about the progress. > > Best regards, > > Ralf > > -Ursprüngliche Nachricht- > Von: Peter Dahm [mailto:[EMAIL PROTECTED] > Gesendet: Dienstag, 17. Juli 2007 12:45 > An: users@myfaces.apache.org > Betreff: AW: Tool for testing > > > Hi Alexander, > > i did the same. Unfortunatly the proxy browswer just recorded the url i > confirmed in the url input field. > > All actions out of buttons are not recorded. > > Any idea about this problem ?? > > peter > > > -Ursprüngliche Nachricht- > Von: Jesse Alexander (KSFD 121) [mailto: [EMAIL PROTECTED] > Gesendet: Dienstag, 17. Juli 2007 12:26 > An: MyFaces Discussion > Betreff: RE: Tool for testing > > Hi > > last time I used JMeter with a JSF-app i just used the > proxy-recorder > let the tool do the work for you... > - start the proxy-recorder > - point your browser to use that proxy > - use the app > - let then jmeter execute the recorded script > > > If you want just functional testing: Selenium > > > hth > Alexander > > -Original Message- > From: Peter Dahm [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 17, 2007 11:56 AM > To: users@myfaces.apache.org > Subject: Tool for testing > > Hi, > > who has a recommendation wich testing tool is the best one for testing > an > jsf application. > > Does someone have experiences with Apache jMeter ? Here I have problems > to > build a testplan with parameters and session information. > > Regards > > Peter > > > > > > > Viele Grüße, Benjamin Björn Bratkus -- Orientation in Objects GmbH Weinheimerstr. 68 D-68309 Mannheim http://www.oio.de Tel. +49(0)621-71839-0 Fax +49(0)621-71839-50 Amtsgericht Mannheim HRB 38348 Geschäftsführer: Dirk M. Sohn -- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.djmick.com http://www.myspace.com/mickknutson http://www.myspace.com/djmick_dot_com http://www.myspace.com/sexybeotches http://www.thumpradio.com ---
Re: AW: JSF and Tiles
Have you also looked at facelets instead of tiles? On 4/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi, i did all the Steps described there. Now I have the following problem: › The output is a menue with the entries jsp1 and jsp2. When I click on one of these entries I got an javascript error. An object is needed. Any further idea ??? Peter -Ursprüngliche Nachricht- Von: Hazem Saleh [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 4. April 2007 11:39 An: MyFaces Discussion Betreff: Re: JSF and Tiles Hi, Check this at the wiki http://wiki.apache.org/myfaces/Tiles_and_JSF Have a nice time. Bye. On 4/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi all, > > i have some problems while integrating tiles and jsf. > > Is there any documentation how to integrate the current jsf version with the current tamahwak and tiles version. > > To integrate all like the jsf tiles example is no problem, but if I change to the current version I have several problems. > > Thanks > > Peter > -- Hazem Ahmed Saleh Ahmed IBM Egypt Cairo TDC ( Technology Development Center ) WebSphere Business Integration Modeler Software Engineer http://www.jroller.com/page/HazemBlog -- --- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.djmick.com http://www.myspace.com/mickknutson http://www.myspace.com/djmick_dot_com http://www.myspace.com/sexybeotches http://www.thumpradio.com ---
Re: Oracle ADF faces not working with MyFaces
In a nutshell, ADF doea not play well with others we are finding... It is best to define ID's on everything you can to avoid naming conflicts. Like your page, form and buttons should all have user defined id's. Also, beware of custom javascript you add as the adf filter likes to remove MOST javascript without telling you. >( On 3/13/07, Grange, John <[EMAIL PROTECTED]> wrote: Hi, I'm trying to get oracle ADF faces to work with MyFaces, in a portlet environment using apache portals bridge, but none of my adf components are being rendered. I get the following message in my log files: WARN HtmlRenderKitImpl - Unsupported component-family/renderer-type: oracle.adf.Command/oracle.adf.Button 2007-03-13 14:49:51.293 WARNING Could not find renderer for CoreCommandButton[CommandButtonFacesBean, id=_172_26_82_13_3db76027_1114b717aeb__7ffb_idJsp1], rendererType = oracle.adf.Button Having stepped through the initialisation in a debugger, I can see that the oracle.adf.core renderkit is being set up with the adf components, but it does not appear to be called during the render phase. my faces_config.xml contains the following adf magic: oracle.adf.core oracle.adf.controller.faces.lifecycle.ADFPhaseListener and I seem to have all the relevant filters, etc set up in my web.xml Help, please!!! Regards, John Grange Thales UK Ltd (Wells) DISCLAIMER: The information contained in this e-mail is confidential. It may also be legally privileged. It is intended only for the stated addressee(s) and access to it by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this e-mail. Such unauthorised use may be unlawful. We may monitor all e-mail communications through our networks. If you have received this e-mail in error, please inform us immediately on +44 (0) 1749 672081 and delete it and all copies from your system. We accept no responsibility for changes to any e-mail which occur after it has been sent. Attachments to this e-mail may contain software viruses which could damage your system. We therefore recommend you virus-check all attachments before opening. A business of Thales UK Ltd. Registered Office: 2 Dashwood Lang Road, The Bourne Business Park, Addlestone, Weybridge, Surrey KT15 2NX Registered in England No. 868273 -- --- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com ---
Re: need help editing a row of data.
I also tried this: http://wiki.apache.org/myfaces/ExecutingMethodsFromLinkButtonParameters then I have this method: public String prepareForEdit(){ log.info ("++"); log.info ("++"); log.info ("++"); log.info ("++"); log.info("UserBackingBean.prepareForEdit(String)"); log.info("UserBackingBean.user.username(): " + user.getUsername()); String outcome = Constants.FAILURE; try { user = manager.getUser(user.getUsername()); log.info ("++"); log.info("user.toString(): " + user.toString()); log.info ("++"); outcome = Constants.EDIT; } catch (Exception e) { outcome = Constants.FAILURE; FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(e.getMessage())); e.printStackTrace(); return(null); } return outcome; } but then when I get redirected to the editUser.xhtml page, the form is blank. I even added: as all the mangedBean's are request scope but I can't seem to populate the editUser form with data. On 2/26/07, Simon Kitching <[EMAIL PROTECTED]> wrote: Mick Knutson wrote: > > tmpUserBean prints the row I was expecting, but now I do not know how to > get tmpUserBean in the request and sent back to userDetail.xhtml What do you mean by "sent back to userDetail.xhtml"? Note that the h:commandLink tag can take an actionListener *attribute* as an alternative to using an f:actionListener child. The attribute form is an EL expression, ie can point to a method on your normal backing bean, which I find far more useful than an independent ActionListener class. Regards, Simon -- --- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com ---
Re: need help editing a row of data.
i display a table of users on listUsers.xhtml Then I want to click the username link and open the selected user in that row on editUser.xhtml so I can edit that user. On 2/26/07, Simon Kitching <[EMAIL PROTECTED]> wrote: Mick Knutson wrote: > > tmpUserBean prints the row I was expecting, but now I do not know how to > get tmpUserBean in the request and sent back to userDetail.xhtml What do you mean by "sent back to userDetail.xhtml"? Note that the h:commandLink tag can take an actionListener *attribute* as an alternative to using an f:actionListener child. The attribute form is an EL expression, ie can point to a method on your normal backing bean, which I find far more useful than an independent ActionListener class. Regards, Simon -- --- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com ---
need help editing a row of data.
I have a dataTable that has a list of users: [ ] When I click this link, I get sent to com.baselogic.tro.user.impl.UserActionListener.processAction: public void processAction(ActionEvent anEvent) throws AbortProcessingException { log.info("++"); log.info("processAction(ActionEvent anEvent)"); log.info("++"); User tmpUserBean = null; UIComponent tmpComponent = anEvent.getComponent(); while (null != tmpComponent && !(tmpComponent instanceof UIData)) { log.info ("---while--"); tmpComponent = tmpComponent.getParent(); } if (tmpComponent != null && (tmpComponent instanceof UIData)) { Object tmpRowData = ((UIData) tmpComponent).getRowData(); if (tmpRowData instanceof User) { tmpUserBean = (User) tmpRowData; //TODO Implementation of your method log.info ("++"); log.info("tmpUserBean.toString(): " + tmpUserBean.toString ()); log.info ("++"); } } //TODO Exception Handling if UIData not found or tmpRowBean of wrong type tmpUserBean prints the row I was expecting, but now I do not know how to get tmpUserBean in the request and sent back to userDetail.xhtml -- --- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com ---
Re: t:datatable with commandLink and parameter
Ok, thanks. But now, I have a UserBackingBean.user = manager.getUser(user.getUsername ()); then: outcome = Constants.SUCCESS; But the form does not display any of the user variables. Hence I thought I had to bind those variables which was wrong. You help is greatly appreciated by the way... :-) On 2/23/07, Mike Kienenberger <[EMAIL PROTECTED]> wrote: binding="#{userBackingBean.user.username}" is the cause of this error. It's attempting to assign the HtmlInputText component to the value of username. "binding" is for getting a reference to the component on a page into your backing bean. On 2/23/07, Mick Knutson <[EMAIL PROTECTED]> wrote: > The issue was in my method signature. I needed to have no parameters in the > action. > > > With that completed, there seems to be another issue now. > Caused by: javax.faces.el.EvaluationException: Bean: > com.baselogic.tro.user.User , property: username, newValue: > [EMAIL PROTECTED] > 90c56,newValue class: > javax.faces.component.html.HtmlInputText method parameter > class: java.lang.String > at > org.apache.myfaces.el.PropertyResolverImpl.setProperty > (PropertyResolverImpl.java:414) > at > org.apache.myfaces.el.PropertyResolverImpl.setValue( PropertyResolverImpl.java:176) > at > com.sun.facelets.el.LegacyELContext$LegacyELResolver.setValue( LegacyELContext.java > :201) > at > com.sun.el.parser.AstValue.setValue(AstValue.java:113) > at > com.sun.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:246) > at com.sun.facelets.el.TagValueExpression.setValue( > TagValueExpression.java:93) > at > com.sun.facelets.el.LegacyValueBinding.setValue(LegacyValueBinding.java :68) > ... 67 more > Caused by: java.lang.IllegalArgumentException: argument > type mismatch > at > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java > :25) > at java.lang.reflect.Method.invoke(Method.java:585) > at > org.apache.myfaces.el.PropertyResolverImpl.setProperty( PropertyResolverImpl.java:409) > ... 73 more > > > > My #{userBackingBean.user.username} is a String as it should be as this is > just a POJO > > size="30" > required="true" > id="username" > binding="#{userBackingBean.user.username}" > > > > > > > User.username: > > public String getUsername() { > return username; > > } > > > > > > > > On 2/23/07, Mike Kienenberger <[EMAIL PROTECTED]> wrote: > > Add an id field to make sure it's an error for the t:commandLink you > posted. > > > > is there more stack trace available? I'm guessing it's a problem with > > userBackingBean.prepareForEdit(). > > > > > > > > value="#{user.username}"/> > > > property="#{userBackingBean.user.username > > }" value="#{user.username}"/> > > > > > > > > On 2/23/07, Mick Knutson < [EMAIL PROTECTED]> wrote: > > > I got the form to come up, but when I click the username link, I get > this > > > error: > > > > > > > > > javax.servlet.ServletException: Error calling action method of component > > > with id usersForm:_id2:0:_id5 > > > javax.faces.webapp.FacesServlet.service > > > (FacesServlet.java :154) > > > > org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter( ExtensionsFilter.java:147) > > > > org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java:264) > > > > org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke > > > (FilterSecurityInterceptor.java:107) > > > > org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter( FilterSecurityInterceptor.java:72) > > > > org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter > (FilterChainProxy.java > > > :274) > > > > org.acegisecurity.ui.ExceptionTranslationFilter.doFilter( ExceptionTranslationFilter.java:110) > > > > org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java > :274) > > > > org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.
Re: t:datatable with commandLink and parameter
The issue was in my method signature. I needed to have no parameters in the action. With that completed, there seems to be another issue now. Caused by: javax.faces.el.EvaluationException: Bean: com.baselogic.tro.user.User, property: username, newValue: [EMAIL PROTECTED] 90c56,newValue class: javax.faces.component.html.HtmlInputText method parameter class: java.lang.String at org.apache.myfaces.el.PropertyResolverImpl.setProperty( PropertyResolverImpl.java:414) at org.apache.myfaces.el.PropertyResolverImpl.setValue( PropertyResolverImpl.java:176) at com.sun.facelets.el.LegacyELContext$LegacyELResolver.setValue( LegacyELContext.java:201) at com.sun.el.parser.AstValue.setValue(AstValue.java:113) at com.sun.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java :246) at com.sun.facelets.el.TagValueExpression.setValue( TagValueExpression.java:93) at com.sun.facelets.el.LegacyValueBinding.setValue( LegacyValueBinding.java:68) ... 67 more Caused by: java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.myfaces.el.PropertyResolverImpl.setProperty( PropertyResolverImpl.java:409) ... 73 more My #{userBackingBean.user.username} is a String as it should be as this is just a POJO User.username: public String getUsername() { return username; } On 2/23/07, Mike Kienenberger <[EMAIL PROTECTED]> wrote: Add an id field to make sure it's an error for the t:commandLink you posted. is there more stack trace available? I'm guessing it's a problem with userBackingBean.prepareForEdit(). On 2/23/07, Mick Knutson <[EMAIL PROTECTED]> wrote: > I got the form to come up, but when I click the username link, I get this > error: > > > javax.servlet.ServletException: Error calling action method of component > with id usersForm:_id2:0:_id5 > javax.faces.webapp.FacesServlet.service > (FacesServlet.java :154) > org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter( ExtensionsFilter.java:147) > org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java:264) > org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke > (FilterSecurityInterceptor.java:107) > org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter( FilterSecurityInterceptor.java:72) > org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter ( FilterChainProxy.java > :274) > org.acegisecurity.ui.ExceptionTranslationFilter.doFilter( ExceptionTranslationFilter.java:110) > org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java :274) > org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter > (SecurityContextHolderAwareRequestFilter.java:81) > org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter ( FilterChainProxy.java:274) > org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter > (HttpSessionContextIntegrationFilter.java:229) > org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter ( FilterChainProxy.java:274) > org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java :148) > > org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java :98) > > > > Here is the users.xhtml form: > > >var="user" > preserveDataModel="true" > styleClass="users" > headerClass="usersHeader" > > rowClasses="evenRow, oddRow" > columnClasses="username,name" > border="0" > > > > > > > > > > > > > > > > Here is the faces-config: > > > > > > /views/admin/users.xhtml > > > prepareForEdit > /views/admin/updateUser.xhtml > > > > clear > /views/admin/users.xhtml > > > > > > > > > > > On 2/22/07, Mike Kienenberger < [EMAIL PROTECTED] > wrote: > > You have to include the tag handler java class as well. > > > > > http://wiki.apache.org/myfaces/Use_Facelets_with_Tomahawk#updateActionListener > > > > On 2/22/07, Mick Knutson < [EMAIL PROTECTED]> wrote: > > > I tried to add this to my facelets tag hander like: > > > > > > > > > updateActionListener > > > > > > > org.apache.myfaces.cu
Re: t:datatable with commandLink and parameter
I got the form to come up, but when I click the username link, I get this error: javax.servlet.ServletException: Error calling action method of component with id usersForm:_id2:0:_id5 javax.faces.webapp.FacesServlet.service(FacesServlet.java:154) org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147) org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264) org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110) org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81) org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229) org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148) org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98) Here is the users.xhtml form: Here is the faces-config: /views/admin/users.xhtml prepareForEdit /views/admin/updateUser.xhtml clear /views/admin/users.xhtml On 2/22/07, Mike Kienenberger <[EMAIL PROTECTED]> wrote: You have to include the tag handler java class as well. http://wiki.apache.org/myfaces/Use_Facelets_with_Tomahawk#updateActionListener On 2/22/07, Mick Knutson <[EMAIL PROTECTED]> wrote: > I tried to add this to my facelets tag hander like: > > > updateActionListener > > org.apache.myfaces.custom.updateactionlistener.UpdateActionListener > > > > > > > and I tried: > > > updateActionListener > > org.apache.myfaces.custom.updateactionlistener.UpdateActionListenerTag > > > > > > > > but still get this error: > > > > 15:25:46,696 ERROR [STDERR] Feb 22, 2007 3:25:46 PM > com.sun.facelets.FaceletViewHandler initializeCompiler > SEVERE: Error Loading Library: > /WEB-INF/facelets/tags/tomahawk.taglib.xml > java.io.IOException: Error parsing > [jndi:/localhost/tro/WEB-INF/facelets/tags/tomahawk.taglib.xml]: > at > com.sun.facelets.compiler.TagLibraryConfig.create > (TagLibraryConfig.java:396) > at > com.sun.facelets.FaceletViewHandler.initializeCompiler( FaceletViewHandler.java:281) > at > com.sun.facelets.FaceletViewHandler.initialize(FaceletViewHandler.java :184) > at > com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java :421) > at > org.apache.myfaces.lifecycle.RenderResponseExecutor.execute( RenderResponseExecutor.java:41) > at > org.apache.myfaces.lifecycle.LifecycleImpl.render > (LifecycleImpl.java:132) > at > javax.faces.webapp.FacesServlet.service(FacesServlet.java:140) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:252) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:173) > at > org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java:264) > at > org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke > (FilterSecurityInterceptor.java:107) > at > org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter( FilterSecurityInterceptor.java:72) > at > org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter > (FilterChainProxy.java:274) > at > org.acegisecurity.ui.ExceptionTranslationFilter.doFilter( ExceptionTranslationFilter.java:110) > at > org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java > :274) > at > org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter (SecurityContextHolderAwareRequestFilter.java:81) > at > org.acegi
Re: myfaces and acegi problem
Opps. In my logon.xhtml, here is where the controller is called: On 2/23/07, Mick Knutson <[EMAIL PROTECTED]> wrote: To be honest, I am not sure how part of this works, it just works. I have this in my faces-config: authenticationController com.baselogic.tro.security.AuthenticationController request authenticationManager #{authenticationManager} But there is not a call as in the directions http://www.javakaffee.de/blog/2006/07/04/jsfacegi-authentication-with-a-backing-bean/ for something like: which as you can see, I have commented out. Did you try this with the correct schema? If you don't care that there can only be 1 target uri, then this works great. On 2/23/07, Brad Smith <[EMAIL PROTECTED]> wrote: > > Thanks Mick. Am I reading this configuration correctly in that you do > not use the authenticationProcessingFilter bean? I also do not see where > the custom authenticationController bean is being called. > > Brad > > > On Thu, 2007-02-22 at 11:49 -0800, Mick Knutson wrote: > > I created my own logon.xhtml (facelets) and used this as my acegi > > context: > > > > > > > " http://www.springframework.org/dtd/spring-beans-2.0.dtd";> > > > > > > > > > > > > > > CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON > > PATTERN_TYPE_APACHE_ANT > > > /**=httpSessionContextIntegrationFilter,securityRequestFilter,exceptionTranslationFilter,filterSecurityInterceptor > > > > > > > > > > > > class="com.baselogic.tro.security.AuthenticationController " > > scope="session"> > > > > > > > > > > > > > class="org.acegisecurity.providers.ProviderManager "> > > > > > > > > > > > > > > > > > > > class="org.acegisecurity.providers.dao.DaoAuthenticationProvider"> > > > > > > > > > > > class="org.acegisecurity.userdetails.jdbc.JdbcDaoImpl "> > > > > > > > > > > > > SELECT username,password,account_enabled FROM user > > WHERE username = ? > > > > > > > > > > select u.username, r.role_name > > from user u, role r, user_role ur > > where u.username=? > > and u.username = ur.username > > and ur.role_name = r.role_name > > > > > > > > > > > > > > > > > > > class="org.acegisecurity.context.HttpSessionContextIntegrationFilter"> > > > > > > org.acegisecurity.context.SecurityContextImpl > > > > > > > > > class=" > org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter "/> > > > > > class="org.acegisecurity.ui.ExceptionTranslationFilter"> > > > > > > > > /views/common/logon.jsf > > > > > > false > > > > > > > > > > > class="org.acegisecurity.ui.AccessDeniedHandlerImpl"> > > > > /views/common/error.jsf > > > > > > > > > > > > > > > class="org.acegisecurity.intercept.web.FilterSecurityInterceptor"> > > > > > > > > > > > > > > > > > > > class=" org.acegisecurity.vote.RoleVoter"> > > > > > > > > > > > > > > > > > > > > > > > > >
Re: myfaces and acegi problem
To be honest, I am not sure how part of this works, it just works. I have this in my faces-config: authenticationController com.baselogic.tro.security.AuthenticationController request authenticationManager #{authenticationManager} But there is not a call as in the directions http://www.javakaffee.de/blog/2006/07/04/jsfacegi-authentication-with-a-backing-bean/for something like: which as you can see, I have commented out. Did you try this with the correct schema? If you don't care that there can only be 1 target uri, then this works great. On 2/23/07, Brad Smith <[EMAIL PROTECTED]> wrote: Thanks Mick. Am I reading this configuration correctly in that you do not use the authenticationProcessingFilter bean? I also do not see where the custom authenticationController bean is being called. Brad On Thu, 2007-02-22 at 11:49 -0800, Mick Knutson wrote: > I created my own logon.xhtml (facelets) and used this as my acegi > context: > > > " http://www.springframework.org/dtd/spring-beans-2.0.dtd";> > > > > > > > CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON > PATTERN_TYPE_APACHE_ANT > /**=httpSessionContextIntegrationFilter,securityRequestFilter,exceptionTranslationFilter,filterSecurityInterceptor > > > > >class="com.baselogic.tro.security.AuthenticationController" > scope="session"> > > > > > >class="org.acegisecurity.providers.ProviderManager "> > > > > > > > > > class="org.acegisecurity.providers.dao.DaoAuthenticationProvider"> > > > > > class="org.acegisecurity.userdetails.jdbc.JdbcDaoImpl "> > > > > > > SELECT username,password,account_enabled FROM user > WHERE username = ? > > > > > select u.username, r.role_name > from user u, role r, user_role ur > where u.username=? > and u.username = ur.username > and ur.role_name = r.role_name > > > > > > > > > class="org.acegisecurity.context.HttpSessionContextIntegrationFilter"> > > > org.acegisecurity.context.SecurityContextImpl > > > > class="org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter"/> > > class="org.acegisecurity.ui.ExceptionTranslationFilter"> > > > > /views/common/logon.jsf > > > false > > > > > class="org.acegisecurity.ui.AccessDeniedHandlerImpl"> > > /views/common/error.jsf > > > > > > > class="org.acegisecurity.intercept.web.FilterSecurityInterceptor"> > > > > > > > > > class="org.acegisecurity.vote.RoleVoter"> > > > > > > > > > > > > > > CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON > PATTERN_TYPE_APACHE_ANT > /pages/**=IS_AUTHENTICATED_FULLY > /pages/company/**=/permissions/permission1 > /**/admin/**=ROLE_ADMINISTRATOR > /**/secure/**=ROLE_USER > > > > > > > class="org.acegisecurity.providers.encoding.Md5PasswordEncoder"/> > > > > > > > > I also had to ensure this was my web.xml mapping: > > > Acegi Filter Chain Proxy > > org.acegisecurity.util.FilterToBeanProxy > > > targetBean > acegiFilterChainProxy > > > > > -- --- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com ---
Re: Navigation issue with acegi/jsf
I went through that for DAY. And I finally got what I posted here to work. I could not get the example to work. But, if I read the example correctly, there does not seem to be a way to use the requested uri to direct the user to. Such as the issue I have. I have successfully integrated jsf and acegi, but not where there are multiple target uri's only a singe uri. On 2/22/07, Cristi Toth <[EMAIL PROTECTED]> wrote: Hi, It is possible to use Acegi without any custom NavigationHandler The most simple way to use it is described here: http://www.javakaffee.de/blog/2006/07/04/jsfacegi-authentication-with-a-backing-bean/ On 2/22/07, Mick Knutson <[EMAIL PROTECTED]> wrote: > > Can you please send it to me? I would love to have it. > > > On 2/22/07, Ricardo Tercero Lozano <[EMAIL PROTECTED] > wrote: > > > > > > Hi, I faced this problem time ago. > > > > From my knowledge acegi is not compatible (or it is not prepared to > > work to) with JSF navigation system. Acegi works with filters that do the > > security access job (using FilterToBeanProxy to delegate to a Spring bean). > > > > I created a custom NavigationHandler to solve the problem. This custom > > navigation hander checks the new URL against security constrains. I think > > it's the only way to do this, because navigation occurs inside the server > > and inside the Faces servlet. > > > > Ricardo. > > > > > > > > On 2/22/07, Mick Knutson < [EMAIL PROTECTED] > wrote: > > > > > > I have the following rule: > > > > > > > > > > > > Logon Navigation > > > Logon functions... > > > /views/common/logon.xhtml > > > > > > > > > success > > > /views/secure/index.xhtml > > > > > > > > > > > > failure > > > /views/secure/index.xhtml > > > > > > > > > > > > > > > My issue is that I want to have any request, keep the requested > > > to-view-id > > > > > > For example. If I click /views/secure/index.jsf, I expect to go to > > > my logon.xhtml page, then to /views/secure/index.xhtml > > > > > > If I logout, then click /views/admin/admin.jsf I expect to go to my > > > logon.xhmtl page, then to /views/admin/admin.xhtml > > > > > > Right now, no matter what the request (like admin.jsf), I keep > > > getting sent to secured/index.xhtml > > > > > > -- > > > --- > > > Thanks, > > > Mick Knutson > > > > > > http://www.baselogic.com > > > http://www.blincmagazine.com > > > http://www.djmick.com > > > http://www.myspace.com/djmick_dot_com > > > http://www.thumpradio.com > > > --- > > > > > > > > > -- > --- > Thanks, > Mick Knutson > > http://www.baselogic.com > http://www.blincmagazine.com > http://www.djmick.com > http://www.myspace.com/djmick_dot_com > http://www.thumpradio.com > --- > -- --- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com ---
Re: t:datatable with commandLink and parameter
org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke( ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke( StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service( CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process( Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection (Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket( PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run( MasterSlaveWorkerThread.java:112) at java.lang.Thread.run(Thread.java:595) Caused by: org.xml.sax.SAXException: Error Handling [ jndi:/localhost/tro/WEB-INF/facelets/tags/[EMAIL PROTECTED],107] at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.endElement( TagLibraryConfig.java:258) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.endNamespaceScope(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(Unknown Source) at com.sun.facelets.compiler.TagLibraryConfig.create( TagLibraryConfig.java:393) ... 53 more Caused by: java.lang.Exception: org.apache.myfaces.custom.updateactionlistener.UpdateActionListener must be an instance of com.sun.facelets.tag.TagHandler at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.createClass( TagLibraryConfig.java:280) at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.endElement( TagLibraryConfig.java:205) ... 68 more On 2/22/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote: I recommend t:updateActionListener. See [1] [1] http://wiki.apache.org/myfaces/ExecutingMethodsFromLinkButtonParameters Regards, Jeff Bischoff Kenneth L Kurz & Associates, Inc. Mick Knutson wrote: > I have the following: > > onclick="open_alert();"> > > > > > But I need the command to be the action to be something like > userByUsername?username=#{user.username} to fire an event for my navigation > rule "userByUsername" and sending a parameter of the username for each row > as #{user.username} > -- --- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com ---
t:datatable with commandLink and parameter
I have the following: But I need the command to be the action to be something like userByUsername?username=#{user.username} to fire an event for my navigation rule "userByUsername" and sending a parameter of the username for each row as #{user.username} -- --- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com ---
Re: myfaces and acegi problem
I created my own logon.xhtml (facelets) and used this as my acegi context: http://www.springframework.org/dtd/spring-beans-2.0.dtd";> CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON PATTERN_TYPE_APACHE_ANT /**=httpSessionContextIntegrationFilter,securityRequestFilter,exceptionTranslationFilter,filterSecurityInterceptor SELECT username,password,account_enabled FROM user WHERE username = ? select u.username, r.role_name from user u, role r, user_role ur where u.username=? and u.username = ur.username and ur.role_name = r.role_name org.acegisecurity.context.SecurityContextImpl /views/common/logon.jsf false /views/common/error.jsf CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON PATTERN_TYPE_APACHE_ANT /pages/**=IS_AUTHENTICATED_FULLY /pages/company/**=/permissions/permission1 /**/admin/**=ROLE_ADMINISTRATOR /**/secure/**=ROLE_USER I also had to ensure this was my web.xml mapping: Acegi Filter Chain Proxy org.acegisecurity.util.FilterToBeanProxy targetBean acegiFilterChainProxy On 2/22/07, Brad Smith <[EMAIL PROTECTED]> wrote: Hello - I have been trying to integrate acegi security (w/ Spring) and JSF as described on the myfaces wiki page: http://wiki.apache.org/myfaces/JSF_and_Acegi The error I get is from tomcat is: "The requested resource (/pmmWeb/j_acegi_security_check.html) is not available." where pmmWeb is the web application context. I do have /j_acegi_security_check.jsp in the faces-config.xml file and in the application context file for acegi. This application uses facelets as well. Has anyone used the process described on the wiki page successfully with facelets? Thanks, Brad Smith -- --- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com ---
Re: Navigation issue with acegi/jsf
Can you please send it to me? I would love to have it. On 2/22/07, Ricardo Tercero Lozano <[EMAIL PROTECTED]> wrote: Hi, I faced this problem time ago. From my knowledge acegi is not compatible (or it is not prepared to work to) with JSF navigation system. Acegi works with filters that do the security access job (using FilterToBeanProxy to delegate to a Spring bean). I created a custom NavigationHandler to solve the problem. This custom navigation hander checks the new URL against security constrains. I think it's the only way to do this, because navigation occurs inside the server and inside the Faces servlet. Ricardo. On 2/22/07, Mick Knutson <[EMAIL PROTECTED]> wrote: > > I have the following rule: > > > > Logon Navigation > Logon functions... > /views/common/logon.xhtml > > > success > /views/secure/index.xhtml > > > > failure > /views/secure/index.xhtml > > > > > My issue is that I want to have any request, keep the requested > to-view-id > > For example. If I click /views/secure/index.jsf, I expect to go to my > logon.xhtml page, then to /views/secure/index.xhtml > > If I logout, then click /views/admin/admin.jsf I expect to go to my > logon.xhmtl page, then to /views/admin/admin.xhtml > > Right now, no matter what the request (like admin.jsf), I keep getting > sent to secured/index.xhtml > > -- > --- > Thanks, > Mick Knutson > > http://www.baselogic.com > http://www.blincmagazine.com > http://www.djmick.com > http://www.myspace.com/djmick_dot_com > http://www.thumpradio.com > --- -- --- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com ---
Navigation issue with acegi/jsf
I have the following rule: Logon Navigation Logon functions... /views/common/logon.xhtml success /views/secure/index.xhtml failure /views/secure/index.xhtml My issue is that I want to have any request, keep the requested to-view-id For example. If I click /views/secure/index.jsf, I expect to go to my logon.xhtml page, then to /views/secure/index.xhtml If I logout, then click /views/admin/admin.jsf I expect to go to my logon.xhmtl page, then to /views/admin/admin.xhtml Right now, no matter what the request (like admin.jsf), I keep getting sent to secured/index.xhtml -- --- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com ---
Re: How to call a backing bean method from javascript?
You can use DWR On 2/15/07, Thomas Chang <[EMAIL PROTECTED]> wrote: Assumed I will simulate calling a backing bean function in http://us.rd.yahoo.com/evt=41052/*http://de.360.yahoo.com/>. -- --- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com ---
facelets components
ecurityAssociationValve.invoke( SecurityAssociationValve.java:175) at org.jboss.web.tomcat.security.JaccContextValve.invoke( JaccContextValve.java:74) at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke( ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke( StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service( CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process( Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection (Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket( PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run( MasterSlaveWorkerThread.java:112) at java.lang.Thread.run(Thread.java:595) Caused by: javax.faces.el.PropertyNotFoundException: /WEB-INF/facelets/tags/user.xhtml @46,36 value="#{ userBackingBean.user.username}": Bean: com.sun.facel ets.tag.ui.ComponentRef, property: user at com.sun.facelets.el.LegacyValueBinding.getValue( LegacyValueBinding.java:58) at javax.faces.component.UIOutput.getValue(UIOutput.java:80) at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue( RendererUtils.java:222) ... 46 more 13:11:17,676 ERROR [STDERR] Feb 9, 2007 1:11:17 PM com.sun.facelets.FaceletViewHandler handleRenderException When the userForm is inside the registration.xhtml, it works fine -- --- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com ---
Re: Prevent MyFaces to autogen _idxx
You need to have your page and your form define an id then it will be "my_page:my_form:my_textfield" I use only the form myself like this: then an input field is generated like: On 2/9/07, Andrew Robinson <[EMAIL PROTECTED]> wrote: Make sure that you don't have any naming containers that don't have an ID assigned. "_id\d{1,}" patterns are generated for all components that aren't given an ID in the xhtml/jsp files. On 2/9/07, Steve Torrefranca <[EMAIL PROTECTED]> wrote: > How do we prevent MyFaces(tomahawk 1.1.5-SNAP) from adding a _idXX in > between the form name and field id? > > Like this: > action="#{spendReportingBean.generateReport}" /> > > Will render: > > type="submit" value="Submit" onclick="if(typeof window.clearFormHiddenParams__formPage! > ='undefined'){clearFormHiddenParams__formPage('_formPage');}if(typeof window.getScrolling! > ='undefined'){oamSetHiddenInput('_formPage','autoScroll',getScrolling());}" /> > > Thank you > > -- Steve > -- --- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com ---
is there a selectOneState or something in tomahawk?
is there a selectOneState or something in tomahawk? -- --- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com ---
Re: Best Practices for JSF-Spring-Hibernate
Not sure if this is best practice, but I create a Spring Managed DAO so I do not have to put that code into my Manager. Other than that, I do the same as you have described. On 2/8/07, bansi <[EMAIL PROTECTED]> wrote: I have developed simple CRUD application using JSF, Facelets, Ajax4JSF, Spring & Hibernate based on Appfuse/Equinox framework. After making the application to work successfully i am wondering whether i have used the best practices. Here is an example " Is it recommended to instantiate Model object in Backing bean" To elaborate the statement . I have the following UserForm is a JSF managed bean, User is a hibernate mapped POJO, and UserManager is manager class in Spring UserForm.java (Backing Bean) public class UserForm { . . public User user = new User(); public UserManager mgr; . . // Getter & Setter methods for user & mgr //Persistence public String save() { mgr.saveUser(getUser()); addMessage("user.saved", getUser().getFullName()); return "success"; } } I undertand the purpose of having UserManager defined in backing bean but wondering why do we need to have Model (i.e. User) defined in backing bean . Is this a best practice? Is it recommended to populate model object with data in the backing bean and then call for business methods like mgr.saveUser(getUser() I am wondering about perfomance issues i.e. making DB calls from backing bean getters or setters. DB calls can mean a performance hit, and JSF will call the getters and setters multiple times per page request (which means you'll be doing multiple DB calls). Regards Bansi -- View this message in context: http://www.nabble.com/Best-Practices-for-JSF-Spring-Hibernate-tf3194706.html#a8870101 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- --- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com ---
return pdf from database blob?
I want to have a table of pdf documents in my database that I want to return to my web users. Is there an example of having a MyFaces jsp return pdf document verse html? -- --- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com ---
Re: /faces/* servlet mapping and welcome files
Did you try to reference /faces/myfile.jsp as I think the facelets filter will convert the reference to the correct xhtml file On 2/2/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote: What do you redirect to? /faces/myfile.xhtml? Actually I can't get this working either. I've discovered that "blank page" coming up is actually my index.faces dummy file! When I view the source, I see the comment I wrote in there. So why would it be going there when I commented out the extension mapping? Does JBoss treats commented-out items in web.xml as if they are not commented? Some relevent parts of web.xml: javax.faces.DEFAULT_SUFFIX .jsp facelets.VIEW_MAPPINGS *.xhtml Faces Servlet javax.faces.webapp.FacesServlet 1 Faces Servlet /faces/* pages/public/index.jsp /pages/public/ contains index.xhtml, index.jsp, and index.faces. For some reason, index.faces is being served to the client. Any ideas? Regards, Jeff Bischoff Kenneth L Kurz & Associates, Inc. Romanowski, Tim wrote: > Not sure if this fits your needs, but I've accomplished this by using a > dummy jsp page that redirects to my 'real' index.xhtml file. Index.jspas > well as index.xhtml are in my root web directory. > > > > index.jsp > > > > > Tim > > > -Original Message- > From: Jeff Bischoff [mailto:[EMAIL PROTECTED] > Sent: Friday, February 02, 2007 1:02 PM > To: MyFaces Discussion > Subject: /faces/* servlet mapping and welcome files > > Hey guys, quick question: > > Does anyone have welcome files working successfully with the /faces/* > servlet mapping? I previously used a *.faces extension mapping, and had > welcome files working with a dummy index.faces file. But now I am > converting to facelets and followed the advice from the archives to get > them to coexist [1]. Now that I'm using /faces/* I have both facelets > and JSP working just fine together except my welcome-file doesn't work > (results in a blank page shown). I've tried different paths combinations > in the welcome-file-list, with no luck so far. Latest entry is pasted > below. Thanks for any tips! > > > > faces/pages/public/index.xhtml > > > [1] http://www.nabble.com/Facelets-tf2005321.html#a5509212 > > Regards, > > Jeff Bischoff > Kenneth L Kurz & Associates, Inc. > > -- --- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com ---
Re: Doesn't Oracle 10g application Server Support MyFaces 1.1.3 ???
It sounds like Tomcat has commons-digester, but Oracle does not... org.apache.commons.digester.Digester.getXMLReader(Digester.java:891) Try including it in your war/ear On 1/30/07, bansi <[EMAIL PROTECTED]> wrote: I have a web application developed using Facelets 1.1.12, Ajax4Jsf 1.0.4 which works absolutely fine on Tomcat 5.5.17 but when i deploy the same web application onto Oracle 10g Application Server version 10.1.3 it throws Null Pointer Exception Here is the stack trace 07/01/30 14:52:31 log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). 07/01/30 14:52:31 log4j:WARN Please initialize the log4j system properly. 07/01/30 14:52:34 java.lang.NullPointerException 07/01/30 14:52:34 at org.apache.commons.digester.Digester.getXMLReader(Digester.java:891) 07/01/30 14:52:34 at org.apache.commons.digester.Digester.parse(Digester.java:1572) 07/01/30 14:52:34 at org.apache.myfaces.config.impl.digester.DigesterFacesConfigUnmarshallerImpl.getF acesConfig(DigesterFacesConfigUnm arshallerImpl.java:183) 07/01/30 14:52:34 at 2007-01-30 16:43:40,680 ERROR [org.apache.myfaces.webapp.StartupServletContextListener] - java.lang.NullPointerException at org.apache.commons.digester.Digester.getXMLReader(Digester.java:891) at org.apache.commons.digester.Digester.parse(Digester.java:1572) at org.apache.myfaces.config.impl.digester.DigesterFacesConfigUnmarshallerImpl.getF acesConfig(DigesterFacesConfigUnmarshallerImpl.java:183) at org.apache.myfaces.config.FacesConfigurator.feedStandardConfig (FacesConfigurator .java:152) at org.apache.myfaces.config.FacesConfigurator.configure( FacesConfigurator.java:126 ) at org.apache.myfaces.webapp.StartupServletContextListener.initFaces (StartupServlet ContextListener.java:69) -- View this message in context: http://www.nabble.com/Doesn%27t-Oracle-10g-application-Server-Support-MyFaces-1.1.3-tf3146181.html#a8721743 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- --- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com ---
Re: Consultant Developers needed for JSF
Sorry, my bad. It looked like it was sent directly to me. And I get heaps of recruiters scraping emails from my Dice account and putting me on their hot list without my permission. On 1/25/07, Jeff Bischoff <[EMAIL PROTECTED]> wrote: Simon Kitching wrote: > I don't see any problem with Samir's email. This is where JSF people > hang out, and I'm sure we all want jobs (though this one is about 10,000 > kms too far away for me :-). > > If job postings become *too* frequent it might be necessary to move them > to a wiki page or similar but I suggest that problem is dealt with > when(if) it occurs.. > I think these type of postings are fine, though perhaps they should be flagged [OT] or some other prefix... [job] ? > Or maybe Mick thought this was sent direct to him... > I suspect he did. :) > Regards, > > Simon > > Mick Knutson wrote: >> How did you get this email? PLEASE REMOVE THIS EMAIL FROM UNSOLICITED >> CORRESPONDENCE. >> >> >> >> On 1/24/07, *Samir Patel* < [EMAIL PROTECTED] >> <mailto:[EMAIL PROTECTED]>> wrote: >> >> Hello, >> >> Our engineering team was looking to see if we can get some help with >> our Jboss/Hibernate/JSF implementation to build a search marketing >> management software. >> >> We would like a few senior consultants on a full time basis to work >> out of our San Mateo offices. Please send me your resume or a list >> of projects to be considered for this opening. (jobs at SearchForce >> dot com) >> >> If you have anyone else who might be interested, please feel free to >> forward this email to them. >> Regards, >> Samir Patel >> >> President & CEO >> >> SearchForce Inc. >> >> http://www.SearchForce.com > > > -- Thanks DJ MICK (Mick Knutson) http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com
Re: Consultant Developers needed for JSF
How did you get this email? PLEASE REMOVE THIS EMAIL FROM UNSOLICITED CORRESPONDENCE. On 1/24/07, Samir Patel <[EMAIL PROTECTED]> wrote: Hello, Our engineering team was looking to see if we can get some help with our Jboss/Hibernate/JSF implementation to build a search marketing management software. We would like a few senior consultants on a full time basis to work out of our San Mateo offices. Please send me your resume or a list of projects to be considered for this opening. (jobs at SearchForce dot com) If you have anyone else who might be interested, please feel free to forward this email to them. Regards, Samir Patel President & CEO SearchForce Inc. http://www.SearchForce.com<http://exchweb/bin/redir.asp?URL=http://www.searchforce.com/> 510-468-7239 (m) Gtalk: samird -- Thanks DJ MICK (Mick Knutson) http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com
Re: AW: Re: Access to managed bean in JSP
You can also use DWR with JSF and Spring Integration. Works pretty well for me. On 1/23/07, Simon Kitching <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: > > > This imagefile.jsf content works, I have tested it with imagefile. > jsf?filename=C:\temp\chiemgauer.jpg > > > > <% > String filename = request.getParameter("filename"); > image.setFilename(filename); > image.paintImage(); > > %> > > But what still does not work is the commandLink call in the jsf > file. Does this work in JSF? > > > > > > Try this: Note no backslashes in the value (either that or escape them, eg "c:\\temp"). Rather than pass parameters encoded in the url, though, it would probably be more elegant to use to pass the data as a bean property. Regards, Simon -- Thanks DJ MICK (Mick Knutson) http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com
Re: Memory leak
What can you use instead of commons EL? On 1/19/07, Wayne Fay <[EMAIL PROTECTED]> wrote: Sounds like a bug for Apache Commons EL project... but it seems pretty dead. 12 bugs posted since 2003 and only 2 fixed. Realistically, it seems like you'll need to patch the EL code to eliminate this bug, as discussed in that Sun.com bug report. Wayne On 1/19/07, phtan <[EMAIL PROTECTED]> wrote: > Hi, > > We have a memory leak problem when running MyFaces 1.1.3 on Websphere 6.1. We > used a tool provided by IBM call Memory Dump Diagnostic to compare 2 heap dumps > or when we get a core dump due to out of memory. The leak candidate shown by > the tool is almost always the BeanInfoManager in apache commons EL. > > We googled and found similar reported cases albeit with different app server, > see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6390584. > > Have anyone else faced the same issue and any resolution? Any help much > appreciated as our system will go production soon. :-(. > > Thanks! > > Regards, > ph tan > > -- Thanks DJ MICK (Mick Knutson) http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com
[ot] Anyone know of a functional testing tool that can help with malicious attacks?
I want to test my MyFaces application with a barrage of malicious attacks geared to see if there are any vulnerabilities with my app. Are there any tools that have some predefined sets of malicious tests I could use for this? -- Thanks DJ MICK (Mick Knutson) http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com
Re: Anyone get facestrace working?
How does that URL help with facelets? On 1/15/07, yigit darcin <[EMAIL PROTECTED]> wrote: Hi, if you look at http://facestrace.sourceforge.net/main/gettingStarted.html you just need to add taglib to your page: <%@ taglib uri="http://sourceforge.net/projects/facestrace"; prefix="ft"%> do servlet mapping as : Faces Servlet /faces/* and lastly put the facestrace in your form as: and make sure facestrace jar is in your lib folder and nothing more. for the facelets please look at : http://www.jroller.com/page/cagataycivici?entry=facestrace_with_facelets Regards, Yigit. On 1/15/07, Mick Knutson <[EMAIL PROTECTED]> wrote: > > I have also not gotten it to work with facelets. > > > > > > On 1/15/07, Lisa <[EMAIL PROTECTED] > wrote: > > > > > > I came onto a project that has a lot of problems so decided to use > > facestrace > > to see if I could debug some things. > > > > We are using Maven2 so I put the facestrace.jar in our Subversion > > repository. I see that it gets downloaded to > > $home/.m2/repository/myfaces/facestrace/0.8.1_SNAPSHOT/ and that the > > jar is > > there. > > > > I put the tag in an .xhtml file, I put the servlet-mapping in web.xml. > > > > web.xml now looks like this. > > > > > > Faces Servlet > > javax.faces.webapp.FacesServlet > > > > 1 > > > > > > > > > > > > Faces Servlet > > *.jsf > > > > > > > > > > Faces Servlet > > /faces/* > > > > > > Now what? > > > > > > I am accessing my main web application (login page) like so: > > > > http://localhost:8080/jspShare/web/startup/Start.jsf > > > > I put into Start.jsf but do not see anything. What I am > > missing? How is the facestrace info accessed? > > > > Thanks > > > > > > Lisa > > -- > > View this message in context: http://www.nabble.com/Anyone-get-facestrace-working--tf3017036.html#a8378666 > > > > Sent from the MyFaces - Users mailing list archive at Nabble.com<http://nabble.com/> > > . > > > > > > > -- > Thanks > > DJ MICK > > (Mick Knutson) > http://www.djmick.com > http://www.myspace.com/djmick_dot_com > http://www.thumpradio.com -- Thanks DJ MICK (Mick Knutson) http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com
Re: Anyone get facestrace working?
I have also not gotten it to work with facelets. On 1/15/07, Lisa <[EMAIL PROTECTED]> wrote: I came onto a project that has a lot of problems so decided to use facestrace to see if I could debug some things. We are using Maven2 so I put the facestrace.jar in our Subversion repository. I see that it gets downloaded to $home/.m2/repository/myfaces/facestrace/0.8.1_SNAPSHOT/ and that the jar is there. I put the tag in an .xhtml file, I put the servlet-mapping in web.xml. web.xml now looks like this. Faces Servlet javax.faces.webapp.FacesServlet 1 Faces Servlet *.jsf Faces Servlet /faces/* Now what? I am accessing my main web application (login page) like so: http://localhost:8080/jspShare/web/startup/Start.jsf I put into Start.jsf but do not see anything. What I am missing? How is the facestrace info accessed? Thanks Lisa -- View this message in context: http://www.nabble.com/Anyone-get-facestrace-working--tf3017036.html#a8378666 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- Thanks DJ MICK (Mick Knutson) http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com
Re: [ANNOUNCEMENT] Apache Tiles Top Level Project
1. the site seems to not have any html files. Has it been generated yet? 2. Will the new tiles be Struts free/seperated? On 1/15/07, Greg Reddin <[EMAIL PROTECTED]> wrote: The Struts team is pleased to announce that Tiles has been promoted to its own Top Level Project. This move will allow us to stabilize the development of the Tiles 2 framework and push it towards its first final release. The website for the new project has not yet been published so here are the relevant mailing lists. Please direct all future questions and discussion about Apache Tiles to one of the following lists: * Tiles User Discussion <[EMAIL PROTECTED]> * Tiles Development <[EMAIL PROTECTED]> * SVN Commit Notifications < [EMAIL PROTECTED]> * JIRA Issue Tracking Notifications <[EMAIL PROTECTED]> The Tiles JIRA instance is hosted with the Struts project and can be found here: https://issues.apache.org/struts/browse/TILES The project website, when it is ready, will be found here: http://tiles.apache.org/ Please watch the Tiles mailing lists for future developments, which should be happening fairly quickly now. We thank the Struts Project for giving us a place to start and to grow, and we look forward to great things from both projects! Thanks, Apache Tiles PMC PS. I included the lists I'm part of in this message. Please feel free to forward to other appropriate lists. -- Thanks DJ MICK (Mick Knutson) http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com
Where did tomahawk get moved to on ibiblio???
This does not work anymore: org.apache.myfaces.tomahawk tomahawk 1.1.3 compile jar and it is not located: http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/myfaces/tomahawk There is just no tomahawk DIR at all -- Thanks DJ MICK (Mick Knutson) http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com
Re: Jboss and Myfaces problem
Can you post your web.xml? On 12/13/06, Andreas Berger <[EMAIL PROTECTED]> wrote: Do you use facelets? If so, check if you put a tomahawk.taglib.xml (needed by faclets) in your WEB-INF directory. 2006/12/13, Aneesha Govil <[EMAIL PROTECTED]>: > Hi, > > I am migrating my JSF app from Tomcat 5.5.17 to JBoss 4.0.3 SP1. I followed > the instructions at [1] however, before that I was just getting an error for > tomahawk jars as "the absolute uri > http://myfaces.apache.org/tomahawk was not found in web.xml > or jars ...". After following the instructions, it does not even find the > core tlds. > > Do I need to do anything else? I read somewhere about adding some > init-params to web.xml but didn't get which web.xml to put them in. > > Also, if I put the jar files in Manifest.MF instead of putting them in > WEB-INF/lib, it should still work, but it doesn't. > > Any idea what needs to be fixed? Please help, my JSF-application cannot > integrate with the main application if I can't make it work in JBoss. :( > > Thanks, > Aneesha > > [1] > http://wiki.apache.org/myfaces/From_1.1.1_to_1.1.3_with_Jboss > -- Thanks DJ MICK http://www.djmick.com http://www.myspace.com/mickknutson
Re: ENTER key with a single form but multiple actions
I just tested it when I was in an input field, and it does not work. Nothing happends at all. Just like before. On 12/4/06, Simon Kitching <[EMAIL PROTECTED]> wrote: Hi, I expect that the browser is simply invoking a method on the HTML control that currently has the focus. If that HTML control happens to be a submit button then its default behaviour in that situation is to submit the associated form; if the control happens to be a text field then it will have a different effect. This isn't anything to do with JSF. Daniel, are you saying that your proposal works when the user clicks in a text box then presses return, or that it allows the user to press return immediately after the page is rendered (but not after they select a text field or other control)? Regards, Simon Daniel Young wrote: > I use the nasty "1-pixel image" hack, putting it first in the form so > the action I want ("your.action") is the default: > > type="button" tabindex="-1"/> > > That should get you going for now, but if somebody does have A Better > Way, I'd love to hear it… > > > ---- > > *From:* Mick Knutson [mailto:[EMAIL PROTECTED] > *Sent:* Tuesday, 5 December 2006 10:56 AM > *To:* MyFaces Discussion > *Subject:* ENTER key with a single form but multiple actions > > > > I have a form with multiple actions and I want a default action to > happen when I click the enter key. > > Right now, I seem to get the 1st (default) action if I am NOT inside > another component like a text field. But when I am inside another > component, I get nothing submitted and have to manually mouse click the > submit button. > -- Thanks DJ MICK http://www.djmick.com http://www.myspace.com/mickknutson
ENTER key with a single form but multiple actions
I have a form with multiple actions and I want a default action to happen when I click the enter key. Right now, I seem to get the 1st (default) action if I am NOT inside another component like a text field. But when I am inside another component, I get nothing submitted and have to manually mouse click the submit button. -- Thanks DJ MICK http://www.djmick.com http://www.myspace.com/mickknutson
Question about inputText ID attributes
I have dozens of form elements like this: That do not have id's for them. The form is existing and works right now. My question is, what issues should I look for if I want to add ID's to these elements in order to clean up my JSP's? -- Thanks DJ MICK http://www.djmick.com http://www.myspace.com/mickknutson
slightly [ot] ADF scrolling
I want to make a data table area scroll instead of my entire page being scrollable. Is this possible with my data area alone looks like: -- Thanks DJ MICK http://www.djmick.com http://www.myspace.com/mickknutson
Re: acegi, jsf navigation question...
Can anyone help me with this??? On 11/21/06, Mick Knutson <[EMAIL PROTECTED]> wrote: I have a link to my secured area and my admin area, on my home page. When I click on my admin link, I get promoted for a username and password and am authenticated through acegi fine. But after AUTH, I get forwarded to the secured page, not the admin page, or page I originally requested. How can I have acegi just intercept, and then forward to the requested page? faces config: == /views/common/logon.xhtml #{authenticationController.authenticate } success /views/secure/index.jsf Various Administration functions... Admin Utilities /views/admin/index.xhtml users success /views/admin/users.xhtml acegi applicationContext: == /views/common/logon.jsf false /error/error.jsp -- Thanks DJ MICK http://www.djmick.com http://www.myspace.com/mickknutson -- Thanks DJ MICK http://www.djmick.com http://www.myspace.com/mickknutson
can't get t:tabledata to work at all...
I have 2 user objects in a List, then created a ListDataModel out of that list and tried to display the data in a datatable, but the entire table looks like this: Please help me figure out what I am missing... faces config: userBackingBean com.baselogic.tro.user.UserBackingBean session userManager #{userManager} Admin Utilities Various Administration functions... /views/admin/index.xhtml users /views/admin/users.xhtml users.jsp = here is my UserBackingBean: == public ListDataModel getAllUsers() { log.info("UserBackingBean.getAllUsers()"); List userList = new ArrayList(); try { userList = userManager.getUsers(new User()); log.info ("+++"); log.info("userList: " + userList.size()); log.info("userList.toString(): " + userList.toString()); log.info ("+++"); //outcome = "success"; } catch (Exception e) { //outcome = "failure"; FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(e.getMessage())); e.printStackTrace(); } return new ListDataModel(userList); } here is my trace showing the 2 users I get back: 11:42:11,765 INFO [STDOUT] 11:42:11,765 INFO [UserBackingBean] +++ 11:42:11,765 INFO [STDOUT] 11:42:11,765 INFO [UserBackingBean] userList: 2 11:42:11,765 INFO [STDOUT] 11:42:11,765 INFO [UserBackingBean] userList.toString(): [EMAIL PROTECTED] [username=mknutson,password= password,roles=[],accountExpired=false,accountLocked=false,credentialsExpired=false,enabled=false,confirmPassword=,firstName=Mick,email=mknutson@ baselogic.com,lastName=Knutson,address=2875-F Northtowne Lane,address2=#374,city=Reno,state=NV,otherState=,postalCode=94110,country=us,lastUpdat e=2006-11-07 19:44:30.0,creationDate=2006-11-01 18:24:02.0], [EMAIL PROTECTED],password=thump,roles=[ com.baselogic.tro [EMAIL PROTECTED],description=]],accountExpired=false,accountLocked=false,credentialsExpired=false,enabl ed=false,confirmPassword=,firstName=Thump,[EMAIL PROTECTED],lastName=User,address=725 Florida Street,address2=#5,city=San Francisco,sta te=CA,otherState=,postalCode=94110,country=,lastUpdate=2006-11-08 06:47:37.0,creationDate=2006-11-08 06:47:37.0]] 11:42:11,765 INFO [STDOUT] 11:42:11,765 INFO [UserBackingBean] +++ 11:42:11,765 INFO [STDOUT] 11:42:11,765 DEBUG [DelegatingVariableResolver] Attempting to resolve variable 'user' in via original VariableResolver 11:42:11,765 INFO [STDOUT] 11:42:11,765 DEBUG [DelegatingVariableResolver] Attempting to resolve variable 'user' in via original VariableResolver 11:42:11,765 INFO [STDOUT] 11:42:11,765 DEBUG [DelegatingVariableResolver] Attempting to resolve variable 'user' in root WebApplicationContext 11:42:11,765 INFO [STDOUT] 11:42:11,765 DEBUG [DelegatingVariableResolver] Could not resolve variable 'user' 11:42:11,765 INFO [STDOUT] 11:42:11,765 DEBUG [DelegatingVariableResolver] Attempting to resolve variable 'user' in root WebApplicationContext 11:42:11,765 INFO [STDOUT] 11:42:11,765 DEBUG [DelegatingVariableResolver] Could not resolve variable 'user' 11:42:11,765 INFO [STDOUT] 11:42:11,765 DEBUG [DelegatingVariableResolver] Attempting to resolve variable 'user' in via original VariableResolver 11:42:11,765 INFO [STDOUT] 11:42:11,765 DEBUG [DelegatingVariableResolver] Attempting to resolve variable 'user' in via original VariableResolver 11:42:11,765 INFO [STDOUT] 11:42:11,765 DEBUG [DelegatingVariableResolver] Attempting to resolve variable 'user' in root WebApplicationContext 11:42:11,765 INFO [STDOUT] 11:42:11,765 DEBUG [DelegatingVariableResolver] Could not resolve variable 'user' 11:42:11,765 INFO [STDOUT] 11:42:11,765 DEBUG [DelegatingVariableResolver] Attempting to resolve variable 'user' in root WebApplicationContext 11:42:11,765 INFO [STDOUT] 11:42:11,765 DEBUG [DelegatingVariableResolver] Could not resolve variable 'user' 11:42:11,765 INFO [STDOUT] 11:42:11,765 DEBUG [DelegatingVariableResolver] Attempting to resolve variable 'user' in via original VariableResolver 11:42:11,765 INFO [STDOUT] 11:42:11,765 DEBUG [DelegatingVariableResolver] Attempting to resolve variable 'user' in via original VariableResolver 11:42
acegi, jsf navigation question...
I have a link to my secured area and my admin area, on my home page. When I click on my admin link, I get promoted for a username and password and am authenticated through acegi fine. But after AUTH, I get forwarded to the secured page, not the admin page, or page I originally requested. How can I have acegi just intercept, and then forward to the requested page? faces config: == /views/common/logon.xhtml #{authenticationController.authenticate } success /views/secure/index.jsf Various Administration functions... Admin Utilities /views/admin/index.xhtml users success /views/admin/users.xhtml acegi applicationContext: == /views/common/logon.jsf false /error/error.jsp -- Thanks DJ MICK http://www.djmick.com http://www.myspace.com/mickknutson
t:datatable alternating row colors?
How can I alternate the row colors in a datatable? -- Thanks DJ MICK http://www.djmick.com http://www.myspace.com/mickknutson
Any examples of unit testing validators?
I would like to see if anyone has any Unit Test examples for their validators?-- ThanksDJ MICKhttp://www.djmick.com http://www.myspace.com/mickknutson
Re: Navigation from error question...
That did work, but now, I do not get the messages I want printed...In registration.xhtml: required="true" id="username" > errorClass="error" /> Then in my UserBackingBean: FacesContext.getCurrentInstance() .addMessage(null, new FacesMessage( FacesMessage.SEVERITY_ERROR, failureMessage, failureMessage)); //String failureMsg = ErrorMessages.getString ("LoginBean.LOGIN_FAILURE"); FacesMessage message = new FacesMessage( FacesMessage.SEVERITY_ERROR, failureMessage, failureMessage); context.addMessage("login_form:loginButton", message); return (null);But no messages are printed at all.The page is displayed though...On 11/13/06, Gerald Müllan <[EMAIL PROTECTED]> wrote:Hi, in order to stay on the same page, you can also return null. You don`tneed any special navigation outcome to achieve this.cheers,GeraldOn 11/13/06, Mick Knutson < [EMAIL PROTECTED]> wrote:> I am fairly new to JSF, but thought that I had this right, however I am not> getting the navigation I expect...>> When I get an error for a duplicate username, I want to be sent back to my > registration form and have an error message shows.>> faces-config:> >> >> /views/registration.xhtml > > success>> /views/secure/index.xhtml> > > > cancel> /views/center.xhtml > > > > duplicateUsername>> /views/registration.xhtml > > > >>>>>> Here is the UserBackingBean method:> >> public String createUser(){> log.info("createUser()");>> FacesContext context = FacesContext.getCurrentInstance();>> try{> userManager.createUser(getUser());> } catch(Exception e){> log.error("Duplicate user name. Username already exists");> e.printStackTrace();> String failureMessage = "Duplicate user name. Username already > exists";> FacesContext.getCurrentInstance()> .addMessage(null,> new FacesMessage(>> FacesMessage.SEVERITY_ERROR, > failureMessage,> failureMessage));>> return "duplicateUsername";> }> return "success"; > }>>> When I get this error, I still get sent to /views/secure/index.xhtml, same> as if I succeeded...>>> -->> Thanks>> DJ MICK> http://www.djmick.com> http://www.myspace.com/mickknutson--http://www.irian.at Your JSF powerhouse -JSF Consulting, Development andCourses in English and GermanProfessional Support for Apache MyFaces-- ThanksDJ MICK http://www.djmick.comhttp://www.myspace.com/mickknutson
Navigation from error question...
I am fairly new to JSF, but thought that I had this right, however I am not getting the navigation I expect...When I get an error for a duplicate username, I want to be sent back to my registration form and have an error message shows. faces-config: /views/registration.xhtml success /views/secure/index.xhtml cancel /views/center.xhtml duplicateUsername /views/registration.xhtml Here is the UserBackingBean method: public String createUser(){ log.info("createUser()"); FacesContext context = FacesContext.getCurrentInstance(); try{ userManager.createUser(getUser()); } catch(Exception e){ log.error("Duplicate user name. Username already exists"); e.printStackTrace(); String failureMessage = "Duplicate user name. Username already exists"; FacesContext.getCurrentInstance() .addMessage(null, new FacesMessage( FacesMessage.SEVERITY_ERROR, failureMessage, failureMessage)); return "duplicateUsername"; } return "success"; }When I get this error, I still get sent to /views/secure/index.xhtml, same as if I succeeded... -- ThanksDJ MICKhttp://www.djmick.comhttp://www.myspace.com/mickknutson
facelets xhml and jstl question
I am trying to write this in xhtml:" language="_javascript_">My whole header is: http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h=" http://java.sun.com/jsf/html" xmlns:t="http://myfaces.apache.org/tomahawk" xmlns:f=" http://java.sun.com/jsf/core" xmlns:c="http://java.sun.com/jsp/jstl/core" > Backend Listing " language="_javascript_"> But -- ThanksDJ MICKhttp://www.djmick.com http://www.myspace.com/mickknutson
Anyone using face-trace with AD or jspx?
Is Anyone using face-trace with AD or jspx?-- ThanksDJ MICKhttp://www.djmick.comhttp://www.myspace.com/mickknutson
Re: Design question about perpetual audio player, and content workflow...
Not right now, and I am reading about this now.Is there a document you can refer me to that addresses my perpetual streaming issue?At first glance, it seems similar to Tiles like components. But will this work better than, say iFrames? On 11/6/06, Jeff Bischoff <[EMAIL PROTECTED]> wrote: Mick,Are you using Facelets?[1] https://facelets.dev.java.net/nonav/docs/dev/docbook.htmlRegards,Jeff BischoffKenneth L Kurz & Associates, Inc. Mick Knutson wrote:> I am creating a streaming media site with MyFaces. I want to have a> Flash or> Applet audio player at the top of the site that will play selected content> no matter where the user is navigating. > I.E. The user logs into the site, goes to the music selection screen,> selects a show to listen to, then the player starts playing that show.> THEN, the user begins navigating to content about the artist that the show > is by, yet the player does not switch or re-start by going to another page.>> The player will only get reset by going to the show selection page and> selecting another show.>> How would you solve this? I started trying this with frames, but they are a > real pain.> I am wanting to use DWR for some things, and wonder how well it might work> for my dynamic page navigation...???>> Any other ideas to make the navigation, as well as developing this easy and > flexible?>-- ThanksDJ MICKhttp://www.djmick.com http://www.myspace.com/mickknutson
Design question about perpetual audio player, and content workflow...
I am creating a streaming media site with MyFaces. I want to have a Flash or Applet audio player at the top of the site that will play selected content no matter where the user is navigating.I.E. The user logs into the site, goes to the music selection screen, selects a show to listen to, then the player starts playing that show. THEN, the user begins navigating to content about the artist that the show is by, yet the player does not switch or re-start by going to another page.The player will only get reset by going to the show selection page and selecting another show. How would you solve this? I started trying this with frames, but they are a real pain.I am wanting to use DWR for some things, and wonder how well it might work for my dynamic page navigation...???Any other ideas to make the navigation, as well as developing this easy and flexible? -- ThanksDJ MICKhttp://www.djmick.comhttp://www.myspace.com/mickknutson
Re: BackingBean with POJO for model
That was the trick!Thanks.On 11/6/06, William Huang <[EMAIL PROTECTED]> wrote: your User object is null and call getUser(). You need to create new Userobject before the getUser() gets call. "Mick Knutson" <[EMAIL PROTECTED] l.com> To "MyFaces Discussion" 11/03/2006 01:48 < users@myfaces.apache.org> PM cc Subject Please respond to BackingBean with POJO for model "MyFacesDiscussion" <[EMAIL PROTECTED] ache.org> I was creating a BackingBean that has my hibernate POJO inside like:UserBackingBean:===public class UserBackingBean extends BaseObject {private User user; public User getUser() {return user;}public void setUser(User user) {this.user = user;}} // The End...User.java:= public class User extends BaseObject {private static final long serialVersionUID = -5450022397980854742L;private java.lang.String username;private java.lang.String password;private java.lang.String passwordConfirm;private java.lang.String firstName;private java.lang.String email;private java.lang.String lastName;private java.lang.String address;private java.lang.String address2;private java.lang.String city;private java.lang.String state;private java.lang.String otherState;private java.lang.String postalCode;private java.lang.String country; private java.util.Date lastUpdate;private java.util.Date creationDate;public String getUsername() {return username;}.. more omittedRegistration.jsp :===:value="#{UserBackingBean.user.firstName}" required="true" id="user.firstName" > errorClass="error" />When I use the "id="user.firstName"" in the input text I get: 10:37:30,445 ERROR [[jsp]] Servlet.service() for servlet jsp threwexceptionjava.lang.IllegalArgumentException: Subsequent characters of componentidentifier must be a letter, a digit, an underscore ('_'), or a dash ('-')! But component identifier contains "."But when I usevalue="#{UserBackingBean.user.lastName}" required="true" id="lastName" >value="#{messages['error.required']}" /> errorClass="error" />Then I just submit the form with nothing in the text field, I get this: "lastName": Error during model data update.in the messages.Why do I not get a "Required" error message?--ThanksDJ MICK http://www.djmick.comhttp://www.myspace.com/mickknutsonDisclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you. -- ThanksDJ MICKhttp://www.djmick.comhttp://www.myspace.com/mickknutson
acegi-jsf, hibernate, UserDetails and UserDetailsService examples please
Does anyone have an (complete) example of implementing acegi-jsf tags with a hibernate User and Role object going through a UserDetailsService and AuthenticationController (Backing Bean)?I have been scouring the net looking for all the missing pieces to implement a multi-role application for MyFaces. Either I am really not understanding the docs like http://wiki.apache.org/myfaces/JSF_and_Acegi or else I really just don't understand the complete picture. -- ThanksDJ MICKhttp://www.djmick.comhttp://www.myspace.com/mickknutson
Examples with h:commandLink opening a page in another frame of a frameset
I have a frameset I want to keep mostly static, but there are a couple operations I want to have a h:commandLink redirect the other frame to a differnt URL.login/logout is an example of this.How do I have: frame1: h:commandLink target="frame2"-- ThanksDJ MICKhttp://www.djmick.comhttp://www.myspace.com/mickknutson
is there a State Select option like there is a
is there a State Select option like there is a -- ThanksDJ MICKhttp://www.djmick.com http://www.myspace.com/mickknutson
Re: selectOneCountry and i18n question.
Now that I got to this, I want to have my application default to use en_US and United States for the Country pull down.I have this in my faces-config.xml: en_US en es de messages And this in my web.xml: en_US en es de and it does not default to United States, it is still alphabetical On 11/2/06, Mark Breman <[EMAIL PROTECTED]> wrote: No one? -Oorspronkelijk bericht- Van: Mark Breman [mailto:[EMAIL PROTECTED]] Verzonden: maandag 30 oktober 2006 13:23 Aan: users@myfaces.apache.org Onderwerp: t:selectOneCountry and i18n question. Hi everyone, I'm trying to get the t:selectOneCountry component to display a list of countries in my native language (dutch). The taglib docs say that this component uses the java.util.Locale (and getCountry) API. The dutch locale (nl_NL) is fully supported by JDK 1.5 and I have set my browser-language to nl. In my web.xml I have configured < locale-config > < default-locale > nl default-locale > < supported-locale > nl supported-locale > < supported-locale > en supported-locale > locale-config > I'm using Tomcat 5.5.17. I'm keep on getting a list of countries in english, not in dutch. Only my local country in the list is displayed in dutch (i.e. 'Nederland ' instead of 'Netherlands ')?!? Does anyone know what I'm doing wrong here? Any help appreciated. Thanx. -Mark- -- ThanksDJ MICKhttp://www.djmick.comhttp://www.myspace.com/mickknutson
Re: Best practices to add MyFaces to an existing Hibernate project
public class UserBackingBean extends BaseObject { private User user; public User getUser() { return user; } public void setUser(User user) { this.user = user; }Registration.jsp: : required="true" id="firstName" > errorClass="error" /> On 11/3/06, Mick Knutson < [EMAIL PROTECTED]> wrote:Then can you please show me an exapmle of your jsp and you BackingBean and DAO? I have tried what you said, but can't seem to get it to work.On 11/3/06, Jeff Bischoff <[EMAIL PROTECTED]> wrote: Mick,I don't know specifically about hibernate.However, I get the gist of your issue, and have faced the same questionmyself. I think the general pattern for this is to have a DAO (DataAccess Object) as a member variable (property) of the managed bean. That way the managed bean simply contains-a, instead of is-a.Definately don't copy/paste every getter and setter into a managed bean.To do so would unnecessarily complicate your code and couple your layers. :) Regards,Jeff BischoffKenneth L Kurz & Associates, Inc.Mick Knutson wrote:> I have an existing Hibernate project with many hibernate mapped POJO's.>> I do not want to add all the set/get methods from my POJO into Backing > Beans, so I am wondering what others have done?>> Have your BackingBean extend you hibernate object?> -- ThanksDJ MICK http://www.djmick.com http://www.myspace.com/mickknutson -- ThanksDJ MICKhttp://www.djmick.comhttp://www.myspace.com/mickknutson
Re: FW: [SPAM (Non-existent user)] - RE: [O/T] JSF Best Practices for Authentication/Authorization - Local recipient does not exist
No, I get them a s well...On 11/3/06, Nebinger, David <[EMAIL PROTECTED]> wrote: Am I the only one getting these bounce messages, or what? -Original Message- From: System Administrator Sent: Friday, November 03, 2006 4:17 PM To: [EMAIL PROTECTED] Subject: Undeliverable: [SPAM (Non-existent user)] - RE: [O/T] JSF Best Practices for Authentication/Authorization - Local recipient does not exist Your message did not reach some or all of the intended recipients. Subject: [SPAM (Non-existent user)] - RE: [O/T] JSF Best Practices for Authentication/Authorization - Local recipient does not exist Sent: 11/3/2006 4:09 PM The following recipient(s) could not be reached: [EMAIL PROTECTED] on 11/3/2006 4:23 PM The e-mail account does not exist at the organization this message was sent to. Check the e-mail address, or contact the recipient directly to find out the correct address.-- ThanksDJ MICKhttp://www.djmick.comhttp://www.myspace.com/mickknutson
Re: Best practices to add MyFaces to an existing Hibernate project
Then can you please show me an exapmle of your jsp and you BackingBean and DAO?I have tried what you said, but can't seem to get it to work.On 11/3/06, Jeff Bischoff <[EMAIL PROTECTED]> wrote: Mick,I don't know specifically about hibernate.However, I get the gist of your issue, and have faced the same questionmyself. I think the general pattern for this is to have a DAO (DataAccess Object) as a member variable (property) of the managed bean. That way the managed bean simply contains-a, instead of is-a.Definately don't copy/paste every getter and setter into a managed bean.To do so would unnecessarily complicate your code and couple your layers. :) Regards,Jeff BischoffKenneth L Kurz & Associates, Inc.Mick Knutson wrote:> I have an existing Hibernate project with many hibernate mapped POJO's.>> I do not want to add all the set/get methods from my POJO into Backing > Beans, so I am wondering what others have done?>> Have your BackingBean extend you hibernate object?>-- ThanksDJ MICK http://www.djmick.comhttp://www.myspace.com/mickknutson
Re: [O/T] JSF Best Practices for Authentication/Authorization
I am using Spring acegi for my application and it works great!On 11/3/06, Jeff Bischoff <[EMAIL PROTECTED] > wrote:Greetings Colleagues,I have often wondered what the majority of you are using for authentication and authorization in your non-public websites. Over thelast year on this mailing list, I have seen bits and scraps ofdiscussion on this topic. Most often, I hear mention of solutions likecontainer-managed security and phase listeners. Sometimes custom navigation-handlers or servlet filters get mentioned too. Cant' say I'vequite seen evidence of any consensus on which of these is preferred, soI'm interested to hear your thoughts.I have come across this article [1] which offers an approach (and some source code) to authorization in JSF. What are your opinions on thisapproach? Would you consider this and similar approaches to be bestpractice? What other alternatives can you recommend (from experience)? I will post my specific requirements for my security search as a replyto this post, so as not to narrow the overall discussion.[1] http://java.sys-con.com/read/250254_1.htm Regards,Jeff BischoffKenneth L Kurz & Associates, Inc.-- ThanksDJ MICKhttp://www.djmick.com http://www.myspace.com/mickknutson
Best practices to add MyFaces to an existing Hibernate project
I have an existing Hibernate project with many hibernate mapped POJO's.I do not want to add all the set/get methods from my POJO into Backing Beans, so I am wondering what others have done?Have your BackingBean extend you hibernate object? -- ThanksDJ MICKhttp://www.djmick.comhttp://www.myspace.com/mickknutson
Re: BackingBean with POJO for model
after I put just lastName as the id, I get this error only:"lastName": Error during model data update.I do not get a lastName required errorOn 11/3/06, Jeff Bischoff <[EMAIL PROTECTED]> wrote: Mick Knutson wrote: > When I use the "id="user.firstName"" in the input text I get [Exception] >Right, you can't do that. Why would you want to? > Then I just submit the form with nothing in the text field, I get this: > > "lastName": Error during model data update. > > in the messages. > > > Why do I not get a "Required" error message? >Not sure. Is this before or after you fix the error with firstName's id? Regards,Jeff BischoffKenneth L Kurz & Associates, Inc.Mick Knutson wrote:> I was creating a BackingBean that has my hibernate POJO inside like:>> UserBackingBean:> === > public class UserBackingBean extends BaseObject {>>>private User user;>>public User getUser() {>return user;>}>>public void setUser(User user) { >this.user = user;>}>>>> } // The End...>>>> User.java:> => public class User extends BaseObject { >>private static final long serialVersionUID = -5450022397980854742L;>>private java.lang.String username;>private java.lang.String password;>private java.lang.String passwordConfirm;>private java.lang.String firstName;>private java.lang.String email;>private java.lang.String lastName;>private java.lang.String address;>private java.lang.String address2;>private java.lang.String city;>private java.lang.String state;>private java.lang.String otherState;>private java.lang.String postalCode;>private java.lang.String country;>>private java.util.Date lastUpdate;>private java.util.Date creationDate;>>>public String getUsername() {>return username;>}> > .. more omitted>>> Registration.jsp:> ===>>>>> >>>> />:> >>> required="true"> id=" user.firstName" >>>>> errorClass="error" />>>>>>> When I use the "id="user.firstName "" in the input text I get:>> 10:37:30,445 ERROR [[jsp]] Servlet.service() for servlet jsp threw> exception> java.lang.IllegalArgumentException: Subsequent characters of component > identifier must be a letter, a digit, an underscore ('_'), or a dash ('-')!> But comp> onent identifier contains ".">>>>> But when I use>>> required="true"> id="lastName" >>>>> errorClass="error" /> >>>> Then I just submit the form with nothing in the text field, I get this:>> "lastName": Error during model data update.>> in the messages.>> > Why do I not get a "Required" error message?>>>>>>>-- ThanksDJ MICK http://www.djmick.comhttp://www.myspace.com/mickknutson
BackingBean with POJO for model
I was creating a BackingBean that has my hibernate POJO inside like:UserBackingBean:===public class UserBackingBean extends BaseObject { private User user; public User getUser() { return user; } public void setUser(User user) { this.user = user; }} // The End...User.java:= public class User extends BaseObject { private static final long serialVersionUID = -5450022397980854742L; private java.lang.String username; private java.lang.String password; private java.lang.String passwordConfirm; private java.lang.String firstName; private java.lang.String email; private java.lang.String lastName; private java.lang.String address; private java.lang.String address2; private java.lang.String city; private java.lang.String state; private java.lang.String otherState; private java.lang.String postalCode; private java.lang.String country; private java.util.Date lastUpdate; private java.util.Date creationDate; public String getUsername() { return username; }.. more omittedRegistration.jsp :=== : required="true" id="user.firstName" > errorClass="error" /> When I use the "id="user.firstName"" in the input text I get: 10:37:30,445 ERROR [[jsp]] Servlet.service() for servlet jsp threw exceptionjava.lang.IllegalArgumentException: Subsequent characters of component identifier must be a letter, a digit, an underscore ('_'), or a dash ('-')! But comp onent identifier contains "."But when I use required="true" id="lastName" > errorClass="error" />Then I just submit the form with nothing in the text field, I get this: "lastName": Error during model data update. in the messages.Why do I not get a "Required" error message? -- ThanksDJ MICKhttp://www.djmick.comhttp://www.myspace.com/mickknutson
question about
I am trying to understand how to use the validation errors and detailed messages for the For this code: : required="true" id="firstName" /> errorClass="error" /> if I do not enter a vlue in, I get this error:"firstName": Error during model data update.I would expect to get something like "First Name is required"and be able to externalize this into a Resource Bundle.Any help, and usage examples would be appreciated... -- ThanksDJ MICKhttp://www.djmick.comhttp://www.myspace.com/mickknutson
css messages issue
I am not able to see my messages in the defined css style ... id="firstName"/> ... Then my output when I have an error is:< span id="_idJsp0:failures">"firstName": Error during model data update.span>TD>But, the text is black and default, not css applied.here is the css:#failures { color: red; min-width:300px; max-height:200px; overflow:auto; } -- ThanksDJ MICKhttp://www.djmick.comhttp://www.myspace.com/mickknutson
Unit testable Validation classes
I am looking for some examples on how to create seperate validation classes for my MyFaces validation that can be Unit Testable.-- ThanksDJ MICK http://www.djmick.comhttp://www.myspace.com/mickknutson
Re: Solved, but not happy with solution Re: question about BackingBeans and POJO's
This worked great, and I don't have to change all my Resource Bundles now.Thank you so much!!! On 10/31/06, Craig McClanahan <[EMAIL PROTECTED]> wrote: On 10/31/06, Mick Knutson < [EMAIL PROTECTED]> wrote: I solved the issue, but am not happy with it.It seems that using a dot notation in the Resource Bundle is not allowed.Hold up a sec on the changes!EL expressions use the same syntax for variable references that _javascript_ expressions do. Thus, "#{ foo.bar}" and "#{foo[bar]}" and "#{foo['bar']}" are all equivalent. This gives me the error:: Try this instead: Craig This does not::But I had to change my messages.properties declaration from:label.firstName=First Nameto:label_firstName=First Name On 10/31/06, Mick Knutson < [EMAIL PROTECTED]> wrote: What is the UserBackingBeanBeanInfo ???All I have is a simple UserBackingBeanBean with a set/get for public UserOn 10/31/06, Simon Kitching <[EMAIL PROTECTED]> wrote: Well,everything does seem to be right. However the original exceptiondoes say:javax.faces.el.PropertyNotFoundException: Bean: java.lang.String ,property: firstNameatorg.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor (PropertyResolverImpl.java:483)which seems to imply that getUser has returned a String object.The PropertyResolverImpl code is:public static PropertyDescriptor getPropertyDescriptor(BeanInfo beanInfo, String propertyName) {PropertyDescriptor[] propDescriptors =beanInfo.getPropertyDescriptors();if (propDescriptors != null){// TODO: cache this in classLoader safe way for (int i = 0, len = propDescriptors.length; i < len; i++){if (propDescriptors[i].getName().equals(propertyName))return propDescriptors[i]; }}throw new PropertyNotFoundException("Bean: "+ beanInfo.getBeanDescriptor().getBeanClass().getName()+ ", property: " + propertyName); }You don't happen to have a UserBackingBeanBeanInfo class around do you?As a wild guess, is the User class public? Maybe if it isn't, thensomething in the java introspection or JSF el code is calling toString on it to convert it to something that is accessable..I can't think what else might be causing your issue..Cheers,Simon -- ThanksDJ MICK http://www.djmick.com http://www.myspace.com/mickknutson -- ThanksDJ MICKhttp://www.djmick.com http://www.myspace.com/mickknutson -- ThanksDJ MICKhttp://www.djmick.comhttp://www.myspace.com/mickknutson
Re: Anyone using MyFaces with DWR?
THen can you tell me what this is for: DwrFacesFilter org.directwebremoting.faces.FacesExtensionFilter as well as : DWR controller servlet DWR controller servlet org.directwebremoting.servlet.DwrServlet debug true classes com.baselogic.tro.user.UserBackingBean, com.baselogic.tro.user.User This servlet is the Annotations version of the DWR Servlet. And should I not use these 2 with MyFaces? On 11/1/06, Toppac <[EMAIL PROTECTED]> wrote: From the dwr website dwr-invoker uk.ltd.getahead.dwr.DWRServlet dwr-invoker /dwr/*Works fine for me with facelets, myfaces and dwr.Mick Knutson-4 wrote: >> Can I get an example of your web.xml to validate I have the right> implementation for dwr 2.x>> -->> Thanks>> DJ MICK> http://www.djmick.com> http://www.myspace.com/mickknutson>>--View this message in context: http://www.nabble.com/Anyone-using-MyFaces-with-DWR--tf2549437.html#a7116746Sent from the MyFaces - Users mailing list archive at Nabble.com. -- ThanksDJ MICKhttp://www.djmick.comhttp://www.myspace.com/mickknutson
Solved, but not happy with solution Re: question about BackingBeans and POJO's
I solved the issue, but am not happy with it.It seems that using a dot notation in the Resource Bundle is not allowed.This gives me the error:: This does not::But I had to change my messages.properties declaration from:label.firstName=First Nameto:label_firstName=First Name On 10/31/06, Mick Knutson <[EMAIL PROTECTED]> wrote: What is the UserBackingBeanBeanInfo ???All I have is a simple UserBackingBeanBean with a set/get for public UserOn 10/31/06, Simon Kitching <[EMAIL PROTECTED]> wrote: Well,everything does seem to be right. However the original exceptiondoes say:javax.faces.el.PropertyNotFoundException: Bean: java.lang.String ,property: firstNameatorg.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor (PropertyResolverImpl.java:483)which seems to imply that getUser has returned a String object.The PropertyResolverImpl code is:public static PropertyDescriptor getPropertyDescriptor(BeanInfo beanInfo, String propertyName) {PropertyDescriptor[] propDescriptors =beanInfo.getPropertyDescriptors();if (propDescriptors != null){// TODO: cache this in classLoader safe way for (int i = 0, len = propDescriptors.length; i < len; i++){if (propDescriptors[i].getName().equals(propertyName))return propDescriptors[i]; }}throw new PropertyNotFoundException("Bean: "+ beanInfo.getBeanDescriptor().getBeanClass().getName()+ ", property: " + propertyName); }You don't happen to have a UserBackingBeanBeanInfo class around do you?As a wild guess, is the User class public? Maybe if it isn't, thensomething in the java introspection or JSF el code is calling toString on it to convert it to something that is accessable..I can't think what else might be causing your issue..Cheers,Simon -- ThanksDJ MICK http://www.djmick.com http://www.myspace.com/mickknutson -- ThanksDJ MICKhttp://www.djmick.comhttp://www.myspace.com/mickknutson
Anyone using MyFaces with DWR?
Can I get an example of your web.xml to validate I have the right implementation for dwr 2.x-- ThanksDJ MICKhttp://www.djmick.com http://www.myspace.com/mickknutson
Re: question about BackingBeans and POJO's
What is the UserBackingBeanBeanInfo ???All I have is a simple UserBackingBeanBean with a set/get for public UserOn 10/31/06, Simon Kitching <[EMAIL PROTECTED]> wrote: Well,everything does seem to be right. However the original exceptiondoes say:javax.faces.el.PropertyNotFoundException: Bean: java.lang.String ,property: firstNameatorg.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor (PropertyResolverImpl.java:483)which seems to imply that getUser has returned a String object.The PropertyResolverImpl code is:public static PropertyDescriptor getPropertyDescriptor(BeanInfo beanInfo, String propertyName) {PropertyDescriptor[] propDescriptors =beanInfo.getPropertyDescriptors();if (propDescriptors != null){// TODO: cache this in classLoader safe way for (int i = 0, len = propDescriptors.length; i < len; i++){if (propDescriptors[i].getName().equals(propertyName))return propDescriptors[i]; }}throw new PropertyNotFoundException("Bean: "+ beanInfo.getBeanDescriptor().getBeanClass().getName()+ ", property: " + propertyName); }You don't happen to have a UserBackingBeanBeanInfo class around do you?As a wild guess, is the User class public? Maybe if it isn't, thensomething in the java introspection or JSF el code is calling toString on it to convert it to something that is accessable..I can't think what else might be causing your issue..Cheers,Simon-- ThanksDJ MICK http://www.djmick.comhttp://www.myspace.com/mickknutson
Re: question about BackingBeans and POJO's
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %><%@ taglib uri="http://java.sun.com/jsf/core " prefix="f" %><%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %><%@ taglib uri=" http://myfaces.apache.org/tomahawk" prefix="t" %> Main TRO Registration <%-- standard the css and script --%> <%-- Default DWR declarations --%> : value="#{UserBackingBean.user.firstName}"> maximum="25" /> : value="#{UserBackingBean.user.lastName}"> maximum="25" /> On 10/31/06, Mick Knutson <[EMAIL PROTECTED]> wrote: faces-config: UserBackingBean com.baselogic.tro.user.UserBackingBean request User com.baselogic.tro.user.User request On 10/31/06, Mick Knutson <[EMAIL PROTECTED]> wrote: UserBackingBean: private User user; public User getUser() { return user; } public void setUser(User user) { this.user = user; }User: public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } On 10/31/06, Simon Kitching <[EMAIL PROTECTED]> wrote: Mick Knutson wrote:> I am looking for a best practices for creating BackingBeans with sub> objects.>> Such as, I want a UserBackingBean that has a User associated with it.>>> But I have done that, but use: >> >> value="#{UserBackingBean.user.firstName}">> > maximum="25" />> >The class that UserBackingBean refers to needs to define a method User getUser() The User class needs to define String getFirstName()Everything should then work fine. This is all standard JavaBeansconventions.Regards,Simon -- ThanksDJ MICKhttp://www.djmick.com http://www.myspace.com/mickknutson -- ThanksDJ MICK http://www.djmick.comhttp://www.myspace.com/mickknutson -- ThanksDJ MICKhttp://www.djmick.comhttp://www.myspace.com/mickknutson
Re: question about BackingBeans and POJO's
faces-config: UserBackingBean com.baselogic.tro.user.UserBackingBean request User com.baselogic.tro.user.User request On 10/31/06, Mick Knutson <[EMAIL PROTECTED]> wrote: UserBackingBean: private User user; public User getUser() { return user; } public void setUser(User user) { this.user = user; }User: public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } On 10/31/06, Simon Kitching <[EMAIL PROTECTED]> wrote: Mick Knutson wrote:> I am looking for a best practices for creating BackingBeans with sub> objects.>> Such as, I want a UserBackingBean that has a User associated with it.>>> But I have done that, but use: >> >> value="#{UserBackingBean.user.firstName}">> > maximum="25" />> >The class that UserBackingBean refers to needs to define a method User getUser() The User class needs to define String getFirstName()Everything should then work fine. This is all standard JavaBeansconventions.Regards,Simon -- ThanksDJ MICKhttp://www.djmick.com http://www.myspace.com/mickknutson -- ThanksDJ MICKhttp://www.djmick.comhttp://www.myspace.com/mickknutson
Re: question about BackingBeans and POJO's
UserBackingBean: private User user; public User getUser() { return user; } public void setUser(User user) { this.user = user; }User: public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } On 10/31/06, Simon Kitching <[EMAIL PROTECTED]> wrote: Mick Knutson wrote:> I am looking for a best practices for creating BackingBeans with sub> objects.>> Such as, I want a UserBackingBean that has a User associated with it.>>> But I have done that, but use: >> >> value="#{UserBackingBean.user.firstName}">> > maximum="25" />> >The class that UserBackingBean refers to needs to define a method User getUser() The User class needs to define String getFirstName()Everything should then work fine. This is all standard JavaBeansconventions.Regards,Simon -- ThanksDJ MICKhttp://www.djmick.comhttp://www.myspace.com/mickknutson
question about BackingBeans and POJO's
I am looking for a best practices for creating BackingBeans with sub objects.Such as, I want a UserBackingBean that has a User associated with it.But I have done that, but use: value="#{UserBackingBean.user.firstName}"> maximum="25" /> But this gives me this error:15:22:49,656 ERROR [RendererUtils] Property not found - called by component : {Component-Path : [Class: javax.faces.component.UIViewRoot ,ViewId: /views/istration/registration.jsp][Class: javax.faces.component.html.HtmlForm,Id: _idJsp0][Class: javax.faces.component.html.HtmlOutputText,Id: _idJsp1]}javax.faces.el.PropertyNotFoundException: Bean: java.lang.String , property: firstName at org.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor(PropertyResolverImpl.java:483) at org.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor(PropertyResolverImpl.java :454) at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:417) at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:82) at org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate (ELParserHelper.java:532) at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145) at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:383) at javax.faces.component.UIOutput.getValue (UIOutput.java:77) at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue(RendererUtils.java:217) at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderOutput( HtmlTextRendererBase.java:69) at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:57) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java :536) at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:495) at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:363) at org.apache.jsp.views.registration.registration_jsp._jspx_meth_h_outputText_0 (registration_jsp.java:273) at org.apache.jsp.views.registration.registration_jsp._jspx_meth_h_form_0(registration_jsp.java:211) at org.apache.jsp.views.registration.registration_jsp._jspx_meth_f_view_0 (registration_jsp.java:151) at org.apache.jsp.views.registration.registration_jsp._jspService(registration_jsp.java:109) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332) at org.apache.jasper.servlet.JspServlet.serviceJspFile( JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java :672) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416) at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384) at javax.faces.webapp.FacesServlet.service (FacesServlet.java:138) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java :173) at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java :213) at org.apache.catalina.core.StandardContextValve.invoke(StandardCont
Attempting to create a panelTabbedPane with subviews
I am trying to create a tabbed site and each tab I want to be a subview page, then eventually use AJAX to update the data for the current tab.But I keep getting:16:01:24,583 ERROR [ViewTag] Error writing endDocument java.io.IOException: Illegal to flush within a custom tag16:01:24,630 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exceptionjavax.faces.FacesException: Exception in JSP: /views/main.jsp:57 54: label="Home Page for TRO"55: style="width:100%">56: 57: 58: 59: 60: selectedIndex="0" serverSideTabSwitch="false" activeTabStyleClass="googleHouse_panelTabbedPane_activeHeaderCell" tabContentStyleClass="googleHouse_panelTabbedPane" activeSubStyleClass="googleHouse_panelTabbedPane_subHeaderCell_active" inactiveTabStyleClass="CSSClass" disabledTabStyleClass="CSSClass" inactiveSubStyleClass="CSSClass"> <%-- ===--%> <%-- Home Page Tab --%> <%-- ===--%> <%-- This is the Home page tab --%> id="Home" label="Home Page for TRO" style="width:100%"> <%-- ===--%> <%-- Artists Tab --%> <%-- ===--%> <%-- This is the Home page tab --%> id="artists" label="Artists of TRO" style="width:100%"> ...Page3:<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %><%@ taglib uri=" http://java.sun.com/jsf/core" prefix="f" %><%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %> -- ThanksDJ MICK http://www.djmick.comhttp://www.myspace.com/mickknutson