Hello,
I know there's at least one other recent thread about component
bindings, but can anyone give me a start on this:
On 03/01/2008, at 4:18 PM, Paul Hoadley wrote:
Is there an idiom for passing through _any and all_ bindings from a
parent to a child component without being specific about it?
That is, I've got a component that wraps a Dynamic Element. If I add
the binding 'abc="xyz"' to, say, a WOTextField, it will pass that
through to the HTML 'input' element as an attribute and its value.
How can I get my containing component to do something similar—is there
an idiom for passing completely arbitrary bindings from a parent to a
child component? If I can work that out, I think I can answer my
original questions:
1. I want to be able to set any bindings on the WOBrowser which
were set on the LSBrowser. I can list them out in the WOD:
browser : WOBrowser {
list = ^list;
item = ^item;
selections = ^selections;
displayString = ^displayString;
multiple = ^multiple;
id = ^id;
value = ^value;
escapeHTML = ^escapeHTML;
selectedValues = ^selectedValues;
name = ^name;
disabled = ^disabled;
size = ^size;
class = classList;
}
But then WOLips flags an error because I've "set" 'selectedValues'
and 'selections'. All I'm trying to express here is that whichever
of the two is set on the parent should be passed through to the child.
2. Similarly, I'd like to be able to pass through arbitrary
bindings such as 'id' in the list above without having to be
specific about it. Although 'id', for example, is not in the API
for WOBrowser, WOBrowser will pass that through to the corresponding
HTML element. How can I mimic this functionality in my LSBrowser?
--
Paul.
w http://logicsquad.net/
h http://paul.hoadley.name/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]