WOSwitchComponent problem...
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.