or attach ajaxlink to button tag :)
-Igor
On 8/1/08, steviezz <[EMAIL PROTECTED]> wrote:
>
> You could use an AjaxLink, but style the link with CSS to make it look like
> an HTML button.
>
> Steve
>
>
>
>
>
> a_godin wrote:
>>
>> I won't post the whole thing but here's the parts related to the modal
>> window
>>
>> In my java class :
>> public class Edit extends Panel
>> {
>> ....
>> private ModalWindow modCall;
>> private AjaxSubmitButton btnNewCall;
>>
>> ...
>> // creating my components
>> ...
>> add(modCall = new ModalWindow("modalNewCall"));
>> modCall.setPageCreator(new ModalWindow.PageCreator()
>> {
>> private static final long serialVersionUID = 1L;
>>
>> public Page createPage()
>> {
>> CalllPOJO call = new CallPOJO();
>> call.setId(my_mainpage.getId());
>> call.setIdUser(my_mainpage.getSession().getUser().getIdUser());
>> return new CallWindow(call, my_mainpage, true);
>> }
>> });
>>
>> modCall.setPageMapName("modCall-2");
>> modCall.setCookieName("modCall-2");
>> modCall.setTitle(getLocalizer().getString("title.new.call",
>> Edit.this));
>>
>> modCall.setWindowClosedCallback(new ModalWindow.WindowClosedCallback()
>> {
>> private static final long serialVersionUID = 1L;
>>
>> public void onClose(AjaxRequestTarget target)
>> {
>> Request Req = new Request();
>> MainPage dos = new MainPage(my_mainpage.getClient(),
>> Req.getDataPOJO(my_mainpage.getId()), 0);
>> setResponsePage(dos);
>> }
>> });
>> modAppel.setWidthUnit("em");
>> modAppel.setHeightUnit("em");
>> modAppel.setInitialHeight(300);
>> modAppel.setInitialWidth(600);
>>
>> ...
>>
>> btnNewCall = new AjaxSubmitButton("btnNewCall", frmEdit)
>> {
>> private static final long serialVersionUID = 1L;
>>
>> @Override
>> protected void onSubmit(AjaxRequestTarget arg0, Form arg1)
>> {
>> System.out.println("click in button btnNewCall");
>> modCall.show(arg0);
>> }
>> };
>> frmEdit.add(btnNewCall);
>> ...
>> frmEdit.add(modCall);
>> }
>>
>> In the corresponding html class:
>> <wicket:panel>
>> <td><div wicket:id="modalNewCall"></div><input class="ActionButton"
>> type="submit" name="btnNewCall" value="New call"
>> wicket:id="btnNewCall"/></td>
>> </wicket:panel>
>>
>>
>> I hope that's enough information for you ... thank you very much for your
>> help
>>
>>
>>
>> Paul Logasa Bogen II wrote:
>>>
>>> I believe that you really do need it to be a AjaxLink... but if you can
>>> send the code to the list we can see if there are any other issues.
>>> plb
>>>
>>> a_godin wrote:
>>>> Hey,
>>>>
>>>> I'm new to wicket and I'm completing a web app that was left behind by
>>>> someone else. I have to take a functionality (opening a modal window)
>>>> that
>>>> was called by clicking an AjaxLink in a panel and bring it in a button
>>>> on
>>>> another panel ...
>>>>
>>>> I moved the code, it compiles and all but when I click the
>>>> AjaxSubmitButton
>>>> (that calls myModalWindow.show(arg0) ), nothing happens ...
>>>>
>>>> Does anybody know what the problem could be / what I forgot ?
>>>>
>>>> I looked at the example on www.wicket-library.com on how to open modal
>>>> windows but that was with AjaxLinks ...
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/How-to-open-a-Modal-Window-by-clicking-a-button-tp18743263p18770491.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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]