You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Sergey Smirnov <si...@exadel.com> on 2005/07/22 21:57:46 UTC
[shale][clay] jsfid and base html tag. Proposal
PROPOSAL
To make it possible to provide jsfid attribute for any html tag.
Advantages:
* Ability to associate any custom component (not only the standard one) to
most sutable tag on the html mockup.
* Reusing the attibutes of the original html mockup instead of duplicating
them
Known Disadvantage:
Developer should make extra work with mapping html attributes if developer
decides to map, for example, table to inputText widget for some incredible
reason.
Presupposition:
Developers alway should have a chance to map 'span' to any Clay widget to
decouple with original html design if it needs
For more explanations:
==== quote from the private discussion. Permission to disclosure is granted
=====
Gary>>> Some HTML elements have an assumed mapping. For the
Gary>>> HTML table I didn't assume a mapping to a panelGrid we
Gary>>> couldn't support it. Tables that have table data ("td") "rolspan"
Gary>>> and "colspan" elements would not be supported by the
Gary>>> standard panelGrid component renderer.
> > [...]
> > The standard panelGrid has a limitation and if the mockup design does
> > not match the existing component layout well, page writer can ask html
> > designer to change the design, or, in contrast, page writer can ask
> > component developer to provide a custom component that supports what the
> > original design is required.
> > In another words, the component set is not limited to the standard ones
and
> > it is unknown what the base the page writer prefers for particular
> > component, It would be better to have a possibility to provide jsfid
> > attribute for any html tag and reuse this tag's attributes as a
component
> > attribute, and, if it is impossible or undesirable, use the 'span'
wrapper.
> >
>
Gary> Early on we discussed this topic. At the time, my narrow vision was
Gary> that people could create custom builders and register them. The
Gary> builders would map an html element to a JSF component.
Gary> My argument for this was that for some components, you would
Gary> need logic to pull that off.
Gary> I guess that we could try enhancing the builder that maps to the span
tag.
Gary> Open it up for all elements that have a jsfid attribute. We could
Gary> register it last in the chain so that it's invoked after all builders
Gary> that are mapped two specific elements.
Gary> The result might be kind of funky. The builder also knows for a
Gary> target component if it can have children. You might end up trying
Gary> to add children to a component that should not have children.
Gary> The assumed mapping was an attempt to prevent someone from
Gary> mapping an html table to a faces inputText widget.
=== quote off =========
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org