Re: Component Question
Re: Component Question
- Subject: Re: Component Question
- From: Steve Quirk <email@hidden>
- Date: Fri, 14 Aug 2009 08:59:08 -0400 (EDT)
Is that the appendToResponse() method of your component?
Rendering HTML in that style isn't typical for WO and while it probably
works fine in rendering the html properly (more or less) it will get you
into trouble. You might want to look into using the template and
bindings.
In any case, I find it kind of amusing. You might be able to get it to
work if you do this before calling "tab.appendChildrenToResponse()":
context._setCurrentComponent(tab);
That might be enough to set the correct component in the action method for
the form. (If you're not calling super.appendToResponse() in this
component, do the same thing - context._setCurrentComponent(this) before
appending HTML).
Steve
On Thu, 13 Aug 2009, Johnny Miller wrote:
I've created a component that is modeled after the components AjaxTabbedPanel and
AjaxTabbedPanelTab found in Wonder's Ajax Framework.
Unlike AjaxTabbedPanel - the different tabs are all loaded at the same time i.e. no
ajax. Everything works fine except when I embed a Form inside one of the tabs.
For some reason the bindings gets out of sync because when the form is submitted it
doesn't call the function it is wired to?
I think the problem is when I'm looping through the child tabs and appending their
content i.e.
for(MoAccordionTab tab : tabs) {
response.appendContentString("\n\t\t<div");
appendTagAttributeToResponse(response, "class", togglerClass);
response.appendContentString(">");
response.appendContentString((String)tab.title().valueInComponent(component));
response.appendContentString("</div>");
response.appendContentString("\n\t\t<div class=\"" + elementClass + "\">");
tab.appendChildrenToResponse(response, context); // NOT THE RIGHT WAY?
response.appendContentString("\n\t\t</div>");
}
Any ideas?
Thanks in advance,
Johnny
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden