jsf

Compare two fields that use same class

前提是你 提交于 2020-02-12 05:13:47
问题 I have two input fields fromDate and toDate which are instances of Date class. The Date class uses custom Date validator which validates the month, day and year fields contained in the date field. The custom date validator is specific for each date i.e, fromDate and toDate. I need to compare the month, day or year fields of fromDate with toDate. If the fromDate is greater than toDate, a validation message has to displayed. Update: The fromDate and toDate are two custom date components as

How to use Font Awesome from webjars.org with JSF

僤鯓⒐⒋嵵緔 提交于 2020-02-09 01:11:07
问题 I am trying to use Font Awesome icons with my JSF application. I have had some success by following the getting started instructions and adding the following to my view's <h:head> section: <link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet" /> This gives me a nice home icon when I use the icon-home class: However, I don't want to be dependent on the bootstrap server to provide the Font Awesome resources, so I am trying to bundle these with my war,

h:commandbutton, how to redirect to external site?(JSF 2) [duplicate]

家住魔仙堡 提交于 2020-02-08 08:49:40
问题 This question already has an answer here : Redirect to external URL in JSF (1 answer) Closed 4 years ago . When i use command button to redirect to pages, inside my project, u just need to give the name of the page with no extention, followed by ?faces-redirect=true in the action attribute and i will get redirected. But what if i want to get redirected to an external page(example:www.google.com)? I tried in many ways: www.google.com, google.com, http://google.com but i failed. This is what i

ajax is not updating a component situated in another <ui:define

混江龙づ霸主 提交于 2020-02-07 12:30:08
问题 Hi i have a command link so when click it i action="#{projectAdminisrationMB.showGroups(userObj)}" a fieldset will be rendred <p:fieldset legend="Manage User Groups" id="manageUserGroupsFS" rendered="#{projectAdminisrationMB.manageUserGroupsFSFlag}"> when the fieldset was in the same <ui:define name="body"> everything works but when i put it in a separated ui:define it will not be rendered. Here's the code : <ui:define name="body"> <h:form id="manageProjeUFform"> <div class="right"> <p:growl

p:growl does not show global faces message

让人想犯罪 __ 提交于 2020-02-07 07:45:08
问题 I've the below command button and growl component: <p:commandButton id="reservationAdd" actionListener=" {reservationBean.addReservation()}" value="Dodaj" oncomplete="PF('wdlgAddReservation').hide();" update=":frm" action="#{linkedTimelinesController.createTimeline()}"> <f:ajax execute="reservationAdd" onevent="click" listener="#{messageControler.eventAdded()}" render="dynamic"/> </p:commandButton> <p:growl id="msj" autoUpdate="true"/> I'm adding a faces message as below: @ManagedBean public

h:dataTable header facet does not display value from row

有些话、适合烂在心里 提交于 2020-02-07 05:22:25
问题 I'm trying to understand why the second column facet, with #{entry.value} doesn't display anything, just an empty header? <h:dataTable value="#{bean.entries}" var="entry"> <h:column> <f:facet name="header"> <h:outputText value="UserId" /> </f:facet> <h:outputText value="#{entry.key}" /> </h:column> <h:column> <f:facet name="header"> <h:outputText value="#{entry.value}" /> </f:facet> <h:outputText value="#{entry.value}" /> </h:column> I've understand that maybe I'm doing it wrong, because

Reload and refresh table from ajax call

ε祈祈猫儿з 提交于 2020-02-07 03:07:29
问题 I want to create a form which when it's submitted it renders and executes a second form: <h:form id="paymentform"> <div> ..... </div> <h:commandButton id="buy" type="submit" value="Put" action="#{dashboard.calculateProcessing}" > <f:ajax render="@form formdddasd" execute="@form formdddasd"/> </h:commandButton> </h:form> Second form which must be reloaded and refreshed: <h:form id="formdddasd"> <h:dataTable id="formdd" value="#{orders.cdList}" var="cd" rendered="#{orders.cdList ne null}" .....

BootsFaces selectMultiMenu does not render correctly

 ̄綄美尐妖づ 提交于 2020-02-05 11:55:19
问题 I'm on Mojarra 2.2.7, PrimeFaces 5.2, BootsFaces 0.7.0. I'm creating my first BootsFaces page. I've got it configured, resources are loaded and I was able to create a container with a panel with a b:inputText and a b:selectOneMenu . Now I would like to add a b:selectMultiMenu: <b:selectMultiMenu nonSelectedText="Please select"> <f:selectItem itemLabel="Option 1" itemValue="1"/> <f:selectItem itemLabel="Option 2" itemValue="2"/> <f:selectItem itemLabel="Option 3" itemValue="3"/> </b

BootsFaces selectMultiMenu does not render correctly

早过忘川 提交于 2020-02-05 11:43:32
问题 I'm on Mojarra 2.2.7, PrimeFaces 5.2, BootsFaces 0.7.0. I'm creating my first BootsFaces page. I've got it configured, resources are loaded and I was able to create a container with a panel with a b:inputText and a b:selectOneMenu . Now I would like to add a b:selectMultiMenu: <b:selectMultiMenu nonSelectedText="Please select"> <f:selectItem itemLabel="Option 1" itemValue="1"/> <f:selectItem itemLabel="Option 2" itemValue="2"/> <f:selectItem itemLabel="Option 3" itemValue="3"/> </b

Invalidate specific jsf bean session

岁酱吖の 提交于 2020-02-04 23:10:33
问题 How I invalidate a specific bean in a session? I have this example code. I test with ExternalContext.invalidateSession(); but it destroy all beans in the session in the application since it destroys the full session. @Named @SessionScoped class Managed implements Serializable { public void invalidate (){ // lines // externalContext.invalidateSession(); } } but, with invalidateSession all beans in the session are destroyed, I want to invalidate only the one specific "Managed" bean, how I do