jsf-2

Making Glassfish respond to ajax request JSF 2

百般思念 提交于 2019-12-30 11:30:30
问题 I'm trying to do an ajax request to my server (Glassfish v3.1 open source edition) and for any reason the request never go to the server, running the same proyect on tomcat 7 it works correctly, there's any configuration that i should make on glassfich or anything?? im using eclipse helios, jsf 2 MyFaces 2.1.1, richfaces 4.0.0, and glassfish 3.1 open source edition here's my code <h:panelGroup> <h:inputText id="firstName" value="#{RegistrationForm.first_name}" required="true" requiredMessage=

Displaying a message from managed bean with primefaces confirmation dialog component

有些话、适合烂在心里 提交于 2019-12-30 11:19:09
问题 in my page , i'm trying to display a confirmation dialog after clicking a button .In the confirmation dialog i used the attribute message to display it , this message is taken value after clicking the button . So i did it like that : <p:commandButton value="Delete" update="testPlanetree" id="deleteBtn" disabled="#{projectTestManagementMB.disable}" oncomplete="deleteConfirmation.show()" action="#{projectTestManagementMB.testFn}"/> <p:confirmDialog id="confirmDialog" message="#

JSF 2 composites and binding for validation

谁都会走 提交于 2019-12-30 11:15:58
问题 I have a problem with a JSF composite which validates internal input fields. Following code snippet works as long as only one composite is included. <div id="#{cc.clientId}" > <h:panelGroup styleClass="#{not firstname.valid ? 'fmError' : ''}"> <div class="col220"> <h:outputLabel for="firstname" value="Vorname(n):" /> </div> <div class="col220"> <h:inputText id="firstname" styleClass="fmTxt " value="#{cc.attrs.person.firstname}" binding="#{firstname}"> <f:validateRequired /> </h:inputText> <

How to ajax jsf 2 outputLink

ⅰ亾dé卋堺 提交于 2019-12-30 11:01:32
问题 I want to make a webpage that is working on ajax(everything ajax). I mean.. whenever you click a link(I refer to < h:outputLink ...> ) to change a certain div using data from another link. For example: <h:outputLink value="/page.jsf" onclick="myfunction(this); return false;"> My page </h:outputLink> page.jsf is a normal jsf page... displayed using a page layout.xhtml like: <ui:composition template="/layout.xhtml"> <ui:define name="main"> //my content here </ui:define> </ui:composition> Is

How to ajax jsf 2 outputLink

自古美人都是妖i 提交于 2019-12-30 11:01:05
问题 I want to make a webpage that is working on ajax(everything ajax). I mean.. whenever you click a link(I refer to < h:outputLink ...> ) to change a certain div using data from another link. For example: <h:outputLink value="/page.jsf" onclick="myfunction(this); return false;"> My page </h:outputLink> page.jsf is a normal jsf page... displayed using a page layout.xhtml like: <ui:composition template="/layout.xhtml"> <ui:define name="main"> //my content here </ui:define> </ui:composition> Is

Use of p:graphicImage in ui:repeat or p:dataTable

回眸只為那壹抹淺笑 提交于 2019-12-30 10:38:50
问题 I have a Bean which has a List of Objects, containing StreamedContent Objects (Primefaces Type) which represent Images in a Database. Now I want to iterate over this list in a JSF 2.0 Page (with Primefaces), and show the images. Showing only one Image in this way works: <p:graphicImage value="#{ImageLoader.oneImage}" title="aImage" alt="no Img"/> But if I nest this tag in a c:foreach, ui:repeat or p:datatable, the Images aren't loaded! The alternative text is shown instead <ui:repeat value="#

PrimeFaces components are not rendered in browser in spite of dependency being present

删除回忆录丶 提交于 2019-12-30 10:35:39
问题 I'm developing a JSF web application with PrimeFaces 3.5 on Eclipse 4.3. There are no compiletime or runtime errors and the application deploys successfully. However, I cannot get the desired output in browser. The PrimeFaces components do not show up, while the standard JSF components do. I'm not sure if I configured everything right. The PrimeFaces JAR is at least inside /WEB-INF/lib : And the PrimeFaces XML namespace is declared as xmlns:p="http:\\primefaces.org\ui" And I mapped the

How to standardize convertnumber usage in JSF for various components?

允我心安 提交于 2019-12-30 10:30:14
问题 In my project I use lots of h:outputtext with f:convertnumber to apply a pattern to my numeric data. <h:outputText value="#{stock.price}"> <f:convertNumber currencySymbol="" groupingUsed="true" maxFractionDigits="2" type="currency" /> </h:outputText> Copying and pasting this pattern when needed for other data seems to be easy. But it is also unmanageable; when used more, changing the pattern seems to require lots of search/replace operations. How can I make this pattern be reusable and

javax.el.PropertyNotWritableException: /index.xhtml @29,118 value=“”: Illegal Syntax for Set Operation

我的未来我决定 提交于 2019-12-30 10:19:57
问题 I want to create a login screen with localization option to translate the name and when i change from the default English to Arabic it crash here is the faces.config.xml <?xml version="1.0" encoding="UTF-8"?> <faces-config xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd" version="2.0"> <application> <locale-config> <default-locale>en<

JSF 2.2 HTML5 Pass-through attributes

一个人想着一个人 提交于 2019-12-30 07:35:06
问题 I am trying to use JSF 2.2 innovations html5 pass-through attributes feature. Name-spaced attribute on the component tag working with m09 version. <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.faces</artifactId> <version>2.2.0-m09</version> </dependency> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://java.sun.com/jsf/passthrough"> <h:head> <title>HTML 5</title> </h:head> <h:body> <h:inputText p:placeholder="Enter text"/> </h