I am facing a problem in p:tabView with dynamic="true" which i am stuck in for days.
I have three tabs each having separate form and p:fileUpload with command button for submitting the form and upload file.
The problem is my first form or tab works fine but the other two are not working or firing command button action at all, instead ti refreshes the page. They are invoked only when second time form filled and button pressed.
And to add one thing more the fileUploadListeners even work fine in all these tabs but the command button wont work or fire action method for other two tabs(only the first time form filled and submitted after that works fine):
Is there something wrong with this primefaces tag(i m using latest version of primefaces 3.5 also) or i am mistaking or missing something?? any kind of guidance will be helpful.
Here is the page code which is included in another main page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
template="/MasterPage/Master.xhtml">
<ui:define name="Search">
<div class="searchBarDiv"></div>
<br class="clear" />
<div class="resultMainDiv" style="background-color: white;">
<p:layout style="width:1218px;height:558px;" id="layout">
<p:ajax event="toggle" />
<p:layoutUnit position="west" size="300" header="UPDATES"
resizable="true" collapsible="true" styleClass="sliderDiv"
style="color:pink;">
</p:layoutUnit>
<p:layoutUnit position="center" styleClass="resultDiv">
<div class="uploadDiv">
<p:tabView id="tabview" cache="false" dynamic="true">
<p:tab id="docTab" title="Document">
<h:form id="docf" >
<h:panelGrid id="grid" columns="1">
<h:panelGroup>
<h:outputLabel styleClass="advLabel"
for="mId" value="Title ">
</h:outputLabel><h:outputLabel style="color: red;">*</h:outputLabel>
<h:inputText id="mId"
styleClass="txtfield"
value="#{documentInsertController.documentTitle}">
</h:inputText>
</h:panelGroup>
<h:panelGroup>
<h:outputLabel class="advLabel">Dated </h:outputLabel>
<p:calendar styleClass="txtfield" id="dtxtOrginated"
mode="popup" navigator="true" yearRange="1900:2015"
pattern="dd-MMM-yyyy"
converter="CalendarDateStringConverter"
value="#{documentInsertController.documentOriginatedOn}" />
</h:panelGroup>
<h:panelGroup>
<h:outputLabel class="advLabel">KeyWord</h:outputLabel><h:outputLabel
style="color: red;"> *</h:outputLabel>
<h:inputText id="dtxtKeywordsList"
value="#{documentInsertController.documentKeywords}"
styleClass="txtfield" />
</h:panelGroup>
<h:panelGrid rendered="#{renderBean.viewLoad}">
<h:panelGroup> <h:outputLabel class="advLabel">Select Document</h:outputLabel><h:outputLabel
style="color: red;"> *</h:outputLabel>
<p:fileUpload id="fu" allowTypes="/(\.|\/)(DOC|DOCX|doc|docx|ppt|xls|xlsx|pdf)$/"
multiple="false" mode="advanced" sizeLimit="41949000" showButtons="false"
fileUploadListener="#{documentInsertController.uploadPListener}" label="Browse"
value="#{documentInsertController.file}" >
<h:message id="docMSG" for="fu"></h:message>
</p:fileUpload>
</h:panelGroup>
<h:panelGroup>
<p:commandButton id="DocUpoadLoad" styleClass="btn"
value="Load File For Preview" ajax="false"
action="#{documentInsertController.loadDocForPreview}"
style="background-color:#FEAA41;background-image:none;color:white;font-weight:bold;width:170px; height:25px;">
</p:commandButton>
</h:panelGroup>
</h:panelGrid>
</h:panelGrid>
</h:form>
<p:commandButton id="DocUploadbtn" value="Upload"
action="#{documentInsertController.saveDocument}"
ajax="false"
style="background-color:#FEAA41;background-image:none;color:white;font-weight:bold; ">
</p:commandButton>
</h:panelGrid>
</p:tab>
<p:tab id="imgTab" title="Image">
<h:form id="imagef" >
<h:panelGrid id="grid" columns="1">
<h:panelGroup> <h:outputLabel class="advLabel">Title </h:outputLabel> <h:outputLabel
style="color: red;"> *</h:outputLabel>
<h:inputText id="txtImgTitle"
value="#{mediaInsertController.mediaTitle}"
styleClass="txtfield" >
</h:inputText>
</h:panelGroup>
<h:panelGroup> <h:outputLabel class="advLabel">Taken Date</h:outputLabel>
<p:calendar styleClass="txtfield"
id="imgtxtOrginated" mode="popup" navigator="true"
yearRange="1900:2015" pattern="dd-MMM-yyyy"
converter="CalendarDateStringConverter"
value="#{mediaInsertController.mediaTakenOn}" />
</h:panelGroup>
<h:panelGroup> <h:outputLabel class="advLabel">Description</h:outputLabel>
<h:inputTextarea id="txtImgDescription"
value="#{mediaInsertController.mediaDescription}"
styleClass="txtImgDescription" /></h:panelGroup>
<h:panelGroup> <h:outputLabel class="advLabel">Select Image</h:outputLabel><h:outputLabel
style="color: red;"> *</h:outputLabel>
<p:fileUpload id="fuImage" allowTypes="/(\.|\/)(jpeg|jpg|png|bmp|gif|GIF|PNG)$/"
multiple="false" mode="advanced" sizeLimit="6291456" showButtons="false"
label="Browse" invalidSizeMessage="File exceeds limmit 6 MB "
value="#{mediaInsertController.file}" fileUploadListener="#{mediaInsertController.uploadPListener}" />
<h:message id="imgMSG" for="fuImage"></h:message>
</h:panelGroup>
<p:commandButton styleClass="btn" id="btnUploadImage_Click" ajax="false"
value="Upload" actionListener="#{mediaInsertController.saveImage}"
style="background-color:#FEAA41;background-image:none;color:white;font-weight:bold; ">
</p:commandButton>
</h:panelGrid>
</h:form>
</p:tab>
<p:tab id="vidTab" title="Video">
<h:form id="videof" >
<h:panelGrid id="grid" columns="1">
<h:panelGroup>
<h:outputLabel class="advLabel">Title </h:outputLabel> <h:outputLabel
style="color: red;"> *</h:outputLabel>
<h:inputText id="vtxtTitle"
value="#{mediaInsertController.mediaTitle}"
styleClass="txtfield" maxlength="50" >
</h:inputText></h:panelGroup>
<h:panelGroup> <h:outputLabel class="advLabel">Taken Date</h:outputLabel>
<p:calendar styleClass="txtfield" id="vtxtOrginated"
mode="popup" navigator="true" yearRange="1900:2015"
pattern="dd-MMM-yyyy"
converter="CalendarDateStringConverter"
value="#{mediaInsertController.mediaTakenOn}" />
</h:panelGroup>
<h:panelGroup> <h:outputLabel for="txtVidDescription"
value="Description" styleClass="advLabel"></h:outputLabel>
<h:inputTextarea id="txtVidDescription"
value="#{mediaInsertController.mediaDescription}"
styleClass="txtUploading" style="height:40px" />
</h:panelGroup>
<h:panelGroup> <h:outputLabel class="advLabel">Select Video</h:outputLabel><h:outputLabel
style="color: red;"> *</h:outputLabel>
<p:fileUpload id="fuVideo" allowTypes="/(\.|\/)(mp4|flv|swf)$/" invalidFileMessage="Invalid file content"
multiple="false" mode="advanced" sizeLimit="629145699" showButtons="false" update="vidMSG"
fileUploadListener="#{mediaInsertController.uploadPListener}" label="Browse" invalidSizeMessage="Size exeeds limit 600MB"
value="#{mediaInsertController.file}" />
<h:message id="vidMSG" for="fuVideo"></h:message>
</h:panelGroup>
<p:commandButton styleClass="btn" id="btnUploadVideo_Click" ajax="false"
value="Upload" action="#{mediaInsertController.saveVideo}"
style="background-color:#FEAA41;background-image:none;color:white;font-weight:bold; ">
</p:commandButton>
</h:panelGrid>
</h:form>
</p:tab>
</p:tabView>
</div>
</p:layoutUnit>
</p:layout>
<p:growl autoUpdate="true" sticky="true" id="uploadMSG"></p:growl>
</div>
</ui:define>
</ui:composition>
Your commandButton id="DocUploadbtn" is outside the h:form, that could be affecting things. There also seem to be three closing h:panelGrid tags around the same area; could it be malformed XHTML?
Related
I have a primefaces dialog and what I want to do is process inputtext before commandbutton action starts. Inside myController.sendToPostBox method, myController.rejectionReason string returns null. Here is my view code.When I remove process attribute, commandbutton doesn't works.
<h:form>
....
<p:dialog id="myPanel"
widgetVar="myPanelId"
resizable="true"
appendToBody="true"
draggable="true"
height="200"
width="300">
<p:panelGrid id="myPanelGridId" style="width: 250px;" styleClass="panelGridWithoutBorder">
<p:row>
<p:column colspan="2">
<p:inputTextarea style="width: 250px;" value="#{myController.rejectionReason}"/>
</p:column>
</p:row>
<p:row>
<p:column>
<p:commandButton value="Save"
oncomplete="if (!args.validationFailed) myPanel.hide();"
process="myPanelId"
action="#{myController.sendToPostBox()}"/>
</p:column>
<p:column>
<p:commandButton value="Close" />
</p:column>
</p:row>
</p:panelGrid>
</p:dialog>
</h:form>
Just place the <h:form> inside the dialog (instead dialog inside the <h:form>)
Explanation:
When you use appendToBody="true" you dialog is being transferred outside of the form that wraps it to the body of the generated html , and since there is no form inside the dialog you can't really submit it.
Also take a look at this thread: Proper Construct for Primefaces Dialog
You need something like this:
<h:form id="formDialog">
<p:commandButton id="basic" value="Basic Dialog" onclick="PF('dlg1').show();" type="button" />
</h:form>
<p:dialog id="basicDialog" header="Basic Dialog" widgetVar="dlg1">
<h:form id="formUser">
<h:panelGrid id="grid" columns="2">
<h:outputLabel value="Username:" />
<p:inputText id="user" value="#{user.name}" />
<h:outputLabel value="Password:" />
<p:inputText id="password" value="#{user.password}" />
<h:commandButton value="Login" id="btn" process="#formUser" actionListener="#{user.login}" />
</h:panelGrid>
</h:form>
</p:dialog>
"login" in the actionListener tag is a method in the User(bean) class, that needs the #ManagedBean annotations.
I am using the JSF 2.0 and primefaces 3.5. the problem i am facing is i have created a datatable on a page .. every things works fine along with pagination and filtering, but when i include the same page into the template ... the pagination and filtering stop working.. any idea regarding this
the code is
<h:form id="form">
<p:dataTable var="row" rowKey="row.attackID"
value="#{attackBean.list}" id="tableAttack" paginator="true"
rows="10" selection="#{attackBean.selectedAttack}"
filteredValue="#{attackBean.filteredAttack}"
rowsPerPageTemplate="5,10,15" selectionMode="single">
<p:ajax event="rowSelect" update=":centerForm:form:display"
oncomplete="dlg.show()" />
<p:column headerText="Attack-ID" filterBy="#{row.attackID}">
<h:outputText value="#{row.attackID}" />
</p:column>
<p:column headerText="Action Name" filterBy="#{row.attackName}">
<h:outputText value="#{row.attackName}" />
</p:column>
<p:column headerText="Defended User" filterBy="#{row.userID}">
<h:outputText value="#{row.userID}" />
</p:column>
<p:column headerText="Action Taken">
<h:outputText value="#{row.actionTaken}" />
</p:column>
<p:column headerText="Attack Time">
<h:outputText value="#{row.attackTime}" />
</p:column>
</p:dataTable>
<p:dialog id="tDialog" header="Threat info" widgetVar="dlg"
modal="true" height="250" width="300" showEffect="explode"
hideEffect="bounce">
<h:panelGrid id="display" columns="1" cellpadding="4">
<h:outputText value="Attack ID: #{attackBean.selectedAttack.attackID} " />
<h:outputText value="Description: #{attackBean.selectedAttack.userID}" />
<h:outputText
value="Action Taken: #{attackBean.selectedAttack.actionTaken}" />
</h:panelGrid>
</p:dialog>
</h:form>
here is the main templete code
<h:body style="">
<div id="page" >
<h:panelGroup id="mainPanel">
<div id="left" class="bar">
<ui:insert name="left">
<ui:include src="commonLeft.xhtml" />
</ui:insert>
</div>
<div id="center">
<div id="hDiv">
<ui:insert name="left">
<ui:include src="commonHeader.xhtml" />
</ui:insert>
</div>
<div id="cDiv">
<h:form id="centerForm">
<h:panelGroup id="centerPanel" render="mainPanel">
<ui:include src="#{browse.url}" />
</h:panelGroup>
</h:form>
</div>
</div>
<div id="right" >
<ui:insert name="right">
<ui:include src="commonFooter.xhtml" />
</ui:insert>
</div>
</h:panelGroup>
</div>
</h:body>
I assume you are including your template in this section:
<h:form id="centerForm">
<h:panelGroup id="centerPanel" render="mainPanel">
<ui:include src="#{browse.url}" />
</h:panelGroup>
</h:form>
If that's the case, then you have a problem of nested forms. That is not allowed and the inner form is getting removed from the HTML code (you can see that in the source code in the browser). You should not impose the form in the parent template, and let the children create the forms they are going to use.
I have a jsf page having a popup button that opens a following dialog popup:
</h:form>
<p:dialog id="dialog" header="Select different user"
widgetVar="dlg" appendToBody="true">
<h:form id="form23">
<h:panelGrid columns="2" cellpadding="5">
<h:outputLabel for="username" value="Username:" />
<p:inputText value="#{loginBean.username}"
id="username" required="true" label="username" />
<h:outputLabel for="password" value="Password:" />
<h:inputSecret value="#{loginBean.password}"
id="password" required="true" label="password" />
<f:facet name="footer">
<p:commandButton id="loginButton" value="Login" />
</f:facet>
</h:panelGrid>
</h:form>
</h:form>
But instead of opening as popup it is getting displayed outside the page itself. the dialog is outside the main form. Help!!
I tried that but still the same problem persists..below is my modified code..
<h:form id="create-ticket">
<p:dialog id="dialog" header="Select different user" widgetVar="dlg" appendToBody="true">
<h:panelGrid columns="2" cellpadding="5">
<h:outputLabel for="username" value="Username:" />
<p:inputText value="#{loginBean.username}"
id="username" required="true" label="username" />
<h:outputLabel for="password" value="Password:" />
<h:inputSecret value="#{loginBean.password}"
id="password" required="true" label="password" />
<f:facet name="footer">
<p:commandButton id="loginButton" value="Login"
/>
</f:facet>
</h:panelGrid>
</p:dialog>
<h:panelGroup>
<h:outputLabel value="#{I18N['Create_Ticket_for_other_users']}" styleClass="atf-header"></h:outputLabel>
</h:panelGroup>
<h:panelGroup id="search_section" layout="block"
styleClass="atf-content-area atf-separarot-botton"> <!-- This is the section where we get the grey background -->
<h:panelGroup id="input_search_section" styleClass="">
<h:outputText id="name" value="Siddharth Mishra"
labelStyleClass="atf-label">
</h:outputText>
</h:panelGroup>
<h:panelGroup styleClass="atf-right atf-inline-block">
<p:commandButton id="btn_search" value="select different user"
styleClass="atf-button-search" onclick="dlg.show();" type="button"
>
</p:commandButton>
</h:panelGroup>
</h:panelGroup>
Now i only have one form you can see the popup dialog section + the button which is calling the popup under h:panelgroup.Atached is the image how the form currently looks Thanks in advance
You need to restructure your code.
*Don't nest forms inside other forms.
*You dont have the end-tag of your p:dialog.
<h:form>
<p:dialog id="dialog" header="Select different user"
widgetVar="dlg" appendToBody="true">
//Content ex inputtext
</p:dialog>
<p:commandButton value="Show Dialog" onclick="dlg.show();" type="button" />
</h:form>
I am using Primefaces3.5 with Jsf2.1.9 i am getting a weired issue with
<p:commandButton>
as well as
<p:commandLink>
I have to press button as well as link more than one then JSF bean method is calling otherwise on Single click nothing Happening as i read some Stackoverflow Question this Issue relates to JSF but even using Primfaces3.5 with their Components i am getting this issue.Any one know How can i resolve this issue.
My JSF page
<ui:composition xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:p="http://primefaces.org/ui"
template="./../portfolio/PortfolioViewTemplate.xhtml">
<ui:define name="moduleContent">
<p:panel id="panel" header="Portfolio Transaction">
<p:messages id="msgs" />
<p:panelGrid id="addMoreTrans" columns="2" style="border-style:none;">
<f:facet name="header">
Add Trades
</f:facet>
<p:dataTable var="moreTrans"
value="#{portfolioTransactionBean.listOfTrasPanel}" style="border:none;" >
<p:column style="border:none;">
<p:panelGrid columns="7" id="transactionPanel1"
style="display: inline-block;border:none;">
<h:outputLabel for="tipsSuggestionBoxId" value="Company Name:*"></h:outputLabel>
<h:outputText value="Date:*" />
<h:outputText value="Type:*" />
<h:outputText value="Quantity:*" />
<h:outputText value="Price:*" />
<h:outputText value="Brokerage:" />
<h:outputText value="Notes:" />
<p:autoComplete id="tipsSuggestionBoxId"
completeMethod="#{applicationScopeBean.autoSelectCompany}"
value="#{portfolioTransactionBean.txnCurrentRecord.companyName}"
minChars="3" nothingLabel="No similar company found"
requestDelay="1" minQueryLength="3" required="true"
requiredMessage="Company Name Cannot be empty">
</p:autoComplete>
<p:calendar id="from_date1" size="10" required="true"
requiredMessage="Date Cannot be empty"
value="#{portfolioTransactionBean.txnCurrentRecord.umptTransDate}"
mode="popup" showOn="both" pattern="dd/MM/yyyy"
popupIconOnly="true" readonly="#{facesContext.renderResponse}"
navigator="true" showButtonPanel="true">
</p:calendar>
<p:selectOneMenu id="tranType"
value="#{portfolioTransactionBean.txnCurrentRecord.umptTransType}">
<f:selectItem itemLabel="Transaction Type" itemValue="" />
<f:selectItem itemLabel="Buy" itemValue="Buy" />
<f:selectItem itemLabel="Sell" itemValue="Sell" />
<f:selectItem itemLabel="Bonus" itemValue="Bonus" />
<f:selectItem itemLabel="Split" itemValue="Split" />
</p:selectOneMenu>
<p:spinner id="transQuntity1" required="true"
value="#{portfolioTransactionBean.txnCurrentRecord.umptQty}"
min="1" label="Quanity" size="5"
validatorMessage="Field Is mandatory" />
<p:spinner id="transPrice1" required="true" size="5"
value="#{portfolioTransactionBean.txnCurrentRecord.umptPrice}"
label="Price" validatorMessage="Field Is mandatory" />
<p:spinner id="brokerage1" size="5"
value="#{portfolioTransactionBean.txnCurrentRecord.umptBrokerage}" />
<h:inputText
value="#{portfolioTransactionBean.txnCurrentRecord.umptNotes}" />
</p:panelGrid>
<p:separator id="customSeparator" style="width:100%;height:10px" />
</p:column>
</p:dataTable>
<f:facet name="footer">
<p:commandButton value="Clear"
actionListener="#{portfolioTransactionBean.clearRecord}"
process="#this"
rendered="#{portfolioTransactionBean.onClickofButton}">
</p:commandButton>
<p:spacer width="100" height="10" />
<p:commandButton value="Save Transaction " icon="ui-icon-check"
action="#{portfolioTransactionBean.savePortfolioTransaction}"
style="float:right;right:20%;"
rendered="#{portfolioTransactionBean.onClickofButton}">
</p:commandButton>
<p:commandButton value="Add More Transaction " icon="ui-icon-check"
action="#{portfolioTransactionBean.addMoreTransPanel}"
process="#this" update="addMoreTrans"
rendered="#{portfolioTransactionBean.onClickofButton}" />
</f:facet>
</p:panelGrid>
<p:panelGrid columns="2" id="allTransactionPanel">
<p:dataTable value="#{portfolioTransactionBean.transactionsList}"
var="tradeRec">
<f:facet name="Header">
<h:outputText>Recently Added Trades</h:outputText>
</f:facet>
<p:column headerText="Company">
<h:outputText value="#{tradeRec.companyName}"></h:outputText>
</p:column>
<p:column headerText="Date">
<h:outputText value="#{tradeRec.umptTransDate}">
<f:convertDateTime dateStyle="medium"></f:convertDateTime>
</h:outputText>
</p:column>
<p:column headerText="Type">
<h:outputText value="#{tradeRec.umptTransType}"></h:outputText>
</p:column>
<p:column headerText="Quantity">
<h:outputText value="#{tradeRec.umptQty}"></h:outputText>
</p:column>
<p:column headerText="Price">
<h:outputText value="#{tradeRec.umptPrice}">
<f:convertNumber maxFractionDigits="2"></f:convertNumber>
</h:outputText>
</p:column>
<p:column headerText="Brokerage">
<h:outputText value="#{tradeRec.umptBrokerage}">
<f:convertNumber maxFractionDigits="2"></f:convertNumber>
</h:outputText>
</p:column>
</p:dataTable>
</p:panelGrid>
</p:panel>
</ui:define>
</ui:composition>
Template File...
<ui:composition xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:p="http://primefaces.org/ui"
template="./../templates/MasterTemplate.xhtml">
<ui:define name="moduleDetails">
<h:form name="portfolioMenuForm">
<f:event type="javax.faces.event.PreRenderViewEvent" listener="#{applicationScopeBean.preRenderView}"/>
<table style="width: 100%; min-height: 500px; border: none">
<tr>
<td>
<p:menu>
<p:submenu label="Portfolio Views">
<p:menuitem value="Add Transactions" action="PortfolioTransactionMgmt" update="#form" immediate="true" />
<p:menuitem value="View Transactions" action="PortFolioTranView" update="#form" immediate="true" />
<p:menuitem value="Latest Holdings" action="PortfolioHolding" update="#form" immediate="true" />
<p:menuitem value="Sector Allocations" action="#{portfolioTransactionBean.showSecAllocation}" update="#form" immediate="true" />
<p:menuitem value="Realized Profit" action="PortfolioRelizeProfit" update="#form" immediate="true" />
<p:menuitem value="Portfolio Performance" action="#{portfolioTransactionBean.showPortPerformance}" update="#form" immediate="true" />
<p:menuitem value="Benchmark Comparison" action="#{portfolioTransactionBean.showBenhComparison}" update="#form" immediate="true" />
</p:submenu>
</p:menu>
</td>
<td>
<ui:insert name="moduleContent"></ui:insert>
</td>
</tr>
</table>
</h:form>
</ui:define>
</ui:composition>
Basically this is not weired issue
On first click jsf first looks whether there is (javax.faces.ViewState) state available or not and if it is not available then it creates one for you & when you click second time because of Jsf state available it makes call to bean method.
Solution : try creating jsf state through the javascript function
Thanks to Çağatay Çivici Project lead of primefaces .He suggest me
Try with 2.1.17 then, showcase is 2.1.17.
So i updated my pom for jsf and it work like a charm.
Thanks
I have a form with 4 fields (2 dates, 2 selectOne).
My Bean is SessionScoped.
When I change the values in the form once, and click on submit, the applications works fine.
But when I want to change the values in form again, nothing happens. no change nor execution.
My Form looks like:
<ui:define name="sidebar">
<p:panel header="Select Values">
<h:form id="graphform">
<p:growl id="msg" />
<p:panelGrid columns="1">
<h:outputLabel for="servervalue" value="Servervalue: " />
<p:selectOneMenu value="#{graph.servervalue }" id="servervalue">
<f:selectItems value="#{formconst.SERVERVALUES}" />
</p:selectOneMenu>
<h:outputLabel for="startdate" value="Startdate: " />
<p:calendar disabledWeekends="false" size="10" pattern="dd.MM.yyyy"
showOtherMonths="true" maxlength="10"
mindate="#{formconst.MINDATE }" maxdate="#{formconst.MAXDATE}"
showButtonPanel="true" navigator="true" readOnlyInputText="true"
id="startdate" value="#{graph.startdate }" showOn="button"
required="true" />
<h:outputLabel for="enddate" value="Enddate: " />
<p:calendar disabledWeekends="false" size="10" pattern="dd.MM.yyyy"
showOtherMonths="true" maxlength="10"
mindate="#{formconst.MINDATE }" maxdate="#{formconst.MAXDATE }"
showButtonPanel="true" navigator="true" readOnlyInputText="true"
id="enddate" value="#{graph.enddate }" showOn="button"
required="true" />
<h:outputLabel for="filter" value="Filter: " />
<p:selectOneMenu value="#{graph.filter }" id="filter">
<f:selectItems value="#{formconst.GENERALFILTER}" />
</p:selectOneMenu>
</p:panelGrid>
<p:separator />
<p:panelGrid columns="2">
<p:commandButton value="Submit" update="#all"
action="#{ graph.updateChart }" />
<p:commandButton value="Reset" update="#all"
action="#{ graph.resetChart }" />
</p:panelGrid>
</h:form>
</p:panel>
</ui:define>
<ui:define name="content">
<h:form id="linechart">
<p:lineChart value="#{graph.cartesianChartBean.chartmodel }"
enhancedLegend="true" legendPosition="nw" xaxisAngle="50" />
</h:form>
</ui:define>
The same happens when I change SessionScoped to ViewScoped or RequestScoped.
I can change the values only one time.
I use primefaces 3.2 with apache myFaces 2.0.2 on WebSphere Application Server 8.0
Best Regards Veote