Done. Added the class to:

https://cwiki.apache.org/confluence/display/WICKET/Modal+Windows


Regards,

Ernesto

On Tue, Nov 23, 2010 at 4:24 PM, Martin Grigorov <mgrigo...@apache.org> wrote:
> Wiki page is OK for now.
> 1) it is easy to create if needed
> 2) I don't remember such request in the mailing lists for the last 2 years,
> so it is not something everyone needs
>
> My 2c.
>
> On Tue, Nov 23, 2010 at 4:16 PM, Ernesto Reinaldo Barreiro <
> reier...@gmail.com> wrote:
>
>> Hi,
>>
>> In one of the application we working at right now we have the
>> requirement that the user should fill in some extra information before
>> he/she is allowed to work with some pages. We wanted to do this with a
>> modal window blocking the page till this information is provided. So,
>> the requirement is:
>>
>> -Modal window should be opened immediately after a page is load.
>>
>> After a bit of messing around/googling we came up with this class, who
>> seems to be doing the job:-)
>>
>> public class OpenOnLoadModalWindow extends ModalWindow implements
>> IHeaderContributor {
>>
>>        private static final long serialVersionUID = 1L;
>>
>>        /**
>>         * @param id
>>         */
>>        public OpenOnLoadModalWindow(String id) {
>>                super(id);
>>        }
>>
>>        /**
>>         * @param id
>>         * @param model
>>         */
>>        public OpenOnLoadModalWindow(String id, IModel<?> model) {
>>                super(id, model);
>>        }
>>
>>        /**
>>         * Adds the JavaScript to initially open modal window.
>>         */
>>        public void renderHead(IHeaderResponse response)
>>        {
>>
>>  response.renderOnDomReadyJavascript(getWindowOpenJavascript());
>>        }
>>
>>        /*
>>         * (non-Javadoc)
>>         * @see
>> org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow#makeContentVisible()
>>         */
>>       �...@override
>>        protected boolean makeContentVisible()
>>        {
>>                return true;
>>        }
>> }
>>
>> Would this class, or one derived form this one, or a better solution
>> if one is known:), be included on the framework. Or this is just a
>> topic for wiki page?
>>
>> Regards,
>>
>> Ernesto
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to