RE: Question about prerenderer?
Hi You have messed (i.e mixed) things up. Try this: %@ taglib prefix=f uri=http://java.sun.com/jsf/core% %@ taglib prefix=h uri=http://java.sun.com/jsf/html% %@ taglib uri=http://myfaces.apache.org/tomahawk; prefix=t% t:div styleClass=portletbox h3 Debug /h3 /t:div h:dataTable value=#{mvportal.contacts} var=contact rowClasses=odd,even cellspacing=0 h:column f:facet name=header h:outputText value=Name / /f:facet h:outputText id=displayName value=#{contact.displayName} / /h:column h:column f:facet name=header h:outputText value=Office / /f:facet h:outputText id=OfficeName value=#{contact.office.name} / /h:column h:column f:facet name=header h:outputText value=EXT / /f:facet h:outputText id=extension value=#{contact.extension} / /h:column h:column f:facet name=header h:outputText value=Email / /f:facet h:outputLink value=mailto:#{contact.email}; h:outputText id=email value=#{contact.email} / /h:outputLink /h:column h:column f:facet name=header h:outputText value=IM / /f:facet h:outputText id=im value=#{contact.imUsername} / /h:column /h:dataTable -Original Message- From: Jonathan Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, November 02, 2006 10:46 PM To: user@shale.apache.org Subject: Re: Question about prerenderer? ok i using this code the h3 tage get rendered at the bottom of the t:div instead of at the top where it belongs if i put the f:verbaitum wrapping the whole div i get the h3 outside and below the div. what can i do to get the h3 to render before the datatable? %@ taglib prefix=f uri=http://java.sun.com/jsf/core% %@ taglib prefix=h uri=http://java.sun.com/jsf/html% %@ taglib uri=http://myfaces.apache.org/tomahawk; prefix=t% t:div styleClass=portletbox f:verbatim t:div h3 Debug /h3 /t:div h:dataTable value=#{mvportal.contacts} var=contact rowClasses=odd,even cellspacing=0 h:column f:facet name=header h:outputText value=Name / /f:facet h:outputText id=displayName value=#{contact.displayName} / /h:column h:column f:facet name=header h:outputText value=Office / /f:facet h:outputText id=OfficeName value=#{contact.office.name} / /h:column h:column f:facet name=header h:outputText value=EXT / /f:facet h:outputText id=extension value=#{contact.extension} / /h:column h:column f:facet name=header h:outputText value=Email / /f:facet h:outputLink value=mailto:#{contact.email}; h:outputText id=email value=#{contact.email} / /h:outputLink /h:column h:column f:facet name=header h:outputText value=IM / /f:facet h:outputText id=im value=#{contact.imUsername} / /h:column /h:dataTable /f:verbatim /t:div _ Stay in touch with old friends and meet new ones with Windows Live Spaces http://clk.atdmt.com/MSN/go/msnnkwsp007001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the
General questions to shale...
Hi, As I already wrote, I am a newby to apache shale. So I have a few general questions. I have great experience with apache struts, but never made some work with JSF or other technologies which are used in shale. So I need something like a short introduction in the style of shale für struts users. I heard a lot about the prerenderer. Is this something like the controller-classes in struts-tiles? A class or action which is called just before the associated jsp or html file is rendered? Until now I had only a look to the clay-usecases example which is distributed on the shale-webpage. In this example, there is a managed-bean defined (QueryParam) which puts some Request-Parameters into the defined class. Can we say in general, that this is a rebuild of the functionality of the Struts-Action's? Another question: Most question and mails on this list refer to jsp functionality and problems with some jsp-errors. As I heard about struts especially about clay, this was the most interesting point for me. But it seems that not that much people are using clay at the moment? Are there some great disadvantages about this technology? I want to realize a huge project with shale and also with clay. Is it a too early stage to use clay? Is there some further developement work, which should be done? I hope my questions are clearly written. I am not so an experienced english-writer. Thanks :-) Thomas --- Thomas Walland http://www.walland.net [EMAIL PROTECTED]
RE: General questions to shale...
Hi First thing to note is that while Struts is page-centric, JSF is component-centric. To describe this in short: In struts a submit/get from a page always goes to an action. In JSF, each component is (may be) wired to its own method in what is known as a backing bean (or i Shale ViewController). There is no get, allways post in JSF. This is a shift of pradigms actually, and you need to shift your way of thinking when moving to JSF from Struts. Think of it as being more like programming in Swing or that that matter what we used to do VB6 back in the old days. Hermod -Original Message- From: Thomas Walland [mailto:[EMAIL PROTECTED] Sent: Friday, November 03, 2006 10:04 AM To: user@shale.apache.org Subject: General questions to shale... Hi, As I already wrote, I am a newby to apache shale. So I have a few general questions. I have great experience with apache struts, but never made some work with JSF or other technologies which are used in shale. So I need something like a short introduction in the style of shale für struts users. I heard a lot about the prerenderer. Is this something like the controller-classes in struts-tiles? A class or action which is called just before the associated jsp or html file is rendered? Until now I had only a look to the clay-usecases example which is distributed on the shale-webpage. In this example, there is a managed-bean defined (QueryParam) which puts some Request-Parameters into the defined class. Can we say in general, that this is a rebuild of the functionality of the Struts-Action's? Another question: Most question and mails on this list refer to jsp functionality and problems with some jsp-errors. As I heard about struts especially about clay, this was the most interesting point for me. But it seems that not that much people are using clay at the moment? Are there some great disadvantages about this technology? I want to realize a huge project with shale and also with clay. Is it a too early stage to use clay? Is there some further developement work, which should be done? I hope my questions are clearly written. I am not so an experienced english-writer. Thanks :-) Thomas --- Thomas Walland http://www.walland.net [EMAIL PROTECTED] * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that the DnB NOR Group cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the anti virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Re: General questions to shale...
2006/11/3, Thomas Walland [EMAIL PROTECTED]: Hi, As I already wrote, I am a newby to apache shale. So I have a few general questions. I have great experience with apache struts, but never made some work with JSF or other technologies which are used in shale. So I need something like a short introduction in the style of shale für struts users. Shale is built on JSF, so you need to have a good grasp of JSF fundamentals. I heard a lot about the prerenderer. Is this something like the controller-classes in struts-tiles? A class or action which is called just before the associated jsp or html file is rendered? Yes, the controller's prerender method is indeed much like a Tiles controller. In that method, you generally set things up for the view. Until now I had only a look to the clay-usecases example which is distributed on the shale-webpage. In this example, there is a managed-bean defined (QueryParam) which puts some Request-Parameters into the defined class. Can we say in general, that this is a rebuild of the functionality of the Struts-Action's? Another question: Most question and mails on this list refer to jsp functionality and problems with some jsp-errors. As I heard about struts especially about clay, this was the most interesting point for me. But it seems that not that much people are using clay at the moment? Are there some great disadvantages about this technology? I want to realize a huge project with shale and also with clay. Is it a too early stage to use clay? Is there some further developement work, which should be done? truphone.com was implemented using Shale and Clay. I hope my questions are clearly written. I am not so an experienced english-writer. No problem, you're doing very well. david Thanks :-) Thomas --- Thomas Walland http://www.walland.net [EMAIL PROTECTED]
Re: General questions to shale...
On 11/3/06, Thomas Walland [EMAIL PROTECTED] wrote: Hi, As I already wrote, I am a newby to apache shale. So I have a few general questions. I have great experience with apache struts, but never made some work with JSF or other technologies which are used in shale. So I need something like a short introduction in the style of shale für struts users. That's a good idea. In fact, I gave a presentation at a Java event in London this last spring, and one of my talks was introducing JSF (and Shale) from the perspective of a developer familiar with Struts. You can find the slides on my home page at Apache (http://people.apache.org/~craigmcc/) ... look for the paper entitled Struts and JavaServer Faces. I heard a lot about the prerenderer. Is this something like the controller-classes in struts-tiles? A class or action which is called just before the associated jsp or html file is rendered? Yes, that's exactly what it is for. Interestingly, Struts 2 has the same concept with the Preparable interface -- which says to me that the idea is useful, even though you could accomplish the same thing with a customized request processor (Struts 1.1/1.2) or customizing the request processing chain (1.3) or interceptors (2.0). The prerender method is called on a GET request as well as a POST, making it fairly easy to create bookmarkable URLs too. In addition to prerender, the view controller functionality of Shale ( http://shale.apache.org/shale-view/) has three other lifecycle methods that are interesting: * init() -- called when the backing bean is first created and added to request scope. This is useful to gather resources that you will need, whether this is a GET or a POST. * preprocess() -- called *only* if this request is a POST of the form submitted by this view. Use it to do things like acquiring database locks, or re-selecting data objects that will be modified by this form (if you didn't save them in session scope). * prerender() -- as discussed above. I like to think of it as an opportunity to pull data needed by this view out of the model, versus a typical pattern in Struts of pushing data from one action to the next. * destroy() -- called *after* rendering is completed, for which there is no analogous method in Struts 1, and IIUC not in Struts 2 either. Until now I had only a look to the clay-usecases example which is distributed on the shale-webpage. In this example, there is a managed-bean defined (QueryParam) which puts some Request-Parameters into the defined class. Can we say in general, that this is a rebuild of the functionality of the Struts-Action's? Sort of, but its really driven by the differences between the JSF request processing lifecycle and the Struts processing lifecycle. In particular, you don't need anything analogous to form beans in JSF, because the components take care of those responsibilities already. And, JSF lets you bind individual submit buttons to different actions already, so you don't need something like DispatchAction to handle this case. Another question: Most question and mails on this list refer to jsp functionality and problems with some jsp-errors. As I heard about struts especially about clay, this was the most interesting point for me. But it seems that not that much people are using clay at the moment? Are there some great disadvantages about this technology? I want to realize a huge project with shale and also with clay. Is it a too early stage to use clay? Is there some further developement work, which should be done? There is ongoing development work going on, but it seems to me that the basic problems have been shaken out already, and that this is pretty solid. A good way to find out for yourself, though, would be to do a small prototype project first, which would help you get used to all of the things that are different about JSF and Shale, before you do the architecture for the large scale project. I hope my questions are clearly written. I am not so an experienced english-writer. You are doing great! Thanks :-) Thomas Craig --- Thomas Walland http://www.walland.net [EMAIL PROTECTED]
Re: General questions to shale...
From: Thomas Walland [EMAIL PROTECTED] Hi, As I already wrote, I am a newby to apache shale. So I have a few general questions. I have great experience with apache struts, but never made some work with JSF or other technologies which are used in shale. So I need something like a short introduction in the style of shale f?uts users. I heard a lot about the prerenderer. Is this something like the controller-classes in struts-tiles? A class or action which is called just before the associated jsp or html file is rendered? Yeap, once you try it, it is hard to imagine using JSF without it. The shale tiger library is a really nice add-on if you can use java 1.5. It allows you to use annotations to register managed beans. These beans are like the struts action and form bean combined with IoC. @Bean(name=mybean, scope=Scope.REQUEST) @View public class MyBean { @Prerender public void loadPeople() { ... ... } } Until now I had only a look to the clay-usecases example which is distributed on the shale-webpage. In this example, there is a managed-bean defined (QueryParam) which puts some Request-Parameters into the defined class. That is like a struts form bean on steroids. In struts, the form bean was auto-magically populated from request parameters. Using the JSF managed bean facility, you can use dependency injection to connect graphs of objects, not just request params. Can we say in general, that this is a rebuild of the functionality of the Struts-Action's? Another question: Most question and mails on this list refer to jsp functionality and problems with some jsp-errors. As I heard about struts especially about clay, this was the most interesting point for me. But it seems that not that much people are using clay at the moment? That just means that there is more opportunity to participate :-). Some of the best features in Clay have come from people in the community exchanging ideas on the mailing lists. Are there some great disadvantages about this technology? I want to realize a huge project with shale and also with clay. Is it a too early stage to use clay? Is there some further developement work, which should be done? Hopefully there will always be new features and enhancements we can add but Clay is more stable than ever. The only way to make this happen is for the community to build under and around it. Clay started as simple idea and has grown with the ideas of people in the Shale community. I hope my questions are clearly written. I am not so an experienced english-writer. Thanks :-) Thomas Hope to see you hanging around. Gary --- Thomas Walland http://www.walland.net [EMAIL PROTECTED]
Re: General questions to shale...
On 11/3/06, Gary VanMatre [EMAIL PROTECTED] wrote: From: Thomas Walland [EMAIL PROTECTED] Hi, As I already wrote, I am a newby to apache shale. So I have a few general questions. I have great experience with apache struts, but never made some work with JSF or other technologies which are used in shale. So I need something like a short introduction in the style of shale f?uts users. I heard a lot about the prerenderer. Is this something like the controller-classes in struts-tiles? A class or action which is called just before the associated jsp or html file is rendered? Yeap, once you try it, it is hard to imagine using JSF without it. The shale tiger library is a really nice add-on if you can use java 1.5. It allows you to use annotations to register managed beans. These beans are like the struts action and form bean combined with IoC. @Bean(name=mybean, scope=Scope.REQUEST) @View public class MyBean { @Prerender public void loadPeople() { ... ... } } Until now I had only a look to the clay-usecases example which is distributed on the shale-webpage. In this example, there is a managed-bean defined (QueryParam) which puts some Request-Parameters into the defined class. That is like a struts form bean on steroids. In struts, the form bean was auto-magically populated from request parameters. Using the JSF managed bean facility, you can use dependency injection to connect graphs of objects, not just request params. Can we say in general, that this is a rebuild of the functionality of the Struts-Action's? Another question: Most question and mails on this list refer to jsp functionality and problems with some jsp-errors. As I heard about struts especially about clay, this was the most interesting point for me. But it seems that not that much people are using clay at the moment? That just means that there is more opportunity to participate :-). Some of the best features in Clay have come from people in the community exchanging ideas on the mailing lists. Are there some great disadvantages about this technology? I want to realize a huge project with shale and also with clay. Is it a too early stage to use clay? Is there some further developement work, which should be done? We are using Shale/Clay for a huge portlet project. It's actually a pleasure to work with. You will start applying metadata to components, then you will realize you can build up the resuablitiy chain. You will piece together trees of components. Then you will realize you can encapsulate entire fragments of your application in modules. I wrote a wiki entry about this - check out http://wiki.apache.org/shale/ReusableClayJars. It's kind of a silly example but it shows you just how far you can go with it. Hopefully there will always be new features and enhancements we can add but Clay is more stable than ever. The only way to make this happen is for the community to build under and around it. Clay started as simple idea and has grown with the ideas of people in the Shale community. I hope my questions are clearly written. I am not so an experienced english-writer. Thanks :-) Thomas Hope to see you hanging around. Gary --- Thomas Walland http://www.walland.net [EMAIL PROTECTED]