You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Filip S. Adamsen" <fs...@fsadev.com> on 2007/12/19 20:51:21 UTC

[T5] Tapestry 5 and IntelliJ IDEA

Hi there,

Just a quick question: Is there a way to prevent IDEA complaining about 
unresolvable symbols in .tml files? I get hundreds of "Cannot resolve 
symbol t:label" etc. when performing code analysis.

-Filip

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5] Tapestry 5 and IntelliJ IDEA

Posted by Zsolt Salamon <sa...@gmail.com>.
I use IDEA 7.0.2.

I use html extension not tml. So my templates is html type by default  
not xml.
If you add tml extension like html type that do the same too.

My every template is start with a html tag. The first tag is contains  
the xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd  
attribute.
I actually download this xsd file and put somewhere my hdd.
In IDEA preferences I select the Resources option and add this resource:

URI: http://tapestry.apache.org/schema/tapestry_5_0_0.xsd
PATH: $THE_PATH_WHERE_I_PUT_THIS_FILE/tapestry_5_0_0.xsd

In the "Inspection profile/HTML Inspections/Unknown HTML tag" I add  
the Tapestry own tags to the "Custom HTML tags".

That works fine for me. I hope this help for you.

The tapestry own tags I add
On Jan 3, 2008, at 09:58, Paudi Moriarty wrote:

> Yes, I used that intention to fetch the external resource and then  
> ended up
> with the same error.
>
> I tried to add xmlns="http://www.w3.org/1999/xhtml" to the <html>  
> element
> but that precludes using the tapestry namespace!
>
> I guess I can live with it, but it would be nice to have proper  
> validation.
>
> On 02/01/2008, Howard Lewis Ship <hl...@gmail.com> wrote:
>>
>> I'm on IDEA 7 and have no problems at all with this stuff.
>>
>> I can't remember doing any special configuration, beyond adding
>> "*.tml" as an XML file (in the File Types view of the preferences
>> panel).
>>
>> Hm. Actually, I do see one intention error, "URI is not registerred".
>>
>> Used the intention ... ok, now I'm getting the error "cannot find
>> declaration of not element html".
>>
>> On Jan 2, 2008 1:53 AM, Paudi Moriarty  
>> <pm...@annadaletech.com> wrote:
>>> Howard,
>>>
>>> You switched to Idea recently, does this work for you?
>>>
>>>
>>> On 21/12/2007, Paudi Moriarty <pm...@annadaletech.com> wrote:
>>>>
>>>>>> There is probably an easier way to do it, and it probably doesn't
>> (or
>>>>>> shouldn't) happen if you associate the file as an xml file type.
>>>>
>>>> I have associated *.tml with the XML file type and have the same
>> problem.
>>>> Attributes are recognised as being part of the namespace but tags
>> aren't and
>>>> produce "Cannot resolve symbol t:xxxx" errors.
>>>>
>>>> Has anyone got this to work?
>>>>
>>>> On 19/12/2007, Jesse Kuhnert <jk...@gmail.com> wrote:
>>>>>
>>>>> -) Go to Settings -> Errors ->  choose either the global ide  
>>>>> profile
>> or
>>>>> a
>>>>> project specific profile
>>>>> -) Go to Inspections -> HTML Inspections -> Unknown HTML tag
>> attribute
>>>>> -) Add whatever attribute tags you want under "Custom HTML tag
>>>>> attributes"
>>>>> on the left.
>>>>>
>>>>> There is probably an easier way to do it,  and it probably doesn't
>> (or
>>>>> shouldn't) happen if you associate the file as an xml file type.
>>>>>
>>>>> On Dec 19, 2007 3:26 PM, Filip S. Adamsen < fsa@fsadev.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Thank you for the tips. Now IDEA is complaining that "t:label is
>> not
>>>>>> allowed here" etc. Am I missing something? I'd really just like
>> IDEA
>>>>> to
>>>>>> mind its own business wrt. the Tapestry-related tags etc. in my
>>>>> templates.
>>>>>>
>>>>>> -Filip
>>>>>>
>>>>>> Michael Lake skrev:
>>>>>>> Filip,
>>>>>>>
>>>>>>> make sure your encapsulating tags define the "t" namespace.
>>>>>>>
>>>>>>> <html xmlns:t="
>> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd
>>>>> ">
>>>>>>> MAIN BODY HERE
>>>>>>> </html>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> also, in your settings under "file types", make sure you've got
>> .tml
>>>>>>> under the XML file type.
>>>>>>>
>>>>>>> if the reference to the .xsd is red, put the cursor on it, wait
>> for
>>>>> the
>>>>>>> red light bulb on the left, then click "fetch external resource"
>>>>>>>
>>>>>>> -mike
>>>>>>>
>>>>>>> Filip S. Adamsen wrote:
>>>>>>>> Hi there,
>>>>>>>>
>>>>>>>> Just a quick question: Is there a way to prevent IDEA
>> complaining
>>>>>>>> about unresolvable symbols in .tml files? I get hundreds of
>> "Cannot
>>>>>>>> resolve symbol t:label" etc. when performing code analysis.
>>>>>>>>
>>>>>>>> -Filip
>>>>>>>>
>>>>>>>>
>>>>>
>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Jesse Kuhnert
>>>>> Tapestry / OGNL / Dojo team member/developer
>>>>>
>>>>> Open source based consulting work centered around
>>>>> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>>>>>
>>>>
>>>>
>>>
>>
>>
>>
>> --
>> Howard M. Lewis Ship
>>
>> Creator Apache Tapestry and Apache HiveMind
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5] Tapestry 5 and IntelliJ IDEA

Posted by Paudi Moriarty <pm...@annadaletech.com>.
Yes, I used that intention to fetch the external resource and then ended up
with the same error.

I tried to add xmlns="http://www.w3.org/1999/xhtml" to the <html> element
but that precludes using the tapestry namespace!

I guess I can live with it, but it would be nice to have proper validation.

On 02/01/2008, Howard Lewis Ship <hl...@gmail.com> wrote:
>
> I'm on IDEA 7 and have no problems at all with this stuff.
>
> I can't remember doing any special configuration, beyond adding
> "*.tml" as an XML file (in the File Types view of the preferences
> panel).
>
> Hm. Actually, I do see one intention error, "URI is not registerred".
>
> Used the intention ... ok, now I'm getting the error "cannot find
> declaration of not element html".
>
> On Jan 2, 2008 1:53 AM, Paudi Moriarty <pm...@annadaletech.com> wrote:
> > Howard,
> >
> > You switched to Idea recently, does this work for you?
> >
> >
> > On 21/12/2007, Paudi Moriarty <pm...@annadaletech.com> wrote:
> > >
> > > >> There is probably an easier way to do it, and it probably doesn't
> (or
> > > >> shouldn't) happen if you associate the file as an xml file type.
> > >
> > > I have associated *.tml with the XML file type and have the same
> problem.
> > > Attributes are recognised as being part of the namespace but tags
> aren't and
> > > produce "Cannot resolve symbol t:xxxx" errors.
> > >
> > > Has anyone got this to work?
> > >
> > > On 19/12/2007, Jesse Kuhnert <jk...@gmail.com> wrote:
> > > >
> > > > -) Go to Settings -> Errors ->  choose either the global ide profile
> or
> > > > a
> > > > project specific profile
> > > > -) Go to Inspections -> HTML Inspections -> Unknown HTML tag
> attribute
> > > > -) Add whatever attribute tags you want under "Custom HTML tag
> > > > attributes"
> > > > on the left.
> > > >
> > > > There is probably an easier way to do it,  and it probably doesn't
> (or
> > > > shouldn't) happen if you associate the file as an xml file type.
> > > >
> > > > On Dec 19, 2007 3:26 PM, Filip S. Adamsen < fsa@fsadev.com> wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > Thank you for the tips. Now IDEA is complaining that "t:label is
> not
> > > > > allowed here" etc. Am I missing something? I'd really just like
> IDEA
> > > > to
> > > > > mind its own business wrt. the Tapestry-related tags etc. in my
> > > > templates.
> > > > >
> > > > > -Filip
> > > > >
> > > > > Michael Lake skrev:
> > > > > > Filip,
> > > > > >
> > > > > > make sure your encapsulating tags define the "t" namespace.
> > > > > >
> > > > > > <html xmlns:t="
> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd
> > > > ">
> > > > > > MAIN BODY HERE
> > > > > > </html>
> > > > > >
> > > > > >
> > > > > >
> > > > > > also, in your settings under "file types", make sure you've got
> .tml
> > > > > > under the XML file type.
> > > > > >
> > > > > > if the reference to the .xsd is red, put the cursor on it, wait
> for
> > > > the
> > > > > > red light bulb on the left, then click "fetch external resource"
> > > > > >
> > > > > > -mike
> > > > > >
> > > > > > Filip S. Adamsen wrote:
> > > > > >> Hi there,
> > > > > >>
> > > > > >> Just a quick question: Is there a way to prevent IDEA
> complaining
> > > > > >> about unresolvable symbols in .tml files? I get hundreds of
> "Cannot
> > > > > >> resolve symbol t:label" etc. when performing code analysis.
> > > > > >>
> > > > > >> -Filip
> > > > > >>
> > > > > >>
> > > >
> ---------------------------------------------------------------------
> > > > > >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > >> For additional commands, e-mail: users-help@tapestry.apache.org
> > > > > >>
> > > > > >
> > > > > >
> > > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Jesse Kuhnert
> > > > Tapestry / OGNL / Dojo team member/developer
> > > >
> > > > Open source based consulting work centered around
> > > > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> > > >
> > >
> > >
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: [T5] Tapestry 5 and IntelliJ IDEA

Posted by Howard Lewis Ship <hl...@gmail.com>.
I'm on IDEA 7 and have no problems at all with this stuff.

I can't remember doing any special configuration, beyond adding
"*.tml" as an XML file (in the File Types view of the preferences
panel).

Hm. Actually, I do see one intention error, "URI is not registerred".

Used the intention ... ok, now I'm getting the error "cannot find
declaration of not element html".

On Jan 2, 2008 1:53 AM, Paudi Moriarty <pm...@annadaletech.com> wrote:
> Howard,
>
> You switched to Idea recently, does this work for you?
>
>
> On 21/12/2007, Paudi Moriarty <pm...@annadaletech.com> wrote:
> >
> > >> There is probably an easier way to do it, and it probably doesn't (or
> > >> shouldn't) happen if you associate the file as an xml file type.
> >
> > I have associated *.tml with the XML file type and have the same problem.
> > Attributes are recognised as being part of the namespace but tags aren't and
> > produce "Cannot resolve symbol t:xxxx" errors.
> >
> > Has anyone got this to work?
> >
> > On 19/12/2007, Jesse Kuhnert <jk...@gmail.com> wrote:
> > >
> > > -) Go to Settings -> Errors ->  choose either the global ide profile or
> > > a
> > > project specific profile
> > > -) Go to Inspections -> HTML Inspections -> Unknown HTML tag attribute
> > > -) Add whatever attribute tags you want under "Custom HTML tag
> > > attributes"
> > > on the left.
> > >
> > > There is probably an easier way to do it,  and it probably doesn't (or
> > > shouldn't) happen if you associate the file as an xml file type.
> > >
> > > On Dec 19, 2007 3:26 PM, Filip S. Adamsen < fsa@fsadev.com> wrote:
> > >
> > > > Hi,
> > > >
> > > > Thank you for the tips. Now IDEA is complaining that "t:label is not
> > > > allowed here" etc. Am I missing something? I'd really just like IDEA
> > > to
> > > > mind its own business wrt. the Tapestry-related tags etc. in my
> > > templates.
> > > >
> > > > -Filip
> > > >
> > > > Michael Lake skrev:
> > > > > Filip,
> > > > >
> > > > > make sure your encapsulating tags define the "t" namespace.
> > > > >
> > > > > <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd
> > > ">
> > > > > MAIN BODY HERE
> > > > > </html>
> > > > >
> > > > >
> > > > >
> > > > > also, in your settings under "file types", make sure you've got .tml
> > > > > under the XML file type.
> > > > >
> > > > > if the reference to the .xsd is red, put the cursor on it, wait for
> > > the
> > > > > red light bulb on the left, then click "fetch external resource"
> > > > >
> > > > > -mike
> > > > >
> > > > > Filip S. Adamsen wrote:
> > > > >> Hi there,
> > > > >>
> > > > >> Just a quick question: Is there a way to prevent IDEA complaining
> > > > >> about unresolvable symbols in .tml files? I get hundreds of "Cannot
> > > > >> resolve symbol t:label" etc. when performing code analysis.
> > > > >>
> > > > >> -Filip
> > > > >>
> > > > >>
> > > ---------------------------------------------------------------------
> > > > >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > >> For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >>
> > > > >
> > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Jesse Kuhnert
> > > Tapestry / OGNL / Dojo team member/developer
> > >
> > > Open source based consulting work centered around
> > > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> > >
> >
> >
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5] Tapestry 5 and IntelliJ IDEA

