
Untitled
By: a guest on
Apr 28th, 2012 | syntax:
None | size: 0.85 KB | hits: 25 | expires: Never
Changing background color of inputfield of editable coloumn in primefaces datatable on value change
<p:column id="articleDescription" headerText="Article Description" filterBy="#{article.description}" filterMatchMode="startsWith">
<p:inputText id="description" value="#{article.description}"style="border:none; box-shadow:none;" />
</p:column>
<p:inputText styleClass="changeable" />
$(document).delegate("tr :input.changeable", "change", function() {
var $this = $(this);
$this.css('background-color', $this.closest('tr').css('background-color'));
});
.inputTextStyle {
background-color: transparent !important;
}
<h:inputText id="vendorDiscountPerInputTxt"
value="#{articlePromo.descPromoPorcentaje}"
styleClass="inputTextStyle">
</h:inputText>
$(document.getElementById(str)).css("background-color", "pink !important");