jsf

How does JSF generate the name of the form input field?

Any idea anyone? Is it possible that we specify the name of the form input field? How to go about doing that? ...

Conditionally wrap HTML elements

In my Seam application, I have a Seam component that returns a (@Datamodel) list of items I want to transform into a set of <li> HTML elements. I have this working without a problem. But now, I want to split up the list according to an EL expression. So the EL expression determines if a new <ul> element should be started. I tried the f...

JSF : How to update one session bean base on another session bean?

I am currently modifying some jsf application. I have two beans. connectionBean UIBean When I set my connection parameters in connectionBean the first time, the UIBean is able to read my connectionBean information and display the correct UI Tree. However when I try to set the connection parameters in the same session. My UIBean will...

How to create conditions based on user role using JSF/MyFaces?

What options do I have to read the roles of the current user from my JSP pages? I'm aware of the visibleOnUserRole="myRole" attribute on Tomahawk components, but I need roles for a bit more complicated things than simple visibility. ...

JSF Upload component: alternate triggering

Hi all, I have a JSF form that needs to upload a file via an icon click (i.e. without showing the textfield/browse button of the file upload component). Is it possible to trigger the file-open dialog and uploading functionality of the upload component via some other component type? ...

Show me Open Source projects using Facelets!

I want to watch and learn from Open Source projects that are using Facelets, but my Google skills failed me so I went here. The closest thing I found was http://wiki.java.net/bin/view/Projects/FaceletsProjects but -- correct me if I'm wrong -- that tiny link collection only go to demos, 404:s, commercial products or projects that are s...

Default JSF Form Behavior

I'm building a vanilla JSF app, and I'm having some difficulty understanding how forms work in this framework. If I make a JavaScript form submission ... document.myForm.submit(); ... on this JSF form ... <h:form id="myForm"> ... <h:commandButton value="Continue" action="#{foo.continueButton}"></h:commandButton> </h:form> ... ...

How to display the row index in a JSF datatable

In a JSF dataTable I want to display the row index next to the rows... like: Column A Column B 1 xxx 2 yyy I thought that I could use an implicit el variable like #{rowIndex} but this is not working. A solution I found is to create a binding for the data table and use the binding like: <h:dataTable var="item" ...

Load ajax load in JSF

Ok, heres my issue: I have a JSF application and some JSP files. Let's say i have main.jsp which has a view and includes sub.jsp. This works fine. sub.jsp contains a subview. As a result all the ID's of the form elements in sub.jsp follow the form of 'subview:component'. Now suppose I'm using some ajax and want to fetch the jsp page sub....

How to learn JSF and Seam fast

hi there, For a team of JSP/Struts developers who have about 5+ years on java, what would be a good way to ramp up really fast on JSF. Since JSF is conceptually different compared to Struts, what tutorials, books and other resources have you come across for a quick learn. We're considering using "Seam In Action" book BUT that book is th...

jsf checkbox problem

hi, i've a problem using checkboxes in jsf pages: if i click the checkbox it doesn't remain checked. I've no idea of what is causing this. i'm using the selectBooleanCheckbox and the h:selectManyCheckbox tags. ...

Iterate over HashMap.values() in JSF+Facelets

I'm using JSF/Facelets, and I'm trying to iterate over some Document objects (custom object) that I'm keeping in a HashMap. When the page is loaded, I'm getting the error "Property 'name' not found on type java.util.HashMap$Values". Here's what's in my backing bean: private Map<String, Document> documents = new HashMap<String, Documen...

JSF initialize application-scope bean when context initialized

I'm building a JSF+Facelets web app, one piece of which is a method that scans a directory every so often and indexes any changes. This method is part of a bean which is in application scope. I have built a subclass of TimerTask to call the method every X milliseconds. My problem is getting the bean initialized. I can reference the b...

How to display my application's errors in JSF?

In my JSF/Facelets app, here's a simplified version of part of my form: <h:form id="myform"> <h:inputSecret value="#{createNewPassword.newPassword1}" id="newPassword1" /> <h:message class="error" for="newPassword1" /> <h:inputSecret value="#{createNewPassword.newPassword2}" id="newPassword2" /> <h:message class="error" for="newP...

Why is the WebBeans (JSR-299) Conversation Context tied to JSF?

I am reading through the Public Review Draft of the Web Beans specification (JSR-299) and I am wondering why it is so 'tightly coupled' to JSF? Especially the Conversation Context seems only be specified for JSF. I understand, that it is a goal of WebBeans to integrate JSF and EJB3. But would it not make sense to specify the concept of...

Dynamic Id's in JSF/Seam

Hi all, Got a little problem with a Seam application I'm working on and I was wondering if anyone knows a way round it. I've got a form in my application that uses AJAX to show certain input boxes depending on an item in a dropdown box. The code works fine except for setting the ID's in my input boxes. It looks like JSF doesn't let m...

Automatic entity mapping similar to O/R-mapping with JSF?

With JPA I do not need to code the SQL for every new attribute as the o/r-mapping is being done automatically. As I am new to JSF, i am wondering whether there is a similar possiblity with JSF? I do not want to add new code to a jsf datatable every time I change something at the corresponding entity. ...

How to use eclipse debugger to debug stacktrace of JSF core libraries?

Welcome I am extending some application written with Sprint and JSF. My work is partly writing xml config files. After some changes I got reports from library generators. Can I access with Eclipse debugger attached jars and fount what method throws error (and why) ? ...

JSF : java.lang.IllegalStateException: Client-id : _idJsp35 is duplicated in the faces tree in Alfresco Web Client

I am extending Alfresco Web Client and in one page while expanding panels I get this error. I do not get it always. JSF : java.lang.IllegalStateException: Client-id : _idJsp35 is duplicated in the faces tree in Alfresco Web Client I tried to give every component possible unique id, but error still shows up. How can I find source of th...

Difference between value and itemvalue

What is the difference between the value and itemValue attribute of the radiobutton in Jsf? ...