jsf-2.0

JSF2 Paging / Pager for Repeater

Hey guys, Do you know this feeling when every code you write works immedietly and you underrun your schedule :-P It's like 'oh yeah now I have time to make it perfect'. That's where I am at the moment^^ So I implemented a repeater with JSF (ui:repeat) and I thought about a paging for all the entities. Is there maybe an easy way to do t...

Migration to new version of JSF with feature-rich but more compatible library

Currently I am using JSF 1.1 (Myfaces library). I am considering moving to JSF 2.0 and towards a more feature-rich implementation library but at the same time considering that migration issues must be as less as possible. People with the experience of JSF, please suggest. ...

JSF 2.0 validation controller

I am very new to JSF/Java but I wanted to know if anyone knows a good way to create a custom validation controller. I have a lot of forms in my web application with fields that overlap such as First Name, SSN, or email. I wanted to create a Controller that would handle all of these validations and messages. Is this a good idea? I have ...

Serve JSF from database

Hi, is it possible to load jsf 2 page from database, not from xhtml file? Eg., the request comes for /faces/foo.xhtml, FacesServet intercepts request and VieHanlder creates view foo.xhtml by loading foo.xhtml from a DB, not from the server? Thanks ...

JSF 2.0 - Ajax submit validation on inputs

I have a form that needs to be submitted with ajax. I am trying to get the validation to work but it wont work when I use ajax. When I take the ajax out and submit the form with an empty testinput it properly triggers he validation and does not submit the form. How can I do this with an ajax call. My form is below. <h:form> <f:ajax> ...

Returning list of images on JSF page

Hi, I have a dropdown list of items a user can select from (the view is JSF). I would like for an image to appear on the same JSF page after a user selects an item from the dropdown list (i.e. A user select the word "Cat" from the dropdown list, and group of different cat images appear) How would I code this in JSF? Note* I'm using JS...

<f:ajax> Unable to attach <f:ajax> to non-ClientBehaviorHolder parent

I receive the following error when running my application: <f:ajax> Unable to attach <f:ajax> to non-ClientBehaviorHolder parent My JSF: <h:commandButton id="submitschool" action="submit" value="Get templates" style="FONT-SIZE: medium;FONT-FAMILY: 'Rockwell';width : 128px; height : 24px;"> <ui:repeat value="#{person.theImage}...

Losing data when editing editable datatable (JSF2)

Hi there, I'm starting to code a little cookbook. Therefor i've created a page to add some menusteps, a menustep should describe how to cook the menu step by step. I have a datatable containing a list of MenuSteps. The user can click a commandLink to add/delete a new step. The Bean adds or removes a MenuStep of the list and rerender the...

Returning Multiple Images to JSF page

Hello, With this code, I am able to return one image based off of a dropdown selection. Any ideas on how to return multiple images (I have attempted to create an ArrayList with the images and use the UI:Repeat tag to render it back to my view, but I was unsuccessful. Here is my current code now, which works but only returns one image. A...

Adding Richfaces to a Maven Project being Deployed to JBoss AS 6

I'm having trouble with adding Richfaces to my Maven project, which is deploying to JBoss AS 6. Here is my pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt; <mode...

JSF 2.0 tutorial with Eclipse and Tomcat

I am new to JSF 2.0 and I am planning to use Eclipse as the IDE and Tomcat as servletcontainer. Are there any good tutorials for this? ...

How to control alignment of DataTable inside of a PanelGrid?

I've got a multi-column panelGrid setup, with dataTables as each of the columns. Each of the dataTables is a different length. This results in the panelGrid stretching out to fit the largest dataTable (so far, that's good). The remaining dataTables are centered vertically (this is not good as it looks horrible on screen) instead of be...

JSF rerender with AJAX

Hi guys, I have implemented a list created by a repeater: <ui:repeat value="#{projectData.paginator.list}" var="project"> <h:outputText value="#{project.title}" /> </ui:repeat> and a Button that filters my list: <h:commandLink action="#{overviewController.filterNew}"> <h:outputText value="Filter List" /> </h:commandLink> So, is ...

How to add JS effects on rendering AJAX parts in JSF2?

In JSF2, I can update part of view by AJAX. I assume part of components tree is just generated/updated on server, rendered to HTML and this HTML is sent to client. Then inserted into DOM where appropriate. This works, but I wonder if I could add some jQuery (or other JS) effect when I want this new HTML part to appear? What if I want it...

JSF 2.0 Input field rendered by Ajax cannot be used to input values?

<h:form> Do you have a driving license? <h:selectOneMenu value="#{requestScope.license}"> <f:selectItem itemLabel="Select..." itemValue=""/> <f:selectItem itemLabel="Yes" itemValue="Y"/> <f:selectItem itemLabel="No" itemValue="N"/> <f:ajax render="@form"/> </h:selectOneMenu> <br/> Enter...

How to dynamically refresh h:selectManyCheckbox selectItems

I am trying to implement a scenario using JSF. I have a commandExButton and when user click this button "A" it shows the panelDialog which contains the selectManyCheckBox items. I generat these items in the backend bean by parsing one file which is continuously getting updated. What I want is, whenever I click this button "A" I should ge...

JSF Status bar / connection status information..

Hello folks, 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 on...

JSF 2 - passing parameters accross system events

I have a composite component, where I pass in an arbitrary defined attribute: <x:mycomp x="..."/> x being defined as such in the interface definition of the cc. Inside the implementation of mycomp I have an event listener: <composite:implementation> <f:event type="preRenderComponent" listener="#{mycontroller.init}" /> </composite...

JSF CRUD application and entities

I'm writing an administration part of the application which is responsible for CRUD operations. I decided to generate the jsf pages from the jpa entities but for some reason I keep getting this error: org.apache.jasper.el.JspELException: /busStop/List.jsp(18,12) '#{busStop.pagingInfo.itemCount == 0}' Error reading 'pagingInfo' on type j...

JSF 2 annotations not working on weblogic 10.3.3

I have installed JSF 2 support on Weblogic 10.3.3 version using these instructions: When I run a sample application which basically calls a bean action like #{someBean.someMethod} and that bean is declared SomeBean.java with annotation @ManagedBean and @SessionScoped (I am sure its not some capitalization error - I am aware the Some...