jsf-2

why does mojarra 2.1 scan every other war on each module startup?

寵の児 提交于 2020-01-23 12:21:34
问题 We have a huge EAR application with about 20 ejb-jar and war modules. For each war module that Mojarra starts, it seems it is trying to scan annotation on every other war. Other wars are unavailable to the classloader, so I get lot of exceptions. It eventually starts anyway, but it clutters my logs with warnings, and I guess application startup time could be much less without this (+100 seconds). To make it clear, I have following structure: EAR +- ejb1 +- ejb2 +- war1 +- war2 When Mojarra

JSF 2.0 dynamic attributes without creating new components

怎甘沉沦 提交于 2020-01-23 12:18:52
问题 How do you add new attributes to a component that doesn't define those attributes without creating your own. I want to do something like this <h:commandButton actionListener="#{manager.saveNew}" value="#{i18n['School.create']}" secured="true" /> or at least, a way to allow the developer to assign the secure attribute. any ideas? 回答1: You can use f:attribute inside your h:commandButton . <h:commandButton actionListener="#{manager.saveNew} value="#{i18n['School.create']}"> <f:attribute name=

Prevent p:messages component from showing messages which are already shown in p:message

ⅰ亾dé卋堺 提交于 2020-01-23 10:43:09
问题 i have an input component that has three types of validation (required,validatorMessage,converterMessage) and this input has its own message icon, and the whole form has a messages component to display all the messages for all components as follows: <p:message for="idEstNumOfUser" display="icon" id="msgEstNumOfUser" /> <p:inputText id="idEstNumOfUser" placeholder="Estimated Number of Users" value="#{mybean.estimatedUserCount}" required="true" requiredMessage="" maxlength="8" title="Estimated

PrimeFaces remote command is not invoking

≡放荡痞女 提交于 2020-01-23 09:46:07
问题 I am using a remote Command button to execute a method to a bean level. But my command button is not working . I am attaching my code below: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui"> <ui:composition template="/layouts/BasicTemplate.xhtml"> <ui:define name="content"> <div class="container"> <script> function doAlert(s) { if(s=="true") {

PrimeFaces remote command is not invoking

限于喜欢 提交于 2020-01-23 09:46:06
问题 I am using a remote Command button to execute a method to a bean level. But my command button is not working . I am attaching my code below: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui"> <ui:composition template="/layouts/BasicTemplate.xhtml"> <ui:define name="content"> <div class="container"> <script> function doAlert(s) { if(s=="true") {

JSF 2.0 validateRegex with own validator message

做~自己de王妃 提交于 2020-01-23 07:05:56
问题 i am having a code similar to this: <h:inputText id="email" value="#{managePasswordBean.forgotPasswordEmail}" validatorMessage="#{validate['constraints.email.notValidMessage']}" requiredMessage="#{validate['constraints.email.emptyMessage']}" validator="#{managePasswordBean.validateForgotPasswordEmail}" required="true"> <f:validateRegex pattern="^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,6})$" /> </h:inputText> The validator in the backing bean has its own validation

What is the difference between javax.faces-2.1.14.jar from jsf-api-2.2.0-m05.jar and jsf-impl-2.2.0-m05.jar

筅森魡賤 提交于 2020-01-23 05:24:53
问题 I am confused between the difference of javax.faces-2.1.14.jar from jsf-api-2.2.0-m05.jar and jsf-impl-2.2.0-m05.jar I am trying to make a jsf project without using maven and while searching for examples I saw different jar dependencies on different tutorials. The tutorial from coreservlets uses javax.faces-2.1.14.jar and the other tutorial I saw from a different site uses 2 jar files jsf-api-2.2.0-m05.jar and jsf-impl-2.2.0-m05.jar Id like to know the difference of these two set of

How to set or inject request parameters in a managed bean?

六月ゝ 毕业季﹏ 提交于 2020-01-23 02:43:05
问题 I'm using a number of PrimeFaces <p:remoteCommand/> s to call various action listeners on a page. In the javascript calls, I'm passing parameters. These parameters arrive in the request parameter map. Now, I can extract the parameters from the map in the action listeners themselves. What I would like, however, is for the action listeners not to have to do that. Rather, they should just check that the appropriate value in the bean is not null and act accordingly. I want to either centralize

Horizontal scaling of JSF 2.0 application

一个人想着一个人 提交于 2020-01-22 14:26:32
问题 Given that JavaServer Faces is inherently stateful on the server side, what methods are recommended for horizontally scaling a JSF 2.0 application? If an application runs multiple JSF servers, I can imagine the following scenarios: Sticky Sessions: send all requests matching a given session to the same server. Question: what technology is commonly used to achieve this? Problem: server failure results in lost sessions... and generally seems like fragile architecture, especially when starting

JSF display HTML comment

末鹿安然 提交于 2020-01-22 13:48:29
问题 I am using JSF 2.0 and have defined property javax.faces.FACELETS_SKIP_COMMENTS to skip comments in JSF code because there is a lot of other code, deveploping comments etc. But I need to print some HTML comments into client's browser eg. for defining alternative conditioned stylesheet for other browsers. Please is there any way how to do it? Because all my attempts failed. 回答1: Use <ui:remove> to remove comments instead of the context parameter. 回答2: This is crude but it does work (under JSF