Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where does the action URL come from?

 
Garann Means
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried asking this in Sun's forum, but I wasn't clear or wasn't lucky and still haven't found the answer. I hoped maybe I'd find someone here who's run into the same thing.

I want to write a custom component and use method binding to set an action for it. But I don't want the method to run when the component's clicked. Let's say I want it to run when the component is mouse over. So, when the component's moused over by the user, it should send a request to the server and the server should direct that event or request to the appropriate method in a backing bean.

The really important thing to me here is the method binding, so even if anyone can tell me how to set that up by hand in the code for my custom component, that would be a wonderful start.

Thanks!
g.
 
Mauro Castaldo
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, you could write a custom component to do that work but you can also try simpler solutions with standard ones like this:



move mouse over the image and have your mouseOverAction method executed!
(sorry for zeros instead of 'o' in some code parts but it's a post requirement)
 
Garann Means
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the suggestion, Mauro, but I really need at be able to do this all from one component. I won't have any control over the JSP itself - I need to be able to encapsulate all this functionality within one tag.

Do you know how I'd get access to the method binding from within my rendering code?

Thanks,
Garann
 
Garann Means
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, the code I'm looking for is apparently this:



If anyone now sees what I'm trying to do and wants to offer their advice, it would be very much appreciated. In the meantime, I am going to combine the code above with javascript telling each component to submit its form on mouse over or on blur or in whatever exceptional circumstances it needs to, and see if that actually works.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic