I am assuming that my debugger will not execute when executing the jQuery code, is that correct?
After trying my ajax call and could not get my debugger to execute I just put in an alert to see if I could see the value of "data" but there I'm getting a dialog box with the rendered HTML code in it and not the value I should be getting from the bean in the jsp that I'm calling.
My jQuery code is:
The code in my changeSelectedFacilityCode.jsp page:
Any help/direction would be greatly appreciated. Thank you.
Melinda Savoy wrote:I am assuming that my debugger will not execute when executing the jQuery code, is that correct?
In any case, giving us JSP doesn't help us at all--we need the rendered HTML, as has been mentioned to you previously.
Here is my rendered HTML code from view source:
Thanks for taking the time to take a look at this and help me with my issue. Thank you again.
Can you tell me how in my debugger when I call the bean from the changeSelectedFacilityCode.jsp page that I jump over to my code? I put a breakpoint there but I never get there so I cannot see what is actually going to my java code. Hope that makes sense.
Have you used anything to see if the request is being sent from the browser? Someone else mentioned Fiddler, or Firebug, or any other similar tool?
I am working on a support issue at the same time that I'm working with you so I've not been able to get Fiddler started unfortunately. I may have to wait until tomorrow to get back with you on this. Sorry for the delay but thanks for your help.
At any rate, the request header looks like this:
The rendered HTML, per Fiddler2, again look like:
I don't know if this helps but the http looks like this in the response section of Fiddler2 down at the very bottom of the screen:
The ?text=46 at the end of my http is the value that is being passed as a parameter in my jQuery code above.
I have a question - when jQuery executes the code and I have a breakpoint in the java bean in RAD, should the break point not be executed in my IDE, if the bean is actually being executed by jQuery?
Again, any help/direction on what I'm doing wrong would be greatly appreciated. Thank you.
Melinda Savoy wrote:should the break point not be executed in my IDE, if the bean is actually being executed by jQuery?
Should it *not* be executed? I'm not sure how to parse your sentence.
If the code where the breakpoint is set is being executed, and you're in debug mode, the code should stop executing at the breakpoint.
I guess I'm a little confused: what are you expecting as a response from your Ajax call? In the blur() function you're trying to set a select element's value, so wouldn't you want a number (or whatever) back? You're calling a JSP that appears to render an entire form.
You're also correct in that I DO WANT A VALUE RETURNED TO ME so that that the value in "data" can be used ultimately to SELECT the option from the dropdown id called "facilityCodes". I'm not sure why I'm getting the form returned to me therein lies my question to this forum. Right now I'm just trying to do an alert on the "data" value in the jQuery code so that I can see what is being returned to me from the ajax call.
This is the first time I've used jQuery and therefore the reason for my questions.
Hope this makes sense. If not, my apologies.
JSF is definitely not very easy to work with. I'll post to jQuery itself and see if anyone there is working with JSF at all and how to return only the contents of the bean I'm calling and NOT the entire form.
David Newton wrote:Ew. Isn't there a way to have a managed bean "call through" to a service that could be exposed in a variety of ways? Or is just like any other facade/wrapper/etc. and it's just not designed to be used like that (accessed directly)?
There probably is and it's probably hidden deep in the entrails of the tags if anyone took the time to muck through it. I haven't used JSF in years (thank God). If anyone around here knows it is probably Tim Holloway.
Melinda, you might consider asking David's question in the JSF forum. The folks that hang out there will probably be more help when it comes to this kind of info. This thread is really treading between 2 different topics at this point.
To be honest, I do not think I'm ever getting to my bean from the call to this JSP page. But without having the debugging capabilities (for whatever reason not executing), I cannot tell what is going on.
Just banging my head...
Everyone's time and help are very much appreciated.
David Newton wrote:You're getting HTML back because you're calling a JSP page that renders a form, no?
I think he said is correct。
Once that is fixed then per jQuery I should see the value in my rendered HTML and pick it up from there. We'll see. Thanks.