You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Heath Borders <he...@gmail.com> on 2004/12/08 21:00:57 UTC

faces-config/component/property element

Currently, we only support the following component configuration in
the faces-config.xml:

<faces-config>
  <component>
    <component-type />
    <component-class />
  </component>
</faces-config>


However, according to the DTD, we should support the following configuration:

<faces-config>
  <component>
    <component-type/>
    <component-class />
    <property>
      <property-name />
      <property-class />
      <default-value />			
      <suggested-value />
    </property>
  </component>
</faces-config>

The problem is that there doesn't appear to be a way to store these
default properties without increasing the coupling between the
FacesConfigurator and the ApplicationImpl.

Furthermore, there aren't guidelines in the spec for how to process
the default value (i.e. how to translate it from a String to the given
class).

Because this really is only mentioned in the DTD, I'm wondering if
this is something for future use only that has yet to be officially
defined.

Regardless, my team needs a means of defaulting properties of
components, and we would prefer to do so in a standardized manner.

Thoughts?

-- 
If you don't have a GMail account, I probably have 5 invites.  Just ask!
-Heath Borders-Wing
hborders@mail.win.org

Re: faces-config/component/property element

Posted by Craig McClanahan <cr...@gmail.com>.
One thing to keep in mind is that there is a difference between what
the *runtime* environment requires, and what the *designtime*
environment (i.e. inside a tool) requires.  Storing the property
information in the runtime, for example, is pretty useless because
there is no decisions that the runtime has to make that are based on
this information.

In the JSF specification, section 10.3.4 outlines the only information
that affects the behavior of the runtime environment.  All the rest of
the elements in faces-config.xml are intended for use in a tool.

Craig


On Wed, 8 Dec 2004 14:00:57 -0600, Heath Borders
<he...@gmail.com> wrote:
> Currently, we only support the following component configuration in
> the faces-config.xml:
> 
> <faces-config>
>   <component>
>     <component-type />
>     <component-class />
>   </component>
> </faces-config>
> 
> However, according to the DTD, we should support the following configuration:
> 
> <faces-config>
>   <component>
>     <component-type/>
>     <component-class />
>     <property>
>       <property-name />
>       <property-class />
>       <default-value />
>       <suggested-value />
>     </property>
>   </component>
> </faces-config>
> 
> The problem is that there doesn't appear to be a way to store these
> default properties without increasing the coupling between the
> FacesConfigurator and the ApplicationImpl.
> 
> Furthermore, there aren't guidelines in the spec for how to process
> the default value (i.e. how to translate it from a String to the given
> class).
> 
> Because this really is only mentioned in the DTD, I'm wondering if
> this is something for future use only that has yet to be officially
> defined.
> 
> Regardless, my team needs a means of defaulting properties of
> components, and we would prefer to do so in a standardized manner.
> 
> Thoughts?
> 
> --
> If you don't have a GMail account, I probably have 5 invites.  Just ask!
> -Heath Borders-Wing
> hborders@mail.win.org
>