-
1. Re: modalpannel confirmation box:
fernando_jmt Aug 5, 2007 7:13 PM (in response to szaccaria)If you are using SEAM, you can use SMPC and start a conversation with manual flush mode, with this you will have the control over the flush operation , to be specific you must call entityManager.flush() in order to save the changes in the database.
e.g.:@Begin(ifOutcome = {Outcome.SUCCESS}, flushMode = FlushModeType.MANUAL) public String select() { ...(load entity) } @End public void save (){ ...(save entity operations) entityManager.flush(); }
HTH. -
2. Re: modalpannel confirmation box:
szaccaria Aug 6, 2007 3:13 AM (in response to szaccaria)Thanks Fernando,
that I do have made is that you write to me.
The problem is not to the server site but in the client, in fact I don't know how to pop up programmaticaly the modalpannel when refresh the windows.
I have thought to control, before to flush the data, if the data need the flush
es:((Session)entityManager.getDelegate()).isDirty()
in a action method, therefore set a flag and after return null from action method pop up the modal pannel...
But I don't know like making in the js to pop up a modal panell conditionedly. Any help will be appreciated.
Thanks in advance -
3. Re: modalpannel confirmation box:
fernando_jmt Aug 6, 2007 3:46 PM (in response to szaccaria)Ok, I think is more clear for me now.
Well, I didn't do anything similar yet, but these are my suggestions:
A)
- Add a variable in you backing bean, a boolean which will indicate if modal panel must be shown.
- If you talk about page refresing, what about to use the onload of the page body, calling a js function.
- Such js function must be written programatically, it means it depends of your boolean flag. Inside the function you only need to throw Richfaces.showModalPanel(...).
B)
May be you can use a4j:js in order to find a solution or even better, to accomplish the point A)
c)
I'm not sure, but an alternative could be a4j:pool, in order to get the state of you boolean flag and the throw JS functions.
HTH. -
4. Re: modalpannel confirmation box:
szaccaria Aug 7, 2007 1:21 AM (in response to szaccaria)Thanks again Fernando,
today I will try with the suggestions that you have given to me.
However me it is not still luminosity like activating dynamically the script js? knows to me that today I will have to study a few of java script!!!
Thanks