function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
chris_parxchris_parx 

Bug rendering with datatable and immediate true

Hi,

 

I'm facing a bug on a few of my old interfaces since I guess the new release and I don't find an easy way to fix that.

 

the scenario: the problem appears as soon as you have an apex datatable with a few inputfields and some of them which are tag as required and you want to delete for example one row. The best practice was before to put a button/commandlink or whatever, to make a call to the controller with immediate="true" (because of the empty required inputfields), to delete the row in the controller and to make a rerender on the table. easy. But since the new release, it appears that it's broken. What happens is the following: the row is deleted, the table is refreshed, the row disappears as expected but the data inside the row are not removed - I mean, the table itself looks like it has been refreshed but the data inside the table are not refreshed. Instead, the data of the last row is removed as if we deleted the last row. I checked that the controller did the job right, but not the rendering of the page.

 

my actual solution: I still make the call to the controller to delete physically the row in the controller, but I don't make any rerender (or well a fake one on any id). Instead of that, I call a JS function on the oncomplete event which removes the corresponding row in Javascript ... really horrible ...

 

Is there anyone else facing the same kind of problem?

 

PS: the API Version has not been updated although the behaviour is really different...

Best Answer chosen by Admin (Salesforce Developers) 
aballardaballard

This should be fixed now.   Let us know if you are still experiencing  a problem.

All Answers

aballardaballard

There is a known issue with inputField in a datatable or repeat when immediate is specified.  This should be fixed VERY soon. 

chris_parxchris_parx

glad to hear that! thank you very much

chris_parxchris_parx

aballard wrote:

There is a known issue with inputField in a datatable or repeat when immediate is specified.  This should be fixed VERY soon. 


May we get an update on this thread when the fix is deployed?

aballardaballard

This should be fixed now.   Let us know if you are still experiencing  a problem.

This was selected as the best answer
chris_parxchris_parx

this seems indeed to be working again, at least in my first test. Thank you!

 

By the way, I would be happy the day where it would be possible to make a kind of immediate true which disable the required true field but send the data to the controller. Right now, this immediate function is indispensable but has big drawbacks by not sending data to the controller.

chris_parxchris_parx

aballard wrote:

This should be fixed now.   Let us know if you are still experiencing  a problem.


I think I answered too fast as I now test the changes on a much complicated interface.... This bug with the immediate true seems anyway to be fixed but there is another one.

 

The rerender does not work properly anymore: when you rerender for example a table with filled input fields which are still not saved in the controller, before these values were not changed at all. Now they are overwritten with the values which are currently in the controller... which is of course wrong :(

 

This is for example a huge issue when you make a rerender after an immediate true, the user simply loses all his data!

chris_parxchris_parx

aballard wrote:

This should be fixed now.   Let us know if you are still experiencing  a problem.


May you confirm there is a still a problem with the rerender function and you are working on it? I really need to know when I could approximately expect a fix on that.

aballardaballard

I don't know of any remaining problem.  Is this something that previously worked differently, or new development?  The exact rules for what to display when there is a difference between the form field value and the controller value are not really very well defined..... 

 

Please open a support case and provide details that can be used to reproduce this if you are sure there is a bug.  

chris_parxchris_parx

aballard wrote:

I don't know of any remaining problem.  Is this something that previously worked differently, or new development?  The exact rules for what to display when there is a difference between the form field value and the controller value are not really very well defined..... 

 

Please open a support case and provide details that can be used to reproduce this if you are sure there is a bug.  


thank you for your answer. This is indeed a feature which is working now different than before. Before, doing a rerender on values which were not "saved" in the controller did not erased these values. now, these values are simply erased. This problem is as easy to reproduce as the immediate problem.

 

I will open a case and post an update when I will have one concrete.

scansanjuscansanju

Hi Chris,

 

I am facing the same issue with the immediate = true as i use this to rerender the table to add multiple rows in a pageblock table, but as soon as click add now the data entered by the user is wiping off. this used to work before very well.

 

can you please let me know if there is any answer you got on this one.

 

Appreciate you  help.

Sanjay 

aballardaballard

There is another fix going out very soon.  Hopefully it will fix this problem.

chris_parxchris_parx

scansanju wrote:

Hi Chris,

 

I am facing the same issue with the immediate = true as i use this to rerender the table to add multiple rows in a pageblock table, but as soon as click add now the data entered by the user is wiping off. this used to work before very well.

 

can you please let me know if there is any answer you got on this one.

 

Appreciate you  help.

Sanjay 


 

Sorry for the late answer, I was out of the office last week. It looks like anyway the bug has been fixed as everything seems to be working fine again :)

aballardaballard

Yes, this should be fixed now.... if anyone is still encountering problems, let us know....