Hi,
We have a requirement where all the values of Static Select CCE widget have to be retrieved through code.
I tried by following the below method but the xml is returning has empty selectOptions value for the select values part.
Scriptlet:
<%
List results = queryContentComponent.getResults(rc);
int i =0;
if(results.size() > 0)
{
ContentInstance ci = new ContentInstance();
ci = (ContentInstance)results.get(0)
AttributeData[] ads =ci.getAttributes();
out.print(ads[2].getName()+"-------nameofAttribute");
AttributeDefinitionData cv =ads[2].getAttributeDefinition();
Map widgetMap =cv.getWidgetDataMap();
out.print(widgetMap);
}
%>
OUTPUT:
Teaser-CONTENT-TYPE-----name of Attribute
{defaultValueType=NO, defaultValueExpr=, onChangeFunction=, authGroupsRW=null, miscValue=, validationExprOther=, validationMode=null, extraHtml=, size=null, failureMessageType=null, selectOptions=, validationExpr=, referenceType=NO, overrideType=NONE, validationType=NO, failureMessageExpr=, authGroupsHidden=null, transformType=TRANSFORM_IMPL_NONE, widgetContextPath=/vgn-wcm-up, referenceClass=null, authGroupsRO=null, overridePath=null, transformClass=null}
Please let me know if I am missing anything.
Thanks,
Chandrakanth Ramireddy