Maurits van Beusekom

+ Follow
since Jun 03, 2010
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Maurits van Beusekom

Hi Tim,

Thanks for the welcome and the reply I appreciate it (and sorry for the bulk of information, I figured better to much then to little).

My controller impression came from this tutorial and makes sense to me, however this would not be the place to discuss this.

I am a bit confused regarding your remark, I am familiar with HTML and how it functions (a lot of .NET experience). I am not really looking for a AJAX solution, I was in the impression that it would be possible to do a postback to the server by using the onchange="this.form.submit()" javascript, and be able to call the 'valueChanged' method (as described in this article, where a similar solution is done). And basically that is the same I do with the 'open' note link which does a postback and fires the "editDoc" method in the EindOpdrachtContr class.

So what I basically want is for the selectOneMenu to make a roundtrip to the server when the users changes its value and the response should contain the updated Note textarea.

Thanks Maurits
12 years ago
Hi All,

I am currently trying to build a simple web based application as a school exercise using JSF. The application allows the user to login and manage notes. The user can add multiple notes (I call documents) and per note have multiple versions (each time the user makes a change to a note a new version is created).

The application consists out of the following elements:

- Title textfield;
- Note textarea;
- Version selectOneMenu;
- Save button;
- Data table showing all existing notes.

The data table contains an commandlink behind each note which, when clicked by the user, populates the Title, Note and Version elements with the appropriate data. So far everything works fine.

Now when the user selects a different version from the Version selectOneMenu the 'Note' textarea should be updated with the content of that specific version. This is where my problem pops up. When I change the version nothing happens. The "versionChanged" method in my managed bean is not triggered when I select a different version. Here is my code so far:

Welcome.jsp (this is opened after the user logged on successfully):

In my managed bean (EindOpdrachtContr class) I have the following method:

The managed bean is configured in the faces-config.xml file like this:

I posted the code parts which (in my opinion) are most relevant, if you are missing something please let me know. Any help would be greatly appreciated.

12 years ago