jsf-2

how to pass the parameter during file upload in primefaces [duplicate]

寵の児 提交于 2020-01-02 07:40:13
问题 This question already has an answer here : Pass value of another input component when uploading file via p:fileUpload mode=advanced (1 answer) Closed 3 years ago . I am using jsf2.0 with primfaces and using p:fileupload for uploading the photo..Here i need to pass the parameter in backing bean. In that there is no option for passing parameter through p:fileupload.. i was used the binding option also,but it returns the null value on backing bean... here is my fileupload.xhtml <h:form enctype=

Accessing and using .jsf files from the database

允我心安 提交于 2020-01-02 07:06:23
问题 What is the best way to enable my webapplication to use JSF files stored in the database? I'd like to be able to dynamically (during runtime) create new JSF pages which will be made available without having to redeploy the application. So in other words: I would like to store the bigger part of my JSF pages in the database and would like JSF to use the database as a datasource for getting JSF files. I've thought long about a solution and found some possible ways. However, I haven't been able

Accessing and using .jsf files from the database

左心房为你撑大大i 提交于 2020-01-02 07:06:06
问题 What is the best way to enable my webapplication to use JSF files stored in the database? I'd like to be able to dynamically (during runtime) create new JSF pages which will be made available without having to redeploy the application. So in other words: I would like to store the bigger part of my JSF pages in the database and would like JSF to use the database as a datasource for getting JSF files. I've thought long about a solution and found some possible ways. However, I haven't been able

JSF ViewScoped variable not surviving redirect to same page

倾然丶 夕夏残阳落幕 提交于 2020-01-02 06:33:10
问题 With the code below, i'm using a listener on the selectOneRadio to redirect to the page with a query string in the url. The problem is, when i get redirected, the value of newsTitle and selectedNews are null. Why is this? Is is because i'm doing a redirect using FacesContext? news.xhtml <h:outputLabel for="title" value="Title" style="font-weight: bold;"/> <p:inputText id="title" required="true" value="#{contentEditorBacking.newsTitle}" > <p:ajax event="blur"/> </p:inputText> <h:outputLabel

JSF 2 : dataTable columnClasses is not replicated after 2 columns

血红的双手。 提交于 2020-01-02 06:11:13
问题 Im using glassfish 3.0.1 and was experimenting with columnClasses in dataTable for the first time. It's something like this : <h:dataTable value="#{coreGridBean.heroBeanList}" var="hero" captionStyle="font-size: 0.95em; font-style:italic" styleClass="orders" headerClass="ordersHeader" footerClass="ordersHeader" columnClasses="oddColumn,evenColumn"> From the core jsf book im reading, it says that by specifying only 2 classes in the columnClasses attribute, those 2 will be repeated when the

JSF 2 : dataTable columnClasses is not replicated after 2 columns

烈酒焚心 提交于 2020-01-02 06:11:09
问题 Im using glassfish 3.0.1 and was experimenting with columnClasses in dataTable for the first time. It's something like this : <h:dataTable value="#{coreGridBean.heroBeanList}" var="hero" captionStyle="font-size: 0.95em; font-style:italic" styleClass="orders" headerClass="ordersHeader" footerClass="ordersHeader" columnClasses="oddColumn,evenColumn"> From the core jsf book im reading, it says that by specifying only 2 classes in the columnClasses attribute, those 2 will be repeated when the

Composite component required=“true” not respected

 ̄綄美尐妖づ 提交于 2020-01-02 05:45:08
问题 In the composite:interface I have defined an attribute like this: <composite:attribute name="myAttribute" required="true"/> Now when I use my composite component like this, without defining any attributes: <myTag:myCC/> I would expect an error to occur. It doesn't. What could I possibly be missing? 回答1: It will only occur if your JSF project stage is set to Development as follows in web.xml : <context-param> <param-name>javax.faces.PROJECT_STAGE</param-name> <param-value>Development</param

How to create a button in JSF page with custom label

夙愿已清 提交于 2020-01-02 05:41:11
问题 I have this simple JSF button: //Question Dialog function deletedialog(button, a){ $("<div />", { text: a }).dialog({ width: 600, buttons: { "Ok": function() { $("#form\\:deleterow").click(); // $('input[id$="deleterow"]').click(); $(this).dialog("close"); button.value = "Processing..."; button.disabled = true; }, "Cancel": function(event) { $(this).dialog("close"); event.preventDefault(); button.value = "Delete"; button.disabled = false; } } }); } <!-- hidden button --> <h:commandButton id=

List<Integer> received List<String>

旧城冷巷雨未停 提交于 2020-01-02 05:18:19
问题 I think that I found a error in runtime of Java with JSF 2.0 (Using Primefaces), in this project I'm using JSF 2.0 Primefaces and CDI. Resuming the problem, I have a method setter in my business class Role that received a List, but the JSF is setting a ArrayList on that. Should the java throw a exception or at least should not find a method that matches? here is: public void setAcl(List<Integer> acl) { this.acl = acl; System.out.println("Received: " + this.acl); for(Object i : this.acl) {

When using lazy dataTable another component does not get updated / 2nd component data is one request behind

五迷三道 提交于 2020-01-02 03:37:07
问题 I have a PrimeFaces p:dataTable and enabled lazy loading by implementing a LazyDataModel . The dataTable holds search results, so when doing a search request the search service only retrieves the required (paginating) data. That works fine. When doing a ajax request with p:commandButton : <p:commandButton id="searchCmdBtn" value="Search" action="#{searchBean.search}" update=":resultForm:resultList :filterForm:filterMenu :resultForm:messages" ajax="true" /> the dataTable gets updated properly,