I want to update the width with the p:slider.
But it doesn´t work. I debug with firebug. The txt3 and txt4 will change the value. But my <p:outputPanel id="test" doesn´t change the value in the style attribute.
Here my code:
Bean: + Getter/ Setter
private int marginLeft = 30;
private int marginRight = 80;
Code: Select all
<h:outputText id="displayRange"
value="Between #{documentTemplateEditController.marginLeft} and #{documentTemplateEditController.marginRight}" />
<p:slider for="txt3,txt4,test" type="horizontal"
display="displayRange"
styleClass="documentTemplateEditorSliderHorizontal" range="true" />
<h:inputHidden id="txt3"
value="#{documentTemplateEditController.marginLeft}" />
<h:inputHidden id="txt4"
value="#{documentTemplateEditController.marginRight}" />
<p:outputPanel id="test"
style="margin-left: #{documentTemplateEditController.marginLeft}px;" />