在一个小木屋里.我如何setEscapeModelString(false)上的选择



我需要每个选项在两行上有一个标签,在字符串中的特定点有一个换行符。我已经把
我想要休息,但它正在逃脱。如何阻止模型上的name字段的值被转义?下面的代码没有给我想要的结果:

...
final RadioGroup<WebShippingMethodDO> rg =
  initShipMethodOptionView(view, methodsModel, shipModel, shipMethodId, methods);
shipMethodForm.add(rg.setEscapeModelStrings(false));
...

结果如下:

...
<label for="shipMethodBtnac">FEDEX INTL ECONOMY&lt;br/&gt;(3 - 5 Days)</label>
...

但这就是我想要的:

...
<label for="shipMethodBtnac">FEDEX INTL ECONOMY<br/>(3 - 5 Days)</label>
...

如何关闭转义?

...
final RadioGroup<WebShippingMethodDO> rg =
  initShipMethodOptionView(view, methodsModel, shipModel, shipMethodId, methods);
// turn off escaping on rg's children
rg.visitChildren(new IVisitor<Component,Object>(){      
  @Override
  public void component(Component child, IVisit<Object> visit)
  {
    child.setEscapeModelStrings(false);
  }      
});
shipMethodForm.add(rg);
...

相关内容

  • 没有找到相关文章

最新更新