primefaces

How to hide p:panel on CommandButton click

五迷三道 提交于 2019-12-31 03:07:33
问题 I wanted to achieve what is written here - How to hide and show p:panel on commandbutton click but it seems, that hide() is not available anymore... What's the proper approach? I tried toggle() , but it's not hiding it: Do I really have to have some panelVisibile property on backing bean and use visible=#{.panelVisible} ? I'm trying with PrimeFaces 7.0. Project is based on https://github.com/Betlista/joinfaces-maven-jar-example index.xhtml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html

CSS class specificity order

£可爱£侵袭症+ 提交于 2019-12-31 02:35:30
问题 I have defined my own CSS class: .my-ui-table td { border-width: 1px; border: 0; padding: 5px 10px; border-style: hidden; border-color: inherit; } Default PrimeFaces css defines its own class that is being applied to : .ui-panelgrid td { border-width: 1px; border-style: solid; border-color: inherit; padding: 4px 10px; } Both classes are being applied to table: <table class="ui-panelgrid ui-widget my-ui-table" role="grid">...</table> When Chrome renders said table the border-style from ui

f:setPropertyActionListener doesn't set the value however action is triggered

一个人想着一个人 提交于 2019-12-31 01:33:07
问题 I need to set a boolean field whenever p:fieldset is toggled. I tried out following code but the field is never set by f:setPropertyActionListener although p:ajax listener is invoked on toggle. I tried out following code. <p:fieldset legend="(Optional) Link.." toggleable="true"> <p:ajax event="toggle" listener=".."> <f:setPropertyActionListener target="#{viewScope.rendrUsrProjctsList}" value="#{true}"/> </p:ajax> </p:fieldset> However when I tried modifying the code as below then field is

How do I add or change the class attribute of a JSF dataTable (primefaces)?

邮差的信 提交于 2019-12-31 00:30:28
问题 I have a PrimeFaces <p:dataTable> and I want to specify a CSS class in the generated HTML <table> element. If I use the styleClass attribute, then this will be added to the wrapping <div> instead of the <table> . How can I get it on the <table> instead? 回答1: If you set tableStyle or tableStyleClass attribute, it will add the css class to the table element. 来源: https://stackoverflow.com/questions/12266895/how-do-i-add-or-change-the-class-attribute-of-a-jsf-datatable-primefaces

java.lang.VerifyError: org/primefaces/behavior/confirm/ConfirmBehaviorHandler Wrong return type in function

馋奶兔 提交于 2019-12-30 17:59:27
问题 This morning (South African time), Maven downloaded the latest primefaces jar (version 5.3). While my project is setup in a manner that maven deploys the project to my Web Container (in this case, Wildfly 9.0.1.Final), it failed deployment due to the following exception: 2015-10-19 09:52:36,696 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 82) Critical error during deployment: : java.lang.VerifyError: (class: org/primefaces/behavior/confirm

javax.faces.FacesException: Could not resolve NavigationCase for outcome

谁都会走 提交于 2019-12-30 17:26:29
问题 I have one template.xhtml file at /template/template.xhtml <h:head> </h:head> <h:body> <p:layout fullPage="true"> <p:layoutUnit position="north" size="100"> <h:outputText value="header"></h:outputText> </p:layoutUnit> <p:layoutUnit position="center"> <p:layout> <p:layoutUnit position="north"> <h:outputText value="tabs"/> <ui:include src="/tabs/tabs.xhtml"/> </p:layoutUnit> <p:layoutUnit position="west"> <h:outputText value="left menu"></h:outputText> </p:layoutUnit> <p:layoutUnit position=

How do you conditionally hide/show or enable/disable menuitems in PrimeFaces?

大兔子大兔子 提交于 2019-12-30 16:40:09
问题 I want to do the following: active o inactive a menuitem with management bean (MB), I want to use properties "renderer". But I don't Know like do it. My code is the following: <p:menuitem id="registrarPatio" value="Registrar un Patio" actionListener="#{accionesRedirectMB.redireccionar('/PatioWEB/jsp/patios/registrarPatio.xhtml')}" icon="ui-icon-folder-collapsed"/> With actionListener I am going to redirect the other url. I want to create a MB, when I'll can active o unactive the menuItem with

Primefaces tree from database

可紊 提交于 2019-12-30 13:11:44
问题 I have the following entity class : @Entity @Table(name = "THE_TREE", catalog = "", schema = "dbo") public class TheTree implements Serializable { private static final long serialVersionUID = 1L; @Id @Column(name = "ID", nullable = false) @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @Column(name = "NODE_NAME") private String name; @Column(name = "LEVEL") private int level; @OneToMany @JoinColumn(name="PARENTID") public List<TheTree > children = new LinkedList<TheTree >();

Invoking a p:remoteCommand via a JavaScript function passing a message local to that function to another function through the “oncomplete” handler

雨燕双飞 提交于 2019-12-30 12:23:41
问题 This question is purely based on this previously asked question (courtesy) but the question is messed up completely with the Java EE 7 WebSockets API attempting to show the actual practical approach/scenario which is now very unlikely to receive any answer based on <p:remoteCommand> . Given below a snippet of JavaScript (this is only a test scenario). <script type="text/javascript"> function test() { var message = "myMessage"; window["myFunction"](); // This is literally interpreted as a

Displaying a message from managed bean with primefaces confirmation dialog component

有些话、适合烂在心里 提交于 2019-12-30 11:19:09
问题 in my page , i'm trying to display a confirmation dialog after clicking a button .In the confirmation dialog i used the attribute message to display it , this message is taken value after clicking the button . So i did it like that : <p:commandButton value="Delete" update="testPlanetree" id="deleteBtn" disabled="#{projectTestManagementMB.disable}" oncomplete="deleteConfirmation.show()" action="#{projectTestManagementMB.testFn}"/> <p:confirmDialog id="confirmDialog" message="#