jsf-2

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

P:CommandLink doesn't work with ui:repeat

风格不统一 提交于 2019-12-24 08:57:35
问题 I have strange problem with p:commandLink tag when i use it with the ui:repeat tag ! commandLink doesn't work at all . this my xhtml code : <h:form> <ui:repeat varStatus="miteraionno" value="#{bussinessOwnerViewerMB.bOwner.bOBranches}" var="branch" > <div class="details" > <ul class="services"> <li> <p:commandLink actionListener="#{bussinessOwnerViewerMB.testMethod}" styleClass="nav_services" oncomplete=""> <h:outputText value="#{branch.branchName}"/> </p:commandLink> </li> </ul> </div> </ui

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

How to validate an empty field in action method?

[亡魂溺海] 提交于 2019-12-24 08:51:26
问题 I have an input field and a button. I want to check if the textinput is valid before executing the button action. If it is valid I will render a response message. I have a code like this: public void submitReportRequest() { if(nameField!=null){ System.out.println("aaaaaaaaaaaaa"); submitted=true; } if(nameField == null){ System.out.println("report name is null!!!!!!"); } } but from the console I just get: [#|2011-11-18T15:22:49.931+0200|INFO|glassfishv3.0|null|_ThreadID=21;_ThreadName=Thread

How can I compile a primefaces source?

喜欢而已 提交于 2019-12-24 08:34:43
问题 In the download section of primefaces there are 3 links: binary bundle sources I use primefaces 3.4.2 and would like to recompile one java class to fulfill my needs. I downloaded the sources. Now I would like to recompile this class, but I don't know how to achieve that. How can I compile a primefaces source? 回答1: Checkout sources from repo. It is maven project, so build it with maven. 回答2: From primefaces site: http://code.google.com/p/primefaces/wiki/BuildingFromSource PrimeFaces uses maven

JSF 2 composite component, passing attributes to backing bean

大兔子大兔子 提交于 2019-12-24 08:33:12
问题 I'm stuck on simple JSF2 question: XHTML: <xvf:simpleOut identifier="12345"/> Composite component is supposed to pass "12345" to backing bean and do some output: <composite:interface> <composite:attribute name="identifier" required="true" type="java.lang.String"/> </composite:interface> <composite:implementation> <!--@elvariable id="arg" type="java.lang.String"--> <ui:param name="arg" value="#{cc.attrs.identifier}"/> <h:outputText value="#{myBean.getTestOutput('???????')}"/> </composite

Do I need frameworks to complement a Java EE 6, JSF-2 Web-App? Which ones?

ぐ巨炮叔叔 提交于 2019-12-24 08:31:59
问题 In the previous J2EE versions, it was common practice to complement the default libraries with frameworks like Spring, Hibernate, Struts, etc. Java EE 6 seemed to close the gap (with CDI, JPA, JSF2.0, etc.) - should I still use additional frameworks (Seam? A faces library? Spring?) I am currently using the default Oracle stack - GlassFish v3, JSF (Mojarra) 2.0 回答1: The common practice in J2EE 1.3 and J2EE 1.4 was indeed to supplement the J2EE stack with quite a lot of additional frameworks.

“PropertyNotWritableException: Illegal Syntax for Set Operation” error when setting value in bean [duplicate]

Deadly 提交于 2019-12-24 08:24:53
问题 This question already has an answer here : How to send form input values and invoke a method in JSF bean (1 answer) Closed 3 years ago . I get this error when trying to send some values from jsf page to a bean. I want to set values to the fields in the bean, then create an Airplane instance and add it to my database. But I get an error telling me that i use illegal syntax for the setter part of the bean. Why do I get that error? I didnt find anything on this site that helped me with my

Update of a conditionally rendered selectItem not working

丶灬走出姿态 提交于 2019-12-24 08:00:39
问题 I'm wondering why updating a form won't update a conditionally rendered selectItem. The commandButton (for testing purposes) is updated correctly as expected. <h:form id="form"> <h:selectOneMenu id="selectedGroupId" label="#{msgs.group_group}" value="#{groupBean.selectedGroupId}"> <p:ajax event="change" listener="#{groupBean.selectGroupEvent}" update=":form"/> <f:selectItem rendered="#{empty groupBean.selectedGroupId}" itemLabel="#{msgs.global_select_select}" /> <f:selectItems value="#

How to recognize Java Server Faces 2.0 composite components when using ajax?

痴心易碎 提交于 2019-12-24 07:59:31
问题 I have the following Java Server Faces 2.0 composite component. Notice i am using verbatim resources/customer/customer.xhtml <composite:interface> <composite:attribute name="id" required="false"/> <composite:attribute name="firstName" required="false"/> <composite:attribute name="lastName" required="false"/> <composite:attribute name="age" required="false"/> <composite:attribute name="rendered" required="false"/> </composite:interface> <composite:implementation> <f:verbatim id="#{cc.attrs.id}