Andrew, is this a made up use case or one that someone has asked for? We
usually decide whether or not a UI feature of a component should be an
attribute on the component or a skinning property by how likely it is
that someone will want to change it on a component basis or a
application wide basis. Breadcrumbs showing the last item or not is
something that an application should make consistent throughout, so it
is a skinning property.
Jeanne
Andrew Robinson wrote, On 12/5/2008 8:35 AM PT:
Use case:
Show lines in the Trinidad tree, except for a tree on one page.
This is currently not possible. This can be done:
af|tree{
-tr-show-lines:true;
}
But there is no way to make an exception. What would be better is to
have <tr:tree showLines="true"/> as the default and then use <tr:tree
showLines="fale"/> for the one use case.
With JSF2, maybe some kind of factory could be used to default it to true?
Another thing that would be nice, outside of skinning, is to default a
non-visual attribute too. Like I mentioned with tr:commandLink, I
almost always set partialSubmit to true, so it would be much less work
for me if I could make true the default. My alternative is to subclass
all the components that I want defaults for and code it that way. Not
as easy to maintain though.
-Andrew
On Fri, Dec 5, 2008 at 9:10 AM, Gerhard Petracek
<[EMAIL PROTECTED]> wrote:
hello andrew,
just to avoid misunderstandings:
do you have a concrete use-case in mind?
regards,
gerhard
2008/12/5 Andrew Robinson <[EMAIL PROTECTED]>
Yeah something like that. Right now skinning properties in Trinidad
are used to set behaviors for components for the entire skin
(non-component level control). Since they can only be applied to all
or no components, there is no way to say for a given set of
components, use this behavior. So somewhere it would be good to be
able to set a default behavior, but be able to override it.
-Andrew
On Fri, Dec 5, 2008 at 8:50 AM, Gerhard Petracek
<[EMAIL PROTECTED]> wrote:
hello andrew,
@"true" as default value for partialSubmit:
do you mean via a new configuration entry?
regards,
gerhard
2008/12/5 Andrew Robinson <[EMAIL PROTECTED]>
All other frameworks use
component attributes for this, but Trinidad puts it in these
non-intuitive skinning keys.
Sorry, had one more comment right after I hit send again. Maybe just
having default component attributes for a web app would satisfy the
need. Like a way to say 'partialSumbit' should be defaulted to true on
all tr:commandLink. Then all the skin properties could be converted to
attributes and have their defaults set in a common location (like what
the skin does).
This would be much more useful and flexible as then page developers
can make exceptions to the rule.
--
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