omnifaces

Handle ViewExpiredException in the background and restore form values

廉价感情. 提交于 2019-12-19 04:32:08
问题 Is there a database-, primefaces- and "keep-session-alive"-free solution to prevent or to handle a ViewExpiredException silently in the background while restoring the form-inputs? for example a user with a "stay logged-in cookie" would prefer not to be redirected to some kind of an error- or start-page; he fills out some form values, comes back in an hour and then, when he submits the form, the same view is re-created with its previous inputs and the submit-action of the underlying

Object doesn't support this property or method with primefaces omnifaces timeout combination

瘦欲@ 提交于 2019-12-18 07:10:41
问题 Setup: JSF, PrimeFaces 3.2, Omnifaces 1.1, JBoss AS 7.1.1, Final, Mojarra 2.1.7 I have a simple page (listed below) and I have set up omnifaces to deal with ViewExpiredExceptions for ajax calls. When the listed below page expires and I click on a primefaces button (ajax) on IE8, the expired error page shows up but with the following javascript error: Message: Object doesn't support this property or method, Line: 1 Char: 5500 Code: 0 URI: blah blah/mywebapp/javax.faces.resource/primefaces.js

<partial-response> XML shown as plain text after ajax redirect on security constraint in WildFly

六月ゝ 毕业季﹏ 提交于 2019-12-17 17:03:57
问题 I've got this weird problem with ajax redirect on a security constraint: When an ajax call is made (by clicking on a sortable p:dataTable column or when a p:poll triggers) on a role-secured page after my session timed out, a <partial-response><redirect-url=... XML from OmniFaces is shown on the screen. When I remove OmniFaces, the ajax calls seem to fail silently and I don't get the XML shown. Security is configured as following in web.xml: <security-constraint> <web-resource-collection> <web

f:viewParam with Converter and ViewScoped exception out when invoke the second ajax request

主宰稳场 提交于 2019-12-14 03:49:46
问题 I have this f:viewParam that I try to bind validate and convert a userId into Player , and I got an unexpected results. <f:metadata> <f:viewParam name="userId" value="#{myBean.selectedPlayer}" converter="pConverter" converterMessage="Bad Request. Unknown User" required="true" requiredMessage="Bad Request. Please use a link from within the system" /> </f:metadata> <h:body> <p:messages id="msgs"/> <h:form> <ul> <li><a href="index2.xhtml?userId=1">Harry</a></li> <li><a href="index2.xhtml?userId

ui:repeat in o:tree not working as expected

拈花ヽ惹草 提交于 2019-12-13 18:28:43
问题 I'm using a omnifaces o:tree of "branches" where each branch has a "list of leafs" with the attribute "color" which should be editable in the tree. - branch 0 - leaf 0 (color = "green") - leaf 1 (color = "yellow") - branch 1 - leaf 0 (color = "purple") - branch 1_0 - leaf 1 (color = "red") - leaf 2 (color = "orange") - leaf 3 (color = "brown") Adding/removing branches and adding leafs to any branch works fine and as expected. Also the rendering of any complex tree including all the list of

Conflict between Omnifaces cdi param and JSF 2.3

梦想的初衷 提交于 2019-12-13 18:15:20
问题 My web app encountered a problem with Omnifaces cdi param after upgrading the server from tomee plume 7 to tomee plume 8. I tested with a bare bone webapp and confirmed this. My bean: @javax.faces.view.ViewScoped @javax.inject.Named public class Bean2 implements java.io.Serializable { @javax.inject.Inject @org.omnifaces.cdi.Param private String tag; private String tag2; @javax.annotation.PostConstruct public void init() { if (getTag() == null || getTag().length()==0) { setTag2("None injected"

Primefaces ManyCheckbox inside ui:repeat calls setter method only for last loop

删除回忆录丶 提交于 2019-12-13 16:45:24
问题 I have a <p:selectManyCheckbox> inside <ui:repeat> , getting it's items from a List of a certain Object Class (provided by <ui:repeat> -variable) and is supposed to save the chosen items into another List of the same Object Class. But it calls the setter method #{cartBean.setSelectedExtras} only for the last entry (last iteration of <ui:repeat> ). <ui:repeat var="item" value="#{category.items}"> <p:selectManyCheckbox id="extraCheckbox" value="#{cartBean.selectedExtras}" layout="pageDirection"

jsf highlight label for invalid input

↘锁芯ラ 提交于 2019-12-13 16:28:55
问题 Is there a simple possibility to apply a specific style to input labels that are invalid? I've seen omnifaces highlight component wich does the job for the input itself, but the given styleguide for my project, forces this for the label of the input. Something like this would be great: <h:outputLabel for="inputId" value="label" /> <h:inputText id="inputId" value="..." /> <o:highlight errorLabelStyle="errorLabel" /> 回答1: This was not possible with <o:highlight> . It's however relatively simple

How to use FullAjaxExceptionHandler with Spring Boot error page declarations?

笑着哭i 提交于 2019-12-13 09:12:45
问题 How can we do when use onmifaces in the case of spring boot apps?, where the error pages declaration is made at EmbeddedServletContainerCustomizer class? @Override public void customize(ConfigurableEmbeddedServletContainer container) { MimeMappings mappings = new MimeMappings(MimeMappings.DEFAULT); mappings.add("eot", "application/vnd.ms-fontobject"); mappings.add("ttf", "application/x-font-ttf"); mappings.add("woff", "application/x-font-woff"); mappings.add("woff2", "application/x-font-woff2

When I use o:graphicImage, the image is not displayed

坚强是说给别人听的谎言 提交于 2019-12-13 07:08:17
问题 I can´t display images from my database, they are stored as bytea and I am mapping them like this: @Entity @Table(name = "photograph", schema = "public") public class Photograph{ @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "photograph_id", unique = true, nullable = false) private Long id; @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "diagnostic_id", nullable = false, insertable = false, updatable = false) private Diagnostic diagnostic; @Column(name =