Re: T 4.1 Strange Asset Context problem

2007-12-15 Thread Matt Brock


mistapony wrote:
> 
> Anyone have any idea on this.  It is utterly annoying to have to hard code
> the Context in the page spec.
> 
Well, you don't show how you're using the "msi" asset... You don't normally
see assets included in onlick handlers, so I'm guessing you're using OGNL to
get the value of the path and putting it into an @Any component that renders
the button?  That's... uh, not ideal.

If you're going to do that, you might as well inject the context into your
basepage:


@InjectObject("infrastructure:request")
public abstract WebRequest getRequest();

Then you can use the ognl:request.contextPath instead of hard-coding the
URL.

-- 
View this message in context: 
http://www.nabble.com/T-4.1-Strange-Asset-Context-problem-tp14176242p14357371.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


Re: T 4.1 Strange Asset Context problem

2007-12-06 Thread Andreas Andreou
Can't quite think of anything right now... but tacos-snapshot of 4.1 has an
absoluteAsset binding prefix which makes sure the url that the asset produces
will be an absolute one (assuming that you're looking for a quick workaround)

On Dec 6, 2007 11:57 PM, Chris Chiappone <[EMAIL PROTECTED]> wrote:
> Anyone have any idea on this.  It is utterly annoying to have to hard
> code the Context in the page spec.
>
>
> On Dec 5, 2007 10:13 AM, Chris Chiappone <[EMAIL PROTECTED]> wrote:
> > I have an assets defined in my page spec as follows:
> >
> >
> >
> >
> > The images seem to be using the correct context (/esp) as the source output 
> > is:
> >
> > 
> > 
> > 
> >
> > The msi though comes out like this:
> >
> >  > onclick="window.location='/installer/agent_setup.msi'" id="dlButton">
> >   Download
> >  
> >
> > which does not include the context of /esp
> >
> > Does anyone know why this may be?
> >
> > Thanks,
> >
> > --
> > ~chris
> >
>
>
>
> --
> ~chris
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T 4.1 Strange Asset Context problem

2007-12-06 Thread Chris Chiappone
Anyone have any idea on this.  It is utterly annoying to have to hard
code the Context in the page spec.

On Dec 5, 2007 10:13 AM, Chris Chiappone <[EMAIL PROTECTED]> wrote:
> I have an assets defined in my page spec as follows:
>
>
>
>
> The images seem to be using the correct context (/esp) as the source output 
> is:
>
> 
> 
> 
>
> The msi though comes out like this:
>
>  onclick="window.location='/installer/agent_setup.msi'" id="dlButton">
>   Download
>  
>
> which does not include the context of /esp
>
> Does anyone know why this may be?
>
> Thanks,
>
> --
> ~chris
>



-- 
~chris

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T 4.1 Strange Asset Context problem

2007-12-05 Thread Chris Chiappone
I have an assets defined in my page spec as follows:

   
   

The images seem to be using the correct context (/esp) as the source output is:





The msi though comes out like this:


  Download
 

which does not include the context of /esp

Does anyone know why this may be?

Thanks,

-- 
~chris

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]