"Manfred Klug" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
>
> > [snip]
> >
> > PROBLEMS
> >
> > [snip]
> >
> > ### 3. ### Undesirable overriding.
> >
> > As I mentioned above, in case of
> > <input type="submit" jsfid="submitForm" value="Button 1" />
> > the 'value' is passed to the component overriding the 'value' in the
> > component declaration.
> >
> > Scenario:
> > web designer has created a mockup that contains some buttons and wants
to
> > keep the title on the buttons as designed for further possible
re-design.
> > page writer should take the actual title on the buttons from the bundle
or
> > manage beans properties. However, the declaration:
> >
> > <component jsfid="submitForm" extends="commandButton">
> >     <attributes>
> >         <set name="value" value="#{bundle.SubmitName}" />
> >         <set name="action" value="whatever" />
> >     </attributes>
> > </component>
> >
> > does not work without removing 'value' from the html tag.
> >
> > So, we need a way how to disable overwriting in the particular cases
> >
> > PROPOSALS
> >
> > [snip]
> >
> > ### 3. ####
> >
> > Introduce the new attribute for tag <set> that names allowOverriding
that
> > might disable the subsequent overriding. The default value should be
true.
> > In this case we can resolve the conflict mentioned in the #3# :
scenario.
>
> Another possible solution is that the component always overwrites the
values in
> the html template.
>
> Examples:
>
> Use the value of the component
>
> <input type="submit" jsfid="submitForm" value="Button 1" />
>
> <component jsfid="submitForm" extends="commandButton">
>     <attributes>
>         <set name="value" value="#{bundle.SubmitName}" />
>         <set name="action" value="whatever" />
>     </attributes>
> </component>
>
>
> Use the value of the template
>
> <input type="submit" jsfid="submitForm" value="Button 1" />
>
> <component jsfid="submitForm" extends="commandButton">
>     <attributes>
>         <set name="action" value="whatever" />
>     </attributes>
> </component>
>
>
> With this solution no new attribute is needed and in most (all?) cases it
> should work as expected.
>

The key point here: what is the inheritence hierarchy. In another worlds,
what is on the top of the hierarchy: html snippet or the widget referenced
by jsfid. if we keep in mind the paradign of OOP, class inherits and
overrides the super-class, but not vice-versa.

So,

In my case, it looks like:

| snippet
|-- submitForm
   |--commandButton

In your case:

| submitForm
|--snippet
   |--commandButton

The advantage of your proposal is avoiding to change the current DTD with
introducing allowOverriding attribute.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to