on ‎2018 Mar 05 10:20 AM
Hi All,
We have requirement to display Product Name through ZUL file in Backoffice. Though we are able to get product name in widget controller and not getting way to sent to corresponding ZUL file and to display it.
Is there any way to send parameters from widget controller to ZUL file and use it.
Regards, Raghavendra.
Request clarification before answering.
Hi Raghavendra,
You can access the values in backoffice widget in a simple way by storing the values as key values pairs in widget model. Like in controller you will write code like below.
public class InfoController extends DefaultWidgetController
{
@Override
public void preInitialize(Component comp) {
super.preInitialize(comp);
// it is important to fill widget model in preInitialize method, not in initialize, if we want to access it in zul file
getModel().put("MODEL_KEY", "MODEL_VALUE");
}
In zul file you will access same value like below.
<!-- accessing widget model -->
<label value="${widgetModel.MODEL_KEY}"/>
For more details please refer to the below link,
https://help.hybris.com/6.6.0/hcd/8c18483786691014a1e8bebb3f622780.html
Regards,
Raghavendra.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 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.