Skip to main content

I’m uisng a wizard which selects an object in one step and display its field values in next step.I’m using rendering condition in the 2nd step to show certain field values according to object selected in previous step. The issue I’m facing is that it is displaying the same field values in one field editor with rendering and not displaying the same field values in other field editor without rendering condition (both editors are on same model).

I’m attaching the pics. What is possibly going wrong?

Need some urgent help.

Ashish,

Please check that both the field editors are using the same model (perhaps one is using the ‘clone’ instead?)

Can you provide a screenshot of the actual runtime behavior?


Hi Matt,

Yes both are using same model. I have posted a pic for that too. posting it again.


Both are on same collateral object. Both are trying to print Collateral type name. First editor is without any rendering condition and other is with rendering condition that the collateral type name should be equal to ‘Equipment’.


What this problem leads to is when I go back in wizard to previous step and select any other collateral object type, when clicking next to show all the field values of the selected collateral, it is not at all rendering anything as the rendering condition is according to collateral type name.


What is strange that the console is showing that the collateral type name is set to newly selected collateral object ,but it’s not rendering that editor with that type name nor it is displaying the type name.


Attaching the pics


Is that the data for the Collateral model that you’re showing in the console?

try running this in the console and see if you’re getting what you expect:


<br>skuid.$C('MyFieldEditorId').render();


(substitute the actual unique id of your field editor).



yes that’s the data from collateral model .
I’m displaying the collateral model data when moving to next step.


So here’s what happening after running that line. It is displaying the editor but not before running that line. But Collateral type name is still not coming in top field editor which is without any rendering condition.

Attaching the pics


If you run .render() on the top field editor, it will show the values.


yes , its rendering it… but why is it not rendering automatically when the object is loaded. Why do I need to re-render it. Is there any way I can achieve it without writing JS for all available editor.


Several ways to go about it. You could query the model each time the wizard step is loaded. You could try to re-render the entire wizard step with JS. You could write javascript to find all the field editors in your page and re-render them… 

In my opinion, skuid should know that the model data has been updated, and re-render the editors appropriately. That fact that it’s not smells like a bug.


Skuid?


As per  the requirements I think "You could query the model each time the wizard step is loaded " is a better option as I have too many editor on the same page. JS will be a mess. How can I query the model when each wizard step page loads. Are you pointing towards adding an “action” in the “next step” button of previous page in wizard?


Thanks for your response.I did it through javaScript. I have one more issue which I posted 2 weeks back but couldn’t get any resolution. Could you have a look and see if you can provide some insight. Many thanks for your responses and sticking it this far.
Here is the link :https://community.skuid.com/t/handlemessage-displaying-error-message-only-once


Reply