This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSF and the fly likes Can't get to the bean methods Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Can Watch "Can New topic
Author

Can't get to the bean methods

Ricardo J Marques
Greenhorn

Joined: Aug 13, 2010
Posts: 1
Hi

I'm a starter on JSF 2.0, and i have been trying to play a bit on it, but i'm on a heavy battle against a weird case here, can't find a reason for this problem:

I have this facelets composition:



And the backing bean:


@ManagedBean
@RequestScoped
public class ContentItemBean {

...

public String formSubmit()
{
try {
// Set current system date
item.setDateModified(Calendar.getInstance().getTime());

ContentItemCommand c = new ContentItemCommand();
c.setOperation(ContentItemCommand.OPERATION_UPDATE);
c.setItem(item);

c.execute();

return "success";
}
catch(Exception e)
{
return "exception";
}
}

public String formCancel()
{
return "success";
}

}



And i want, is that when i click the Cancel or Submit button to perform a server side operation. But for some reason the application never get to the backing bean method, i usally put a breaking point on both methods, and whenever I click a button the form submits for the page page without trigering the events. Another thing that i found wierd, the HTML that s generated doesn't include none javascript to make the form submit.

Any idea?

Thanks in advance.

PS: I'm using JSF 2.0 (Mojarra), Glassfish 3 and Netbeans 6.9.


If I have seen further it's by standing on the shoulders of giants - Isaac Newton
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Can't get to the bean methods
 
Similar Threads
JSF, Facelets losing context after reload
Issue with my webApp
json object send to JSF backing bean to xhtml page
JSP <a href> tags breaks page functionality
how use a <li>with <h:commandLink> ?