Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

onclick event from Javascript to trigger backing bean method (Also anybody used J4J ?)

 
harinder singh
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi Ranchers,

Problem: I have a text box and a button (Go), I want the same result when user click on Go button or click enter( when focus is in the test box)

Environment: jboss-seam-2.2.0.GA, richfaces-3.3.1.GA, jboss-5.1.0.GA

I have two Question
1) I am having a problem to trigger the backing bean method with onClick event from Javascript , I already search the form and find this link

http://www.coderanch.com/t/211593/JSF/java/Calling-backingBean-method-from-javascript

I also tried the solution to use <h:commandlink> instead of <h:commandButton>..no Luck there (My code works fine but instead of calling the method it just refresh the Page)
The Reason I created the new Link to find out the real reason why the onclick method does not work for backing bean and if there is any other solution (ready to use API)??

Q 2) Anyone used the Default Action for a JSF Form ??
http://www.jsftutorials.net/defaultActionTag.html

I was using it in the Jboss 4.2.3 from one year and it worked like a charm , but when I upgradede my Jboss to 5.0.1 it stop working
what is in the Jboss 5 that can block this ??? no idea (The only thing I can think of jsf-imp/facelet jars etc and I tried to change those with old jars....no luck there)

This is very basic functionality for a web -application and how come there is no information on the net ???

I will really appreciate you comments and solutions.
Thanks




 
harinder singh
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone ??

Here is my code


This code is wrapped with facelets, I also tried the immediate ="true" condition on command button
Thanks in Advance!!
Harinder


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic