You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by James Hays <ja...@mac.com> on 2003/08/15 17:02:59 UTC

Image Component example is incorrect

Looking in the Image component documentation, the last line that returns 
an IAsset from an ExternalAsset

This is the line in question.

public IAsset getImageAsset() { return new ExternalAsset <http://jakarta.apache.org/tapestry/doc/api/org/apache/tapestry/asset/ExternalAsset.html>(imageURL); }    

The ExternalAsset constructor is:
|*ExternalAsset <http://jakarta.apache.org/tapestry/doc/api/org/apache/tapestry/asset/ExternalAsset.html#ExternalAsset%28java.lang.String,%20org.apache.tapestry.ILocation%29>*(String <http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html> URL,
              ILocation <http://jakarta.apache.org/tapestry/doc/api/org/apache/tapestry/ILocation.html> location)

Can someone veryify this and tell me what location is referring to.

Thanks.

James

|




Re: Image Component example is incorrect

Posted by Geoff Longman <gl...@intelligentworks.com>.
I took a quick look at the framework code. In the case of an ExternalAsset
it should be ok to pass null.

Your mileage may vary as I have not tried it out.

Cheers,

Geoff
----- Original Message -----
From: "James Hays" <ja...@mac.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Sunday, August 17, 2003 7:00 PM
Subject: Re: Image Component example is incorrect


> So, should it be null or how do I handle this.  I will be doing the same
> type of thing in my application.
>
> James
>
> Geoff Longman wrote:
> > The code snippet in the componen ref example is out of date.
> >
> > The ILocation is used internally by the framework to record the location
of
> > the spec file that defined the asset. The location is used by Tapestry
when
> > generating the Exception page. The example given is dynamicaly creating
an
> > External asset, so there would be no location to specify.
> >
> > You should add a bug to Bugzilla.
> >
> > Cheers,
> >
> > Geoff
> > ----- Original Message -----
> > From: "James Hays" <ja...@mac.com>
> > To: "'Tapestry users'" <ta...@jakarta.apache.org>
> > Sent: Friday, August 15, 2003 11:02 AM
> > Subject: Image Component example is incorrect
> >
> >
> >
> >>Looking in the Image component documentation, the last line that returns
> >>an IAsset from an ExternalAsset
> >>
> >>This is the line in question.
> >>
> >>public IAsset getImageAsset() { return new ExternalAsset
> >
> >
<http://jakarta.apache.org/tapestry/doc/api/org/apache/tapestry/asset/Extern
> > alAsset.html>(imageURL); }
> >
> >>The ExternalAsset constructor is:
> >>|*ExternalAsset
> >
> >
<http://jakarta.apache.org/tapestry/doc/api/org/apache/tapestry/asset/Extern
> >
alAsset.html#ExternalAsset%28java.lang.String,%20org.apache.tapestry.ILocati
> > on%29>*(String
> > <http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html>
URL,
> >
> >>              ILocation
> >
> >
<http://jakarta.apache.org/tapestry/doc/api/org/apache/tapestry/ILocation.ht
> > ml> location)
> >
> >>Can someone veryify this and tell me what location is referring to.
> >>
> >>Thanks.
> >>
> >>James
> >>
> >>|
> >>
> >>
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


Re: Image Component example is incorrect

Posted by James Hays <ja...@mac.com>.
So, should it be null or how do I handle this.  I will be doing the same 
type of thing in my application.

James

Geoff Longman wrote:
> The code snippet in the componen ref example is out of date.
> 
> The ILocation is used internally by the framework to record the location of
> the spec file that defined the asset. The location is used by Tapestry when
> generating the Exception page. The example given is dynamicaly creating an
> External asset, so there would be no location to specify.
> 
> You should add a bug to Bugzilla.
> 
> Cheers,
> 
> Geoff
> ----- Original Message -----
> From: "James Hays" <ja...@mac.com>
> To: "'Tapestry users'" <ta...@jakarta.apache.org>
> Sent: Friday, August 15, 2003 11:02 AM
> Subject: Image Component example is incorrect
> 
> 
> 
>>Looking in the Image component documentation, the last line that returns
>>an IAsset from an ExternalAsset
>>
>>This is the line in question.
>>
>>public IAsset getImageAsset() { return new ExternalAsset
> 
> <http://jakarta.apache.org/tapestry/doc/api/org/apache/tapestry/asset/Extern
> alAsset.html>(imageURL); }
> 
>>The ExternalAsset constructor is:
>>|*ExternalAsset
> 
> <http://jakarta.apache.org/tapestry/doc/api/org/apache/tapestry/asset/Extern
> alAsset.html#ExternalAsset%28java.lang.String,%20org.apache.tapestry.ILocati
> on%29>*(String
> <http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html> URL,
> 
>>              ILocation
> 
> <http://jakarta.apache.org/tapestry/doc/api/org/apache/tapestry/ILocation.ht
> ml> location)
> 
>>Can someone veryify this and tell me what location is referring to.
>>
>>Thanks.
>>
>>James
>>
>>|
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 


Re: Image Component example is incorrect

Posted by Geoff Longman <gl...@intelligentworks.com>.
The code snippet in the componen ref example is out of date.

The ILocation is used internally by the framework to record the location of
the spec file that defined the asset. The location is used by Tapestry when
generating the Exception page. The example given is dynamicaly creating an
External asset, so there would be no location to specify.

You should add a bug to Bugzilla.

Cheers,

Geoff
----- Original Message -----
From: "James Hays" <ja...@mac.com>
To: "'Tapestry users'" <ta...@jakarta.apache.org>
Sent: Friday, August 15, 2003 11:02 AM
Subject: Image Component example is incorrect


> Looking in the Image component documentation, the last line that returns
> an IAsset from an ExternalAsset
>
> This is the line in question.
>
> public IAsset getImageAsset() { return new ExternalAsset
<http://jakarta.apache.org/tapestry/doc/api/org/apache/tapestry/asset/Extern
alAsset.html>(imageURL); }
>
> The ExternalAsset constructor is:
> |*ExternalAsset
<http://jakarta.apache.org/tapestry/doc/api/org/apache/tapestry/asset/Extern
alAsset.html#ExternalAsset%28java.lang.String,%20org.apache.tapestry.ILocati
on%29>*(String
<http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html> URL,
>               ILocation
<http://jakarta.apache.org/tapestry/doc/api/org/apache/tapestry/ILocation.ht
ml> location)
>
> Can someone veryify this and tell me what location is referring to.
>
> Thanks.
>
> James
>
> |
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


Re: Image Component example is incorrect

Posted by James Hays <ja...@mac.com>.
Let me try this again.  Please look below for the question.

James Hays wrote:

> Looking in the Image component documentation, the last line that 
> returns an IAsset from an ExternalAsset
>
> This is the line in question.
>
> public IAsset getImageAsset() { return new ExternalAsset(String URL); 
> }   
> The ExternalAsset constructor is:
> ExternalAsset (String  URL, ILocation  location)
>
> Can someone veryify this and tell me what location is referring to.
>
> Thanks.
>
> James
>
> |
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>