You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Iordanov, Borislav (GIC)" <bo...@miamidade.gov> on 2006/08/22 20:12:08 UTC
very simple question regarding h:inputText
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
Re: very simple question regarding h:inputText
Posted by Behrang Saeedzadeh <be...@gmail.com>.
Hi Bolerio,
Oh, I had mistaken a backing bean with a managed bean :-)
Regards,
Behi
On 8/22/06, Iordanov, Borislav (GIC) <bo...@miamidade.gov> 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:behrangsa@gmail.com]
> 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) <bo...@miamidade.gov> 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:andrew.rw.robinson@gmail.com]
> > 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) <bo...@miamidade.gov> 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
>
--
"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
RE: very simple question regarding h:inputText
Posted by "Iordanov, Borislav (GIC)" <bo...@miamidade.gov>.
In JSF, the M from MVC are things like SelectItem, DataModel etc. (more
inline with the original MVC from Smalltalk than the so called Model 2
crap), not the business data model like Person etc.
________________________________
From: CD [mailto:dcypher67@gmail.com]
Sent: Tuesday, August 22, 2006 5:10 PM
To: MyFaces Discussion
Subject: Re: very simple question regarding h:inputText
IMHO, it's not duplicating it but rather exposing the data contained in
the model in MVC fashion. How else would you display your data from a
model in a view without coupling the view and the model together while
retaining the purity MVC?
On 8/22/06, Iordanov, Borislav (GIC) <bo...@miamidade.gov> wrote:
That's point. You are essentially duplicating your business model in
order to fit the UI framework.
-----Original Message-----
From: Martin Marinschek [mailto:martin.marinschek@gmail.com]
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) < boris@miamidade.gov
<ma...@miamidade.gov> > 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: behrangsa@gmail.com
<ma...@gmail.com> ]
> 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) <bo...@miamidade.gov> 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: andrew.rw.robinson@gmail.com]
> > 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) <boris@miamidade.gov > 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
Re: very simple question regarding h:inputText
Posted by CD <dc...@gmail.com>.
IMHO, it's not duplicating it but rather exposing the data contained in the
model in MVC fashion. How else would you display your data from a model in
a view without coupling the view and the model together while retaining the
purity MVC?
On 8/22/06, Iordanov, Borislav (GIC) <bo...@miamidade.gov> wrote:
>
> That's point. You are essentially duplicating your business model in
> order to fit the UI framework.
>
> -----Original Message-----
> From: Martin Marinschek [mailto:martin.marinschek@gmail.com]
> 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) <bo...@miamidade.gov> 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:behrangsa@gmail.com]
> > 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) <bo...@miamidade.gov> 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:andrew.rw.robinson@gmail.com]
> > > 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) <bo...@miamidade.gov> 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
>
Re: very simple question regarding h:inputText
Posted by Martin Marinschek <ma...@gmail.com>.
For a solution to the problem of your last paragraph, take a look at the:
s:selectItems component
in the MyFaces-sandbox.
regards,
Martin
On 8/23/06, Iordanov, Borislav (GIC) <bo...@miamidade.gov> wrote:
> 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:martin.marinschek@gmail.com]
> 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) <bo...@miamidade.gov> wrote:
> > That's point. You are essentially duplicating your business model in
> > order to fit the UI framework.
> >
> > -----Original Message-----
> > From: Martin Marinschek [mailto:martin.marinschek@gmail.com]
> > 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) <bo...@miamidade.gov> 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:behrangsa@gmail.com]
> > > 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) <bo...@miamidade.gov> 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:andrew.rw.robinson@gmail.com]
> > > > 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) <bo...@miamidade.gov> 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
>
--
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces
RE: very simple question regarding h:inputText
Posted by "Iordanov, Borislav (GIC)" <bo...@miamidade.gov>.
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:martin.marinschek@gmail.com]
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) <bo...@miamidade.gov> wrote:
> That's point. You are essentially duplicating your business model in
> order to fit the UI framework.
>
> -----Original Message-----
> From: Martin Marinschek [mailto:martin.marinschek@gmail.com]
> 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) <bo...@miamidade.gov> 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:behrangsa@gmail.com]
> > 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) <bo...@miamidade.gov> 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:andrew.rw.robinson@gmail.com]
> > > 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) <bo...@miamidade.gov> 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
Re: very simple question regarding h:inputText
Posted by Martin Marinschek <ma...@gmail.com>.
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) <bo...@miamidade.gov> wrote:
> That's point. You are essentially duplicating your business model in
> order to fit the UI framework.
>
> -----Original Message-----
> From: Martin Marinschek [mailto:martin.marinschek@gmail.com]
> 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) <bo...@miamidade.gov> 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:behrangsa@gmail.com]
> > 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) <bo...@miamidade.gov> 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:andrew.rw.robinson@gmail.com]
> > > 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) <bo...@miamidade.gov> 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
RE: very simple question regarding h:inputText
Posted by "Iordanov, Borislav (GIC)" <bo...@miamidade.gov>.
That's point. You are essentially duplicating your business model in
order to fit the UI framework.
-----Original Message-----
From: Martin Marinschek [mailto:martin.marinschek@gmail.com]
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) <bo...@miamidade.gov> 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:behrangsa@gmail.com]
> 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) <bo...@miamidade.gov> 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:andrew.rw.robinson@gmail.com]
> > 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) <bo...@miamidade.gov> 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
Re: very simple question regarding h:inputText
Posted by Martin Marinschek <ma...@gmail.com>.
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) <bo...@miamidade.gov> 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:behrangsa@gmail.com]
> 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) <bo...@miamidade.gov> 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:andrew.rw.robinson@gmail.com]
> > 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) <bo...@miamidade.gov> 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
RE: very simple question regarding h:inputText
Posted by "Iordanov, Borislav (GIC)" <bo...@miamidade.gov>.
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:behrangsa@gmail.com]
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) <bo...@miamidade.gov> 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:andrew.rw.robinson@gmail.com]
> 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) <bo...@miamidade.gov> 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
Re: very simple question regarding h:inputText
Posted by Behrang Saeedzadeh <be...@gmail.com>.
Isn't the action method a method defined in the backing bean :-?
-Behi
On 8/22/06, Iordanov, Borislav (GIC) <bo...@miamidade.gov> 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:andrew.rw.robinson@gmail.com]
> 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) <bo...@miamidade.gov> 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
RE: very simple question regarding h:inputText
Posted by "Iordanov, Borislav (GIC)" <bo...@miamidade.gov>.
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:andrew.rw.robinson@gmail.com]
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) <bo...@miamidade.gov> 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
>
>
Re: very simple question regarding h:inputText
Posted by Andrew Robinson <an...@gmail.com>.
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) <bo...@miamidade.gov> 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
>
>