on 2019 May 08 8:52 PM
I am currently trying to configure a create wizard for a custom item type. One of the fields (attribute) of the object is a string value. So in this case in the create wizard editor it renders a normal text box for input. This is expected as the data type is just a string.
BUT rather than providing a textbox for input is there anyway to replace the textbox with a drop down menu with option values? I would also need to populate the options for the menu dynamically (they will differ for each item).
This is for the PCM Backoffice (Hybris 6.7)
Request clarification before answering.
One solution is to create your own editor, rendering either a textbox or a dropdown. Than you use this editor within wizard-configuration:
..
<wz:property qualifier="myField" type="java.lang.String" editor="de.mycompany.backoffice.editors.myeditor">
<wz:editor-parameter>
<wz:name>attribute</wz:name>
<wz:value>{parentObject.attribute}</wz:value>
</wz:editor-parameter>
</wz:property> ..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks . I think this should work. I am currently facing issue trying to retrieve the value from within the editor class.
I am trying to get the value from usng a method I created (which returns the string value) using EditorContext as such:
final Object productCode = context.getParameterAs(PARAM_CODE);
if(productCode instanceof String)
{
return (String) productCode;
}
But I am not getting the actual value of the parent object but rather the value defined in the configuration. {parentObject.code}
Maybe I need to reference it differently in configuration OR I'm obtaining it incorrectly in editor class?
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.