You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Rob Decker <ro...@objectsource.org> on 2005/04/14 22:51:32 UTC
inputParam component
I created a component I'd like to contribute to myfaces. If I stick it in JIRA will
someone merge it into the code base?
It extends inputHidden by adding an attribute, paramValue, which allows value binding
predefined form values to a managed bean. For example, if you have a managed bean
named searchBean with a setLastModified(Date d) method you can create a hidden form
element with a preset date:
<x:inputParam value="#{searchBean.lastModified}" paramValue="04/05/2005">
<f:convertDateTime type="date" dateStyle="short"/>
</x:inputParam>
renders:
<input type="hidden" value="04/05/2005"/>
When the form is submitted searchBean.setLastModified is called with the Date object.
--
Rob
@objectsource.org
Re: inputParam component
Posted by Sean Schofield <se...@gmail.com>.
Ahh ok I see. Well let me think about it some more then. You should
go ahead and add it to JIRA and see what other people think as well.
sean
On 4/14/05, Rob Decker <ro...@objectsource.org> wrote:
> It solves the problem of having predefined form variables that can be set
> into a managed bean. inputHidden doesn't do that because it is not capable
> of value binding and providing a value to bind at the same time (it only has
> one value attribute). It is added to an existing component: inputHidden. It
> extends it.
>
>
> ----- Original Message -----
> From: "Sean Schofield" <se...@gmail.com>
> To: "MyFaces Discussion" <my...@incubator.apache.org>
> Sent: Thursday, April 14, 2005 5:03 PM
> Subject: Re: inputParam component
>
> It sounds interesting but what problem does this solve exactly? Why
> not use inputHidden? Also consider it as an add-on to an existing
> component instead of a completely new component.
>
> sean
>
> On 4/14/05, Rob Decker <ro...@objectsource.org> wrote:
> > I created a component I'd like to contribute to myfaces. If I stick it in
> JIRA will
> > someone merge it into the code base?
> >
> > It extends inputHidden by adding an attribute, paramValue, which allows
> value binding
> > predefined form values to a managed bean. For example, if you have a
> managed bean
> > named searchBean with a setLastModified(Date d) method you can create a
> hidden form
> > element with a preset date:
> >
> > <x:inputParam value="#{searchBean.lastModified}" paramValue="04/05/2005">
> > <f:convertDateTime type="date" dateStyle="short"/>
> > </x:inputParam>
> >
> > renders:
> >
> > <input type="hidden" value="04/05/2005"/>
> >
> > When the form is submitted searchBean.setLastModified is called with the
> Date object.
> >
> > --
> > Rob
> >
> > @objectsource.org
> >
> >
>
>
Re: inputParam component
Posted by Rob Decker <ro...@objectsource.org>.
It solves the problem of having predefined form variables that can be set
into a managed bean. inputHidden doesn't do that because it is not capable
of value binding and providing a value to bind at the same time (it only has
one value attribute). It is added to an existing component: inputHidden. It
extends it.
----- Original Message -----
From: "Sean Schofield" <se...@gmail.com>
To: "MyFaces Discussion" <my...@incubator.apache.org>
Sent: Thursday, April 14, 2005 5:03 PM
Subject: Re: inputParam component
It sounds interesting but what problem does this solve exactly? Why
not use inputHidden? Also consider it as an add-on to an existing
component instead of a completely new component.
sean
On 4/14/05, Rob Decker <ro...@objectsource.org> wrote:
> I created a component I'd like to contribute to myfaces. If I stick it in
JIRA will
> someone merge it into the code base?
>
> It extends inputHidden by adding an attribute, paramValue, which allows
value binding
> predefined form values to a managed bean. For example, if you have a
managed bean
> named searchBean with a setLastModified(Date d) method you can create a
hidden form
> element with a preset date:
>
> <x:inputParam value="#{searchBean.lastModified}" paramValue="04/05/2005">
> <f:convertDateTime type="date" dateStyle="short"/>
> </x:inputParam>
>
> renders:
>
> <input type="hidden" value="04/05/2005"/>
>
> When the form is submitted searchBean.setLastModified is called with the
Date object.
>
> --
> Rob
>
> @objectsource.org
>
>
Re: inputParam component
Posted by Sean Schofield <se...@gmail.com>.
It sounds interesting but what problem does this solve exactly? Why
not use inputHidden? Also consider it as an add-on to an existing
component instead of a completely new component.
sean
On 4/14/05, Rob Decker <ro...@objectsource.org> wrote:
> I created a component I'd like to contribute to myfaces. If I stick it in JIRA will
> someone merge it into the code base?
>
> It extends inputHidden by adding an attribute, paramValue, which allows value binding
> predefined form values to a managed bean. For example, if you have a managed bean
> named searchBean with a setLastModified(Date d) method you can create a hidden form
> element with a preset date:
>
> <x:inputParam value="#{searchBean.lastModified}" paramValue="04/05/2005">
> <f:convertDateTime type="date" dateStyle="short"/>
> </x:inputParam>
>
> renders:
>
> <input type="hidden" value="04/05/2005"/>
>
> When the form is submitted searchBean.setLastModified is called with the Date object.
>
> --
> Rob
>
> @objectsource.org
>
>