jsf-2

Accessing JSF nested composite component elements in JavaScript

梦想与她 提交于 2019-12-24 13:52:57
问题 I am trying to DRY up popup windows in my JSF 2 project using composite components. This code base uses Icefaces 3.3.0 (with their 1.8.2 compatibility layer for historical reasons), Mojarra 2.2.7, and Glassfish 4.1. I have input.xhtml which provides a text input and uses a 2-button popup (ok/cancel), which in turn builds on the basic popup. input.xhtml: <composite:interface> <!-- ... --> <composite:editableValueHolder name="forInput" targets="theInput"/> </composite:interface> <composite

rich:dataGrid borders issue rich faces 4

孤街浪徒 提交于 2019-12-24 13:17:56
问题 We are upgrading from jsf 1.2 to jsf 2. We are using apache myfaces 2.1 and rich faces 4.3. The issue is i am not able to get borders around <rich:dataGrid> component. I have seen posts describing how to remove the borders but no one specifies how to get borders. It seems that borders are by default rendered earlier (they were coming when rich faces 3 is used ) but after upgrading to rich faces 4 , ther are not rendered by default. Following is the xhtml snippet. <rich:dataGrid value="#{bean

JSF - List of objects in a Managed Bean and memory management question

和自甴很熟 提交于 2019-12-24 13:15:35
问题 I am creating my first JSF application. For this question I am going to simplify everything to try and make my question as clear as possible. The application I am creating is a simple contact storing application that will allow you to create a new contact, store information such as addresses, phone numbers, where they work, and upload files that are associated to the contact. When the application loads the user is displayed with a list of contacts that have already been created. They can

How display something near h:selectOneRadio item?

爱⌒轻易说出口 提交于 2019-12-24 13:09:16
问题 I have some list of elements, that generates my <h:selectOneRadio> items: <h:selectOneRadio id="list#{cand.id}" value="#{mybean.value}" layout="pageDirection"> <c:forEach items="#{mybean.list}" var="c"> <f:selectItem id="first#{c.id}" itemlabel="#{c.surname}" itemValue="#{c.name}" /> </c:forEach> </h:selectOneRadio> I want next each element display <h:outputText> with value #{c.id} , so that at each row will be my radioButton element and next it some textbox. How can I do it ? I tried

Input given in JSF page does not set that value to managed bean variable [duplicate]

☆樱花仙子☆ 提交于 2019-12-24 13:02:50
问题 This question already has answers here : commandButton/commandLink/ajax action/listener method not invoked or input value not set/updated (12 answers) Closed 2 years ago . Am a newbie to JSF. Am using JSF 2 and primefaces 4.0 in my application. As stated in the Title, the input value given in the xhtml page, does not set the value to the ManagedBean. I have tried all the possible combination. growlMessage.xhtml <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"

How to force only one page to open with SSL?

本小妞迷上赌 提交于 2019-12-24 12:29:24
问题 In my project, I am using SSL but it works for all pages.I want to use it for only a login page, after that page it should revert to HTTP protocol. How can i do that? I found a way below, but it does not work. <security-constraint> <web-resource-collection> <web-resource-name>Notify page, accessed internally by application</web-resource-name> <url-pattern>/Login.xhtml</url-pattern> </web-resource-collection> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user

JSF Validation error is not displaying before close Jquery dialog

ぃ、小莉子 提交于 2019-12-24 12:26:03
问题 I have a Jquery dialog to get user input. <div id="icPopup"> <td> <h:selectOneMenu id="selectICType" value="#{sessionBean.icStartLetter}" required="true" requiredMessage="Select IC type" style="width:100px;"> <f:selectItem itemValue="" itemLabel="- Select -"/> <f:selectItems value="#{sessionBean.icStartLetterTypes}"/> </h:selectOneMenu> </td> <td align="center"> <h:inputText id="icNumber" value="#{sessionBean.icNumber}"></h:inputText> </td> <td> <div id="mainBtnGrey" class="mainBtnLeftAlign">

How to continue JSF:RENDER_RESPONSE phase after exception in END PHASE INVOKE_APPLICATION

五迷三道 提交于 2019-12-24 11:53:40
问题 I want to continue to JSF:RENDER_RESPONSE (last phase in JSF lifecylce) after getting a particular custom exception in INVOKE_APPLICATION phase. For following action all Six JSF lifecycle phase run: public void save(String actionID) throws Exception { } What I am getting in logs is : START PHASE RESTORE_VIEW 1 END PHASE RESTORE_VIEW 1 START PHASE APPLY_REQUEST_VALUES 2 END PHASE APPLY_REQUEST_VALUES 2 START PHASE PROCESS_VALIDATIONS 3 END PHASE PROCESS_VALIDATIONS 3 START PHASE UPDATE_MODEL

selectCheckboxMenu filter values not reset on refresh

Deadly 提交于 2019-12-24 11:36:25
问题 In my dataTable, I want to use selectCheckboxMenu as a filter on one of columns (like in this example on Color column). My column looks like this: <p:column filterBy="#{record.typeString}" filterMatchMode="in"> <f:facet name="filter"> <p:selectCheckboxMenu label="Types" onchange="PF('dataTable').filter();" panelStyle="width:125px" scrollHeight="150"> <f:selectItems value="#{myBean.typeStrings}" /> </p:selectCheckboxMenu> </f:facet> <f:facet name="header"> <h:outputText value="Type"/> </f

Aborting an Ajax request if confirmation dialog is “Cancel”

让人想犯罪 __ 提交于 2019-12-24 11:35:43
问题 I'd like to have a <f:ajax> component that would display a confirmation dialog and then do the action tag if OK was selected or abort if Cancel was selected. I thought this would work, but it doesn't (The ajax part runs no matter what I select in the confirmation): <f:ajax render="some_div"> <h:commandButton value="A Hazardous Button!" onclick="show_confirm()" action="#{bean.doSomething}" /> </f:ajax> - function show_confirm() { var r=confirm("Are you sure you want to do this? This is totally