jsf-2

JSF2 Composite component link using ajax

懵懂的女人 提交于 2019-12-13 02:27:53
问题 Here is my (simplified) issue : I've got a page that is using 2 composite components of mine : - CCSelection - CCDisplay In CCSelection, I have a list of values, each one has got a h:commandLink onto. When clicking on a link, the CCDiaplay component is refreshed using the selected value. To do this, CCSelection exposes a method attribute that is directly linked on each h:commandLink. The value is given to the method using f:attribute. In the page backing bean, I've got a method (that is given

textarea preformatting and wrapping in h:outputText

眉间皱痕 提交于 2019-12-13 02:21:38
问题 I am saving news from textarea in database and showing them again on a JSF page. When I print the bean data I have it as below. This is line 1 This is line 2 In textarea when I try to edit, I see same as above. But when I try to print in <h:outputText> I see it as below. This is line 1 This is line 2 Even when I print using Sytem.out.println() , I see output as This is line 1 This is line 2 Any idea how can I get this new line in <h:outputText> ? I also tried this answer which suggests to use

JSF @ViewScope, PrimeFaces <p:dialog and <ui:include

笑着哭i 提交于 2019-12-13 02:19:10
问题 I have: button on main page and dialog. A would like to have ViewScope life cycle for managed bean (NewDialog.java), what perform the dialog. In other words: recreate the NewDialog bean while pushing the button, and destroy while closing dialog. But NewDialog bean has created while loading main page. How to force bean created only when you press a button? <ui:composition <h:form id="mainForm"> <p:commandButton value="New Dialog" onclick="newDialogVar.show();"/> </h:form> <ui:include src="#

MyFaces CODI and windowId request parameter issue

眉间皱痕 提交于 2019-12-13 02:16:38
问题 I have been trying to conduct some simple tests on Seam Weld and MyFaces CODI . After adding CODI jar files to my projects, I found that it adds a windowId request value to every request even if the bean scope is RequestScoped . Is it really necessary to add windowId request parameter to every request while the bean is in RequestScoped ? Is there any practical real-world scenario for this case? Is is possible to remove it if it is not necessary? For example: This is the code of bean class:

JSF2.0 Some facesmessages not sent to redirected page on error handling

拥有回忆 提交于 2019-12-13 02:15:43
问题 I'm building a JSF2.0 application on TomEE1.7.3, and I've created a custom ExceptionHander, and overrided handle() method, which looks like below: @Override public void handle() { for (Iterator<ExceptionQueuedEvent> it = getUnhandledExceptionQueuedEvents().iterator(); it.hasNext();) { ExceptionQueuedEventContext eventContext = it.next().getContext(); FacesContext facesContext = eventContext.getContext(); ExternalContext externalContext = facesContext.getExternalContext(); Throwable throwable

Primefaces datatable live scrolling not working with lazy loading

两盒软妹~` 提交于 2019-12-13 02:12:07
问题 With reference to the suggestion given in the post here i tried implementing lazy loading with live scrolling to handle large data sets,but live scrolling doesn't happen when both rows and scrollRows attributes of datatable are used.If i remove rows attribute then no records would be displayed.Here is my code snippet that i tried.Can someone please help me out if i am doing anything wrong. JSF code snippet <p:dataTable id="arcRecList" var="data" value="#{archivedRecordBean.archModel}" lazy=

ignoreValidationFailed doesn´t work inside p:dataTable

試著忘記壹切 提交于 2019-12-13 02:07:27
问题 I am using actionListener ajax call inside datatable and trying to do the following : skip validation update the model with the inserted values I knew that omnifaces utility liberary by BalusC can do this using o:ignoreValidationFailed But it failed with me to work inside primefaces datatable. Also I found that it failed to work inside ui:repeat in another post here I dont know if its a bug or not. here is my code example <o:form id ="trans_desc_form"> <p:outputPanel id="stkdetailsid"> <p

PrettyFaces & JSF 2 : Do we always need to pass parameters to the URL to retrieve them?

两盒软妹~` 提交于 2019-12-13 01:53:52
问题 Do we always need to pass parameters to the URL to retrieve them ? In my example , I can't get to retrieve my param named 'study'; How should i do that ? XHTML File Sender: <h:commandButton value="Send" type="button" action="pretty:participant"> <f:param name="study" value ="test" /> </h:commandButton> XHTML File Recever: <h:outputFormat value="Print : {0} "> <f:param value="#{study}" /> </h:outputFormat> Pretty Config XML : <url-mapping id="participant"> <pattern value="/Participant/New/" />

encodeAll() not called on a composite component when rendered attribute is wrapped

白昼怎懂夜的黑 提交于 2019-12-13 01:50:50
问题 When I do: <h:form> <ui:repeat ...> <ui:fragment rendered="#{xyz.type eq 1}" <h:inputText value="#{xyz}"/> </ui:frament> <ui:fragment rendered="#{xyz.type eq 2}" <my:component value="#{xyz}"/> </ui:frament> <ui:repeat /> </h:form> encodeAll() doesen't get called on my:component and subsequently the existing values are not shown. If I do the following though <ui:repeat ...> <ui:fragment rendered="#{xyz.type eq 1}" <h:inputText value="#{xyz}"/> </ui:frament> <ui:fragment rendered="#{xyz.type eq

<p:ajax update=“”> inside nested components

心已入冬 提交于 2019-12-13 01:48:46
问题 Iam using Mojarra 2.2.11 (WildFly 9.0.1) with PF 5.3. In relation with my original question: <p:ajax update="...> cell or row update inside PF subTable I am still struggling with the following line: <p:ajax update=":tabView1:form1:mainTable".../> The following part has been changed: #{subTableView.getAllheaders(tabview)} . Below references have been used but the datatable refresh does not seem to work. I have done several researches and tried multiple options without success. The operation