Posted by Paudi Moriarty <pm...@annadaletech.com>.
Howard,

You switched to Idea recently, does this work for you?

On 21/12/2007, Paudi Moriarty <pm...@annadaletech.com> wrote:
>
> >> There is probably an easier way to do it, and it probably doesn't (or
> >> shouldn't) happen if you associate the file as an xml file type.
>
> I have associated *.tml with the XML file type and have the same problem.
> Attributes are recognised as being part of the namespace but tags aren't and
> produce "Cannot resolve symbol t:xxxx" errors.
>
> Has anyone got this to work?
>
> On 19/12/2007, Jesse Kuhnert <jk...@gmail.com> wrote:
> >
> > -) Go to Settings -> Errors ->  choose either the global ide profile or
> > a
> > project specific profile
> > -) Go to Inspections -> HTML Inspections -> Unknown HTML tag attribute
> > -) Add whatever attribute tags you want under "Custom HTML tag
> > attributes"
> > on the left.
> >
> > There is probably an easier way to do it,  and it probably doesn't (or
> > shouldn't) happen if you associate the file as an xml file type.
> >
> > On Dec 19, 2007 3:26 PM, Filip S. Adamsen < fsa@fsadev.com> wrote:
> >
> > > Hi,
> > >
> > > Thank you for the tips. Now IDEA is complaining that "t:label is not
> > > allowed here" etc. Am I missing something? I'd really just like IDEA
> > to
> > > mind its own business wrt. the Tapestry-related tags etc. in my
> > templates.
> > >
> > > -Filip
> > >
> > > Michael Lake skrev:
> > > > Filip,
> > > >
> > > > make sure your encapsulating tags define the "t" namespace.
> > > >
> > > > <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd
> > ">
> > > > MAIN BODY HERE
> > > > </html>
> > > >
> > > >
> > > >
> > > > also, in your settings under "file types", make sure you've got .tml
> > > > under the XML file type.
> > > >
> > > > if the reference to the .xsd is red, put the cursor on it, wait for
> > the
> > > > red light bulb on the left, then click "fetch external resource"
> > > >
> > > > -mike
> > > >
> > > > Filip S. Adamsen wrote:
> > > >> Hi there,
> > > >>
> > > >> Just a quick question: Is there a way to prevent IDEA complaining
> > > >> about unresolvable symbols in .tml files? I get hundreds of "Cannot
> > > >> resolve symbol t:label" etc. when performing code analysis.
> > > >>
> > > >> -Filip
> > > >>
> > > >>
> > ---------------------------------------------------------------------
> > > >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > >> For additional commands, e-mail: users-help@tapestry.apache.org
> > > >>
> > > >
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
> > --
> > Jesse Kuhnert
> > Tapestry / OGNL / Dojo team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> >
>
>

Re: [T5] Tapestry 5 and IntelliJ IDEA

Posted by Paudi Moriarty <pm...@annadaletech.com>.
>> There is probably an easier way to do it, and it probably doesn't (or
>> shouldn't) happen if you associate the file as an xml file type.

I have associated *.tml with the XML file type and have the same problem.
Attributes are recognised as being part of the namespace but tags aren't and
produce "Cannot resolve symbol t:xxxx" errors.

Has anyone got this to work?

On 19/12/2007, Jesse Kuhnert <jk...@gmail.com> wrote:
>
> -) Go to Settings -> Errors ->  choose either the global ide profile or a
> project specific profile
> -) Go to Inspections -> HTML Inspections -> Unknown HTML tag attribute
> -) Add whatever attribute tags you want under "Custom HTML tag attributes"
> on the left.
>
> There is probably an easier way to do it,  and it probably doesn't (or
> shouldn't) happen if you associate the file as an xml file type.
>
> On Dec 19, 2007 3:26 PM, Filip S. Adamsen <fs...@fsadev.com> wrote:
>
> > Hi,
> >
> > Thank you for the tips. Now IDEA is complaining that "t:label is not
> > allowed here" etc. Am I missing something? I'd really just like IDEA to
> > mind its own business wrt. the Tapestry-related tags etc. in my
> templates.
> >
> > -Filip
> >
> > Michael Lake skrev:
> > > Filip,
> > >
> > > make sure your encapsulating tags define the "t" namespace.
> > >
> > > <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
> > > MAIN BODY HERE
> > > </html>
> > >
> > >
> > >
> > > also, in your settings under "file types", make sure you've got .tml
> > > under the XML file type.
> > >
> > > if the reference to the .xsd is red, put the cursor on it, wait for
> the
> > > red light bulb on the left, then click "fetch external resource"
> > >
> > > -mike
> > >
> > > Filip S. Adamsen wrote:
> > >> Hi there,
> > >>
> > >> Just a quick question: Is there a way to prevent IDEA complaining
> > >> about unresolvable symbols in .tml files? I get hundreds of "Cannot
> > >> resolve symbol t:label" etc. when performing code analysis.
> > >>
> > >> -Filip
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > >> For additional commands, e-mail: users-help@tapestry.apache.org
> > >>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry / OGNL / Dojo team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>

StreamResponse in Tapestry 4.1

Posted by mu...@fantasymail.de.
Is there an alternative way for outputting binary data in Tapestry 4.1
without the T5 specific StreamResponse?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: PrivateAsset example please

Posted by mu...@fantasymail.de.
IAsset image = getEngine().getInfrastructure().getAssetFactory().createAbsoluteAsset(
				"z\\0001.JPG",
				getLocale(),
				getLocation()
		);

This results in:

java.lang.IllegalArgumentException
Could not find a strategy instance for class java.lang.String.
Stack Trace:

      org.apache.hivemind.lib.util.StrategyRegistryImpl.searchForAdaptor(StrategyRegistryImpl.java:176) org.apache.hivemind.lib.util.StrategyRegistryImpl.getStrategy(StrategyRegistryImpl.java:74) $AssetFactory_11777dea53e._getStrategy($AssetFactory_11777dea53e.java) $AssetFactory_11777dea53e.createAbsoluteAsset($AssetFactory_11777dea53e.java) $AssetFactory_11777dea3df.createAbsoluteAsset($AssetFactory_11777dea3df.java)

-------- Original-Nachricht --------
> Datum: Tue, 8 Jan 2008 13:10:04 -0500
> Von: "Daniel Jue" <te...@gmail.com>
> An: "Tapestry users" <us...@tapestry.apache.org>
> Betreff: Re: PrivateAsset example please

