-
1. Re: Resize ModalPanel by JS
kalomo Dec 8, 2009 3:31 AM (in response to cencil)yes it is possible.
you can resize the modalPanel with jquery
http://docs.jquery.com/UI/Resizable
for changing the position you could use this
http://www.tutorialspoint.com/script.aculo.us/scriptaculous_drag_drop.htm -
2. Re: Resize ModalPanel by JS
kalomo Dec 8, 2009 3:38 AM (in response to cencil)hi,
sorry the links above are for container components like a div container.
both features (resize/move) are already implemented in the modalPanel component.
have a look at the modalPanel example. -
3. Re: Resize ModalPanel by JS
cencil Dec 8, 2009 5:12 AM (in response to cencil)Hi, I will try that. And just wonder do Richfaces comes with something like:
Richfaces.resizeModalPanel('#{id}')
or
#{rich:component('mp')}.resize(100, 200)
heheeee, just like how we show and hide the modal panel. -
4. Re: Resize ModalPanel by JS
ilya_shaikovsky Dec 8, 2009 8:00 AM (in response to cencil)you could bind the size attributes to some properties using EL as usually. and you could pass some parameters to client for example via ajax with data attribute. And then just use in show API calls.
-
5. Re: Resize ModalPanel by JS
cencil Dec 9, 2009 3:12 AM (in response to cencil)good idea man, even it is not as good as just using JS, but worth have a try, thanks!
-
6. Re: Resize ModalPanel by JS
amolfuke Jan 12, 2010 5:20 AM (in response to ilya_shaikovsky)Hi Ilya ,
Can I know how we can do this ? We are trying to capture the modified size of modalpanel when user resize it and store it in db so that when user log in again the modalpanel can be shown in new sizes.But we are able to get the size of modalpanle when we resize it.I think because its not a window object.
Here is the code snippet:
<
rich:modalPanel
id="messageReaderModal_#{ReportWidgetStateBean.subscriptionId}"
resizeable="true" headerClass="modal_header"
onresize="some_javascript_function()"
height="messageReaderModal_#{ReportWidgetStateBean.height}" width="messageReaderModal_#{ReportWidgetStateBean.width}" onshow="nbmDash.refreshMessageReaderModal(this);">
<f:facet name="header">
..
..
Your help is much appreciated.
Thanks,
Amol
-
7. Re: Resize ModalPanel by JS
ilya_shaikovsky Jan 12, 2010 9:27 AM (in response to cencil)try to use visualOptions for that. -
8. Re: Resize ModalPanel by JS
cencil Jan 13, 2010 12:08 AM (in response to ilya_shaikovsky)hi, where I can find how to use visualOptions?
Thanks!
-
9. Re: Resize ModalPanel by JS
ilya_shaikovsky Jan 18, 2010 8:32 AM (in response to cencil)checked
visualOptions="#{userBean.options}"
and
private Map<String, Object> options = new HashMap<String, Object>();
options.put("width", 100);
options.put("height", 800);
unfortunatelly I must say that the options is read on encoding but not processed on decode. So there is no way to save using this way..