[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tapestry-user
Subject:    Re: T5.3.1 : How to load image outside context when different options selected in t:select?
From:       Woei Jye Wesley Too <wj.too () bostongroup ! com ! my>
Date:       2013-06-26 16:59:28
Message-ID: CAApAbLjCQajWc3BkkLinGiqiDkc39QGW-d45hrT2E=4P2pxN=A () mail ! gmail ! com
[Download RAW message or body]


the example shown were loaded during onEvent, assume that i can get the
image loaded with inputstream and return as StreamResponse; upon changing
selection as this for my t:select component

@InjectComponent private Zone showPictureZone;

@OnEvent(value=EventConstants.VALUE_CHANGED,component="packageSelection")
public Object onPackageSelection(PackageObj theObj){
//Read Image as streamresponse and generate a url link and embed inside img
tag
return showPictureZone.getBody();
}

how do i create a url embed inside <img src/> ?

the tml is as follow:

<t:select  t:id="packageSelection" t:model="cnbfSelectModel"
t:blankLabel="please select" t:blankOption="always"
 t:value="selectedPackType" t:encoder="le2uProductEncoder"
zone="showPictureZone"/>
<t:zone t:id="showPictureZone">
    <img src="${???}"/>
</t:zone>

please advice,


On Wed, Jun 26, 2013 at 5:45 PM, Lance Java <lance.java@googlemail.com>wrote:

> There's two options, both listed here
>
>
> http://stackoverflow.com/questions/16914673/serve-images-outside-web-application
>
> Be warned that using a local directory has issues with security,
> portability, transactions, clustering and thread safety. You might want to
> consider using a database or Amazon s3 etc.
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic