*
The moose likes JSF and the fly likes callflow glassfish V3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "callflow glassfish V3" Watch "callflow glassfish V3" New topic
Author

callflow glassfish V3

Men rai
Greenhorn

Joined: May 31, 2011
Posts: 11
Hi,
May be it isn't the right forum.
My problem is that I would like to know wich functions are called by the application. I don not know if it is called the callflow. I'm developing with glassfish V3.
For exemple: I have a form with a selectonemenu with the property "onchange=submit()". When I change its value some functions of the server are called. The browser diplays "waiting for localhost" but I dont know How I can see it.

If I debug the application I don't know where to put the breakpoint.

thanks in advance.
Marcos Silvestri
Ranch Hand

Joined: Dec 06, 2009
Posts: 62

Could you be trying to set a breakpoint in a piece of code not written by you? Is that possible at all?

If I've understood you correctly, you're wishing to understand what the JSF framework does under the hood, and for some reason, set a breakpoint in that intentionally encapsulated world. Is that what you really mean?


DJ aspirant, Engineering undergraduate, Tokusatsus addicted, fond of English language and Asia's, Buddhist, blogger, etc. I'll need to insert all these attributes in a Java class and manage to create methods for handling my overwhelming life
Men rai
Greenhorn

Joined: May 31, 2011
Posts: 11
Yes, I would like to know which functions of the managedbeans are called by the application.
I'm just interested about the functions of my beans.
Marcos Silvestri
Ranch Hand

Joined: Dec 06, 2009
Posts: 62

Do you have any specific problem or just want to follow the processing flow of the program as means of curiosity?

What do you want to debug through that wished breakpoint?
Men rai
Greenhorn

Joined: May 31, 2011
Posts: 11
I have an specific problem. I have a form that is populated whith a datatable:
<h:dataTable var="pre" value="#{epBacking.getDataPre(epBacking.idpreguntes)}">

I have a a selectBooleanCheckbox that when changes it submits the page, the page reloads with the new value and it allows me to show some information that is relevant with the value of the selectBooleanCheckbox

<h:selectBooleanCheckbox value="#{pre.Altre}" onchange="submit()"></h:selectBooleanCheckbox>

<h:inputText id="t_pre" value="#{epBacking.altres.pregunta}" rendered="#{pre.Altre == true}"></h:inputText>

I want to do the same with another field and when the pages reloads it lost its value:

<h:selectOneMenu id="no_men" value="#{pre.num_men}" onchange="submit()">
Marcos Silvestri
Ranch Hand

Joined: Dec 06, 2009
Posts: 62

Maybe the <h:selectBooleanCheckbox> works differently when compared with <h:selectOneMenu>

Where to set the breakpoint? What about the managed bean "Pre", where the attribute "num_men" is present?

If you set a breakpoint there, once both "Altre" and "num_men" belong to the same managed bean, you can try to check if the processing flow is the same for both cases, verifying what values are carried from the View to the Bean when you use the JSF components on the browser.

It's an idea, hopefully helpful...

Men rai
Greenhorn

Joined: May 31, 2011
Posts: 11
Where of the backingbean pre should I put the breakpoint?
Is there any point that breaks the execution of the application if any function of the backingbean pre is called??
Thanks for your interest.
Marcos Silvestri
Ranch Hand

Joined: Dec 06, 2009
Posts: 62


Where of the backingbean pre should I put the breakpoint?

Unfortunately, that is a question that nobody can answer for you since it depends on your code and your debugging interest. In other words, in your code, you yourself have to suspect where there might be a problem, and then you set the breakpoint right there to verify if your error assumption was correct, possibly ending up finding out that there was something wrong somewhere else.

Is there any point that breaks the execution of the application if any function of the backingbean pre is called??

This question is not much clear, it possibly implies that the concept of breakpoint might not be crystal clear to you.

It's true that your application can "break", that is, crash, if there's a problem hidden in your code. However, breakpoints are set so that you can intercept errors before that crash occurs. In other words, the breakpoint itself does not break the application, you give a pause to the processing of your code so that you can, starting on the line where that breakpoint was set, follow the processing of your code step-by-step, analyzing what's happening with your attributes and methods at the moment of execution.

Again, whenever in your Java code you suspect there is a problem, you can set a breakpoint into that line so as to check whether or not the problem is there. If not there, you have to try other places where may possibly exist something wrong.

One thing that you can check is if the values chosen in the View are carried over to the Bean accordingly, by analyzing what's received inside the bean. How do you do that? Start the application in debugging mode, set a breakpoint somewhere suspicious, then go step-by-step through your code with that breakpoint.

Lastly, where is it suspicious? That's something only you can tell, especially because you're the only one with access to that code

I hope it further clarifies it...

Regards!
Men rai
Greenhorn

Joined: May 31, 2011
Posts: 11
Lots of thanks.
I'll try to find it.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: callflow glassfish V3