icefaces-2

Faces messages are not cleared on subsequent requests

谁说我不能喝 提交于 2020-01-16 01:05:48
问题 Case is as follows: you have a bean method which parses a file, and if parsing fail, error message is added, and if parsing successful, success message is added. But when you make consecutive operations: fail > success , i expect that the fail message will disappear and the success message appears, but what happens is that fail message is still there, and success message is added to it. Clearing the MessageList before adding the message is not a solution, because list is already cleared, if

Custom selectItems

有些话、适合烂在心里 提交于 2019-12-24 08:58:42
问题 i want to customize selectItems to display an image conditionally beside each checkbox so first i tried to display the image for all checkboxes but it gets displayed only once, here's what i tried: <h:selectManyCheckbox value="#{myBean.checkboxesArry}" layout="pageDirection"> <f:selectItems value="#{myBean.mapOfCheckBoxes}" var="entry"> <label> <ice:graphicImage url="/resources/images/myImage.bmp"/> <b>#{entry.value}</b> </label> </f:selectItems> </h:selectManyCheckbox> please advise how to

JSF2 + IceFaces 2 - Retrieve UIComponent from ViewRoot

爷,独闯天下 提交于 2019-12-13 06:22:35
问题 I've got hard time resolving the following. My problem is quite simple : I would like to highlight in red the forms fields that triggered validation errors. The error messages are placed correctly in the FacesContext using a context.addMessage(...) line. I'd like my system to be generic. All form fields having a message attached are automatically highlighted. I've found on this site a link to this excellent article : http://www.jroller.com/mert/entry/how_to_find_a_uicomponent With it, I did

How to override default file upload h:message in ICEfaces

半世苍凉 提交于 2019-12-07 01:32:31
问题 i am using the ace:fileEntry component to upload files and after successful upload i get the message that: 'File Entry' uploaded successfully 'filename'. and i want to override this message and display other message (some kind of a summary for parsing that uploaded file), any ideas how ? here's my code: <h:form> <ace:fileEntry id="fileEntryComp" label="File Entry" relativePath="uploaded" fileEntryListener="#{mybean.uploadFile}"/> <h:commandButton value="Upload Excel File" /> <h:message for=

How to override default file upload h:message in ICEfaces

泪湿孤枕 提交于 2019-12-05 05:28:14
i am using the ace:fileEntry component to upload files and after successful upload i get the message that: 'File Entry' uploaded successfully 'filename'. and i want to override this message and display other message (some kind of a summary for parsing that uploaded file), any ideas how ? here's my code: <h:form> <ace:fileEntry id="fileEntryComp" label="File Entry" relativePath="uploaded" fileEntryListener="#{mybean.uploadFile}"/> <h:commandButton value="Upload Excel File" /> <h:message for="fileEntryComp" /> </h:form> You have to create your own message and send it. It will overwrite the

ui:repeat doesn't work with Map

僤鯓⒐⒋嵵緔 提交于 2019-11-27 21:14:53
I have a Map of key / values, which I initialize in @PostConstruct as follows: Map<String, String> myMap; @PostConstruct public void init() { myMap=new LinkedHashMap<String, String>(); myMap.put("myKey","myValue"); } public Map<String, String> getMyMap() { return myMap; } public void setMyMap(Map<String, String> myMap) { this.myMap = myMap; } When I try to iterate over this Map with <ui:repeat> like shown bellow, and I set a break point on the getter for the Map, I notice that it is not getting called, and so nothing is printed: <ice:panelGroup> <ui:repeat items="#{myBean.myMap}" var="entry"

ui:repeat doesn't work with Map

这一生的挚爱 提交于 2019-11-26 20:38:03
问题 I have a Map of key / values, which I initialize in @PostConstruct as follows: Map<String, String> myMap; @PostConstruct public void init() { myMap=new LinkedHashMap<String, String>(); myMap.put("myKey","myValue"); } public Map<String, String> getMyMap() { return myMap; } public void setMyMap(Map<String, String> myMap) { this.myMap = myMap; } When I try to iterate over this Map with <ui:repeat> like shown bellow, and I set a break point on the getter for the Map, I notice that it is not