> um, I meant "done this way"
> 
> On 1/8/08, Daniel Jue <te...@gmail.com> wrote:
> > It could also be dont this way:
> > http://wiki.apache.org/tapestry/Tapestry5HowToStreamAnExistingBinaryFile
> >
> > On 1/8/08, Igor Drobiazko <ig...@gmail.com> wrote:
> > > Have a look at HiveMind API.
> > >
> >
> http://hivemind.apache.org/hivemind1/hivemind/apidocs/org/apache/hivemind/impl/LocationImpl.html
> > >
> >
> http://hivemind.apache.org/hivemind1/hivemind/apidocs/org/apache/hivemind/util/URLResource.html
> > >
> > > If I would be you, I would rethink the architecture. How do you want
> to
> > > access images when you go online?
> > >
> > > On Jan 8, 2008 5:37 PM, <mu...@fantasymail.de> wrote:
> > >
> > > > Do you have an example?
> > > >
> > > > What is the path? Relativ so the classpath?
> > > > How do I create a location object ?
> > > >
> > > > Do I need to set:
> > > >
> > > >
> > > >        <meta key="org.apache.tapestry.asset.dir"
> > > > value="file:///Z:/Media/"/>
> > > >
> > > > as well or would that expose the whole directoy to anyone?
> > > >
> > > >
> > > > I wish there was an example somewhere.....
> > > >
> > > >
> > > > -------- Original-Nachricht --------
> > > > > Datum: Tue, 8 Jan 2008 18:20:34 +0200
> > > > > Von: "Andreas Andreou" <an...@gmail.com>
> > > > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > > > Betreff: Re: PrivateAsset example please
> > > >
> > > > > Hi, those Assets implementations are easier to create through the
> > > > > AssetFactory services...
> > > > >
> > > > > For instance, there's a ClasspathAssetFactory, so perhaps use its
> > > > > IAsset createAbsoluteAsset(String path, Locale locale, Location
> > > > location)
> > > > >
> > > > >
> > > >
> > >
> >
> http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/asset/ClasspathAssetFactory.html
> > > > >
> > > > >
> > > > > On Jan 8, 2008 5:46 PM,  <mu...@fantasymail.de> wrote:
> > > > > > PrivateAsset takes the following parameters:
> > > > > >
> > > > > > Resource resourceLocation, IEngineService assetService, Location
> > > > > location
> > > > > >
> > > > > > The images are in another directory on a different disk....the
> > > > directory
> > > > > is on the classpath...so the image should be in:
> > > > > >
> > > > > > someimages/picture.jpg
> > > > > >
> > > > > > How do I create a resourcelocation, how do I get the
> assetService
> > and
> > > > > how the location?
> > > > > >
> > > > > > Thanks!
> > > > > >
> > > > > >
> > > > > >
> > > > > > -------- Original-Nachricht --------
> > > > > > > Datum: Tue, 08 Jan 2008 16:24:41 +0100
> > > > > > > Von: munich@fantasymail.de
> > > > > >
> > > > > > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > > > > > Betreff: Re: PrivateAsset example please
> > > > > >
> > > > > > > Thanks. There are no exmaples on these pages though.
> > > > > > >
> > > > > > > public IAsset getScreenshot(String name){
> > > > > > >
> > > > > > >                       return new
> > > > > ExternalAsset("thumbs/".concat(name).concat(".JPG"), null);
> > > > > > >
> > > > > > > I have tried this also:
> > > > > > >
> > > > > > > So if I used PrivateAsset what do the paramters look like?
> > > > > > >
> > > > > > > Just a short example would be cool....
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > -------- Original-Nachricht --------
> > > > > > > > Datum: Tue, 8 Jan 2008 14:36:51 +0200
> > > > > > > > Von: "Andreas Andreou" <an...@gmail.com>
> > > > > > > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > > > > > > Betreff: Re: PrivateAsset example please
> > > > > > >
> > > > > > > > it's auto-used when it's a classpath asset...
> > > > > > > > see
> > > > > > > >
> > > > >
> http://tapestry.apache.org/tapestry4.1/usersguide/spec.html#spec.asset
> > > > > > > > and
> > > > > > > >
> > > > >
> http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html
> > > > > > > > (InjectAsset)
> > > > > > > >
> > > > > > > > On Jan 8, 2008 2:02 PM,  <mu...@fantasymail.de> wrote:
> > > > > > > > > I wonder who this works:
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > >
> > > >
> > >
> >
> http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/asset/PrivateAsset.html
> > > > > > > > >
> > > > > > > > > How do I use the PrivateAsset component?
> > > > > > > > >
> > > > > > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> > > > > > > > > For additional commands, e-mail:
> > users-help@tapestry.apache.org
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Andreas Andreou - andyhot@apache.org -
> http://blog.andyhot.gr
> > > > > > > > Tapestry / Tacos developer
> > > > > > > > Open Source / JEE Consulting
> > > > > > > >
> > > > > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> > > > > > > > For additional commands, e-mail:
> users-help@tapestry.apache.org
> > > > > > >
> > > > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > > For additional commands, e-mail:
> users-help@tapestry.apache.org
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> > > > > Tapestry / Tacos developer
> > > > > Open Source / JEE Consulting
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Best regards,
> > >
> > > Igor Drobiazko
> > >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: PrivateAsset example please

Posted by Daniel Jue <te...@gmail.com>.
um, I meant "done this way"

On 1/8/08, Daniel Jue <te...@gmail.com> wrote:
> It could also be dont this way:
> http://wiki.apache.org/tapestry/Tapestry5HowToStreamAnExistingBinaryFile
>
> On 1/8/08, Igor Drobiazko <ig...@gmail.com> wrote:
> > Have a look at HiveMind API.
> >
> http://hivemind.apache.org/hivemind1/hivemind/apidocs/org/apache/hivemind/impl/LocationImpl.html
> >
> http://hivemind.apache.org/hivemind1/hivemind/apidocs/org/apache/hivemind/util/URLResource.html
> >
> > If I would be you, I would rethink the architecture. How do you want to
> > access images when you go online?
> >
> > On Jan 8, 2008 5:37 PM, <mu...@fantasymail.de> wrote:
> >
> > > Do you have an example?
> > >
> > > What is the path? Relativ so the classpath?
> > > How do I create a location object ?
> > >
> > > Do I need to set:
> > >
> > >
> > >        <meta key="org.apache.tapestry.asset.dir"
> > > value="file:///Z:/Media/"/>
> > >
> > > as well or would that expose the whole directoy to anyone?
> > >
> > >
> > > I wish there was an example somewhere.....
> > >
> > >
> > > -------- Original-Nachricht --------
> > > > Datum: Tue, 8 Jan 2008 18:20:34 +0200
> > > > Von: "Andreas Andreou" <an...@gmail.com>
> > > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > > Betreff: Re: PrivateAsset example please
> > >
> > > > Hi, those Assets implementations are easier to create through the
> > > > AssetFactory services...
> > > >
> > > > For instance, there's a ClasspathAssetFactory, so perhaps use its
> > > > IAsset createAbsoluteAsset(String path, Locale locale, Location
> > > location)
> > > >
> > > >
> > >
> >
> http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/asset/ClasspathAssetFactory.html
> > > >
> > > >
> > > > On Jan 8, 2008 5:46 PM,  <mu...@fantasymail.de> wrote:
> > > > > PrivateAsset takes the following parameters:
> > > > >
> > > > > Resource resourceLocation, IEngineService assetService, Location
> > > > location
> > > > >
> > > > > The images are in another directory on a different disk....the
> > > directory
> > > > is on the classpath...so the image should be in:
> > > > >
> > > > > someimages/picture.jpg
> > > > >
> > > > > How do I create a resourcelocation, how do I get the assetService
> and
> > > > how the location?
> > > > >
> > > > > Thanks!
> > > > >
> > > > >
> > > > >
> > > > > -------- Original-Nachricht --------
> > > > > > Datum: Tue, 08 Jan 2008 16:24:41 +0100
> > > > > > Von: munich@fantasymail.de
> > > > >
> > > > > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > > > > Betreff: Re: PrivateAsset example please
> > > > >
> > > > > > Thanks. There are no exmaples on these pages though.
> > > > > >
> > > > > > public IAsset getScreenshot(String name){
> > > > > >
> > > > > >                       return new
> > > > ExternalAsset("thumbs/".concat(name).concat(".JPG"), null);
> > > > > >
> > > > > > I have tried this also:
> > > > > >
> > > > > > So if I used PrivateAsset what do the paramters look like?
> > > > > >
> > > > > > Just a short example would be cool....
> > > > > >
> > > > > >
> > > > > >
> > > > > > -------- Original-Nachricht --------
> > > > > > > Datum: Tue, 8 Jan 2008 14:36:51 +0200
> > > > > > > Von: "Andreas Andreou" <an...@gmail.com>
> > > > > > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > > > > > Betreff: Re: PrivateAsset example please
> > > > > >
> > > > > > > it's auto-used when it's a classpath asset...
> > > > > > > see
> > > > > > >
> > > > http://tapestry.apache.org/tapestry4.1/usersguide/spec.html#spec.asset
> > > > > > > and
> > > > > > >
> > > > http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html
> > > > > > > (InjectAsset)
> > > > > > >
> > > > > > > On Jan 8, 2008 2:02 PM,  <mu...@fantasymail.de> wrote:
> > > > > > > > I wonder who this works:
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > >
> > >
> >
> http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/asset/PrivateAsset.html
> > > > > > > >
> > > > > > > > How do I use the PrivateAsset component?
> > > > > > > >
> > > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > > > For additional commands, e-mail:
> users-help@tapestry.apache.org
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> > > > > > > Tapestry / Tacos developer
> > > > > > > Open Source / JEE Consulting
> > > > > > >
> > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > > >
> > > > > >
> > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> > > > Tapestry / Tacos developer
> > > > Open Source / JEE Consulting
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
> > --
> > Best regards,
> >
> > Igor Drobiazko
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: PrivateAsset example please

Posted by Daniel Jue <te...@gmail.com>.
It could also be dont this way:
http://wiki.apache.org/tapestry/Tapestry5HowToStreamAnExistingBinaryFile

On 1/8/08, Igor Drobiazko <ig...@gmail.com> wrote:
> Have a look at HiveMind API.
> http://hivemind.apache.org/hivemind1/hivemind/apidocs/org/apache/hivemind/impl/LocationImpl.html
> http://hivemind.apache.org/hivemind1/hivemind/apidocs/org/apache/hivemind/util/URLResource.html
>
> If I would be you, I would rethink the architecture. How do you want to
> access images when you go online?
>
> On Jan 8, 2008 5:37 PM, <mu...@fantasymail.de> wrote:
>
> > Do you have an example?
> >
> > What is the path? Relativ so the classpath?
> > How do I create a location object ?
> >
> > Do I need to set:
> >
> >
> >        <meta key="org.apache.tapestry.asset.dir"
> > value="file:///Z:/Media/"/>
> >
> > as well or would that expose the whole directoy to anyone?
> >
> >
> > I wish there was an example somewhere.....
> >
> >
> > -------- Original-Nachricht --------
> > > Datum: Tue, 8 Jan 2008 18:20:34 +0200
> > > Von: "Andreas Andreou" <an...@gmail.com>
> > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > Betreff: Re: PrivateAsset example please
> >
> > > Hi, those Assets implementations are easier to create through the
> > > AssetFactory services...
> > >
> > > For instance, there's a ClasspathAssetFactory, so perhaps use its
> > > IAsset createAbsoluteAsset(String path, Locale locale, Location
> > location)
> > >
> > >
> >
> http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/asset/ClasspathAssetFactory.html
> > >
> > >
> > > On Jan 8, 2008 5:46 PM,  <mu...@fantasymail.de> wrote:
> > > > PrivateAsset takes the following parameters:
> > > >
> > > > Resource resourceLocation, IEngineService assetService, Location
> > > location
> > > >
> > > > The images are in another directory on a different disk....the
> > directory
> > > is on the classpath...so the image should be in:
> > > >
> > > > someimages/picture.jpg
> > > >
> > > > How do I create a resourcelocation, how do I get the assetService and
> > > how the location?
> > > >
> > > > Thanks!
> > > >
> > > >
> > > >
> > > > -------- Original-Nachricht --------
> > > > > Datum: Tue, 08 Jan 2008 16:24:41 +0100
> > > > > Von: munich@fantasymail.de
> > > >
> > > > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > > > Betreff: Re: PrivateAsset example please
> > > >
> > > > > Thanks. There are no exmaples on these pages though.
> > > > >
> > > > > public IAsset getScreenshot(String name){
> > > > >
> > > > >                       return new
> > > ExternalAsset("thumbs/".concat(name).concat(".JPG"), null);
> > > > >
> > > > > I have tried this also:
> > > > >
> > > > > So if I used PrivateAsset what do the paramters look like?
> > > > >
> > > > > Just a short example would be cool....
> > > > >
> > > > >
> > > > >
> > > > > -------- Original-Nachricht --------
> > > > > > Datum: Tue, 8 Jan 2008 14:36:51 +0200
> > > > > > Von: "Andreas Andreou" <an...@gmail.com>
> > > > > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > > > > Betreff: Re: PrivateAsset example please
> > > > >
> > > > > > it's auto-used when it's a classpath asset...
> > > > > > see
> > > > > >
> > > http://tapestry.apache.org/tapestry4.1/usersguide/spec.html#spec.asset
> > > > > > and
> > > > > >
> > > http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html
> > > > > > (InjectAsset)
> > > > > >
> > > > > > On Jan 8, 2008 2:02 PM,  <mu...@fantasymail.de> wrote:
> > > > > > > I wonder who this works:
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > >
> >
> http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/asset/PrivateAsset.html
> > > > > > >
> > > > > > > How do I use the PrivateAsset component?
> > > > > > >
> > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> > > > > > Tapestry / Tacos developer
> > > > > > Open Source / JEE Consulting
> > > > > >
> > > > > >
> > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> > > Tapestry / Tacos developer
> > > Open Source / JEE Consulting
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Best regards,
>
> Igor Drobiazko
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: PrivateAsset example please

Posted by Igor Drobiazko <ig...@gmail.com>.
You can also create your own implementation of IAsset. Something like that:

public class YetAnotherAsset implements IAsset{
    private Resource resource;

    public YetAnotherAsset(Resource resource){
           this.resource=resource;
    }
    public String buildURL(){
        return resource.getPath();
    }
    public Resource getResourceLocation(){
         return this.resource;
    }
    public Resource getAsStream(){
           use IOUtils
    }
}

And put e.g
http://hivemind.apache.org/hivemind1/hivemind/apidocs/org/apache/hivemind/util/URLResource.htmlinto
the constructor

On Jan 8, 2008 6:40 PM, Andreas Andreou <an...@gmail.com> wrote:

> oh - I think i'd go for a custom IEngineService for that...
>
> i.e. something like :
>
>    public void service(IRequestCycle cycle) throws IOException {
>        String filename = cycle.getParameter("f");
>        String realFilename = imagesFolder + filename;
>        OutputStream responseOutputStream =
> response.getOutputStream(new ContentType("image/jpeg"));
>        InputStream stream = new FileInputStream(realFilename);
>        IOUtils.copy(stream, responseOutputStream);
>    }
>
> If you want to stick with the assets approach, you'd need your own
> implementation perhaps
>
> On Jan 8, 2008 7:25 PM,  <mu...@fantasymail.de> wrote:
> > Then, I just need to change the path somewhere I assume.
> >
> > It is 250 Gigabytes of image data and I do not want to war them every
> time I make a change during development...on the final system they will be
> on a linux machine so I can just make virtual directories and link to the
> storage.
> >
> > So do I need to use the hivemind.xml somehow ?
> >
> > It sounds really complicated just to have images from an external
> directory
> > outside of the war file / the web root....
> >
> >
> > -------- Original-Nachricht --------
> > > Datum: Tue, 8 Jan 2008 17:52:02 +0100
> > > Von: "Igor Drobiazko" <ig...@gmail.com>
> >
> > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > Betreff: Re: PrivateAsset example please
> >
> > > Have a look at HiveMind API.
> > >
> http://hivemind.apache.org/hivemind1/hivemind/apidocs/org/apache/hivemind/impl/LocationImpl.html
> > >
> http://hivemind.apache.org/hivemind1/hivemind/apidocs/org/apache/hivemind/util/URLResource.html
> > >
> > > If I would be you, I would rethink the architecture. How do you want
> to
> > > access images when you go online?
> > >
> > > On Jan 8, 2008 5:37 PM, <mu...@fantasymail.de> wrote:
> > >
> > > > Do you have an example?
> > > >
> > > > What is the path? Relativ so the classpath?
> > > > How do I create a location object ?
> > > >
> > > > Do I need to set:
> > > >
> > > >
> > > >        <meta key="org.apache.tapestry.asset.dir"
> > > > value="file:///Z:/Media/"/>
> > > >
> > > > as well or would that expose the whole directoy to anyone?
> > > >
> > > >
> > > > I wish there was an example somewhere.....
> > > >
> > > >
> > > > -------- Original-Nachricht --------
> > > > > Datum: Tue, 8 Jan 2008 18:20:34 +0200
> > > > > Von: "Andreas Andreou" <an...@gmail.com>
> > > > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > > > Betreff: Re: PrivateAsset example please
> > > >
> > > > > Hi, those Assets implementations are easier to create through the
> > > > > AssetFactory services...
> > > > >
> > > > > For instance, there's a ClasspathAssetFactory, so perhaps use its
> > > > > IAsset createAbsoluteAsset(String path, Locale locale, Location
> > > > location)
> > > > >
> > > > >
> > > >
> > >
> http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/asset/ClasspathAssetFactory.html
> > > > >
> > > > >
> > > > > On Jan 8, 2008 5:46 PM,  <mu...@fantasymail.de> wrote:
> > > > > > PrivateAsset takes the following parameters:
> > > > > >
> > > > > > Resource resourceLocation, IEngineService assetService, Location
> > > > > location
> > > > > >
> > > > > > The images are in another directory on a different disk....the
> > > > directory
> > > > > is on the classpath...so the image should be in:
> > > > > >
> > > > > > someimages/picture.jpg
> > > > > >
> > > > > > How do I create a resourcelocation, how do I get the
> assetService
> > > and
> > > > > how the location?
> > > > > >
> > > > > > Thanks!
> > > > > >
> > > > > >
> > > > > >
> > > > > > -------- Original-Nachricht --------
> > > > > > > Datum: Tue, 08 Jan 2008 16:24:41 +0100
> > > > > > > Von: munich@fantasymail.de
> > > > > >
> > > > > > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > > > > > Betreff: Re: PrivateAsset example please
> > > > > >
> > > > > > > Thanks. There are no exmaples on these pages though.
> > > > > > >
> > > > > > > public IAsset getScreenshot(String name){
> > > > > > >
> > > > > > >                       return new
> > > > > ExternalAsset("thumbs/".concat(name).concat(".JPG"), null);
> > > > > > >
> > > > > > > I have tried this also:
> > > > > > >
> > > > > > > So if I used PrivateAsset what do the paramters look like?
> > > > > > >
> > > > > > > Just a short example would be cool....
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > -------- Original-Nachricht --------
> > > > > > > > Datum: Tue, 8 Jan 2008 14:36:51 +0200
> > > > > > > > Von: "Andreas Andreou" <an...@gmail.com>
> > > > > > > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > > > > > > Betreff: Re: PrivateAsset example please
> > > > > > >
> > > > > > > > it's auto-used when it's a classpath asset...
> > > > > > > > see
> > > > > > > >
> > > > >
> http://tapestry.apache.org/tapestry4.1/usersguide/spec.html#spec.asset
> > > > > > > > and
> > > > > > > >
> > > > >
> http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html
> > > > > > > > (InjectAsset)
> > > > > > > >
> > > > > > > > On Jan 8, 2008 2:02 PM,  <mu...@fantasymail.de> wrote:
> > > > > > > > > I wonder who this works:
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > >
> > > >
> > >
> http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/asset/PrivateAsset.html
> > > > > > > > >
> > > > > > > > > How do I use the PrivateAsset component?
> > > > > > > > >
> > > > > > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> > > > > > > > > For additional commands, e-mail:
> > > users-help@tapestry.apache.org
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Andreas Andreou - andyhot@apache.org -
> http://blog.andyhot.gr
> > > > > > > > Tapestry / Tacos developer
> > > > > > > > Open Source / JEE Consulting
> > > > > > > >
> > > > > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> > > > > > > > For additional commands, e-mail:
> users-help@tapestry.apache.org
> > > > > > >
> > > > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > > For additional commands, e-mail:
> users-help@tapestry.apache.org
> > > > > >
> > > > > >
> > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> > > > > Tapestry / Tacos developer
> > > > > Open Source / JEE Consulting
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Best regards,
> > >
> > > Igor Drobiazko
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> Tapestry / Tacos developer
> Open Source / JEE Consulting
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Best regards,

Igor Drobiazko

Re: PrivateAsset example please

Posted by mu...@fantasymail.de.
So what does it do? The service method does not return/change anything?

And then, this service will be added to the Hivemind.xml? 
What does such a Hivemind configuration look like ?

Where do I add this "f" parameter ?

Would it be possible to add the following to Tapestry:

<span jwcic="@PrivateAsset" value="ognl:privateImage('key')"/>

public IAsset getPrivateImage(String key){

if (allowed){
return new PrivateImage("/home/images/".concat(key));
}
else {
return new PrivateImage("/home/images/forbidden.jpg");
}

}

This would it make a lot easier....and many might find it useful.


-------- Original-Nachricht --------
> Datum: Tue, 8 Jan 2008 19:40:00 +0200
> Von: "Andreas Andreou" <an...@gmail.com>
> An: "Tapestry users" <us...@tapestry.apache.org>
> Betreff: Re: PrivateAsset example please

> oh - I think i'd go for a custom IEngineService for that...
> 
> i.e. something like :
> 
>     public void service(IRequestCycle cycle) throws IOException {
>         String filename = cycle.getParameter("f");
>         String realFilename = imagesFolder + filename;
>         OutputStream responseOutputStream =
> response.getOutputStream(new ContentType("image/jpeg"));
>         InputStream stream = new FileInputStream(realFilename);
>         IOUtils.copy(stream, responseOutputStream);
>     }
> 
> If you want to stick with the assets approach, you'd need your own
> implementation perhaps
> 
> On Jan 8, 2008 7:25 PM,  <mu...@fantasymail.de> wrote:
> > Then, I just need to change the path somewhere I assume.
> >
> > It is 250 Gigabytes of image data and I do not want to war them every
> time I make a change during development...on the final system they will be on
> a linux machine so I can just make virtual directories and link to the
> storage.
> >
> > So do I need to use the hivemind.xml somehow ?
> >
> > It sounds really complicated just to have images from an external
> directory
> > outside of the war file / the web root....
> >
> >
> > -------- Original-Nachricht --------
> > > Datum: Tue, 8 Jan 2008 17:52:02 +0100
> > > Von: "Igor Drobiazko" <ig...@gmail.com>
> >
> > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > Betreff: Re: PrivateAsset example please
> >
> > > Have a look at HiveMind API.
> > >
> http://hivemind.apache.org/hivemind1/hivemind/apidocs/org/apache/hivemind/impl/LocationImpl.html
> > >
> http://hivemind.apache.org/hivemind1/hivemind/apidocs/org/apache/hivemind/util/URLResource.html
> > >
> > > If I would be you, I would rethink the architecture. How do you want
> to
> > > access images when you go online?
> > >
> > > On Jan 8, 2008 5:37 PM, <mu...@fantasymail.de> wrote:
> > >
> > > > Do you have an example?
> > > >
> > > > What is the path? Relativ so the classpath?
> > > > How do I create a location object ?
> > > >
> > > > Do I need to set:
> > > >
> > > >
> > > >        <meta key="org.apache.tapestry.asset.dir"
> > > > value="file:///Z:/Media/"/>
> > > >
> > > > as well or would that expose the whole directoy to anyone?
> > > >
> > > >
> > > > I wish there was an example somewhere.....
> > > >
> > > >
> > > > -------- Original-Nachricht --------
> > > > > Datum: Tue, 8 Jan 2008 18:20:34 +0200
> > > > > Von: "Andreas Andreou" <an...@gmail.com>
> > > > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > > > Betreff: Re: PrivateAsset example please
> > > >
> > > > > Hi, those Assets implementations are easier to create through the
> > > > > AssetFactory services...
> > > > >
> > > > > For instance, there's a ClasspathAssetFactory, so perhaps use its
> > > > > IAsset createAbsoluteAsset(String path, Locale locale, Location
> > > > location)
> > > > >
> > > > >
> > > >
> > >
> http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/asset/ClasspathAssetFactory.html
> > > > >
> > > > >
> > > > > On Jan 8, 2008 5:46 PM,  <mu...@fantasymail.de> wrote:
> > > > > > PrivateAsset takes the following parameters:
> > > > > >
> > > > > > Resource resourceLocation, IEngineService assetService, Location
> > > > > location
> > > > > >
> > > > > > The images are in another directory on a different disk....the
> > > > directory
> > > > > is on the classpath...so the image should be in:
> > > > > >
> > > > > > someimages/picture.jpg
> > > > > >
> > > > > > How do I create a resourcelocation, how do I get the
> assetService
> > > and
> > > > > how the location?
> > > > > >
> > > > > > Thanks!
> > > > > >
> > > > > >
> > > > > >
> > > > > > -------- Original-Nachricht --------
> > > > > > > Datum: Tue, 08 Jan 2008 16:24:41 +0100
> > > > > > > Von: munich@fantasymail.de
> > > > > >
> > > > > > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > > > > > Betreff: Re: PrivateAsset example please
> > > > > >
> > > > > > > Thanks. There are no exmaples on these pages though.
> > > > > > >
> > > > > > > public IAsset getScreenshot(String name){
> > > > > > >
> > > > > > >                       return new
> > > > > ExternalAsset("thumbs/".concat(name).concat(".JPG"), null);
> > > > > > >
> > > > > > > I have tried this also:
> > > > > > >
> > > > > > > So if I used PrivateAsset what do the paramters look like?
> > > > > > >
> > > > > > > Just a short example would be cool....
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > -------- Original-Nachricht --------
> > > > > > > > Datum: Tue, 8 Jan 2008 14:36:51 +0200
> > > > > > > > Von: "Andreas Andreou" <an...@gmail.com>
> > > > > > > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > > > > > > Betreff: Re: PrivateAsset example please
> > > > > > >
> > > > > > > > it's auto-used when it's a classpath asset...
> > > > > > > > see
> > > > > > > >
> > > > >
> http://tapestry.apache.org/tapestry4.1/usersguide/spec.html#spec.asset
> > > > > > > > and
> > > > > > > >
> > > > >
> http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html
> > > > > > > > (InjectAsset)
> > > > > > > >
> > > > > > > > On Jan 8, 2008 2:02 PM,  <mu...@fantasymail.de> wrote:
> > > > > > > > > I wonder who this works:
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > >
> > > >
> > >
> http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/asset/PrivateAsset.html
> > > > > > > > >
> > > > > > > > > How do I use the PrivateAsset component?
> > > > > > > > >
> > > > > > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> > > > > > > > > For additional commands, e-mail:
> > > users-help@tapestry.apache.org
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Andreas Andreou - andyhot@apache.org -
> http://blog.andyhot.gr
> > > > > > > > Tapestry / Tacos developer
> > > > > > > > Open Source / JEE Consulting
> > > > > > > >
> > > > > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> > > > > > > > For additional commands, e-mail:
> users-help@tapestry.apache.org
> > > > > > >
> > > > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > > For additional commands, e-mail:
> users-help@tapestry.apache.org
> > > > > >
> > > > > >
> > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> > > > > Tapestry / Tacos developer
> > > > > Open Source / JEE Consulting
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Best regards,
> > >
> > > Igor Drobiazko
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> 
> 
> 
> -- 
> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> Tapestry / Tacos developer
> Open Source / JEE Consulting
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: PrivateAsset example please

Posted by Andreas Andreou <an...@gmail.com>.
oh - I think i'd go for a custom IEngineService for that...

i.e. something like :

    public void service(IRequestCycle cycle) throws IOException {
        String filename = cycle.getParameter("f");
        String realFilename = imagesFolder + filename;
        OutputStream responseOutputStream =
response.getOutputStream(new ContentType("image/jpeg"));
        InputStream stream = new FileInputStream(realFilename);
        IOUtils.copy(stream, responseOutputStream);
    }

If you want to stick with the assets approach, you'd need your own
implementation perhaps

On Jan 8, 2008 7:25 PM,  <mu...@fantasymail.de> wrote:
> Then, I just need to change the path somewhere I assume.
>
> It is 250 Gigabytes of image data and I do not want to war them every time I make a change during development...on the final system they will be on a linux machine so I can just make virtual directories and link to the storage.
>
> So do I need to use the hivemind.xml somehow ?
>
> It sounds really complicated just to have images from an external directory
> outside of the war file / the web root....
>
>
> -------- Original-Nachricht --------
> > Datum: Tue, 8 Jan 2008 17:52:02 +0100
> > Von: "Igor Drobiazko" <ig...@gmail.com>
>
> > An: "Tapestry users" <us...@tapestry.apache.org>
> > Betreff: Re: PrivateAsset example please
>
> > Have a look at HiveMind API.
> > http://hivemind.apache.org/hivemind1/hivemind/apidocs/org/apache/hivemind/impl/LocationImpl.html
> > http://hivemind.apache.org/hivemind1/hivemind/apidocs/org/apache/hivemind/util/URLResource.html
> >
> > If I would be you, I would rethink the architecture. How do you want to
> > access images when you go online?
> >
> > On Jan 8, 2008 5:37 PM, <mu...@fantasymail.de> wrote:
> >
> > > Do you have an example?
> > >
> > > What is the path? Relativ so the classpath?
> > > How do I create a location object ?
> > >
> > > Do I need to set:
> > >
> > >
> > >        <meta key="org.apache.tapestry.asset.dir"
> > > value="file:///Z:/Media/"/>
> > >
> > > as well or would that expose the whole directoy to anyone?
> > >
> > >
> > > I wish there was an example somewhere.....
> > >
> > >
> > > -------- Original-Nachricht --------
> > > > Datum: Tue, 8 Jan 2008 18:20:34 +0200
> > > > Von: "Andreas Andreou" <an...@gmail.com>
> > > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > > Betreff: Re: PrivateAsset example please
> > >
> > > > Hi, those Assets implementations are easier to create through the
> > > > AssetFactory services...
> > > >
> > > > For instance, there's a ClasspathAssetFactory, so perhaps use its
> > > > IAsset createAbsoluteAsset(String path, Locale locale, Location
> > > location)
> > > >
> > > >
> > >
> > http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/asset/ClasspathAssetFactory.html
> > > >
> > > >
> > > > On Jan 8, 2008 5:46 PM,  <mu...@fantasymail.de> wrote:
> > > > > PrivateAsset takes the following parameters:
> > > > >
> > > > > Resource resourceLocation, IEngineService assetService, Location
> > > > location
> > > > >
> > > > > The images are in another directory on a different disk....the
> > > directory
> > > > is on the classpath...so the image should be in:
> > > > >
> > > > > someimages/picture.jpg
> > > > >
> > > > > How do I create a resourcelocation, how do I get the assetService
> > and
> > > > how the location?
> > > > >
> > > > > Thanks!
> > > > >
> > > > >
> > > > >
> > > > > -------- Original-Nachricht --------
> > > > > > Datum: Tue, 08 Jan 2008 16:24:41 +0100
> > > > > > Von: munich@fantasymail.de
> > > > >
> > > > > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > > > > Betreff: Re: PrivateAsset example please
> > > > >
> > > > > > Thanks. There are no exmaples on these pages though.
> > > > > >
> > > > > > public IAsset getScreenshot(String name){
> > > > > >
> > > > > >                       return new
> > > > ExternalAsset("thumbs/".concat(name).concat(".JPG"), null);
> > > > > >
> > > > > > I have tried this also:
> > > > > >
> > > > > > So if I used PrivateAsset what do the paramters look like?
> > > > > >
> > > > > > Just a short example would be cool....
> > > > > >
> > > > > >
> > > > > >
> > > > > > -------- Original-Nachricht --------
> > > > > > > Datum: Tue, 8 Jan 2008 14:36:51 +0200
> > > > > > > Von: "Andreas Andreou" <an...@gmail.com>
> > > > > > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > > > > > Betreff: Re: PrivateAsset example please
> > > > > >
> > > > > > > it's auto-used when it's a classpath asset...
> > > > > > > see
> > > > > > >
> > > > http://tapestry.apache.org/tapestry4.1/usersguide/spec.html#spec.asset
> > > > > > > and
> > > > > > >
> > > > http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html
> > > > > > > (InjectAsset)
> > > > > > >
> > > > > > > On Jan 8, 2008 2:02 PM,  <mu...@fantasymail.de> wrote:
> > > > > > > > I wonder who this works:
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > >
> > >
> > http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/asset/PrivateAsset.html
> > > > > > > >
> > > > > > > > How do I use the PrivateAsset component?
> > > > > > > >
> > > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > > > For additional commands, e-mail:
> > users-help@tapestry.apache.org
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> > > > > > > Tapestry / Tacos developer
> > > > > > > Open Source / JEE Consulting
> > > > > > >
> > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > > >
> > > > > >
> > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> > > > Tapestry / Tacos developer
> > > > Open Source / JEE Consulting
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
> > --
> > Best regards,
> >
> > Igor Drobiazko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: PrivateAsset example please

Posted by mu...@fantasymail.de.
Then, I just need to change the path somewhere I assume.

It is 250 Gigabytes of image data and I do not want to war them every time I make a change during development...on the final system they will be on a linux machine so I can just make virtual directories and link to the storage.

So do I need to use the hivemind.xml somehow ?

It sounds really complicated just to have images from an external directory
outside of the war file / the web root....


-------- Original-Nachricht --------
> Datum: Tue, 8 Jan 2008 17:52:02 +0100
> Von: "Igor Drobiazko" <ig...@gmail.com>
> An: "Tapestry users" <us...@tapestry.apache.org>
> Betreff: Re: PrivateAsset example please

> Have a look at HiveMind API.
> http://hivemind.apache.org/hivemind1/hivemind/apidocs/org/apache/hivemind/impl/LocationImpl.html
> http://hivemind.apache.org/hivemind1/hivemind/apidocs/org/apache/hivemind/util/URLResource.html
> 
> If I would be you, I would rethink the architecture. How do you want to
> access images when you go online?
> 
> On Jan 8, 2008 5:37 PM, <mu...@fantasymail.de> wrote:
> 
> > Do you have an example?
> >
> > What is the path? Relativ so the classpath?
> > How do I create a location object ?
> >
> > Do I need to set:
> >
> >
> >        <meta key="org.apache.tapestry.asset.dir"
> > value="file:///Z:/Media/"/>
> >
> > as well or would that expose the whole directoy to anyone?
> >
> >
> > I wish there was an example somewhere.....
> >
> >
> > -------- Original-Nachricht --------
> > > Datum: Tue, 8 Jan 2008 18:20:34 +0200
> > > Von: "Andreas Andreou" <an...@gmail.com>
> > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > Betreff: Re: PrivateAsset example please
> >
> > > Hi, those Assets implementations are easier to create through the
> > > AssetFactory services...
> > >
> > > For instance, there's a ClasspathAssetFactory, so perhaps use its
> > > IAsset createAbsoluteAsset(String path, Locale locale, Location
> > location)
> > >
> > >
> >
> http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/asset/ClasspathAssetFactory.html
> > >
> > >
> > > On Jan 8, 2008 5:46 PM,  <mu...@fantasymail.de> wrote:
> > > > PrivateAsset takes the following parameters:
> > > >
> > > > Resource resourceLocation, IEngineService assetService, Location
> > > location
> > > >
> > > > The images are in another directory on a different disk....the
> > directory
> > > is on the classpath...so the image should be in:
> > > >
> > > > someimages/picture.jpg
> > > >
> > > > How do I create a resourcelocation, how do I get the assetService
> and
> > > how the location?
> > > >
> > > > Thanks!
> > > >
> > > >
> > > >
> > > > -------- Original-Nachricht --------
> > > > > Datum: Tue, 08 Jan 2008 16:24:41 +0100
> > > > > Von: munich@fantasymail.de
> > > >
> > > > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > > > Betreff: Re: PrivateAsset example please
> > > >
> > > > > Thanks. There are no exmaples on these pages though.
> > > > >
> > > > > public IAsset getScreenshot(String name){
> > > > >
> > > > >                       return new
> > > ExternalAsset("thumbs/".concat(name).concat(".JPG"), null);
> > > > >
> > > > > I have tried this also:
> > > > >
> > > > > So if I used PrivateAsset what do the paramters look like?
> > > > >
> > > > > Just a short example would be cool....
> > > > >
> > > > >
> > > > >
> > > > > -------- Original-Nachricht --------
> > > > > > Datum: Tue, 8 Jan 2008 14:36:51 +0200
> > > > > > Von: "Andreas Andreou" <an...@gmail.com>
> > > > > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > > > > Betreff: Re: PrivateAsset example please
> > > > >
> > > > > > it's auto-used when it's a classpath asset...
> > > > > > see
> > > > > >
> > > http://tapestry.apache.org/tapestry4.1/usersguide/spec.html#spec.asset
> > > > > > and
> > > > > >
> > > http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html
> > > > > > (InjectAsset)
> > > > > >
> > > > > > On Jan 8, 2008 2:02 PM,  <mu...@fantasymail.de> wrote:
> > > > > > > I wonder who this works:
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > >
> >
> http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/asset/PrivateAsset.html
> > > > > > >
> > > > > > > How do I use the PrivateAsset component?
> > > > > > >
> > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > > For additional commands, e-mail:
> users-help@tapestry.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> > > > > > Tapestry / Tacos developer
> > > > > > Open Source / JEE Consulting
> > > > > >
> > > > > >
> > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> > > Tapestry / Tacos developer
> > > Open Source / JEE Consulting
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> 
> 
> -- 
> Best regards,
> 
> Igor Drobiazko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: PrivateAsset example please

Posted by Igor Drobiazko <ig...@gmail.com>.
Have a look at HiveMind API.
http://hivemind.apache.org/hivemind1/hivemind/apidocs/org/apache/hivemind/impl/LocationImpl.html
http://hivemind.apache.org/hivemind1/hivemind/apidocs/org/apache/hivemind/util/URLResource.html

If I would be you, I would rethink the architecture. How do you want to
access images when you go online?

On Jan 8, 2008 5:37 PM, <mu...@fantasymail.de> wrote:

> Do you have an example?
>
> What is the path? Relativ so the classpath?
> How do I create a location object ?
>
> Do I need to set:
>
>
>        <meta key="org.apache.tapestry.asset.dir"
> value="file:///Z:/Media/"/>
>
> as well or would that expose the whole directoy to anyone?
>
>
> I wish there was an example somewhere.....
>
>
> -------- Original-Nachricht --------
> > Datum: Tue, 8 Jan 2008 18:20:34 +0200
> > Von: "Andreas Andreou" <an...@gmail.com>
> > An: "Tapestry users" <us...@tapestry.apache.org>
> > Betreff: Re: PrivateAsset example please
>
> > Hi, those Assets implementations are easier to create through the
> > AssetFactory services...
> >
> > For instance, there's a ClasspathAssetFactory, so perhaps use its
> > IAsset createAbsoluteAsset(String path, Locale locale, Location
> location)
> >
> >
> http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/asset/ClasspathAssetFactory.html
> >
> >
> > On Jan 8, 2008 5:46 PM,  <mu...@fantasymail.de> wrote:
> > > PrivateAsset takes the following parameters:
> > >
> > > Resource resourceLocation, IEngineService assetService, Location
> > location
> > >
> > > The images are in another directory on a different disk....the
> directory
> > is on the classpath...so the image should be in:
> > >
> > > someimages/picture.jpg
> > >
> > > How do I create a resourcelocation, how do I get the assetService and
> > how the location?
> > >
> > > Thanks!
> > >
> > >
> > >
> > > -------- Original-Nachricht --------
> > > > Datum: Tue, 08 Jan 2008 16:24:41 +0100
> > > > Von: munich@fantasymail.de
> > >
> > > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > > Betreff: Re: PrivateAsset example please
> > >
> > > > Thanks. There are no exmaples on these pages though.
> > > >
> > > > public IAsset getScreenshot(String name){
> > > >
> > > >                       return new
> > ExternalAsset("thumbs/".concat(name).concat(".JPG"), null);
> > > >
> > > > I have tried this also:
> > > >
> > > > So if I used PrivateAsset what do the paramters look like?
> > > >
> > > > Just a short example would be cool....
> > > >
> > > >
> > > >
> > > > -------- Original-Nachricht --------
> > > > > Datum: Tue, 8 Jan 2008 14:36:51 +0200
> > > > > Von: "Andreas Andreou" <an...@gmail.com>
> > > > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > > > Betreff: Re: PrivateAsset example please
> > > >
> > > > > it's auto-used when it's a classpath asset...
> > > > > see
> > > > >
> > http://tapestry.apache.org/tapestry4.1/usersguide/spec.html#spec.asset
> > > > > and
> > > > >
> > http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html
> > > > > (InjectAsset)
> > > > >
> > > > > On Jan 8, 2008 2:02 PM,  <mu...@fantasymail.de> wrote:
> > > > > > I wonder who this works:
> > > > > >
> > > > > >
> > > > >
> > > >
> >
> http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/asset/PrivateAsset.html
> > > > > >
> > > > > > How do I use the PrivateAsset component?
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> > > > > Tapestry / Tacos developer
> > > > > Open Source / JEE Consulting
> > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
> >
> > --
> > Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> > Tapestry / Tacos developer
> > Open Source / JEE Consulting
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Best regards,

Igor Drobiazko

Re: PrivateAsset example please

Posted by mu...@fantasymail.de.
Do you have an example?

What is the path? Relativ so the classpath?
How do I create a location object ?

Do I need to set:


	<meta key="org.apache.tapestry.asset.dir" value="file:///Z:/Media/"/>

as well or would that expose the whole directoy to anyone?


I wish there was an example somewhere.....	


-------- Original-Nachricht --------
> Datum: Tue, 8 Jan 2008 18:20:34 +0200
> Von: "Andreas Andreou" <an...@gmail.com>
> An: "Tapestry users" <us...@tapestry.apache.org>
> Betreff: Re: PrivateAsset example please

> Hi, those Assets implementations are easier to create through the
> AssetFactory services...
> 
> For instance, there's a ClasspathAssetFactory, so perhaps use its
> IAsset createAbsoluteAsset(String path, Locale locale, Location location)
> 
> http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/asset/ClasspathAssetFactory.html
> 
> 
> On Jan 8, 2008 5:46 PM,  <mu...@fantasymail.de> wrote:
> > PrivateAsset takes the following parameters:
> >
> > Resource resourceLocation, IEngineService assetService, Location
> location
> >
> > The images are in another directory on a different disk....the directory
> is on the classpath...so the image should be in:
> >
> > someimages/picture.jpg
> >
> > How do I create a resourcelocation, how do I get the assetService and
> how the location?
> >
> > Thanks!
> >
> >
> >
> > -------- Original-Nachricht --------
> > > Datum: Tue, 08 Jan 2008 16:24:41 +0100
> > > Von: munich@fantasymail.de
> >
> > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > Betreff: Re: PrivateAsset example please
> >
> > > Thanks. There are no exmaples on these pages though.
> > >
> > > public IAsset getScreenshot(String name){
> > >
> > >                       return new
> ExternalAsset("thumbs/".concat(name).concat(".JPG"), null);
> > >
> > > I have tried this also:
> > >
> > > So if I used PrivateAsset what do the paramters look like?
> > >
> > > Just a short example would be cool....
> > >
> > >
> > >
> > > -------- Original-Nachricht --------
> > > > Datum: Tue, 8 Jan 2008 14:36:51 +0200
> > > > Von: "Andreas Andreou" <an...@gmail.com>
> > > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > > Betreff: Re: PrivateAsset example please
> > >
> > > > it's auto-used when it's a classpath asset...
> > > > see
> > > >
> http://tapestry.apache.org/tapestry4.1/usersguide/spec.html#spec.asset
> > > > and
> > > >
> http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html
> > > > (InjectAsset)
> > > >
> > > > On Jan 8, 2008 2:02 PM,  <mu...@fantasymail.de> wrote:
> > > > > I wonder who this works:
> > > > >
> > > > >
> > > >
> > >
> http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/asset/PrivateAsset.html
> > > > >
> > > > > How do I use the PrivateAsset component?
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> > > > Tapestry / Tacos developer
> > > > Open Source / JEE Consulting
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> 
> 
> 
> -- 
> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> Tapestry / Tacos developer
> Open Source / JEE Consulting
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: PrivateAsset example please

Posted by Andreas Andreou <an...@gmail.com>.
Hi, those Assets implementations are easier to create through the
AssetFactory services...

For instance, there's a ClasspathAssetFactory, so perhaps use its
IAsset createAbsoluteAsset(String path, Locale locale, Location location)

http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/asset/ClasspathAssetFactory.html


On Jan 8, 2008 5:46 PM,  <mu...@fantasymail.de> wrote:
> PrivateAsset takes the following parameters:
>
> Resource resourceLocation, IEngineService assetService, Location location
>
> The images are in another directory on a different disk....the directory is on the classpath...so the image should be in:
>
> someimages/picture.jpg
>
> How do I create a resourcelocation, how do I get the assetService and how the location?
>
> Thanks!
>
>
>
> -------- Original-Nachricht --------
> > Datum: Tue, 08 Jan 2008 16:24:41 +0100
> > Von: munich@fantasymail.de
>
> > An: "Tapestry users" <us...@tapestry.apache.org>
> > Betreff: Re: PrivateAsset example please
>
> > Thanks. There are no exmaples on these pages though.
> >
> > public IAsset getScreenshot(String name){
> >
> >                       return new ExternalAsset("thumbs/".concat(name).concat(".JPG"), null);
> >
> > I have tried this also:
> >
> > So if I used PrivateAsset what do the paramters look like?
> >
> > Just a short example would be cool....
> >
> >
> >
> > -------- Original-Nachricht --------
> > > Datum: Tue, 8 Jan 2008 14:36:51 +0200
> > > Von: "Andreas Andreou" <an...@gmail.com>
> > > An: "Tapestry users" <us...@tapestry.apache.org>
> > > Betreff: Re: PrivateAsset example please
> >
> > > it's auto-used when it's a classpath asset...
> > > see
> > > http://tapestry.apache.org/tapestry4.1/usersguide/spec.html#spec.asset
> > > and
> > > http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html
> > > (InjectAsset)
> > >
> > > On Jan 8, 2008 2:02 PM,  <mu...@fantasymail.de> wrote:
> > > > I wonder who this works:
> > > >
> > > >
> > >
> > http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/asset/PrivateAsset.html
> > > >
> > > > How do I use the PrivateAsset component?
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> > > Tapestry / Tacos developer
> > > Open Source / JEE Consulting
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: PrivateAsset example please

Posted by mu...@fantasymail.de.
PrivateAsset takes the following parameters:

Resource resourceLocation, IEngineService assetService, Location location

The images are in another directory on a different disk....the directory is on the classpath...so the image should be in:

someimages/picture.jpg

How do I create a resourcelocation, how do I get the assetService and how the location?

Thanks!



-------- Original-Nachricht --------
> Datum: Tue, 08 Jan 2008 16:24:41 +0100
> Von: munich@fantasymail.de
> An: "Tapestry users" <us...@tapestry.apache.org>
> Betreff: Re: PrivateAsset example please

> Thanks. There are no exmaples on these pages though.
> 
> public IAsset getScreenshot(String name){
> 			
> 			return new ExternalAsset("thumbs/".concat(name).concat(".JPG"), null);
> 
> I have tried this also:
> 
> So if I used PrivateAsset what do the paramters look like?
> 
> Just a short example would be cool....
> 
> 
> 
> -------- Original-Nachricht --------
> > Datum: Tue, 8 Jan 2008 14:36:51 +0200
> > Von: "Andreas Andreou" <an...@gmail.com>
> > An: "Tapestry users" <us...@tapestry.apache.org>
> > Betreff: Re: PrivateAsset example please
> 
> > it's auto-used when it's a classpath asset...
> > see
> > http://tapestry.apache.org/tapestry4.1/usersguide/spec.html#spec.asset
> > and
> > http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html
> > (InjectAsset)
> > 
> > On Jan 8, 2008 2:02 PM,  <mu...@fantasymail.de> wrote:
> > > I wonder who this works:
> > >
> > >
> >
> http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/asset/PrivateAsset.html
> > >
> > > How do I use the PrivateAsset component?
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> > 
> > 
> > 
> > -- 
> > Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> > Tapestry / Tacos developer
> > Open Source / JEE Consulting
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: PrivateAsset example please

Posted by mu...@fantasymail.de.
Thanks. There are no exmaples on these pages though.

public IAsset getScreenshot(String name){
			
			return new ExternalAsset("thumbs/".concat(name).concat(".JPG"), null);

I have tried this also:

So if I used PrivateAsset what do the paramters look like?

Just a short example would be cool....



-------- Original-Nachricht --------
> Datum: Tue, 8 Jan 2008 14:36:51 +0200
> Von: "Andreas Andreou" <an...@gmail.com>
> An: "Tapestry users" <us...@tapestry.apache.org>
> Betreff: Re: PrivateAsset example please

> it's auto-used when it's a classpath asset...
> see
> http://tapestry.apache.org/tapestry4.1/usersguide/spec.html#spec.asset
> and
> http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html
> (InjectAsset)
> 
> On Jan 8, 2008 2:02 PM,  <mu...@fantasymail.de> wrote:
> > I wonder who this works:
> >
> >
> http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/asset/PrivateAsset.html
> >
> > How do I use the PrivateAsset component?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> 
> 
> 
> -- 
> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> Tapestry / Tacos developer
> Open Source / JEE Consulting
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: PrivateAsset example please

Posted by Andreas Andreou <an...@gmail.com>.
it's auto-used when it's a classpath asset...
see
http://tapestry.apache.org/tapestry4.1/usersguide/spec.html#spec.asset
and
http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html
(InjectAsset)

On Jan 8, 2008 2:02 PM,  <mu...@fantasymail.de> wrote:
> I wonder who this works:
>
> http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/asset/PrivateAsset.html
>
> How do I use the PrivateAsset component?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


PrivateAsset example please

Posted by mu...@fantasymail.de.
I wonder who this works:

http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/asset/PrivateAsset.html

How do I use the PrivateAsset component?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to use images outside webroot

Posted by mu...@fantasymail.de.
But how do you avoid that people can access those images
directly ? They should not be accessible through  a direct website url....
as there is a permission check before.

-------- Original-Nachricht --------
> Datum: Thu, 20 Dec 2007 16:08:02 +0100
> Von: Sven Homburg <ho...@googlemail.com>
> An: Tapestry users <us...@tapestry.apache.org>
> Betreff: Re: How to use images outside webroot

> goto Project Settings
> and add a new "Web  Resource Directory"
> 
> 
> best regards
> S.Homburg
> 
> 
> 
> 
> munich@fantasymail.de schrieb:
> > During development I would like to access/use images that are on a
> network drive (e.g. f:\images) as I dont have enough space on my harddisk.
> >
> > How can I tell Tapestry that it finds "localhost:8080/images/image.gif"
> > here "f:\images\image.gif"  ?
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> >   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to use images outside webroot

Posted by Dapeng <da...@spiralcomms.com>.
this is my structure


webapp
    |-myapplication
          |-WEB-INFO
          |-images
              |-0001.jpg
          |-start.tml



so

    @Inject
    @Path("context:images/0001.jpg")
    private Asset img0001;


so when u re-deploy the application

juz overwrite (copy-paste from local testing application folder) all the 
content except the images folder

(don use war)


munich@fantasymail.de wrote:
> I have tried the following:
>
> public abstract class Test extends TrailsPage {
>
> public IAsset getTest(){
> 		
> FileResource resource = new FileResource("Z:\\Media\\0001.JPG");
> Location location = new LocationImpl(resource);
> 			
> IAsset image  = this.getEngine().getInfrastructure().getAssetFactory().createAsset(resource, location);
> 		
> return image;
> 		
> }
>
> ... but this leads to a "Could not find a strategy instance for class org.apache.hivemind.util.FileResource" exception.
>
> -------- Original-Nachricht --------
>   
>> Datum: Fri, 11 Jan 2008 19:27:26 +0800
>> Von: Dapeng <da...@spiralcomms.com>
>> An: Tapestry users <us...@tapestry.apache.org>
>> Betreff: Re: How to use images outside webroot
>>     
>
>   
>> juz copy ur application to the webapps folder
>>
>> it works fine for me
>>
>> 200M static files
>>
>>
>> then u can use the images inside the root
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> munich@fantasymail.de wrote:
>>     
>>> What plugins are you using?
>>>
>>> What would be the "manual" step to achieve this?
>>>
>>> How do I avoid that I get a several Gigabyte big .war file ?
>>>
>>> -------- Original-Nachricht --------
>>>   
>>>       
>>>> Datum: Thu, 20 Dec 2007 16:08:02 +0100
>>>> Von: Sven Homburg <ho...@googlemail.com>
>>>> An: Tapestry users <us...@tapestry.apache.org>
>>>> Betreff: Re: How to use images outside webroot
>>>>     
>>>>         
>>>   
>>>       
>>>> goto Project Settings
>>>> and add a new "Web  Resource Directory"
>>>>
>>>>
>>>> best regards
>>>> S.Homburg
>>>>
>>>>
>>>>
>>>>
>>>> munich@fantasymail.de schrieb:
>>>>     
>>>>         
>>>>> During development I would like to access/use images that are on a
>>>>>       
>>>>>           
>>>> network drive (e.g. f:\images) as I dont have enough space on my
>>>>         
>> harddisk.
>>     
>>>>     
>>>>         
>>>>> How can I tell Tapestry that it finds
>>>>>           
>> "localhost:8080/images/image.gif"
>>     
>>>>> here "f:\images\image.gif"  ?
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>>>
>>>>>   
>>>>>       
>>>>>           
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>     
>>>>         
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>   
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to use images outside webroot

Posted by mu...@fantasymail.de.
I have tried the following:

public abstract class Test extends TrailsPage {

public IAsset getTest(){
		
FileResource resource = new FileResource("Z:\\Media\\0001.JPG");
Location location = new LocationImpl(resource);
			
IAsset image  = this.getEngine().getInfrastructure().getAssetFactory().createAsset(resource, location);
		
return image;
		
}

... but this leads to a "Could not find a strategy instance for class org.apache.hivemind.util.FileResource" exception.

-------- Original-Nachricht --------
> Datum: Fri, 11 Jan 2008 19:27:26 +0800
> Von: Dapeng <da...@spiralcomms.com>
> An: Tapestry users <us...@tapestry.apache.org>
> Betreff: Re: How to use images outside webroot

> juz copy ur application to the webapps folder
> 
> it works fine for me
> 
> 200M static files
> 
> 
> then u can use the images inside the root
> 
> 
> 
> 
> 
> 
> 
> 
> 
> munich@fantasymail.de wrote:
> > What plugins are you using?
> >
> > What would be the "manual" step to achieve this?
> >
> > How do I avoid that I get a several Gigabyte big .war file ?
> >
> > -------- Original-Nachricht --------
> >   
> >> Datum: Thu, 20 Dec 2007 16:08:02 +0100
> >> Von: Sven Homburg <ho...@googlemail.com>
> >> An: Tapestry users <us...@tapestry.apache.org>
> >> Betreff: Re: How to use images outside webroot
> >>     
> >
> >   
> >> goto Project Settings
> >> and add a new "Web  Resource Directory"
> >>
> >>
> >> best regards
> >> S.Homburg
> >>
> >>
> >>
> >>
> >> munich@fantasymail.de schrieb:
> >>     
> >>> During development I would like to access/use images that are on a
> >>>       
> >> network drive (e.g. f:\images) as I dont have enough space on my
> harddisk.
> >>     
> >>> How can I tell Tapestry that it finds
> "localhost:8080/images/image.gif"
> >>> here "f:\images\image.gif"  ?
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>>
> >>>
> >>>   
> >>>       
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>     
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to use images outside webroot

Posted by Dapeng <da...@spiralcomms.com>.
juz copy ur application to the webapps folder

it works fine for me

200M static files


then u can use the images inside the root









munich@fantasymail.de wrote:
> What plugins are you using?
>
> What would be the "manual" step to achieve this?
>
> How do I avoid that I get a several Gigabyte big .war file ?
>
> -------- Original-Nachricht --------
>   
>> Datum: Thu, 20 Dec 2007 16:08:02 +0100
>> Von: Sven Homburg <ho...@googlemail.com>
>> An: Tapestry users <us...@tapestry.apache.org>
>> Betreff: Re: How to use images outside webroot
>>     
>
>   
>> goto Project Settings
>> and add a new "Web  Resource Directory"
>>
>>
>> best regards
>> S.Homburg
>>
>>
>>
>>
>> munich@fantasymail.de schrieb:
>>     
>>> During development I would like to access/use images that are on a
>>>       
>> network drive (e.g. f:\images) as I dont have enough space on my harddisk.
>>     
>>> How can I tell Tapestry that it finds "localhost:8080/images/image.gif"
>>> here "f:\images\image.gif"  ?
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>   
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to use images outside webroot

Posted by mu...@fantasymail.de.
What plugins are you using?

What would be the "manual" step to achieve this?

How do I avoid that I get a several Gigabyte big .war file ?

-------- Original-Nachricht --------
> Datum: Thu, 20 Dec 2007 16:08:02 +0100
> Von: Sven Homburg <ho...@googlemail.com>
> An: Tapestry users <us...@tapestry.apache.org>
> Betreff: Re: How to use images outside webroot

> goto Project Settings
> and add a new "Web  Resource Directory"
> 
> 
> best regards
> S.Homburg
> 
> 
> 
> 
> munich@fantasymail.de schrieb:
> > During development I would like to access/use images that are on a
> network drive (e.g. f:\images) as I dont have enough space on my harddisk.
> >
> > How can I tell Tapestry that it finds "localhost:8080/images/image.gif"
> > here "f:\images\image.gif"  ?
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> >   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to use images outside webroot

Posted by Sven Homburg <ho...@googlemail.com>.
goto Project Settings
and add a new "Web  Resource Directory"


best regards
S.Homburg




munich@fantasymail.de schrieb:
> During development I would like to access/use images that are on a network drive (e.g. f:\images) as I dont have enough space on my harddisk.
>
> How can I tell Tapestry that it finds "localhost:8080/images/image.gif"
> here "f:\images\image.gif"  ?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


How to use images outside webroot

Posted by mu...@fantasymail.de.
During development I would like to access/use images that are on a network drive (e.g. f:\images) as I dont have enough space on my harddisk.

How can I tell Tapestry that it finds "localhost:8080/images/image.gif"
here "f:\images\image.gif"  ?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5] Tapestry 5 and IntelliJ IDEA

Posted by Jesse Kuhnert <jk...@gmail.com>.
-) Go to Settings -> Errors ->  choose either the global ide profile or a
project specific profile
-) Go to Inspections -> HTML Inspections -> Unknown HTML tag attribute
-) Add whatever attribute tags you want under "Custom HTML tag attributes"
on the left.

There is probably an easier way to do it,  and it probably doesn't (or
shouldn't) happen if you associate the file as an xml file type.

On Dec 19, 2007 3:26 PM, Filip S. Adamsen <fs...@fsadev.com> wrote:

> Hi,
>
> Thank you for the tips. Now IDEA is complaining that "t:label is not
> allowed here" etc. Am I missing something? I'd really just like IDEA to
> mind its own business wrt. the Tapestry-related tags etc. in my templates.
>
> -Filip
>
> Michael Lake skrev:
> > Filip,
> >
> > make sure your encapsulating tags define the "t" namespace.
> >
> > <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
> > MAIN BODY HERE
> > </html>
> >
> >
> >
> > also, in your settings under "file types", make sure you've got .tml
> > under the XML file type.
> >
> > if the reference to the .xsd is red, put the cursor on it, wait for the
> > red light bulb on the left, then click "fetch external resource"
> >
> > -mike
> >
> > Filip S. Adamsen wrote:
> >> Hi there,
> >>
> >> Just a quick question: Is there a way to prevent IDEA complaining
> >> about unresolvable symbols in .tml files? I get hundreds of "Cannot
> >> resolve symbol t:label" etc. when performing code analysis.
> >>
> >> -Filip
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry / OGNL / Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Re: [T5] Tapestry 5 and IntelliJ IDEA

Posted by "Filip S. Adamsen" <fs...@fsadev.com>.
Hi,

Thank you for the tips. Now IDEA is complaining that "t:label is not 
allowed here" etc. Am I missing something? I'd really just like IDEA to 
mind its own business wrt. the Tapestry-related tags etc. in my templates.

-Filip

Michael Lake skrev:
> Filip,
> 
> make sure your encapsulating tags define the "t" namespace.
> 
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
> MAIN BODY HERE
> </html>
> 
> 
> 
> also, in your settings under "file types", make sure you've got .tml 
> under the XML file type.
> 
> if the reference to the .xsd is red, put the cursor on it, wait for the 
> red light bulb on the left, then click "fetch external resource"
> 
> -mike
> 
> Filip S. Adamsen wrote:
>> Hi there,
>>
>> Just a quick question: Is there a way to prevent IDEA complaining 
>> about unresolvable symbols in .tml files? I get hundreds of "Cannot 
>> resolve symbol t:label" etc. when performing code analysis.
>>
>> -Filip
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5] Tapestry 5 and IntelliJ IDEA

Posted by Michael Lake <ml...@netvue.com>.
Filip,

make sure your encapsulating tags define the "t" namespace.

<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
MAIN BODY HERE
</html>



also, in your settings under "file types", make sure you've got .tml 
under the XML file type.

if the reference to the .xsd is red, put the cursor on it, wait for the 
red light bulb on the left, then click "fetch external resource"

-mike

Filip S. Adamsen wrote:
> Hi there,
>
> Just a quick question: Is there a way to prevent IDEA complaining 
> about unresolvable symbols in .tml files? I get hundreds of "Cannot 
> resolve symbol t:label" etc. when performing code analysis.
>
> -Filip
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org