Update image for already redistered path [message #78220] |
Thu, 13 March 2008 14:41  |
Eclipse User |
|
|
|
Originally posted by: spam.egnition.biz
Hi!
In my RAP application I want to display an image which
is connected to a certain object. The user can specify
this image (e.g. by an URL or by uploading the file).
The image is then stored on the server and the path to
the image is calculated using the objects id. Ok, that
works fine.
In addition, the user shall be able to change the image.
Uploading and overwriting the old image file is no problem.
But displaying it is.
Since in RWT the class org.eclipse.swt.graphics.Image
does not provide a public constructor I create the image
with the method
Graphics.getImage (String path, InputStream inputStream).
As mentioned above, the path is specified by the object id.
The method Graphics.getImage (...) calls
ResourceFactory.findImage( path, inputStream );
which looks up its image registry map first and
always returns the old image.
My question is:
Is there a possibility to force the creation of a new
image, e.g. by unregistering the path prior to the call
of Graphics.getImage (...)? Or is there another way to
create and display images?
Thanks in advance,
Olaf
|
|
|
Re: Update image for already redistered path [message #78266 is a reply to message #78220] |
Fri, 14 March 2008 06:00   |
Eclipse User |
|
|
|
Originally posted by: rherrmann.innoopract.com
Hi Olaf,
RAP currently shares images among session. Therefore we can neither
override a once registered image nor can we unregister it.
For now, you would need to use a different id/path whenever the
image content changes.
For a more detailed discussion see the post "Working with images".
Cheers,
Rüdiger
Olaf Kortlüke wrote:
> Hi!
>
> In my RAP application I want to display an image which
> is connected to a certain object. The user can specify
> this image (e.g. by an URL or by uploading the file).
> The image is then stored on the server and the path to
> the image is calculated using the objects id. Ok, that
> works fine.
>
> In addition, the user shall be able to change the image.
> Uploading and overwriting the old image file is no problem.
> But displaying it is.
>
> Since in RWT the class org.eclipse.swt.graphics.Image
> does not provide a public constructor I create the image
> with the method
>
> Graphics.getImage (String path, InputStream inputStream).
>
> As mentioned above, the path is specified by the object id.
> The method Graphics.getImage (...) calls
>
> ResourceFactory.findImage( path, inputStream );
>
> which looks up its image registry map first and
> always returns the old image.
>
> My question is:
>
> Is there a possibility to force the creation of a new
> image, e.g. by unregistering the path prior to the call
> of Graphics.getImage (...)? Or is there another way to
> create and display images?
>
> Thanks in advance,
> Olaf
|
|
|
|
Re: Update image for already redistered path [message #78456 is a reply to message #78427] |
Sun, 16 March 2008 08:47   |
Eclipse User |
|
|
|
Originally posted by: fappel.innoopract.com
Hi,
there is a plan for improving the situation, but there is no schedule
yet when to do this, so I can't promise that it make it into M3.
Ciao
Frank
-----Ursprüngliche Nachricht-----
Von: Olaf Kortlüke [mailto:spam@egnition.biz]
Bereitgestellt: Freitag, 14. März 2008 20:15
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: Update image for already redistered path
Betreff: Re: Update image for already redistered path
Hi Rüdiger,
thanks for your reply. In the thread you mentioned below Frank wrote
"Seeing your use case I think also about creating the possibility to
remove a image explicitly from the buffer." I also think that the use
case of non-shared images private to one user is quite common.
Is there any plan to introduce a method to unregister images (or a
boolean parameter to overwrite an existing registration)?
Best,
Olaf
Rüdiger Herrmann wrote:
> Hi Olaf,
>
> RAP currently shares images among session. Therefore we can neither
> override a once registered image nor can we unregister it.
> For now, you would need to use a different id/path whenever the image
> content changes.
> For a more detailed discussion see the post "Working with images".
>
> Cheers,
> Rüdiger
>
|
|
|
Re: Update image for already redistered path [message #78500 is a reply to message #78456] |
Mon, 17 March 2008 04:23  |
Eclipse User |
|
|
|
Originally posted by: spam.egnition.biz
Frank Appel wrote:
> Hi,
>
> there is a plan for improving the situation, but there is no schedule
> yet when to do this, so I can't promise that it make it into M3.
>
> Ciao
> Frank
>
Thanks for the info, Frank,
and thanks for this great framework
to all contributors.
|
|
|
Powered by
FUDForum. Page generated in 0.03413 seconds