I have a situation where I have a view, which renders a form, where i can create a "service". In this same view i have another tab where i have a grid of "operator functions". This "operator functions" are the functions that a operator can have on that "service", a relation where 1 service can have many "operator functions".
When the user is creating a new service is mandatory that he creates at least 1 "operator function". I would like to let the user click on a button "Create operator function", in the tab Operator functions, and open a CJuiDialog where he would fill the form to create a new "operator function". Then i would like to send it to the grid and add a new line. At the end of it all, when the user hit "save the service", i would like to send the service with all the "operator functions" created.
Is it possible? Are there other alternatives to do that in a different way?
[size="2"]I think it would be possible your way, but imho it might be easier for users, and yourself, if you create the service in first step, then create operator functions on the fly for the already created service in a sort of second step, using cjuidialog, ajax, and maybe a nice jquery effect.[/size]
I think this would result in less complicated code, and a simpler interface that allows the end user to better clarify between creating a service, and creating the operator functions for a service. This might preclude your requirement that a service has to have an operator function, but I wonder if a user wouldn’t create operator functions anyways(with some visual prompting of course [size=“2”] ), as the service sounds like it might not be useful without operator functions.[/size]
Flow would be something like:
User sees service create form where they name service and fill in service details maybe, then click submit
User now see newly created service, with a textual prompt and ajaxLink for creating operator functions for the service
User clicks on "Create Operator Function" ajaxLink, which loads a cjuidialog, with a form for creating an operator function
User clicks on ajax submit button, the cjuidialog create form closes, the new operator function fades, slides, bounces, etc into place, and the ajaxLink for creating another operator function for the service is still visible close by, and no need to save the service after creating operator functions
Do you think this might work for you?