Sure, I understand that very well. To clarify a bit: the point is that you need that PersonPage bean. Its "entirely different function" is to make your business data model fit JSF at a very _concrete_ level. It's there to represent an application domain artifact for the purpose of UI exposure. Obviously some such glue is unavoidable, but having to have a PersonPage bean in order to display, say, customer information in an HTML form is a bit horrifying to me.
For instance, a recent cause of frustration for me, if I have a List<String> property and I want to create a listbox out of it. I should be just able to tell JSF "here is my list of options", instead of creating a getter somewhere that would transform my List<String> into a SelectItems or whatever it was. And JSP being the main "syntactical environment" targeted by JSF, I should be able to do that in a JSP page. To reiterate my disclaimer, I have little experience with JSF so far, so maybe I'm misunderstanding the framework, so thanks for your attempt to illucidate it for me. best -----Original Message----- From: Martin Marinschek [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 22, 2006 6:24 PM To: MyFaces Discussion Subject: Re: very simple question regarding h:inputText No, I'm not duplicating anything here. In my PersonPage, there is no firstname, lastname, whatever. So no duplication of the business model - it's an entirely different object serving an entirely different function. regards, Martin On 8/22/06, Iordanov, Borislav (GIC) <[EMAIL PROTECTED]> wrote: > That's point. You are essentially duplicating your business model in > order to fit the UI framework. > > -----Original Message----- > From: Martin Marinschek [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 22, 2006 4:52 PM > To: MyFaces Discussion > Subject: Re: very simple question regarding h:inputText > > Personally, I don't use my business model as managed beans. My > "managed-beans" are a layer of page-supporting Java-classes instead, > and they carry business model objects as properties. > > e.g. I don't use person as a managed bean - instead I have a > PersonEditor bean which will allow me to edit not only the person, but > all accompanying information as well. > > regards, > > Martin > > On 8/22/06, Iordanov, Borislav (GIC) <[EMAIL PROTECTED]> wrote: > > No, it's defined in a Java class that contains action methods for > > several different (but conceptually related) forms. I'd like my > "backing > > beans" to not have any JSF API dependencies. IMHO, this is one of the > > biggest problems with JSF - it's too API intrusive as a framework. It > > seems to me that it likes to either (1) make your business model > > dependent on it or (2) force you to duplicate your business model. But > I > > might be mistaken, haven't used it enough yet. > > > > Regards, > > Bolerio > > > > -----Original Message----- > > From: Behrang Saeedzadeh [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, August 22, 2006 4:14 PM > > To: MyFaces Discussion > > Subject: Re: very simple question regarding h:inputText > > > > Isn't the action method a method defined in the backing bean :-? > > > > -Behi > > > > On 8/22/06, Iordanov, Borislav (GIC) <[EMAIL PROTECTED]> wrote: > > > I don't have a backing bean and I don't want to have one as it > doesn't > > > make sense for such an "add new" text box. The action method is the > > > proper place, thanks a lot. > > > > > > -----Original Message----- > > > From: Andrew Robinson [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, August 22, 2006 2:47 PM > > > To: MyFaces Discussion > > > Subject: Re: very simple question regarding h:inputText > > > > > > Answer: it depends > > > > > > if you want the value to be cleared even though there are validation > > > errors or if your submit is immediate, then you can bind your text > box > > > to a varaible on the backing bean. In the actionListener or action > of > > > the submit, clear the submitted value and local value of the > > > component. > > > > > > if you want the value to be cleared when a "normal" (non-immediate) > > > action is run, just clear the value from the backing bean that the > > > text box is bound to. > > > > > > On 8/22/06, Iordanov, Borislav (GIC) <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > I have an input box and an "Add" button next to it that allows the > > > user to > > > > enter new entries of something. After each submit, the text of my > > > input box > > > > must be cleared empty. But by default JSF keeps that last > submitted > > > value as > > > > the value of the component. How do I circumvent that? Any ideas? > > > > > > > > > > > > > > > > Thanks, > > > > > > > > Bolerio > > > > > > > > > > > > > > > > > -- > > "We can only see a short distance ahead, > > but we can see plenty there > > that needs to be done." - Alan Turing > > > > "Science is a differential equation. Religion > > is a boundary condition" - Alan Turing > > > > Behrang Saeedzadeh > > http://www.jroller.com/page/behrangsa > > http://my.opera.com/behrangsa > > > > > -- > > http://www.irian.at > > Your JSF powerhouse - > JSF Consulting, Development and > Courses in English and German > > Professional Support for Apache MyFaces > -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces