jsf-2.0

JSF 2.0 AJAX: Call a bean method from javascript with jsf.ajax.request (or some other way)

Some background: I am building a custom JSF component. The component is basically a text editor and it should have a "Save" -button for saving the content string of the editor. As I am using the CodeMirror library, I need to fetch the content (string) from the editor with javascript and send that to the server. Therefore, in this case I ...

h:commandButton can NOT submit parameters to backing bean

Hi, I would like to submit a key value to my backing bean so that I know which person within a collection user trying to update. I think I need to used f:param to do so, but somehow it does not work. It will submit the value just fine if I use af:commandButton instead of h:commandButton. Here is my button: <h:commandButton styleClass="...

JSF select items from subclass

I am trying to populate the list of an <h:selectOneMenu>. However, the list that I am trying to retrieve is part of another class that is a variable in the base class. Here is what I have and I'm not sure if this is even possible or how to do it. I have a Citation class with the following: public class Citation { private int id; ...

How does JSF find beans annotated with @ManagedBean?

As far as I know, for using @Annotations (or [Attributes] in C#) you have to have a reference to the class metadata, so that you can ask if the class is annotated (attributed) or not. My question is how does JSF implementation find all classes annotated with @ManagedBean? Does it scan all of the classes in the class path? Or is there a ...

JSF2 ManagedBeans Lifecycle

Hey guys, I have a basic question about JSF and their ManagedBeans. Imagine we have set a ManagedBean that only contains data for and from my view: @ManagedBean(name = "dataBean") @SessionScoped public class DataBean { Next here is my controller with a dependency injection to connect controller with model: @ManagedBean @RequestScope...

JSF2 ignores Action attribut

Hey folks, my xhtml code: <h:commandLink action="#{detailController.updateProject}" class="positive" > <h:graphicImage library="img" name="tick.png" alt=""/> <h:outputText value="Save" /> </h:commandLink> This action (updateProject()) is not being called from JSF framework! Even if I delete it in the managedBean there is no except...

How to use ExternalContext.redirect() in JSF2.0?

Consider a page webapp/myPage.xhtml: ... <h:form id="myForm"> ... <h:selectOneMenu id="..." required="true" value="#{myController.aValue}"> <f:selectItems value="#{...}" var="..." itemValue="#{...}" itemLabel="#{...}"/> </h:selectOneMenu> ... <h:commandButton value="Go for it!" action="#{myController.goForIt(....

Page loading bar in JSF?

Is there a way to make a progess/loading bar while a JSF page is loading (something like the thing google has when you're loggin into gmail, the thin bar in the top left hand corner)? ...

h:messages gives no output

Hello, I'm learning about bean validation. I have created simple form with username and password input fields which are bound through backing bean to model (User) properties username and password. I have marked them with annotation: @Id @NotNull(message="Username cannot be empty") private String username; @NotNull(message="Password can...

How to merge cells (colspan) using jsf h:panelGrid?

Hello, Suppose I want display table: +--------------------------------+ | | | | ---------------------------------- | | | ---------------------------------- | | | ---------------------------------- | | | | --------------------...

JSF 2.0 Application as Spring Web Bundle

Hi all, is it possible to run JSF 2.0 Application as Spring Web Bundle? Is there any OSGi support for JSF 2.0? I didn't found any OSGified bundles for Apache MyFaces 2.0. Thanx in advance ...

Authentification in JSF ?

I'm developing a JEE application (JSF2 + richfaces+ Facelets + Tomcat). What's the best way to perform authentification ? Or should i make my own ? ...

JSF Confirmation

Hello jsf friends, My application looks and works great so far. My users will have a lot of crucial decisions to make, like deleting or editing entities or accepting applications which causes an email. For that reason I want to integrate a common form of confirmation. And that's why I ask you: What's your favourite way of confirmation ...

JSF 2.0 Simple login page

Hi, I need to restrict the access to a part of the application. In order to access that part, user needs to log in. I have a table in my database called User, with usernames and hashed passwords and a login form that consists of two inputs and a submit. However, I don't know which classes/mathids should I use to log in the user (I assume...

JSF2 Messages tag for user interaction

Hi, I use the tag h:messages for displaying form validation messages (in a red error style). I was wondering if you can use that tag to display other messages as well. For example a success message (obviously in another style) or an info message. So that I can integrate such a messages tag in any page and use it to provide information t...

How to specify sub-context in JSF web application?

In my JSF application, I have a sub-context 'admin' and I have some pages under 'web/admin' folder. I am able to access all the pages under 'web' with the URL www.abc.com but I am getting 'requested resource not found' for the request www.abc.com/admin. I could make out that this is the issue with the 'context' specification in 'context...

JSF generated pages and entities, selectOneMenu

Using NetBeans, I have generated Hibernate mapping files and set of POJOs. I have also generated a set of JSF pages from entity classes (those generated POJOs). Now, I am trying to add a dropdown menu that would enable me to select one of the enitites. <h:selectOneMenu value="#{measurementController.sensor}"> <f:selectItems value=...

Get the <f:param> value in a jsf page?

I'm trying to pass a <f:param name="id" value="{someValue.id}" /> and retrieve it in the next page (so I can put it in an output link). This is what I tried: <h:outputLink value="#{linkController.clientEdit}?id={id}">#{linkController.clientEdit}?id={id}</h:outputLink> The problem is, the part that is between the tag prints what I want...

JSF 2.0 and hibernate adding new objects to a postgresql database

Hi, I'm writing a JSF 2.0 application with Hibernate and Postgresql database. My problem is quite poor understanding on how to handle session with Hibernate when inserting data into more than one table at a time. I have a method savePerson. The method is called as many times as there are addresses submitted by a user but the object Pers...

Unable to instantiate class...because it's looking for the wrong one

I'm using IBM RAD with a WAS 7.0 application server. I'm developing a JSF project using RichFaces components and I'm having some trouble with one of the classes. Whenever I start my server, I'm getting this error in the console: [9/23/10 15:38:13:182 EDT] 00000016 annotation W com.ibm.ws.webcontainer.annotation.WASAnnotationHelper co...