at the same place where you are instntiating the form...

-igor

On Sat, Jun 6, 2009 at 3:20 PM, Jeremy2009<[email protected]> wrote:
>
> I instantiate my Iframe in the panel's onBeforeRender() to ensure there's a
> page to attach the iFrame to.
>
> I think the oncomponenttag() happens before the onBeforeRender() which means
> that if i do:
>
> tag.put("target", myIFrame.getMarkupId());
>
> myIFrame is null.
>
> So, where can I instantiate my Iframe to ensure I can pass it's ref. to the
> panel's oncomponenttag method?
>
> Sorry if i'm missing something obvious...
> Thanks
> Jeremy
>
>
>
> igor.vaynberg wrote:
>>
>> add(new form(..) { oncomponenttag(tag) { tag.put("target","whatever");
>> }});
>>
>> -igor
>>
>> On Sat, Jun 6, 2009 at 1:26 PM, Jeremy2009<[email protected]> wrote:
>>>
>>> I am trying to simulate an ajax file upload by having my form's target
>>> specify an iframe.  So that once the form's onsubmit() ends, the iframe
>>> will
>>> re-render instead of the panel that contains the upload form.  On being
>>> re-rendered it will contain some javascript that will call another piece
>>> of
>>> javascript in the parent panel that will send an ajax request to the
>>> server
>>> therefore allowing me to simulate an ajax upload.
>>>
>>> So, I want to instantiate an iframe, add it to the parent panel and then
>>> have the form's target in the parent panel point to the iframe.  How do i
>>> know what value to put in the target?
>>>
>>> Eg in my HTML i have:
>>>
>>> <iframe wicket:id="upload" frameborder="0" height="100"
>>> name="myIFrame"></iframe>
>>>
>>> <form .... target="myIFrame">
>>> .
>>> .
>>> </form>
>>>
>>> Wicket will be ok with this?
>>>
>>> Many thanks
>>> J
>>>
>>>
>>>
>>> igor.vaynberg wrote:
>>>>
>>>> what exactly do you want to know? how to add a target tag to the form?
>>>>
>>>> <form wicket:id="form" target="foo"></form>
>>>>
>>>> -igor
>>>>
>>>> On Sat, Jun 6, 2009 at 1:07 PM, Jeremy Colton<[email protected]> wrote:
>>>>> Hi,
>>>>>
>>>>> I am creating a form that performs a file upload.  Rather than have the
>>>>> form's page update once the onSubmit() ends, I want the form's target
>>>>> attribute to specify an iframe and have the iframe update instead.
>>>>>
>>>>> How do i do this?
>>>>>
>>>>> Many thanks
>>>>> Jeremy C.
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [email protected]
>>>> For additional commands, e-mail: [email protected]
>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/How-to-set-a-form%27s-target-to-an-iframe--tp23905147p23905277.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]
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/How-to-set-a-form%27s-target-to-an-iframe--tp23905147p23906116.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]

Reply via email to