jsf-2

JSF 2.1.X validation behaves differently on Glassfish 3.1.2 vs. Tomcat 6 & 7

狂风中的少年 提交于 2019-12-12 04:48:45
问题 I'm experiencing what I think is odd behavior with the JSF validation between Tomcat and Glassfish. Previously we were using Tomcat, but now have requirements to run a full Java EE App Server. During testing, I noticed when submitting empty fields to the server, that simply have a length validator and no required attribute, Glassfish is outputting the validation message whereas, Tomcat would simply skip the validation on these elements. If a value is submitted and fails validation everything

Focus an inputText when opening dialog in primefaces

≡放荡痞女 提交于 2019-12-12 04:45:11
问题 I'm actually using JSF with Primefaces, and I have a little trouble with an p:inputText in a p:dialog . Indeed I don't know how to give/keep the focus on the inputText when I open my dialog. Here is my XHTML file : <body> ... <p:commandButton id="add-movie-button" value="Add movie" onclick="searchdlg.show()" update="movie-list,text-search" actionListener="#{layout.clearMovieList}"/> <p:dialog id="search-movie" header="Add movie" widgetVar="searchdlg" modal="true" resizable="false"> <h

Primefaces selectCheckboxMenu erratic behavior when deselecting individual checkboxes

耗尽温柔 提交于 2019-12-12 04:43:56
问题 In an application based on jsf 2.1 and Primefaces 6.1.5, I have difficulties implementing a <p:selectCheckboxMenu I simplified the code according to the instructions here How to create a Minimal, Complete, and Verifiable example My code now looks quite similar to the code in the Primefaces Showcase. Primefaces Showcase After much analyzing, I can describe 'erratic' a bit better. When deselecting an item, the item following it is affected. The last item is not affected at all. And the first

checkbox in datatble using primefaces5

こ雲淡風輕ζ 提交于 2019-12-12 04:43:08
问题 I have a problem with my datatable. I try to display selected rows of a table but I can't because my selection list is empty even if I check one or more rows.it seems that I have a selectedArticles empty I don't know what part of my code should I change .I m asking for your help please. My jsf page : <h:body> <h:form id="form"> <p:growl id="msgs" showDetail="true" /> <p:panel header="Order" style="margin-bottom:10px;"> <h:panelGrid columns="2" cellpadding="5"> <p:outputLabel for="category"

Template (jsf) is not working properly. When i override the elements, they dont appear on the page.

六月ゝ 毕业季﹏ 提交于 2019-12-12 04:39:58
问题 I have done template in 3 steps: Firstly i created a xhtml file with content that is common to all the pages: AllComponentsTemplate.xhtml <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"> <head> <title>State Transport Department- Work Schedule</title> <meta name="viewport" content="width=device-width"/> <link rel="stylesheet" type="text/css" href="../../CSS/CompleteTemplateCSS

jsf 2: UploadedFile is null in ManagedBean using Tomahawk

不羁岁月 提交于 2019-12-12 04:38:31
问题 I did as BalusC's step by step tutorial: JSF 2.0 File upload But I then found that the UploadedFile is null when I clicked the commandButton . web.xml: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> <display-name>web<

JSF programmatically component in Primefaces Tab

流过昼夜 提交于 2019-12-12 04:35:15
问题 I created some programmatily component in a Primefaces Tab. <h:form> <p:tabView id="documentDetailsTabs" dynamic="true" cache="true" > <p:tab id="contenutoTab" title="#{msg['content']}" > <p:panelGrid columns="4" style="width:100%" styleClass="table-4col-noborder" binding="#{documentContentController.propertiesGridComponentModify}" columnClasses="label-col-4col, value-col-4col,label-col-4col, value- col4col"> </p:panelGrid> <p:commandButton value="Save" styleClass="buttonStyle" process="@form

ui:repeat in o:treeNodeItem

北战南征 提交于 2019-12-12 04:34:10
问题 I have an <o:tree> where i am displaying list of persons and each person what it has children and every child what it have children where the level of children is not known The data is displayed correctly but the displayed node is an <h:commandLink> where its action is a java bean function Snippet of java code : public class PersonController{ //class Person having List of children //some code public void readChild(double childId){ } //some code } Snippet of jsf code : <o:tree> <o:treeNodeItem

Single entry/exit point design in JSF 2.0

眉间皱痕 提交于 2019-12-12 04:33:42
问题 I want to design my application in JSF 2.0 with single entry/exit point for all the requests and responses so that they can be routed through a single managedBean/controller. The purpose of having this design is to catch my all business exceptions at common place and also it would be easy for me to check for the validation of session for each new request. One of the option I see is ServletFilter but I am not sure if this would be the best approach with JSF 2.0. 回答1: The purpose of having this

10 digit allow after decimal using jquery

…衆ロ難τιáo~ 提交于 2019-12-12 04:14:43
问题 I am using primeface inputText and want to allow only 10 digit after decimal, plz provide how to do this using jquery. below is my code where I want to apply <p:inputText id=inputId/> 回答1: Try this: <h:inputText id="regReward" label="#{msg.registrationReward}" value="#{program.regReward}"> <f:validateDoubleRange minimum="0" maximum="1000000" /> <f:convertNumber pattern="###0.##########" /> </h:inputText> or create Validator and call it like this: <h:inputText id="regReward" label="#{msg