Ernesto,

I really appreciate your help - thanks for the information. I will try to
take a look at it tonight! 

Cheers, Graeme.


reiern70 wrote:
> 
> Hi Graeme,
> 
> Yes, it is the approach I would follow... I'm not 100% sure about all
> the details (e.g maybe the URL is not exactly /images/xxx), but I'm sure
> that approach that will work.   As said I used a similar approach
> sometime ago for displaying a documents inside an iframe: I mounted a
> dynamic resource that was generating the content based on some ID and
> the iframe src just contained the URL of the resource. Your use case is
> a bit different but it will also work. Another possibility is to have on
> the same page , where the "HTML" is going to be displayed, a component
> implementing IResourceListener and have that component generate the
> images...
>  
> Right now I'm very busy with other pressing issues at  work but if I
> find time I'll try to build a small example illustrating this.
> 
> Best,
> 
> Ernesto
>  
> 
> Graeme Knight wrote:
>> Hi, thank you - this is invaluable information.
>>
>> So basically what you are suggesting is something like:
>>
>> 1) Read the HTML content (this will be set on the innerHTML of the
>> iframe).
>> 2) Parse the content to find the each IMG SRC CID - replace this CID with
>> a
>> URL to /images/xxx.
>> 3) Set the HTML into the iframe.
>> 4) On rendering the iframe IMG SRC will point back at the server that
>> will
>> serve up the image, essentially.
>>
>> Appreciate your help!
>>
>> Graeme.
>>
>>
>> reiern70 wrote:
>>   
>>> ...something like:
>>>
>>> private static String ID = "MyImages";
>>>  @Override
>>>  protected void init() {
>>> super.init();
>>>                  getSharedResources().add(ID, new
>>> MyDynamicImageResource());
>>>  mountSharedResource("/images", ID);
>>>  ....
>>> }
>>>
>>> On you WebApplication class... Then ask back to the server for
>>> /images/xxx
>>> and your MyDynamicImageResource will pick up the xxx and stream back
>>> that
>>> xxx image... MyDynamicImageResource should implement some of the
>>> extensions
>>> of DynamicImageResource... Long time ago I implemented something like
>>> that
>>> but I don not have that code at hand anymore... But it shouldn't be that
>>> difficult to get that working.
>>>
>>> I have seen this
>>> http://cwiki.apache.org/WICKET/how-to-create-dynamic-image-overlays.html
>>> example
>>> but don't if it will be of any help to you...
>>>
>>> Best,
>>>
>>> Ernesto
>>>
>>> Best
>>>
>>>
>>>
>>> On Wed, Dec 3, 2008 at 3:16 PM, Ernesto Reinaldo Barreiro <
>>> [EMAIL PROTECTED]> wrote:
>>>
>>>     
>>>> Why not mount a resource that is servicing back images based of the
>>>> CID?
>>>> Best,
>>>>
>>>> Ernesto
>>>>
>>>>
>>>> On Wed, Dec 3, 2008 at 2:59 PM, Graeme Knight
>>>> <[EMAIL PROTECTED]>wrote:
>>>>
>>>>       
>>>>> Oh,
>>>>>
>>>>> My use case is this:
>>>>>
>>>>> 1) Load up HTML email content. This content has CIDs which need to be
>>>>> resolved to URLs.
>>>>>
>>>>> 2) I will put the HTML content into the iframe using some Javascript
>>>>> to
>>>>> manipulate the innerHTML.
>>>>>
>>>>> 3) Before I do step 2 I need to convert the CID to a URL that points
>>>>> to
>>>>> an
>>>>> image file on the server.
>>>>>
>>>>> Its this URL construction that concerns me.
>>>>>
>>>>> Many thanks for any suggestions, Graeme.
>>>>>
>>>>>
>>>>> Graeme Knight wrote:
>>>>>         
>>>>>> Hi,
>>>>>>
>>>>>> I would like to use an iframe on my page that contains IMG tags. I
>>>>>>           
>>>>> would
>>>>>         
>>>>>> like the IMG tag SRC to point back to the server to load up the
>>>>>> image.
>>>>>>
>>>>>> What would be the best way to construct the URLs in Wicket?
>>>>>>
>>>>>> Many thanks for any advice, Graeme.
>>>>>>
>>>>>>           
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/IMG-SRC-URL-in-iframe.-tp20805408p20813419.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]
>>>>>
>>>>>
>>>>>         
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/IMG-SRC-URL-in-iframe.-tp20805408p20821557.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]

Reply via email to