Martin, Yes you are right the requests/e-mails I have seen are older that two years. But I'm not sure this is not a feature everyone needs: maybe when people have such a need they look at ModalWindow and then realize it can't do the job and then turn to use other solution (e.g. jquery Dialog which have an autoOpen property). In my case jquery Dialog was not a good solution, so, I went into trying to fix modal window to do the Job:-)
I will add a wiki page then. Regards, Ernesto On Tue, Nov 23, 2010 at 4:24 PM, Martin Grigorov <[email protected]> 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 < > [email protected]> 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: [email protected] >> For additional commands, e-mail: [email protected] >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
