jsf-2.2

Omnifaces Faces.redirect loses conversation scope

安稳与你 提交于 2019-12-24 13:14:15
问题 I have problem with org.omnifaces.util.Faces#redirect and conversation scoped bean: there is a button <p:commandButton action="#{navigationHandler.gotoCreateCar}" actionListener="#{createHandler.init(searchHandler.search())} value="#{msg.search}" update=":articleSearchForm"> <f:param name="cid" value="#{javax.enterprise.context.conversation.id}"/> </p:commandButton> which must do a navigation to createCar page within the same conversation scope after init of my conversation scoped bean:

Removing gutters from p:layout

不问归期 提交于 2019-12-24 11:50:41
问题 I'm using PrimeFaces 5.0. I'm having a trouble setting gutter in <p:layout> . <p:layout id="templateLayout" fullPage="false"> <p:layoutUnit id="header" position="north" size="155" gutter="0"> </p:layoutUnit> <p:layoutUnit position="west" id="leftPanel" size="225" gutter="0"> </p:layoutUnit> <p:layoutUnit position="east" size="200" gutter="0"> </p:layoutUnit> <p:layoutUnit id="content" position="center" size="2500" style="z-index: 1;" maxSize="2500" gutter="0"> </p:layoutUnit> <p:layoutUnit id

How to figure out the cause of StringIndexOutOfBoundsException in ServerSideStateHelper?

穿精又带淫゛_ 提交于 2019-12-24 08:52:30
问题 while i am performing load test for my JSF 2.2 application, sometimes i get the following error in logs (BTW i am extracting the viewstate variable in the get request of the jmeter sampler and send that viewstate variable in the post request in the jmeter sampler): Jul 09 10:21:56 staging i-3a840e59: 09-Jul-2014 17:21:55.490 SEVERE [http-bio-8308-exec-15] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [Faces Servlet] in context with path [] threw exception

Conditionally render components with ajax conditionally only if validation passes

荒凉一梦 提交于 2019-12-24 02:48:15
问题 I am using JSF 2.2 and I was wondering if there is a way to render components with ajax conditionally only if the validation passes. By using the render attribute of ajax the components will be rendered regardless of the validation passing or not. What I'm after is something like: <f:ajax ... render="#{validationHasPassed ? 'foo' : ''}" /> ... <h:panelGroup id="foo"> <!-- other components here --> </h:panelGroup> Is it possible to conditionally render a component in a similar way like this?

What are the recommended JSF dependencies with TomEE1.7.x?

断了今生、忘了曾经 提交于 2019-12-24 00:44:25
问题 I've been developing a JSF2.0 (I'm not really sure about the JSF version) application on TomEE 1.7.3 (JavaEE6 based). In my Maven pom.xml, I had too many dependencies which I've copied from many examples, but I reduced them to minimum requirements. Bellow is the "dependencies" part of my pom.xml: <dependencies> <!-- JavaEE6 --> <dependency> <groupId>javax</groupId> <artifactId>javaee-api</artifactId> <version>6.0</version> </dependency> <!-- /JavaEE6 --> <!-- OmniFaces for JSF, @Eager,

JSF View- returning null on actions do not update the view

怎甘沉沦 提交于 2019-12-23 22:17:06
问题 i have read the post that have same problem as mine JSF ViewScope - returning null on actions do not update the view but it haven't worked for me cause i already use the h:commandLink in another page and its works perfectly but in this page it doesn't . this is the request Bean public class AddSectionBean { public String delete(String id) { try { HttpSession session = SessionUtil.getSession(); UserVO userVOCreater = (UserVO) session.getAttribute("userVO"); SectionsDao.getInstance()

How to get rid of empty tooltips while displaying error messages on tooltips in PrimeFaces?

女生的网名这么多〃 提交于 2019-12-23 21:02:01
问题 I display error messages somewhere on <p:tooltip> as follows. <p:inputText id="text" value="#{bean.text}" required="true"/> <p:tooltip for="text"> <p:message for="text"/> </p:tooltip> Although it displays an error message the given tooltip, an empty/unnecessary tooltip is shown, when there is no error as can be seen in the following picture - beside the bottom right corner of the text box. How to get rid of such empty tooltips? (I tried someway but it did not work) 回答1: It can be done by

Disable components in a large project

你。 提交于 2019-12-23 19:36:23
问题 with a lot of developers and plenty of juniors I want to disable certain components such as <p:spacer> to prohibit using components for html/css issues. I want to limit the available components for libraries like omnifaces / primefaces / richfaces to a whitelist / blacklist thing basically. Would this be a reasonable feature request for a library like omnifaces or is it to hard to build / to localized? 回答1: Basically, you can achieve this by providing a custom Application implementation

JSF calling method with non String parameters

℡╲_俬逩灬. 提交于 2019-12-23 05:17:35
问题 I have in my JSF: <h:commandButton value="Add to Cart" rendered="#{movieDisplayController.movie.available != 0}" action="#{cartController.addMovie(movieDisplayController.movie, '2')}"> </h:commandButton> The action is underlined in red in eclipse (kepler JEE) and displays: Method must have signature "String method(), String method(), String method(String), String method(String, String), String method(String, String, String), String method(String, String, String, String), String method(String,

selectBooleanCheckbox value doesn't set properly inside ui:repeat

纵饮孤独 提交于 2019-12-22 17:50:47
问题 i have a ui repeat on a composite as follows: -the ui repeat: <ui:repeat var="award" value="#{myBean.awards}" varStatus="status"> <mycomp:Award id="awardComp" value="#{award}" index="#{status.index}"></mycomp:Award> </ui:repeat> -the composite <h:panelGroup id="cashRow" layout="block" style="height:30px"> <label id="anniversaryAwardCash" class="admin checkbox" style="float: left; clear: both; margin-top: 10px; width: 100px;"> <h:selectBooleanCheckbox value="#{cc.attrs.value.cash}" style=