jsf-2

Dynamic columns with List<List> in <p:dataTable><p:columns>

允我心安 提交于 2019-12-19 09:22:07
问题 I'm attempting to generate a dataTable with columns dinamycally, so I've a List<List> when a List inside of a List is the content of my column, but when I try to show it I can't display not much. So, this is the code of my Bean: @ManagedBean @javax.faces.bean.ViewScoped public class Controlador { private List<List> estadistico; @PostConstruct public void inicializar(){ this.estadistico = new ArrayList<List>(); this.estadistico.add( Arrays.asList( new Integer[]{0,1,24})); this.estadistico.add(

How to configure Maven pom for Tomcat 7 with JSF 2.0 and EL 2.2?

百般思念 提交于 2019-12-19 09:17:26
问题 i want to use EL 2.2 for JSF 2 application and tomcat 7 is provided with EL 2.2 and i am confused about the following: 1- Should i provide the servlet-api , jsp-api and the EL in my pom file (using maven) as provided or don't include them at all in the pom file, since they are provided by container, what's the difference ? <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>3.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax

JSF Status bar / connection status information

核能气质少年 提交于 2019-12-19 08:53:59
问题 I would like to implement a kind of information for my users about the progress status. I have found several components like: Richfaces status or IceFaces onnection Status So, I would like to add something like that to my page especially for ajax requests. What's the easiest way to implement it? I would not like to use one of those components, rather programming my own one but I can't imagine how and how much effort it takes :-) I am thankfull for ideas... 回答1: The standard JSF implementation

conditionally rendered input component does not update value

杀马特。学长 韩版系。学妹 提交于 2019-12-19 08:30:53
问题 Using jsf 2 and Primefaces 3.4 I am aware that there are many similar questions but none of them work on this one. When the panelGrid "inner" is rendered with a fixed value of "true" ( <h:panelGrid id="inner" rendered="true"> ) => after the commandbutton is clicked the input component updates correctly the value of #{tableMatchesBean.mergedAuthorAjax}, but when the rendering of this panel is conditional : <h:panelGrid rendered="#{spellCheckBean.renderInputMerge}"> => then the input component

When i click on any link it should Open in the same New Window in JSF, Primefaces

纵饮孤独 提交于 2019-12-19 08:28:42
问题 In my JSF page i have few Links{link1,link2,link3,link4}-{Student Id's}. What i tried is when i click on the Link it Opens the Student-Information in a "NEW WINDOW". When i am clicking on the next Link it is Opening a New Window,but i want to open in the Same New Window i.e., the TARGET should be the Same NEW Window which is opened. Diagramatical Representation: My Piece of Code which i had tried from collecting things from STACKOVERFLOWOpen Page in New Window : <p:dataTable id="studentDtTble

JSF2.0 with <f:ajax> only works once

青春壹個敷衍的年華 提交于 2019-12-19 08:15:26
问题 I'm having a problem with the tag in JSF2.0 and I hope someone can point out what I'm doing wrong. Here's what I've got in the UI: <h:panelGroup> <h:form id="theForm"> <h:selectOneMenu id="theMenu" value="#{viewBean.selectedItem}"> <f:ajax event="change" render="selectedItemText"/> <f:selectItem itemLabel=""/> <f:selectItems value="#{viewBean.selectableItems}"/> </h:selectOneMenu> <h:outputText id="selectedItemText" value="#{viewBean.selectedItemText}" /> </h:form> </h:panelGroup> This is

JSF2.0 with <f:ajax> only works once

杀马特。学长 韩版系。学妹 提交于 2019-12-19 08:15:02
问题 I'm having a problem with the tag in JSF2.0 and I hope someone can point out what I'm doing wrong. Here's what I've got in the UI: <h:panelGroup> <h:form id="theForm"> <h:selectOneMenu id="theMenu" value="#{viewBean.selectedItem}"> <f:ajax event="change" render="selectedItemText"/> <f:selectItem itemLabel=""/> <f:selectItems value="#{viewBean.selectableItems}"/> </h:selectOneMenu> <h:outputText id="selectedItemText" value="#{viewBean.selectedItemText}" /> </h:form> </h:panelGroup> This is

Evaluating if MethodExpression attribute is set (getting PropertyNotFoundException)

假装没事ソ 提交于 2019-12-19 07:23:20
问题 I have a UI component with a MethodExpression attribute changeListener : <composite:interface> <composite:attribute name="changeListener" required="false" method-signature="void actionListener(javax.faces.event.ActionEvent)" /> .. </composite:interface> <composite:implementation> <p:remoteCommand name="ajaxOnChange" update="#{cc.attrs.onChangeUpdate}" oncomplete="#{cc.attrs.onchange}" actionListener="#{cc.attrs.changeListener}" /> .. </composite:implementation> This changeListener attribute

event.getObject() in row editing for primefaces sends the old value to the bean

人盡茶涼 提交于 2019-12-19 07:23:05
问题 I am trying to use the feature of prime faces which allows user to edit the row data in the table itself.I have followed this link to achieve it: http://www.primefaces.org/showcase/ui/datatableRowEditing.jsf When I say edit user the new values which are entered are not sent to the bean.It still shows the old values only. My code in JSF: <p:dataTable value="#{mybean.userList}" var="item" id="dataTab" widgetVar="usersTable" tableStyleClass="data" paginator="true" rows="5" filteredValue="#

Datatable does not update after successful ajax call

荒凉一梦 提交于 2019-12-19 06:00:37
问题 I have a data table. Each row of the table has a commandButton called 'Remove' , which is supposed to remove that row from the model and the view and perform an update in-place. As a footer, I have another commandButton called 'Remove every row' . The last button works. I click on it, every row is removed from the model (i.e the ArrayList containing the elements becomes empty) and the dataTable and footer facet is re-rendered (or updated) in the view. On the other hand, when I click a button