• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Component Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Component Question


  • Subject: Re: Component Question
  • From: Johnny Miller <email@hidden>
  • Date: Fri, 14 Aug 2009 09:17:02 -1000

Hi Steve,

Since my tab component extends AjaxDynamicElement and not WOComponent I'm unable to use your suggestion.

Do you have an alternate suggestion?

Thanks a lot,

Johnny

On Aug 14, 2009, at 2:59 AM, Steve Quirk wrote:


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



Johnny Miller Kahalawai Media Corp w: www.kahalawai.com e: email@hidden p: 808.661.7962

_______________________________________________
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


References: 
 >Component Question (From: Johnny Miller <email@hidden>)
 >Re: Component Question (From: Steve Quirk <email@hidden>)

  • Prev by Date: Re: Component Question
  • Next by Date: Re: Component Question
  • Previous by thread: Re: Component Question
  • Next by thread: Re: Component Question
  • Index(es):
    • Date
    • Thread