This content has been marked as final. Show 8 replies
FatWire doesn't provide a feasibility to assign multiple attribute editors to a single attribute.
By "runtime", if you mean, you have to show different attribute editors for a same attribute in different asset type edit screen. It is possible.
Thanks for the reply.
But I am still confused. We assign a attribute editor to a attribute at the time of its creation. So how will I show different attribute editors for a same attribute in different asset type edit screen?
Can you help me this?
I would suggest two ways for this. Please verify with experts before you implement.
1. Create two different attributes A1, A2 with same display name A,A and assign two different attribute editors AE1, AE2 for each. Add both attributes to your asset definition and show them selectively on both inspect & edit screens, based on subtypes ST1,ST2. Say, you need to show AE1 for ST1and AE2 for ST2 & your original attribute will be A1.
So, when you save ST1, value provided in AE1 will be saved to A1, absolutely no problem. But when you save ST2, value provided in AE2 must be copied to A1, instead of A2 & this can be implemented in Filter, with subtype check.
2. No need to create A2 and AE2. Have A1-AE1 combination for any subtype. Do an asset type check in your cs-element(written to code your custom attr. editor) & display corresponding attribute editor only, based on check.
Hope this helps!
Reply if any more elaboration needed!
Mark Helpful or Correct if applicable..
Edited by: B S R on Mar 14, 2013 12:55 PM
Edited by: B S R on Mar 14, 2013 12:58 PM
Why not simply have a single attribute with a one attribute editor that dispatches to a different element based on whatever logic is required to choose the appropriate attribute editor.
For example if the subtype was the deciding factor then you might have the following elements.
Of course in 11g you can also put the subtype elements under CustomElements/OpenMarket/Gator/AttributeTypes/.........
Of course depending on how you configure the attribute editor it might make your XML Attribute Editor a little complex. You could have separate elements for each subtype in the example above and you read from Presentation Object based on the subtype.
Edited by: 994389 on Mar 17, 2013 2:35 PM
tell me a real life example where we need 2 editor for single attribute??
one attribute can be of one data type and for each data type there is one editor.
Can you share what is the requirement?
Sorry for replying late.
My requirement is like i have one drop down menu. and based on the value selected in this, I want to assign a separate editor to a single attribute.
Eg: in Drop down , if I choose Offer as value, editor should be one creating radio button and if I choose product, editor should be one creating another dropdown.
Hi, I don't think there is any 'Dependent Choice List' kind of option in Webcenter Sites. You may have to use some out-of-box jquery to achieve this..