jsf-2

Netbeans deployment fails after class rename

自闭症网瘾萝莉.ら 提交于 2019-12-18 05:59:24
问题 I am writing a test client for a webservice. It's a Netbeans 6.9.1 WebApplication using JSF framework. I have one managed bean that calls the webservice. Everything worked fine until I noticed a typo in my bean class name. It was serviceBean and I renamed it to ServiceBean with first letter upper case. I used safe rename function of Netbeans and both the filename and class signature changed as expected. But from then I had a lot of trouble running my application on Glassfish 3.0.1. I can

JSF greater than zero validator

浪子不回头ぞ 提交于 2019-12-18 05:57:29
问题 How do you create a validator in JSF that validates the input text if it is greater than zero? <h:inputText id="percentage" value="#{lab.percentage}"> <f:validateDoubleRange minimum="0.000000001"/> </h:inputText> I have the code above but I am not sure if this is optimal. Although it works but if another number lesser than this is needed then I need to change the jsf file again. The use case is that anything that is greater than zero is okay but not negative number. Any thoughts? 回答1: Just

How to reference p:commandLink in p:dataTable from p:blockUI trigger?

江枫思渺然 提交于 2019-12-18 05:55:58
问题 This is not working for me: <h:form id="wfMgtForm"> . . . <p:dataTable id="wfTable" ..." var="item"> <p:column> . . . </p:column> <p:column> <p:commandLink id="editWatchfolderButtonId" oncomplete="dlgEditWF.show()" update=":editWFForm" process="@none"> <f:param value="#{item.value.ID}" name="editId"/> <h:graphicImage alt="Edit Image" style="border: none" value="./images/edit.png" /> </p:commandLink> </p:column> . . . <p:blockUI block=":wfMgtForm" trigger="editWatchfolderButtonId"> Loading...

JSF how upgrade to Mojarra 2.1.21 in Netbeans7.1 (just sub jsf-api.jar and jsf-impl.jar fails)

﹥>﹥吖頭↗ 提交于 2019-12-18 05:22:39
问题 I want to upgrade from JSF implementation Mojarra 2.1.3 in Netbeans7.1 (Glassfish 3.1.1). You might ask first why I don't just upgrade to Netbeans7.3, and the reasons include that it it runs Glassfish 3.1.2.2 and that I have some other 3rd party software in my web application that is not yet compatible with Glassfish higher than 3.1.1, and besides it only has Mojarra 2.1.6 anyway. I used to be able to upgrade Mojarra by simply replacing jsf-api.jar and jsf-impl.jar under /glassfish/modules,

JSF how upgrade to Mojarra 2.1.21 in Netbeans7.1 (just sub jsf-api.jar and jsf-impl.jar fails)

╄→尐↘猪︶ㄣ 提交于 2019-12-18 05:22:07
问题 I want to upgrade from JSF implementation Mojarra 2.1.3 in Netbeans7.1 (Glassfish 3.1.1). You might ask first why I don't just upgrade to Netbeans7.3, and the reasons include that it it runs Glassfish 3.1.2.2 and that I have some other 3rd party software in my web application that is not yet compatible with Glassfish higher than 3.1.1, and besides it only has Mojarra 2.1.6 anyway. I used to be able to upgrade Mojarra by simply replacing jsf-api.jar and jsf-impl.jar under /glassfish/modules,

How can I initialize a Java FacesServlet

别等时光非礼了梦想. 提交于 2019-12-18 05:17:09
问题 I need to run some code when the FacesServlet starts, but as FacesServlet is declared final I can not extend it and overwrite the init() method. In particular, I want to write some data to the database during development and testing, after hibernate has dropped and created the datamodel. Is there a way to configure Faces to run some method, e.g. in faces-config.xml? Or is it best to create a singleton bean that does the initialization? 回答1: Use an eagerly initialized application scoped

How can I initialize a Java FacesServlet

大城市里の小女人 提交于 2019-12-18 05:17:09
问题 I need to run some code when the FacesServlet starts, but as FacesServlet is declared final I can not extend it and overwrite the init() method. In particular, I want to write some data to the database during development and testing, after hibernate has dropped and created the datamodel. Is there a way to configure Faces to run some method, e.g. in faces-config.xml? Or is it best to create a singleton bean that does the initialization? 回答1: Use an eagerly initialized application scoped

Passing a FacesMessage to the next page [duplicate]

大憨熊 提交于 2019-12-18 05:09:09
问题 This question already has an answer here : How to show faces message in the redirected page (1 answer) Closed 4 years ago . I am looking for a graceful JSF way to do this and was wondering if there was any commonly accepted practice for doing this. When I navigate from one page to another, I want the new page to show a FacesMessage in a h:message component (actually p:message but it should be the same thing) that was transmitted from the last page. So for example, if a user clicks a "Create

JSF Form is not showing up [duplicate]

一笑奈何 提交于 2019-12-18 05:01:45
问题 This question already has an answer here : JSF returns blank/unparsed page with plain/raw XHTML/XML/EL source instead of rendered HTML output (1 answer) Closed 4 years ago . My server is glassfish v3, my browser is firefox 3.6.3 and i am using Netbeans 6.8 My question is why the textfield is not showing up in my browser. I only see the label. <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1

JSF Form is not showing up [duplicate]

一曲冷凌霜 提交于 2019-12-18 05:01:29
问题 This question already has an answer here : JSF returns blank/unparsed page with plain/raw XHTML/XML/EL source instead of rendered HTML output (1 answer) Closed 4 years ago . My server is glassfish v3, my browser is firefox 3.6.3 and i am using Netbeans 6.8 My question is why the textfield is not showing up in my browser. I only see the label. <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1