You need to sign in to do that
Don't have an account?
ParnisariPablo
populates a List<LineaVencida> where LineaVencida is a inner class (inner to the controller) built with OpportunityLineItem (customized) and a boolean
(called "Seleccion") that is represented in VF with a ckeck buttom.After the first click the debug log shows that first of all the setters / getters are runned and after this the method "Generar" is successfully runned an
finally the List<LineaVencida> is populated and showed thru a "pageBlockTable" component.After that if I select another option in the filter pick list (i.e: "Yesterday") and click the button that call the "Generar" method the page is just refresh
whit the same data that had been loaded the first (former) time.When I check the debug log I can see that the setters / getters are runned (much more in this ocassion because there were muche more data in the postback)
and after that the method "GENERAR" wasn't never called !!!! SalesForce not raise any error, neither error is reported in the debug log.Please I need any haelp or clue.
Thanks in advance !!
Custom Controller Action Method works only first run !
I built a VF with a pick-up list and a button with an action that call a method "generar" on a Custom Controller Class.
When the page starts only this are showed. Then the user select an option (today, week, yesterday, etc) and click the button wich call the methods an
populates a List<LineaVencida> where LineaVencida is a inner class (inner to the controller) built with OpportunityLineItem (customized) and a boolean
(called "Seleccion") that is represented in VF with a ckeck buttom.
After the first click the debug log shows that first of all the setters / getters are runned and after this the method "Generar" is successfully runned an
finally the List<LineaVencida> is populated and showed thru a "pageBlockTable" component.
After that if I select another option in the filter pick list (i.e: "Yesterday") and click the button that call the "Generar" method the page is just refresh
whit the same data that had been loaded the first (former) time.
When I check the debug log I can see that the setters / getters are runned (much more in this ocassion because there were muche more data in the postback)
and after that the method "GENERAR" wasn't never called !!!!
SalesForce not raise any error, neither error is reported in the debug log.
Please I need any haelp or clue.
Thanks in advance !!
I built a VF with a pick-up list and a button with an action that call a method "generar" on a Custom Controller Class.When the page starts only this are showed. Then the user select an option (today, week, yesterday, etc) and click the button wich call the methods an populates a List<LineaVencida> where LineaVencida is a inner class (inner to the controller) built with OpportunityLineItem (customized) and a boolean
(called "Seleccion") that is represented in VF with a ckeck buttom.After the first click the debug log shows that first of all the setters / getters are runned and after this the method "Generar" is successfully runned an
finally the List<LineaVencida> is populated and showed thru a "pageBlockTable" component.After that if I select another option in the filter pick list (i.e: "Yesterday") and click the button that call the "Generar" method the page is just refresh
whit the same data that had been loaded the first (former) time.When I check the debug log I can see that the setters / getters are runned (much more in this ocassion because there were muche more data in the postback)
and after that the method "GENERAR" wasn't never called !!!! SalesForce not raise any error, neither error is reported in the debug log.Please I need any haelp or clue.
Thanks in advance !!
I attach the VF and controller code :
Any help will be very appreciated !!
I think I've read somewhere that you shouldn't have a form tag inside a pageBlock. Try putting the pageBlock inside the form and see if that makes any difference.
Hi.
I try your suggestion but It doesn't works.
I interchanged pageBlock and forms tags without result (just changed the aspect of the rows table's)
Ive checked the debug an obtain the same result as before: first time the setters an method (generar) are runned and next times just setters runs but not the method called on the "action" attribute, without error on screen neither debug log.
Anyway I real appreciate your help.
Thanks.
Pablo.
The problem seems related with the"VisualForce execution flow of post back request" described here.
In this explanation is described that if some error appear while the postback data (viewstate) is processed the action method is never called, the problem is that, in my case, there aren't any error reported.
And seem that have had other similar problems in this and this post.
If any know this mechanism (execution flow) maybe could point me in the wright direction.
Thanks
Pablo.
Hola, try a few things:
1. Instead of returning ApexPages:currentPage() from generar, return null;
2. On your commandButton for generar, try adding: reRender="tabla"
3. Inside generar, I think you're going to want to add a filas.clear() before you start adding things to it.
Perhaps something there will help. Best, Steve.
Steve:
I tried your suggestions but don´t work. Thanks anyway !
Finally I found the cause of the problem. It seems to be a BIG BUG in the platform itself.
In few words: when I remove the checkbox "Selecc" from the table everything works fine as is expected.
Put a checkbox inside a table inside a form generates a error that isn´t reported and cancel the proccess of the controller without any error !!
Tanks everyone !
Pablo
What do you get if you use <apex:inputCheckbox> instead of <apex:selectCheckboxes>?
selectCheckboxes requires some <apex:selectOptions> and I don't think that's what you want in your situation.
Note: I think my other suggestions are still correct for what you're doing. Best, Steve.