jsf-2

Loading PrimeFaces Schedule JSF page through ajax into another JSF page

杀马特。学长 韩版系。学妹 提交于 2019-12-24 11:35:06
问题 When I run the prime faces "Scheduler" component as a normal "xhtml" page, everything is going fine, but when I try to load the "schedule.xhtml" page through AJAX into another "xhtml" page, then I am getting unexpected behavior like : The "schedule.xhtml" page is not loading the default events attached with its Java class (those events are sample ones). No events are fired like ("addEvent", "onEventSelect", "onDateSelect", "onEventMove", "onEventResize") I am running JSF 2.2 Mojarra 2.2.0

how to display textarea without scrollbar using jsf?

雨燕双飞 提交于 2019-12-24 11:16:41
问题 I want inputTextarea auto growing when being typed.But I don't want scrollbar. I have done overflow: hidden ,it's not showing scroll but it's also not auto growing. <h:inputTextarea id="ta1" cols="25" style="overflow: hidden"/> please give me reply. 回答1: The auto growing textarea is not a standard feature of the HTML <textarea> element as generated by the JSF <h:inputTextarea> . This is usually been achieved by adding some shot of JavaScript code. Here's a basic kickoff example. <h

Problem with JSF forwarding and security constraint

牧云@^-^@ 提交于 2019-12-24 11:08:47
问题 I'm making a web application in which certain pages are login-protected. I have created a JDBC security realm in glassfish for this, and used Form authentication (Similar to the method described here) I'm using Navigation rules to redirect the user to the secured areas of the website: <navigation-case> <from-outcome>showResults</from-outcome> <to-view-id>/SecureUser/Reservation/New/AvailableResults.xhtml</to-view-id> <redirect/> </navigation-case> (etc...) This works fine. But if I skip the

Spring Inject annotations causing nullpointer exception

依然范特西╮ 提交于 2019-12-24 11:08:07
问题 This post is continuity of Declaration of beans in applicationContext.xml I have a small application using Spring 3 and Hibernate 4 with JSF2, When I am running the application I am getting. java.lang.NullPointerException at net.test.managed.bean.EmployeesManagedBean.getEmpList(EmployeesManagedBean.java:53) What am I doing wrongly to get nullpointer exception ? Any help is highly appreciable. ManagedBean: @ManagedBean(name="empMB") @Named @Scope("request") public class EmployeesManagedBean

JSF 2 + Spring 3 + Shiro - Session Timeout doesn't redirect to login page

人盡茶涼 提交于 2019-12-24 10:59:35
问题 I have this JSF 2.0/Spring app that added Apache Shiro to and a redirect after session timeout never occurs when a user clicks on a command button or triggers an AJAX request. It does work when they refresh the browser. This is happening in all browsers. Here's my applicationContext.xml: <bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean"> <property name="securityManager" ref="securityManager" /> <property name="loginUrl" value="/index.faces"/> <property name=

JSF Lifecycle performed 2 times with PrimeFaces ajax

别来无恙 提交于 2019-12-24 10:58:53
问题 I use PrimeFaces 3.3.1 with Apache MyFaces 2 on WebSphere Application Server. My BackingBean is SessionScoped. I have a form with a selectOneButton should update the whole form. <h:form id="options"> <p:panelGrid> <p:column rowspan="2" style="width:115px;"> <p:selectOneButton value="#{graph.diagramdata}" id="diagramdata"> <f:selectItem itemLabel="WAS-Diagramm" itemValue="1" /> <f:selectItem itemLabel="PSC-Diagramm" itemValue="2" /> <p:ajax listener="#{graph.changeView }" update=":options"/> <

f:ajax listener not fired for h:selectBooleanCheckbox

非 Y 不嫁゛ 提交于 2019-12-24 10:57:48
问题 The event doesn't get fired in my controller. This is the code. View: <ui:repeat var="operation" value="#{trade.operationsSortList}"> <tr class="operations"> <th class="empty_cell"></th> <td id="operation" class="operation_cell color">#{operation.operation}</td> <td class="color">#{operation.time}</td> <td class="color">#{operation.coment}</td> <td class="color"> <h:form> <h:selectBooleanCheckbox> <f:ajax event="click" listener="#{controller.onDelete}" /> <f:attribute name="trade" value="#

jQuery not running in JSF Application

北城余情 提交于 2019-12-24 10:45:06
问题 I am newbie to jQuery. In netbeans I have jquery-1.7.2.js where all HTML files are present. I am creating JSF 2.0 project. Below is the code I have <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:t="http://myfaces.apache.org/tomahawk" xmlns:ui="http://java

Add a row to h:dataTable via AJAX with request-scoped bean without losing the row data

為{幸葍}努か 提交于 2019-12-24 10:40:23
问题 I think the title tells it all: I want to add a row to dataTable over AJAX. The datatable has input fields where user can put text. As simple as that, a pretty common case. With session-scoped bean this no issue, as the same bean is updated over and over again. However, I want to do this in request scope. For each request, I guess I want to create a new bean and to populate it with the values from my form. Then I want my commandButton 's action to add a new row, finally render the dataTable

how to resize an iframe to fit the enclosing panel

我只是一个虾纸丫 提交于 2019-12-24 10:39:21
问题 I am using PrimeFaces 3 for this. I have an iframe element inside a p:panel which is enhanced with a p:resizable component. What I want is to automatically resize the iframe on load and on resize event so that it fits the available width and height of the panel. Note that in this example, there is a p element with some text in it before the iframe . So the relative origin of the iframe isn't a constant. Here is the template code: <h1>Page To Test Stuff</h1> <script type="text/javascript">