jsf-2

How to display 'loading' while loading PF chart

允我心安 提交于 2019-12-12 01:29:32
问题 I have implemented PrimeFaces chart with SQL queries. I noticed a performance problem while I open the JSF page with the chart. I'm interested is it possible to display "Loading.." at the center of the chart while the chart is ready for displaying? EDIT I added this insight of the chart div layer: <div id="powerchart" style="position: absolute; left: 420px; top: 40px; width: 700px; height: 330px" rendered="#{not DCProfileTabGeneralController.editable}"> <!-- Live update <p:poll interval="3"

Subscribing to PostValidationEvent of dynamicaly created child component

允我心安 提交于 2019-12-12 01:27:57
问题 For a forms framework in which I like to use JSF as the real UI frontend, I am searching for a way that a parent component gets informed if in a child component the value is changed. The facelet of a basic 'control' looks like this(body/head omitted since no-one can run it anyway without a dozen classes): <xf:input ref="/my/xpath/value"> <xf:label>Label</xf:label> </xf:input> The xf:input component which I developed, dynamically creates a real ui component (PrimeFaces ones) based on the type

JSF EL i18n in CSS files

回眸只為那壹抹淺笑 提交于 2019-12-12 01:26:32
问题 In my html pages I use the Spring message bean like so: #{ms.my_text_label} ms is of type ReloadableMessageSourceBundle and will translate my_text_label by looking in some resource bundle files. Can I make it possible to use this in my CSS files as well? 回答1: Disclaimer: I'm ignoring the Spring WebFlow part in the question and do as if the JSF project doesn't use any Spring artifacts. You can just use EL in CSS files the usual way if you load the CSS file via <h:outputStylesheet> instead of

jsf2 tomahawk selectOneRadio render label separately

ε祈祈猫儿з 提交于 2019-12-12 01:13:11
问题 I am using Tomahawk radio control for my design requirement. I was testing and wanted to ask if someone answer please. <t:selectOneRadio id="myRadio" forceId="true" layout="spread" styleClass="field checkbox"> <f:selectItems value="#{personBean.genders}" /> </t:selectOneRadio> <c:forEach items="#{personBean.genders}" varStatus="loop"> <span style="width:80px;" class="checkbox"><t:radio for=":myForm:myRadio" index="#{loop.index}" /></span> </c:forEach> HTML Generated <span class="checkbox">

applying sorting in p:datatable but getting java.lang.IllegalStateException: CDATA tags may not nest when click for sorting

那年仲夏 提交于 2019-12-12 01:12:02
问题 I am using p:datatable but getting java.lang.IllegalStateException: CDATA tags may not nest when clicked for sorting , I am getting full data from bean to populate in datatable but not able to sort <h:form prependId="false" id="roundingMasterFormId"> <h:inputHidden value="#{roundingBean.initList}" /> <p:dataTable value="#{roundingBean.myRoundingRuleList}" var="var" style="width: 100%" styleClass="role_detail_section" rowStyleClass="activity_white, activity_blue" cellspacing="0" cellpadding="0

get j_username in j_security_check JSF 2.0

本小妞迷上赌 提交于 2019-12-12 01:03:54
问题 I have simple page, I want to retrieve j_username to save it in session as a logged in user, i can't fetch it from the form. here Server it self perform authentication in this code <h:form id="login" onsubmit="document.getElementById('login').action='j_security_check';" prependId="false"> <h:panelGrid columns="2"> <p:outputLabel for="j_username" value="Username" /> <p:inputText id="j_username" name="j_username"/> <p:outputLabel for="j_password" value="Password" /> <p:password id="j_password"

p:galleria doesn't show after sign up, but directly yes

て烟熏妆下的殇ゞ 提交于 2019-12-12 00:57:08
问题 I am trying to display some picture in a primefaces galleria after signing in, in a new xhtml, but nothing happens. This is the "sing in" page (index.xhtml, "Bejelentkezés" means "Sign in" in hungarian): When I fill the texts with "viktor" (username and passw too), it navigates to "home.xhtml", which would show the galleria upside, the pictures' name in the middle, and one picture under. But I got this: If I write "localhost:8080/Primefaces_test1/home.xhtml" into the browser, ENTER, see a

Getting id of item in list<object> in JSF

江枫思渺然 提交于 2019-12-12 00:46:44
问题 I don't have any idea what approach and how I should start coding to get the id of a specific object item when a form button is clicked. The Product Id values showing are primary keys of the product table I created. I'm coming from Swing programming and in Swing I can easily use the JLabel.getText(); to get the product Ids 1,4,5,6 shown on the screenshot. But I guess it's different with JSF . Also, these object values are contained in a ui:repeat loop frames.xhtml <ui:repeat value="#

Upgrade JSF / Mojarra in JBoss AS / EAP / WildFly

半城伤御伤魂 提交于 2019-12-12 00:36:23
问题 How do I upgrade Mojarra in JBoss server and tell it use the given Mojarra 2.x JARs instead of JBoss own jboss-jsf-api_2.1_spec-2.0.1.Final.jar as indicated in startup log? If that's relevant, I am currently using JBoss AS 7.1. 回答1: The below procedure applies to JBoss AS 7.2+ , JBoss EAP 6.1+ , and JBoss WildFly 8+ and assumes that you've full control over the server installation and configuration. This upgrades the server-wide default JSF version: Download the individual Mojarra API and

Modal dialogs BUG

こ雲淡風輕ζ 提交于 2019-12-12 00:34:49
问题 I have this code, currently working: <?xml version="1.0" encoding="UTF-8"?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.org/ui" template="/templates/default.xhtml"> <ui:define name="content"> <h:form id="form"> <p:dataTable id="clienti" var="c" value="#{clientiController.clienti}" rowKey="#{c.id}"> <p:column headerText="Ragione sociale">