You can use this function in Javascript : onkeyup=”if(this.value.length>(max value)){this.value=this.value.substring(0,5);alert(‘(Warning Text)’)}” Example : <h:inputTextarea value=”#{myController.bigtext}” onkeyup=”if(this.value.length>500){this.value=this.value.substring(0,5);alert(‘The maximum value is 500 … More
Author: camilamacedo86
PostgreeSQL : How to consult the size of one column ?
SELECT atttypmod -4 FROM pg_attribute WHERE attrelid = ‘Table’::regclass AND attname = ‘column’;
Java 8 : How to sum Integer values with streams ?
Below follows an example that show how to get the sum total of all attributes contained in a collection. Example … More
How to download a excel file from html using javascript ?
Table : <table id=”mytable”> {…} </table> Button : <a download=”file.xls” href=”#” class=”btn-print” data-name=”#{mytable}”> Download Excel File </a> JavaScript : <script> $(‘.btn-print’).on(‘click’, function() … More
JavaServerFaces – Example of list interaction with ui:repeat
<ui:repeat value=”#{myBean.myList}” var=”obj”> <td> <p>#{obj.value}</p> </td> </ui:repeat>
PostgreeSQL : How change the size of one column ?
UPDATE pg_attribute SET atttypmod = (your new size) + 4 WHERE attrelid = ‘(table name)’::regclass AND attname = ‘(column name)’; … More
Primefaces – What to do to not lose the values of the components when has some update ?
Often we need to update a form or a div and the component values are lost . To solve it … More
Meteor Js : Scalingo host with new pricing policy from June 1st
Until now, was possible do two free deploys at no cost whatsoever. A new policy will starting from June 1, … More
Meteor Js: Colorize your console with Chalk. – Nice Package
It is often helpful define different types of logs , like as error or informative logs . What about separate … More
Primefaces : How to change to the autocomplete component isn’t case sensitive?
Check your implementation driven by “completeMethod”. In this implementation you should perform the dealings só that this query isn’t case … More