commandbutton

Render multiple components with f:ajax

坚强是说给别人听的谎言 提交于 2019-11-27 14:18:48
The wrong codes are: <h:form id="search_form"> <h:commandButton class="button" value="View" action="#{InfoBean.search}"> <f:ajax execute="search_form" render="linear1"></f:ajax> <f:ajax execute="search_form" render="linear2"></f:ajax> </h:commandButton> <p:lineChart id="linear1" value="#{InfoBean.linearModel1}" legendPosition="e"/> <p:lineChart id="linear2" value="#{InfoBean.linearModel2}" legendPosition="e"/> </h:form> What I want to do is when I click on the commandButton , I want to refresh those two charts. But now I used two <ajax> tags, of which the second doesn't work. So how can I use

h:commandButton not working inside h:dataTable

帅比萌擦擦* 提交于 2019-11-27 08:09:34
I am trying to execute an action through commandButton inside a dataTable , but the action is not invoked when the commandButton is placed inside the datatable as shown below <h:form> <h:dataTable value="#{bean.list}" var="item"> <h:column> <h:commandButton value="submit" action="#{bean.submit}" /> </h:column> </h:dataTable> </h:form> When I move the commandButton out of dataTable , the action is successfully executed. What is the problem when commandButton is inside datatable? The commandLink has the same problem. BalusC This problem can happen when the list behind #{bean.list} is not exactly

Dynamic ui include and commandButton

无人久伴 提交于 2019-11-27 07:56:11
问题 I have a page which includes content from another page dynamically (this is done by a method in the bean) firstPage.xhtml <ui:include src="#{managedBean.pageView}"> <ui:param name="method" value="#{managedBean.someAction}"/> </ui:include> This redirects to a secondPage which is within <ui:composition> which has commandButton. secondPage.xhtml <ui:composition> .. .. <p:commandButton actionListener=#{method} value="Submit"/> </ui:composition> ManagedBean public String pageView(){ return

Handling Events for OLEObject CommandButtons created at Runtime

耗尽温柔 提交于 2019-11-27 04:51:00
问题 I have struggled with this problem for while now...I want to do something very simple. I want to create multiple commandbuttons at runtime, and then handle events for these commandbuttons with one procedure. So I have built a "withevents" class to handle the automation, but my code is not working. When I run Test(), the CommandButton is created, but when I click on it...there is no messagebox response...I cannot find the error..Please any help would be great!! Class cTest Public WithEvents

Creating a Class to Handle Access Form Control Events

大城市里の小女人 提交于 2019-11-27 03:47:06
问题 I'm trying to create a Class which will handle multiple Control Events in Access. This is to save the repetition of typing out many lines of identical code. I've followed the answer located on the following page, but with a few adjustments to tailor it to Access rahter than Excel. How to assign a common procedure for multiple buttons? My Class code below: Option Compare Database Public WithEvents ct As Access.CommandButton 'Changed object type to something recognised by Access Public Sub ct

h:commandButton not working inside h:dataTable

落爺英雄遲暮 提交于 2019-11-26 22:17:21
问题 I am trying to execute an action through commandButton inside a dataTable , but the action is not invoked when the commandButton is placed inside the datatable as shown below <h:form> <h:dataTable value="#{bean.list}" var="item"> <h:column> <h:commandButton value="submit" action="#{bean.submit}" /> </h:column> </h:dataTable> </h:form> When I move the commandButton out of dataTable , the action is successfully executed. What is the problem when commandButton is inside datatable? The

p:commandButton vs. h:commandButton

我的梦境 提交于 2019-11-26 21:55:44
问题 When I am using a PrimeFaces p:commandButton <p:commandButton action=#{bean.action} /> I don't see the the validation messages for inputs (both the default h: ones or the PrimeFaces p: ones.) For example with <f:validateRequired /> When I am using default command button like <h:commandButton action=#{bean.action} /> I do see the validations. What can be the cause of this difference? I am using Prime Faces 3.5 with Mojarra 2.1.18 <h:form id="reliefhourheadcopy-form"> <h:panelGrid columns="1">

Primefaces dialog + commandButton

对着背影说爱祢 提交于 2019-11-26 17:07:28
问题 I'm trying to use primefaces <p:dialog> combined with <p:commandButton> . In my .xhtml page I have a picklist and commandButton which is used to show a dialog. Dialog displays datatable with target values from picklist. Dialog has two buttons: cancel and submit. My problem is that submit button is not fired. What's strange, commandButton out of dialog works. Here's my .xhtml: <body> <ui:composition template="./../resources/mainTemplate.xhtml"> <ui:define name="content"> <h:form> <p:dialog id=

How make commandButton not fully refresh page? How to use f:ajax?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-26 14:44:52
I have to stream a webcam video, so I use ustream to do that, which generate a flash embed code for me, and I have a button to turn off/on the light, but when I press the button it refresh the whole page and so the flash component. There's some way to not refresh the page and still send to command ? Well for now it's this way: <h:form id="form_supervisory"> <h:panelGrid> <h:column> <iframe width="480" height="296" src="http://www.ustream.tv/embed/9599890" scrolling="no" frameborder="0" style="border: 0px none transparent;"> </iframe> <h:commandButton value="Lâmpada" action="#{supervisoryc

Execution order of events when pressing PrimeFaces p:commandButton

不问归期 提交于 2019-11-26 05:53:05
问题 I am trying to execute a JSF2 bean method and show a dialog box after completion of the method on click of PrimeFaces <p:commandButton> . <p:commandButton id=\"viewButton\" value=\"View\" actionlistener=\"#{userBean.setResultsForSelectedRow}\" ajax=\"false\" update=\":selectedRowValues\" oncomplete=\"PF(\'selectedRowValuesDlg\').show()\"> </p:commandButton> <p:dialog id=\"selectedRowValues\" widgetVar=\"selectedRowValuesDlg\" dynamic=\"true\"> <h:outputText value=\"#{userBean