Re: Component Question
Re: Component Question
- Subject: Re: Component Question
- From: Chuck Hill <email@hidden>
- Date: Fri, 14 Aug 2009 13:40:49 -0700
On Aug 14, 2009, at 12:17 PM, Johnny Miller wrote:
Hi Chuck,
I tried to model it pretty closely but the problem for me is the
following.
In your component you write the tabs in a loop in AjaxTabbedPanel's
appendToResponse phase. After the loop you call the function
content.appendToResponse(response, context); // content is assigned
to the third parameter WOElement template in the component's
constructor.
The child element's are then conditionally displayed - depending on
which tab was designated to be open on start.
I need to be able to call the child element's appendToResponse
inside the tab loop (for formatting reasons). Is that not possible?
Not without also making some modifications to the other two phases
(takeValues and invokeAction). You might want to look at ERXTabPanel.
Chuck
On Aug 14, 2009, at 6:55 AM, Chuck Hill wrote:
On Aug 13, 2009, at 7:39 PM, Johnny Miller wrote:
I've created a component that is modeled after the components
AjaxTabbedPanel and AjaxTabbedPanelTab found in Wonder's Ajax
Framework.
How closely? That was rather tricky to write, much deviation won't
work.
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.
Have you tried links and such? I will guess that they do not work
either.
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?
You are manually calling tab.appendChildrenToResponse. Are you
doing something similar during takeValues and invokeAction? If you
don't also handle those specially, this is not going to work.
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?
I suspect it might be more complex than what your implementation
handles.
Chuck
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
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
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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