What my requirment is that I am creating a case and after its inserted I want its case Id,Case No, Subject field to be shown in a jquery BlockUI message box.
But the problem is that after its created and the page is loaded the variable in my controller that holds the data is not binding put to my page so I am unable to get the values.
So what I am tring to do is that when there is data in my contoller right after insert I am adding a JS to the page itself that will have my values bindedup with it.
The way I'd handle this is to have the javascript in the page, but don't render it until the case is created.
Once you create the case, if you rerender the section with the javascript in it, the case information will then be available to that javascript.
There's an example of delayed rendering of javascript on my blog at:
http://bobbuzzard.blogspot.co.uk/2011/05/refreshing-record-detail-from-embedded.html
and an example of retrieving information from another object after the page load, and then using that in a rerender at:
http://bobbuzzard.blogspot.co.uk/2011/11/retrieve-related-object-fields.html
All Answers
Can you explain a little more about what you are trying to do? Generating javascript server side is quite an unusual requirement!
Hi Bob,
What my requirment is that I am creating a case and after its inserted I want its case Id,Case No, Subject field to be shown in a jquery BlockUI message box.
But the problem is that after its created and the page is loaded the variable in my controller that holds the data is not binding put to my page so I am unable to get the values.
So what I am tring to do is that when there is data in my contoller right after insert I am adding a JS to the page itself that will have my values bindedup with it.
The way I'd handle this is to have the javascript in the page, but don't render it until the case is created.
Once you create the case, if you rerender the section with the javascript in it, the case information will then be available to that javascript.
There's an example of delayed rendering of javascript on my blog at:
http://bobbuzzard.blogspot.co.uk/2011/05/refreshing-record-detail-from-embedded.html
and an example of retrieving information from another object after the page load, and then using that in a rerender at:
http://bobbuzzard.blogspot.co.uk/2011/11/retrieve-related-object-fields.html