Re: ViewController - session controlled beans?
Ok i'll try this - but init() was never called, at the first time it was placed in its scope, but you said too that this should happen. But i'll try your suggestion and separate things, maybe this wont be issue anymore. Torsten Am Montag, den 23.10.2006, 19:22 -0700 schrieb Craig McClanahan: On 10/23/06, Torsten Krah [EMAIL PROTECTED] wrote: Documentation reads - in nearly all circumsistances ... , but if i want to have a bean in session scope for caching purposes, does ViewController work too? No, this does not work ... init() is called only when the corresponding bean is first placed into its relevant scope. So, a session scoped view controller bean is only going to have init called once. I ask because my init method does not get called when using a session scoped bean which implements ViewController, should it call the methods or not? My recommendation would be to think about the data you need to cache, and the event handlers relevant to a particular page, as two separate things. The former can go into a regular session scoped managed bean (or, you can extend AbstractSessionBean if that bean itself needs to know about session related events), and keep your event handlers in a standard ViewController managed bean in request scope. One advantage to this split that you should appreciate is it becomes much easier to write unit tests for your session-scoped data bean ... it does not require any Shale or JSF APIs, so it's much simpler to set up a test environment for it. Torsten Craig
Re: ViewController postBack processing question
No i am implementing ViewController. When i do this, i have to implement these postBack things - i should mentioned i am using the latest stable release 1.0.3 ... The interface got this signature: public abstract interface org.apache.shale.view.ViewController { public abstract boolean isPostBack(); public abstract void setPostBack(boolean arg0); public abstract void destroy(); public abstract void init(); public abstract void preprocess(); public abstract void prerender(); } Because if that i am asking ... I am not using the @View annotation. Torsten Am Montag, den 23.10.2006, 11:55 -0700 schrieb Matthias Wessendorf: Torsten, aren't you using the AbstractViewController? http://svn.apache.org/viewvc/shale/framework/trunk/shale-view/src/main/java/org/apache/shale/view/AbstractViewController.java?view=markup I suggest to extend your viewControllers/backingbeans from AbstractFacesBean, since it has nice helper methods. HTH. Matthias On 10/23/06, Torsten Krah [EMAIL PROTECTED] wrote: I've got a question about the postBack methods i have to implement to match ViewController interface. What should i have to have to implement there - the documentation does not mention them, it tells that the methods will be called ( e.g. setPotBack(true)) - but a more detailed description why i have to implement them would be nice, because every postback my page processes ( validation error etc. pp, outcome of the handler is null ), my setPostBack method is never called, so to make things clear, why its there and how to use it? Torsten
Re: ViewController postBack processing question
No i implement the interface, look at the post to Matthias ones. No i am not using the tiger extension at all yet, so this is not an issue. Because i have to implement those postBack things i cant say anything useful yet, wheter to keep or not, i am still a little bit confused, about your answers because you are thinking i extends instead of implement ... Have i have to use the 1.0.4 Snapshots? Torsten Am Montag, den 23.10.2006, 19:49 -0700 schrieb Craig McClanahan: On 10/23/06, Torsten Krah [EMAIL PROTECTED] wrote: I've got a question about the postBack methods i have to implement to match ViewController interface. What should i have to have to implement there - the documentation does not mention them, it tells that the methods will be called ( e.g. setPotBack(true)) - but a more detailed description why i have to implement them would be nice, because every postback my page processes ( validation error etc. pp, outcome of the handler is null ), my setPostBack method is never called, so to make things clear, why its there and how to use it? Separate from Matthias's question about whether you are extending AbstractViewController instead of implementing ViewController, a separate question relevant to your scenario is whether or not you're using the @View annotation from the Tiger Extensions to mark your view controllers. If you are, then you should be aware that the postback property is not supported. As background, I think having the postback property might have been a little bit of overkill in the original API design. One sure way to tell if you're processing a postback or not is if the preprocess() method gets called. Thus, the only time (from Shale's perspective) that the application might really want to know is in the init() method ... and I am moving towards being convinced that adding the postback property just for this use case is not really the right thing to do. What do you think? Is it important enough for a view controller to know this in the init() method to add full support for the postback property, even when you are using the @View annotation? Torsten Craig
Re: Myfaces Sandbox ConversationTag Clay possible?
thx for your answers - i think i am going to evaluate 1.0.4 and its new dialog implementation. Torsten Am Dienstag, den 24.10.2006, 01:48 -0400 schrieb Rahul Akolkar: On 10/23/06, Craig McClanahan [EMAIL PROTECTED] wrote: On 10/23/06, Torsten Krah [EMAIL PROTECTED] wrote: snip/ Btw ist 1.0.4 usable, especially the scxml dialog2? From an API perspective, I think we're done (although a bit more testing around browser navigation buttons is still needed). From an implementation point of view, the scxml implementation passes all the same tests that the basic version does, which is a good thing :-). But, because its capabilities are different, I can't speak from personal experience to how shaken out the underlying SCXML implementation stuff is. Rahul should be able to add some insights here. snap/ Here is a pointer to the browser buttons bit [1], you should evaluate the impact for your application. The underlying Commons SCXML implementation is quite stable, folks have been using the core bits (those that are used by shale-dialog-scxml) for quite a while. The W3C specification may bring changes since its not a Candidate Recommendation yet (its a Working Draft), but the API will evolve in line with Commons standards, which are quite high, so that risk is well mitigated, IMO. You will find most of the details and a user guide on the Commons SCXML site [2], the background for the Shale dialogs piece is here [3]. I'm hoping to port some of that and then add some docs in this (currently empty) space [4] later in the week. All the things you can do with the basic impl can be done easily with the SCXML impl (lone exception is if you've subclassed the object model for the basic state machine impl, that might require some thinking while porting). Additionally, you get certain things for free. Some examples: * Closer UML2 semantics, crisp mapping to state chart diagrams * Per state contexts (for scratch space workflow variables) * Arbitrary expression evaluation (rather than just method binding) in dialog definition * Histories, for navigation of the style - go back to (the view) where I was at some prior point And thats without exposing any SCXML implementation specific APIs (just using the shale-dialog abstraction APIs). Therefore, there is value to starting new applications with the SCXML dialogs implementation, rather than the basic one. Most basic dialog definitions can just be styled into SCXML dialog definitions, so its possible to move existing basic dialog definitions over fairly quickly, if thats the decision. At some point in the future, it makes sense to expose some of the underlying Commons SCXML APIs (such as the actual SCXML execution engine instance) via the (SCXML) DialogContext to developers. This will add another set of features that will become available to developers if they can be assured that the dialog implementation is the SCXML impl -- which they should be if they choose it ;-) -- but one step at a time. -Rahul [1] https://issues.apache.org/struts/browse/SHALE-61 [2] http://jakarta.apache.org/commons/scxml/ [3] http://jakarta.apache.org/commons/scxml/usecases/scxml-in-shale-dialogs.html [4] http://shale.apache.org/shale-dialog-scxml/index.html Torsten Craig
Re: [OT] download area down - some news when it will be up or mirrors?
On 10/25/06, Torsten Krah [EMAIL PROTECTED] wrote: people.apache.org refuses connections for afaik 2 days now. Is there some other space where i can get the nightly builds, or has someone some informations when it will be there again? The server was part of some infrastructure work that started on Saturday and was expected to be completed on Monday. Unfortunately, it's taking longer than expected. The infrastructure team is working on it and it will be back as soon as possible. -- Wendy
Re: Internationalization
On 10/25/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Does Shale have a feature for internationalization similar to Struts? snip/ JSF itself provides internationalization support, see f:loadBundle tag in the JSF core taglib. See shale-usecases sample application for examples of this. Shale adds to that and provides utility classes that can be used as managed beans. See LoadBundle and Messages classes in the util package in shale-core: http://shale.apache.org/shale-core/apidocs/org/apache/shale/util/package-summary.html -Rahul
How to use Shale/JSF for file download
Hi, I am trying to write a Java web app using JSF. I have a page which takes some info from user and it has a submit button. If the validation of the info entered by user is correct, the web app will send down a file. All the example I look at has navigation rule while navigate from one jsp to another. How can I send down a file instead of loading another jsp? Thank you.
Re: How to use Shale/JSF for file download
@file: http://wiki.apache.org/myfaces/Sending_Files @Kito: :D On 10/25/06, Kito D. Mann [EMAIL PROTECTED] wrote: Ah, cool! I was wondering what you were doing on Saturday :-). Tracey won't be in town, actually. I think I was checking the wrong date before. ~~~ Kito D. Mann ([EMAIL PROTECTED]) Author, JavaServer Faces in Action http://www.virtua.com - JSF/Java EE consulting, training, and mentoring http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info phone: +1 203-653-2989 fax: +1 203-653-2988 -Original Message- From: ying lcs [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 25, 2006 11:50 PM To: user@shale.apache.org Subject: How to use Shale/JSF for file download Hi, I am trying to write a Java web app using JSF. I have a page which takes some info from user and it has a submit button. If the validation of the info entered by user is correct, the web app will send down a file. All the example I look at has navigation rule while navigate from one jsp to another. How can I send down a file instead of loading another jsp? Thank you. -- Matthias Wessendorf http://tinyurl.com/fmywh further stuff: blog: http://jroller.com/page/mwessendorf mail: mwessendorf-at-gmail-dot-com
Re: calling authors
I am writing one on Trinidad for the German Java Magazine, maybe we can translate it later (deadline is december 20th or so) (I know I need to send you the portlet article too :) ) -M On 10/25/06, Kito D. Mann [EMAIL PROTECTED] wrote: Hello, I'm currently looking for people who are interested in writing great articles for JSF Central about MyFaces, Tomahawk, Tobago, Trinidad, or Shale. If you're interested, please reply! ~~~ Kito D. Mann ([EMAIL PROTECTED]) Author, JavaServer Faces in Action http://www.virtua.com http://www.virtua.com/ - JSF/Java EE consulting, training, and mentoring http://www.JSFCentral.com http://www.jsfcentral.com/ - JavaServer Faces FAQ, news, and info -- Matthias Wessendorf http://tinyurl.com/fmywh further stuff: blog: http://jroller.com/page/mwessendorf mail: mwessendorf-at-gmail-dot-com