This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protected void encodeMarkup(FacesContext context, PickList pickList) throws IOException { | |
| ... | |
| writer.startElement("tbody", null); | |
| // FILTER EXTENSION BEGIN | |
| if (pickList.isShowSourceFilter() || pickList.isShowTargetFilter()) { | |
| if (pickList.isShowSourceControls()) { | |
| writer.startElement("td", null); | |
| writer.endElement("td"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PrimeFaces.widget.PickList.prototype.filter = function(input, source) { | |
| var $pkitems = source ? this.sourceList : this.targetList; | |
| var escapedInput = input.value.replace(/([()[{*+.$^\\|?])/g, '\\$1'); | |
| var re = new RegExp(escapedInput, "i"); | |
| $pkitems.find(".ui-picklist-item").show().filter( | |
| function() { | |
| return !re.test(jQuery(this).text()); | |
| }).hide(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .ui-picklist-source-filter input, | |
| .ui-picklist-target-filter input { | |
| background: #ffffff url("#{resource['img:filter.png']}?rv=${buildNumber}") no-repeat scroll 98% !important; | |
| width: 95%; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PrimeFaces.widget.DefaultCommand = PrimeFaces.widget.BaseWidget.extend({ | |
| init: function(cfg) { | |
| ... | |
| //attach keypress listener to parent form | |
| this.jqTarget.parents('form:first').keydown(function(e) { | |
| ... | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <p:messages/> | |
| <p:focus context="secondGrid"/> | |
| <h:panelGrid columns="2" style="margin-bottom:10px;"> | |
| <h:outputLabel value="Dummy *"/> | |
| <p:inputText required="true" label="Dummy"/> | |
| </h:panelGrid> | |
| <h:panelGrid id="secondGrid" columns="2"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bindCheckboxEvents: function() { | |
| ... | |
| A HUGE PERFORMANCE PROBLEM WITH THE CODE BELOW | |
| //keyboard support | |
| $(document).off('focus.ui-chkbox blur.ui-chkbox keydown.ui-chkbox keyup.ui-chkbox', checkboxInputSelector) | |
| .on('focus.ui-chkbox', checkboxInputSelector, null, function() { | |
| var input = $(this), | |
| box = input.parent().next(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bindCheckboxEvents: function() { | |
| ... | |
| SOLUTION TO THE PERFORMANCE PROBLEM | |
| //keyboard support | |
| $(checkboxSelector).off('focus.ui-chkbox blur.ui-chkbox keydown.ui-chkbox keyup.ui-chkbox') | |
| .on('focus.ui-chkbox', function() { | |
| var input = $(this), | |
| box = input.parent().next(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Client-side conversion / validation fails in most cases for f:convertDateTime and valid dates / times | |
| PrimeFaces 4.x (current) | |
| The client-side converter for f:convertDateTime uses $.datepicker.parseDate(format, value, settings). | |
| The problem with $.datepicker.parseDate ist an exception when the format doesn't have days | |
| (works as designed). E.g. try to parse $.datepicker.parseDate("mm/y", "11/16"). | |
| An exception will be raised. "mm/y" for datepicker is exactly the pattern "MM/yy" in | |
| f:convertDateTime. Simple attach e.g. <f:convertDateTime pattern="MM/yy" timeZone="..."/> | |
| to p:inputText and use CSV. The date will be always invalid. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class MyTestIT extends AbstractSeleniumTest { | |
| @FlowOnPage(step = 1, desc = "Description for this method") | |
| void flowSomePage(SomePage somePage) { | |
| ... | |
| } | |
| @FlowOnPage(step = 2, desc = "Description for this method") | |
| void flowAnotherPage(AnotherPage anotherPage) { | |
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Target(ElementType.METHOD) | |
| @Retention(RetentionPolicy.RUNTIME) | |
| public @interface FlowOnPage { | |
| int step() default 1; | |
| String desc(); | |
| } |
OlderNewer