我想将一个参数从 html 传递给 WCMUse 类。
爪哇:
public class ComponentHelper extends WCMUse {
public void activate() throws Exception {}
...
public String methodA(String parameter1) {
...
}
public String getParam() {
String param = "";
...
return param;
}
}
HTML:
<componentHelper data-sly-use.componentHelper="ComponentHelper" data-sly-unwrap />
...
<div>
${componentHelper.methodA @ parameter1=componentHelper.param}
<!--/* Also tried: ${componentHelper.methodA @ componentHelper.param} */-->
</div>
不幸的是,看起来我无法将任何参数传递给该方法。有没有办法将参数从 html 传递给 WCMUse 类?