Attached is the application map,
There are two paths
A fresh ticket would take a new ticket path and subsequently editticket when completed. this scenario works fine.
The second scenario for opening an existing ticket has issues to populate dropdown fields(takes the route prepareForm, cloadticket, Editticket..)
the same set of dropdown selects are in prepareform and cloadticket(with a condition to check for existing records), when arriving at Editticket after a cupdateTicket, cloadticket the drop down data are not populated, where could the problem be?
There are two paths
A fresh ticket would take a new ticket path and subsequently editticket when completed. this scenario works fine.
The second scenario for opening an existing ticket has issues to populate dropdown fields(takes the route prepareForm, cloadticket, Editticket..)
the same set of dropdown selects are in prepareform and cloadticket(with a condition to check for existing records), when arriving at Editticket after a cupdateTicket, cloadticket the drop down data are not populated, where could the problem be?
RE: Contoller- values not rendered
If I understand correctly, the route from fEditTicket-cUpdateTicket-cloadTicket-fEditTicket loses the dropdowns?
Where do you 'create' the data for the dropdowns? Is it in PrepareForm or cloadTicket?
First, make sure your data is present in cloadTicket. You should be able to trace this by using the Test Dashboard and looking at the outgoing message to ensure you have the dropdown data and it is in the expected format as defined in the Data Bindings for the fEditTicket page.
If the data is present in cloadTicket then it is likely you are losing the data after the eEditTicket page is rendered following the first iteration, i.e. following submission to cUpdateTicket. This is because the Controllers are standard server-side web components and stateless by default. Have a look at cUpdateTicket after submission and ensure you are not losing the data at this stage. This is not an issue however, if you are re-reading ('creating') the data in cloadTicket.
If you are losing the data by the time you reach cUpdateTicket and not recreating it in cloadTicket, then you can either cache the dropdown data in PrepareForm (if this is where the data is created) and retrieve it elsewhere, such as the cloadTicket controller. Also, you can use the Keep previous form data? option in the Data Bindings, Action Configuration tab and select the fragment that represents your dropdown data. This will enable the fEditTicket page to resubmit the data back to cUpdateTicket. This is just an alternative technique to caching your data on the server and uses the client server roundtrip to preserve data.
I hope I understood your problem, but please let me know how you get on.
Kind Regards
Abdul
RE: Contoller- values not rendered
Attached is a simple application with a selection(dropdown) which i want to persist as it moves from one form to another,
scenario 1:The path for new form is taken if a condition is satisfied in this case procesid not equal to 1001, then i want the value of drop down to be displayed, prepareform -> new form -> save->load_c->editform->update->load_c->editform.
scenario 2: if procid is 1001, prepareform -> load_c -> editform->update->load_c->editform.
I cannot get this working, the data is lost when updated.. please help..
RE: Contoller- values not rendered
Attached is a simple application with a selection(dropdown) which i want to persist as it moves from one form to another,
scenario 1:The path for new form is taken if a condition is satisfied in this case procesid not equal to 1001, then i want the value of drop down to be displayed, prepareform -> new form -> save->load_c->editform->update->load_c->editform.
scenario 2: if procid is 1001, prepareform -> load_c -> editform->update->load_c->editform.
I cannot get this working, the data is lost when updated.. please help..
RE: Contoller- values not rendered
I'm unsure why your flow in scenario 1 goes to ...load_c > Editform > update > ....etc. after NewForm > save, but I assume that is part of your required application flow after you have created something using NewForm > save >...?
I notice you are retrieving the data for the dropdown in both PrepareForm and load_c. This means you will read the data twice during scenario 2, which means a redundant list, but it should not cause the issue you are describing. You should be able to remove the SQL lookup in load_c and use the Keep previous form data? in NewForm as I described in my earlier post which should preserve and repost the data you retrieve in PrepareForm, unless you are concerned about the dropdown list changing between NewForm and EditForm or you have other scenarios that need this lookup.
I'm still unsure what problem you are experiencing. Are you simply not noticing the values in your dropdown on Editform or have you used the Test Dashboard and cannot find the required data in the load_c controller? You do need to isolate this to ensure you have the required data in the outgoing message on the load_c controller, otherwise your dropdown has nothing to bind to. Also, you need to ensure you have the correct structures and bindings that match the server data structure. If your data is present in load_c and your dropdown is still blank in EditForm then you can use the copy XML link for the outgoing message in the Dashboard and actually compare this xml to the static Page Display binding document in the FormMaker bindings tab.
I also notice that your bindings for the control on EditForm is different to the bindings for the same field in NewForm. In EditForm, your bindings for the Select Box Options Data Value and Select Box Options Display Text should both be relative rather than fully qualified and read name ?
I hope this provides a few more clues. Good luck.
Regards
Abdul