Re: How do I embed/load already existing components into other components

Paul Yu <[email protected]>
Newsgroups gmane.comp.web.webobjects.wonder-disc
Message-ID <[email protected]>
Giancarlo

That's the reason I switch away from AjaxTabPanel.  I could not find a way to dynamically add tabs to the setup, but that may be just me.  I use CCAjaxTabPanel.  Something like this...


		<wo:CCAjaxTabPanel id = "myCCTabs" selectedTab="$tabSelection" tabs = "$tabs" tabNameKey="tabLabel" >
				
			<wo:AjaxUpdateContainer id = "ccTabContentContainer">
	    		<wo:switch WOComponentName="$selectedTabsWOComponent" myBinding = "$value"   />
			</wo:AjaxUpdateContainer>
			
		</wo:CCAjaxTabPanel>


Then in the .java file I can dynamically set the tabs NSArray.  You can also set the tabSelection variable too.

Paul

On Feb 5, 2013, at 8:11 AM, Giancarlo Dessena <[email protected]> wrote:

> I'm trying to build a tab panel to which i can add tabs dynamically.
> A typical scenario would be that on one of the tabs there would be a user search.
> When you click on one of the search results a new tab should open displaying information to the user that was clicked.
> 
> Am 04.02.2013 um 21:30 schrieb Chuck Hill <[email protected]>:
> 
>> 
>> On 2013-02-04, at 4:28 AM, Giancarlo Dessena wrote:
>> 
>>> Hi Chuck,
>>> 
>>> you are right about the AjaxTabPanel :) Guess i have to build my own AjaxTabs to achieve my goal.
>>> Anyway I'm still wondering if it is possible to load an existing component into another one.
>>> 
>>> <wo:??? component = "$<componentReference>"  />
>>> 
>>> Is that even Possible?
>> 
>> Almost anything is possible with enough effort.  But code like this:
>> 
>> tabs = new NSMutableArray<WOComponent>();
>> tabs.add(new SearchUser(this.context()));
>> tabs.add(new User(this.context()));
>> 
>> is not how WO is intended to work.
>> 
>> What are you trying to accomplish?  If you can tell us that, we can probably tell you the Right Way to do it.
>> 
>> 
>> Chuck
>> 
>>> 
>>> Carlo
>>> 
>>> Am 01.02.2013 um 18:38 schrieb Chuck Hill <[email protected]>:
>>> 
>>>> Hi Carlo,
>>>> 
>>>> It does not work like that, you can't use it like that.  You need to follow the pattern in AjaxExamples.
>>>> 
>>>> Chuck
>>>> 
>>>> 
>>>> On 2013-02-01, at 9:14 AM, Giancarlo Dessena wrote:
>>>> 
>>>>> Hi everybody,
>>>>> 
>>>>> I'm trying to fill the tabs of an AjaxTabbedPanel with components that i have already created and stored in a list.
>>>>> I have been working with the switchComponent to load new components by name, but I don't know which component i can use to embed/load an existing Component.
>>>>> 
>>>>> <wo:AjaxTabbedPanel id="tabbedPanel">
>>>>> 	  <wo:loop list="$tabs" item = "$tab">
>>>>> 	  		<wo:AjaxTabbedPanelTab name="~tab.title + '  [x]'" >
>>>>> 	  			<wo:??? component = "$tab"  />
>>>>> 	  		</wo:AjaxTabbedPanelTab>
>>>>> 	  </wo:loop>
>>>>> </wo:AjaxTabbedPanel>
>>>>> 
>>>>> ...
>>>>> tabs = new NSMutableArray<WOComponent>();
>>>>> tabs.add(new SearchUser(this.context()));
>>>>> tabs.add(new User(this.context()));
>>>>> 
>>>>> Any suggestions?
>>>>> 
>>>>> Carlo
>>>>> ------------------------------------------------------------------------------
>>>>> Everyone hates slow websites. So do we.
>>>>> Make your web apps faster with AppDynamics
>>>>> Download AppDynamics Lite for free today:
>>>>> http://p.sf.net/sfu/appdyn_d2d_jan_______________________________________________
>>>>> Wonder-disc mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/wonder-disc
>>>> 
>>>> -- 
>>>> 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/gvc/practical_webobjects
>>>> 
>>>> Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C! 
>>>> Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine!
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>> 
>> 
>> -- 
>> 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/gvc/practical_webobjects
>> 
>> Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C! 
>> Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine!
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
> 
> 
> ------------------------------------------------------------------------------
> Free Next-Gen Firewall Hardware Offer
> Buy your Sophos next-gen firewall before the end March 2013 
> and get the hardware for free! Learn more.
> http://p.sf.net/sfu/sophos-d2d-feb
> _______________________________________________
> Wonder-disc mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wonder-disc


------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.