I see your goal here. I agree it is too complicated to express in Tellurium
UI templates. Maybe we need some other mechanisms
to handle this type of complexity. How about have another tier for the
transform? I mean
Widget UI module
|
Javascript Library specific transform
|
Tellurium UI module
In this way, hope the transform tier could absorb some dynamic factors here.
I have not worked on Widget for quite some time and maybe should re-think
about the widget architecture.
The key thing here is how to find widget in the runtime DOM and then act on
each individual element, which
is really a pattern matching problem and how to describe the Widget with as
least attributes as possible.
Need more thoughts on this.
Thanks,
Jian
On Fri, May 15, 2009 at 2:41 PM, Nicolae Vintila <[email protected]> wrote:
>
> "You want to optimize the attributes in the UI module so that the UI module
> works better for XPath or jQuery
> selector, right? "
>
> I want to use an approach that makes it possible to manage the complexity
> of so many complex widgets - EXT-JS is a large library and encapsulates a
> significant complexity.
>
> Many widgets with numerous options which all influence the generated DOM.
>
> Does not seem possible to completely cover the combinations - even the
> rendering of a button in a form can be customized with a template... - see
> end.
>
> Cheers
> Nick
>
> From FormLayout.js
>
> if(!this.fieldTpl){
> var t = new Ext.Template(
> '<div class="x-form-item {5}" tabIndex="-1">',
> '<label for="{0}" style="{2}"
> class="x-form-item-label">{1}{4}</label>',
> '<div class="x-form-element" id="x-form-el-{0}"
> style="{3}">',
> '</div><div class="{6}"></div>',
> '</div>'
> );
> t.disableFormats = true;
> t.compile();
> Ext.layout.FormLayout.prototype.fieldTpl = t;
>
>
> ----
>
> Generates
>
>
> <div class="x-form-item"
>
> tabindex="-1">
>
> <label id="ext-gen1435"
>
> for="lookupComboBox"
>
> style="width: 60px;"
>
> class="x-form-item-label">CAP
>
> code:</label>
>
>
> <div class="x-form-element"
>
> id="x-form-el-DayTimeEntryForm_capCode_lookupComboBox"
>
> style="padding-left: 65px;">
>
> <div style="width: 0px;"
>
> id="ext-gen1154"
>
> class="x-form-field-wrap">
>
> <input style="width: 300px;"
>
> class="x-form-text x-form-field"
>
> size="24"
>
> autocomplete="off"
>
> id="lookupComboBox"
>
> name="codeLookup"
>
> type="text"><img
>
> style="display: none;"
>
> id="ext-gen1155"
>
> src="
> http://localhost:8080/webtime/com.mercer.apps.webtime.webtime_web/clear.cache.gif
> "
>
> class="x-form-trigger x-form-arrow-trigger">
>
> </div>
>
> </div>
>
> <div class="x-form-clear-left"></div>
>
> </div>
>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"tellurium-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tellurium-users?hl=en
-~----------~----~----~----~------~----~------~--~---