Re: When to use JSF?
As a general rule, I would only use Struts if I had a considerable legacy system built with it. In that case, depending upon the skillsets of your team and the amount of legacy code, it might be better to stick with Struts. But otherwise, Struts is dated, and in today's world is a pretty tedious way to develop a new application. JSF is much better. For example, value expressions in JSF reduce the amount of code you must write vs. Struts in a big way. Instead of implementing a Struts action, that's passed a form bean, from which you manually pull strings, convert them to their appropriate type, and manually push that data to the model, in JSF, you just do this: #{ bean.property} and JSF takes care of all that tedium for you. Struts dynabeans help in that regard, but still... That said, JSF has many flaws and holes; for example, JSF doesn't explicitly support client-side validation out of the box. Shale, and other open-source frameworks such as Facelets, Seam, and Ajax4jsf serve to fill those holes and provide a great deal of cool functionality on top. btw, all of my comments concerning Struts refer to Struts 1.X. I know very little about Struts 2, other than it is really WebWork in disguise. david 2006/11/14, Thomas Walland <[EMAIL PROTECTED]>: I have a question to the usage of JSF and Shale. Are there any rules or is there any limitation, when Shale/JSF should be applied to a project? Until now I only worked with Struts. So I was involved in page-centric developement. Is it easy to build applications which uses user-input in a massive way? For example, triggering some actions because of some input-data? I just want a few rules or tipps, when to use JSF and when it would be better to continue using struts. Thanks a lot, Thomas
Re: usecase example logon dialog
Sorry for what i think is a dumb question I just can get this to work. so i am tryng to use a dialog to navigate throught some webpages. here is the dialog. http://shale.apache.org/dtds/dialog-config_1_0.dtd";> here is the button that calls it. action="managecontacts" > and all my managecontacts method does is return a string of managecontacts so what am i doing wrong? I am new to shale so this is probably something simple. _ All-in-one security and maintenance for your PC. Get a free 90-day trial! http://clk.atdmt.com/MSN/go/msnnkwlo005002msn/direct/01/?href=http://www.windowsonecare.com/?sc_cid=msn_hotmail
Re: The latest Shale/Tiles release results in a 404
On Nov 14, 2006, at 3:24 PM, Dick Starr wrote: Nov 14, 2006 2:18:04 PM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Nov 14, 2006 2:18:04 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/starraShale] startup failed due to previous errors These 2 lines concern me. Is that in your catalina.out file? Do you have another log file that contains more detailed error information? It appears something caused the entire web application to be unable to deploy. Is it the Tiles Filter? Greg
The latest Shale/Tiles release results in a 404
I have been trying to update my Tiles development from release shale-framework-20061004 (works fine) to shale-framework-2006 (fails). I am using tiles-core-2.0-r468346-SNAPSHOT.jar, which is included with the Shale release. I am also using the Tiles 2 FAQ as a guide. I immediately die with a 404 ("The requested resource (/starraShale/) is not available.") with the following Tomcat log entries: Nov 14, 2006 2:18:03 PM org.apache.tiles.listener.TilesListener contextInitialized INFO: Initializing TilesListener Nov 14, 2006 2:18:03 PM org.apache.tiles.listener.TilesListener readFactoryConfig INFO: CONFIG FILES DEFINED IN WEB.XML Nov 14, 2006 2:18:04 PM org.apache.tiles.listener.TilesListener initDefinitionsFactory INFO: initializing definitions factory... SaInitializer.contextInitialized (Note: This message is from my own listener that currently does nothing but print his message.) Nov 14, 2006 2:18:04 PM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Nov 14, 2006 2:18:04 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/starraShale] startup failed due to previous errors I think the problem is in my layout which had entries like , but now has For sure it can't find the first Tile which is accessed via my index.jsp as follows: where my tiles.xml has the following entries: I have tried every combination I could think of to replace the tiles:insert. Yes, I tried both tiles:insertTemplate and tiles:insertDefinition (even though tiles:attribute was the only one that made sense to me). Nothing I have tried works. Here is my layout: <%-- starraLayout.jsp 2006-11-14 RJS. New. --%> <%@ include file="/jspf/common/taglibs.jsp" %> <%@ include file="/jspf/common/messages.jsp" %> <%-- Layout Tiles This layout create a html page with and tags. It render a header, left menu, body and footer tile. @param title String use in page title @param header: Header tile (jsp url or definition name) @param menuBar: Menu Bar @param body: Body @param footer: Footer --%> " rel="stylesheet" type="text/css"/> "/> Thanks in advance for your help. Dick
When to use JSF?
I have a question to the usage of JSF and Shale. Are there any rules or is there any limitation, when Shale/JSF should be applied to a project? Until now I only worked with Struts. So I was involved in page-centric developement. Is it easy to build applications which uses user-input in a massive way? For example, triggering some actions because of some input-data? I just want a few rules or tipps, when to use JSF and when it would be better to continue using struts. Thanks a lot, Thomas
Re: usecase example logon dialog
On 11/14/06, Jonathan Smith <[EMAIL PROTECTED]> wrote: in usecases.jsp where does the #{logon$dialog.enter} come from. Is that a managed bean method or is that something that lets you enter the dialog automatically. If if is declared in a managed bean please let me know which one and where in the faces-config that bean is declared. How recent is the version of Shale you are looking at? In the current sources, there is a managed bean named "profile$logon". IIRC, in the very early days we used the Spring integration to create one of these beans, so check in "WEB-INF/applicationContext.xml" as well. thank you Jon Smith Craig _ All-in-one security and maintenance for your PC. Get a free 90-day trial! http://clk.atdmt.com/MSN/go/msnnkwlo005002msn/direct/01/?href=http://www.windowsonecare.com/?sc_cid=msn_hotmail
SV: SV: usecase example logon dialog
Hi You must have - I can not find it in any of the current sources. Unless you are running the Tiger stuff, where this is registered using annotations Hermod -Opprinnelig melding- Fra: Jonathan Smith [mailto:[EMAIL PROTECTED] Sendt: 14. november 2006 18:28 Til: [EMAIL PROTECTED] Emne: RE: SV: usecase example logon dialog do i have a old copy of the usecase example becaus i have spent the last day and a half looking for that declaration in faces-config and i have not found it yet. >From: Hermod Opstvedt <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: user@shale.apache.org >Subject: SV: usecase example logon dialog >Date: Tue, 14 Nov 2006 18:11:19 +0100 > >Hi > >If ypu look in faces-config.xml you will find tke declaration of >logon$dialog. Then you can look for the "enter" method in that bean. > >Hermod > >-Opprinnelig melding- >Fra: Jonathan Smith [mailto:[EMAIL PROTECTED] >Sendt: 14. november 2006 18:00 >Til: user@shale.apache.org >Emne: usecase example logon dialog > >in usecases.jsp where does the #{logon$dialog.enter} come from. Is that a >managed bean method or is that something that lets you enter the dialog >automatically. If if is declared in a managed bean please let me know which >one and where in the faces-config that bean is declared. > >thank you >Jon Smith > >_ >All-in-one security and maintenance for your PC. Get a free 90-day trial! >http://clk.atdmt.com/MSN/go/msnnkwlo005002msn/direct/01/?href=http://ww w >.windowsonecare.com/?sc_cid=msn_hotmail > _ Try Search Survival Kits: Fix up your home and better handle your cash with Live Search! http://imagine-windowslive.com/search/kits/default.aspx?kit=improve&locale=e n-US&source=hmtagline
SV: usecase example logon dialog
Hi If ypu look in faces-config.xml you will find tke declaration of logon$dialog. Then you can look for the "enter" method in that bean. Hermod -Opprinnelig melding- Fra: Jonathan Smith [mailto:[EMAIL PROTECTED] Sendt: 14. november 2006 18:00 Til: user@shale.apache.org Emne: usecase example logon dialog in usecases.jsp where does the #{logon$dialog.enter} come from. Is that a managed bean method or is that something that lets you enter the dialog automatically. If if is declared in a managed bean please let me know which one and where in the faces-config that bean is declared. thank you Jon Smith _ All-in-one security and maintenance for your PC. Get a free 90-day trial! http://clk.atdmt.com/MSN/go/msnnkwlo005002msn/direct/01/?href=http://www .windowsonecare.com/?sc_cid=msn_hotmail
usecase example logon dialog
in usecases.jsp where does the #{logon$dialog.enter} come from. Is that a managed bean method or is that something that lets you enter the dialog automatically. If if is declared in a managed bean please let me know which one and where in the faces-config that bean is declared. thank you Jon Smith _ All-in-one security and maintenance for your PC. Get a free 90-day trial! http://clk.atdmt.com/MSN/go/msnnkwlo005002msn/direct/01/?href=http://www.windowsonecare.com/?sc_cid=msn_hotmail
Re: [SHALE-277] - Error Page for Code 500 - broken?
I am using clay - espacially i am using clay only as the html views and the composition of components through inheritance is a dream :-), and navigation between non clay views ( jsp ) and clay ones ( html ) is broken - so i have to choose clay or non clay ( wrote a post to the list which is unanswered yet ). I'll rename it - but this does break the evaluation of the el expressions in the template - the error page would be useless, have i have to use a jsp one? If clay html templates, to render the error page, are not possible - can i do anything to make it work? Torsten Am Dienstag, den 14.11.2006, 12:38 + schrieb Gary VanMatre: > >Debugged things a little bit: > > > >at > >javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:738) > >at > >javax.faces.component.UIComponentBase.getRendersChildren(UIComponentBase.java:30 > >7) > >at > >org.apache.shale.clay.faces.ClayViewHandler.recursiveRender(ClayViewHandler.java > >:462) > >at > >org.apache.shale.clay.faces.ClayViewHandler.renderView(ClayViewHandler.java:398) > > > > > >At the viewhandler in line 462 all is fine, a context is there. > >But when the children are going to be rendered, the call to > >FacesContext.getCurrentInstance() returns null. > > > >Might this be a bug in the jsf implemantation or does shale destroy > >things which it shouldn't? > >Any help would be nice - i don't know why the context gets lost, > >something i should look for in clay or shale which would be nice debug > >points? > > It sounds as if your target error page has an .html suffix and you have the > shale-clay.jar in your web project. If the error page has not been > dispatched thru the faces servlet, the FacesContext will not be setup. > > If you are not using Clay in the project, I'd try removing the clay jar. > Otherwise, try renaming your error page to error.htm or something that has > another suffix. > > > >Torsten > > > > Gary smime.p7s Description: S/MIME cryptographic signature
Re: [SHALE-277] - Error Page for Code 500 - broken?
Debugged things a little bit: at javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:738) at javax.faces.component.UIComponentBase.getRendersChildren(UIComponentBase.java:307) at org.apache.shale.clay.faces.ClayViewHandler.recursiveRender(ClayViewHandler.java:462) at org.apache.shale.clay.faces.ClayViewHandler.renderView(ClayViewHandler.java:398) At the viewhandler in line 462 all is fine, a context is there. But when the children are going to be rendered, the call to FacesContext.getCurrentInstance() returns null. Might this be a bug in the jsf implemantation or does shale destroy things which it shouldn't? Any help would be nice - i don't know why the context gets lost, something i should look for in clay or shale which would be nice debug points? Torsten Am Donnerstag, den 02.11.2006, 13:17 +0100 schrieb Torsten Krah: > Using pure jsp's i get this additionally: > > ERROR http-8080-Processor23 javax.faces.webapp.UIComponentTag - Faces > context not found. getResponseWriter will fail. Check if the > FacesServlet has been initialized at all in your web.xml. > ERROR http-8080-Processor23 > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/frc-dev].[jsp] > - Servlet.service() for servlet jsp threw exception > java.lang.NullPointerException > at > javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:929) > at > javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:310) > at > org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:70) > at > org.apache.jsp.jsf.test_jsp._jspx_meth_f_view_0(test_jsp.java:100) > > > > Caused by: org.apache.jasper.JasperException: Exception in > JSP: /jsf/test.jsp:5 > > 2: <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"; %> > 3: <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"; %> > 4: > 5: > 6: > 7: > 8: > > > Stacktrace: > at > org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504) > at > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393) > 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:802) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) > at > org.apache.shale.application.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:267) > 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.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) > ... 32 more > > > > Why there is no context? > > Torsten > > Am Donnerstag, den 02.11.2006, 12:18 +0100 schrieb Torsten Krah: > > Still no success here. > > > > Adapted the shale-usecases example to test this page - but still no > > success. > > > > When i hit the submit button, the division by zero exception occurs. > > But later in the log there are these exceptions: > > > > ERROR http-8080-Processor23 > > org.apache.myfaces.lifecycle.PhaseListenerManager - Exception in > > PhaseListener INVOKE_APPLICATION(5) afterPhase > > java.lang.NullPointerException > > at > > net.sf.facestrace.utils.TraceUtils.getTraceData(TraceUtils.java:36) > > at > > net.sf.facestrace.phase.listener.InvokeApplicationPhaseListener.afterPhase(InvokeApplicationPhaseListener.java:33) > > > > ... > > > > ERROR http-8080-Processor23 > > org.apache.myfaces.lifecycle.PhaseListenerManager - Exception in > > PhaseListener RENDER_RESPONSE(6) beforePhase. > > java.lang.NullPointerException > > at > > net.sf.facestrace.utils.TraceUtils.getTraceData(TraceUtils.java:36) > > at > > net.sf.facestrace.phase.listener.RenderResponsePhaseListener.beforePhase(RenderResponsePhaseListener.java:45) > > at > > org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:70) > > > > ... > > > > ERROR http-8080-Processor23 > > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/frc-dev].[Faces > > Servlet] - Servlet.
Re: [SHALE-277] - Error Page for Code 500 - broken?
On 11/14/06, Torsten Krah <[EMAIL PROTECTED]> wrote: I am using clay - espacially i am using clay only as the html views and the composition of components through inheritance is a dream :-), and navigation between non clay views ( jsp ) and clay ones ( html ) is broken - so i have to choose clay or non clay ( wrote a post to the list which is unanswered yet ). I'll rename it - but this does break the evaluation of the el expressions in the template - the error page would be useless, have i have to use a jsp one? If clay html templates, to render the error page, are not possible - can i do anything to make it work? The challenge here is that, by the time the servlet container's error handling mechanism is invoked, the JSF lifecycle has been completed ... so you won't be able to use any JSF technology to produce the error page. One approach to consider would be to customize the error handling mechanism of the view controller ... it is called each time an exception is trapped (by default, it just queues them up), and again at the end of the request to deal with any accumulated exceptions (by default, throws an ApplicationException with the list of trapped exceptions). Consider doing an ExternalContext.dispatch() call to your "error handler" view, either as soon as an exception has occurred or just before rendering takes place. That way, it is just a normal JSF page rather than the servlet container's error handler that displays the error to the user. Torsten Craig Am Dienstag, den 14.11.2006, 12:38 + schrieb Gary VanMatre: > >Debugged things a little bit: > > > >at > >javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java :738) > >at > >javax.faces.component.UIComponentBase.getRendersChildren( UIComponentBase.java:30 > >7) > >at > >org.apache.shale.clay.faces.ClayViewHandler.recursiveRender( ClayViewHandler.java > >:462) > >at > >org.apache.shale.clay.faces.ClayViewHandler.renderView( ClayViewHandler.java:398) > > > > > >At the viewhandler in line 462 all is fine, a context is there. > >But when the children are going to be rendered, the call to > >FacesContext.getCurrentInstance() returns null. > > > >Might this be a bug in the jsf implemantation or does shale destroy > >things which it shouldn't? > >Any help would be nice - i don't know why the context gets lost, > >something i should look for in clay or shale which would be nice debug > >points? > > It sounds as if your target error page has an .html suffix and you have the shale-clay.jar in your web project. If the error page has not been dispatched thru the faces servlet, the FacesContext will not be setup. > > If you are not using Clay in the project, I'd try removing the clay jar. Otherwise, try renaming your error page to error.htm or something that has another suffix. > > > >Torsten > > > > Gary
Re: [SHALE-277] - Error Page for Code 500 - broken?
>Debugged things a little bit: > >at >javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:738) >at >javax.faces.component.UIComponentBase.getRendersChildren(UIComponentBase.java:30 >7) >at >org.apache.shale.clay.faces.ClayViewHandler.recursiveRender(ClayViewHandler.java >:462) >at >org.apache.shale.clay.faces.ClayViewHandler.renderView(ClayViewHandler.java:398) > > >At the viewhandler in line 462 all is fine, a context is there. >But when the children are going to be rendered, the call to >FacesContext.getCurrentInstance() returns null. > >Might this be a bug in the jsf implemantation or does shale destroy >things which it shouldn't? >Any help would be nice - i don't know why the context gets lost, >something i should look for in clay or shale which would be nice debug >points? It sounds as if your target error page has an .html suffix and you have the shale-clay.jar in your web project. If the error page has not been dispatched thru the faces servlet, the FacesContext will not be setup. If you are not using Clay in the project, I'd try removing the clay jar. Otherwise, try renaming your error page to error.htm or something that has another suffix. >Torsten > Gary