• 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
WOSwitchComponent problem...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WOSwitchComponent problem...


  • Subject: WOSwitchComponent problem...
  • From: Alexandra Milton <email@hidden>
  • Date: Fri, 16 Jul 2004 03:09:28 +0200

I am working on using WOSwitchComponent to make the user able to design templates in a content management system. The idea is to make the user able to choose two strings, an image and two more strings for an article.

Inputwise that seem to work well where my WOSwitchComponent looks like this:


SwitchComponent2: WOSwitchComponent { WOComponentName = editElementTypeItem.elementTypeDesc; value = editElementTypeItem.elementTypeDesc; size = editElementTypeItem.elementCols; cols = editElementTypeItem.elementCols; filePath = cmsDataPlaceHolder.dataPath; rows = editElementTypeItem.elementRows; data = cmsDataPlaceHolder.dataContent; mimeType = cmsDataPlaceHolder.dataMimeType; }

but when I did the part that is supposed to show the very same contentobjects but where WOTextField is substituted into a WOString and so forth the binding looks like this:

SwitchComponent1: WOSwitchComponent {
	WOComponentName = showElementTypeItem.elementTypeDesc;
	value = showElementTypeItem.elementTypeDesc;
	filePath = cmsDataPlaceHolder.dataPath;
	mimeType = cmsDataPlaceHolder.dataMimeType;
	data = cmsDataPlaceHolder.dataContent;

Obviously that is a problem when WOComponentName is "WOImage" which does not like bindings to both "value" and "data" at the same time.

Since I must use the value-bindning for WOStrings I wonder if there is any way out of this. Can I dynamically set the attributes for the WOSwitchComponent? Or is there a better way to being able to switch WOElements dynamically?

Regards,

Alexandra
Stockholm, Sweden
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: [Newbie] Direct action woes
  • Next by Date: Re: numberformat problems
  • Previous by thread: Re: [Newbie] Direct action woes
  • Next by thread: Re: WOSwitchComponent problem...
  • Index(es):
    • Date
    • Thread