You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by 滕训华 <te...@magic-sw.com.cn> on 2008/04/08 09:07:56 UTC

Why it convert my path

I have a form in a page and when the form is submitted,it will open another
page which is under the securePage path.But when it turn to this page,the
“securePage” is change to “securepage”,which leads to some js or css can
not read.why and how to solve this?


Re: 答复: Why it convert my path

Posted by Thiago HP <th...@gmail.com>.
On 4/8/08, Chris Lewis <ch...@bellsouth.net> wrote:
> If I'm understanding you, it seems that your problem is getting the path
>  (url) for asset files like JS and CSS. DO NOT hard code these in
>  templates! Use the @IncludeJavaScriptLibrary and @IncludeStylesheet
>  annotations on the page class, and that's it.

Another option is using something like
${asset:context:/css/style.css}. Tapestry will always output the
correct path.

-- 
Thiago

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


Re: 答复: Why it convert my path

Posted by Chris Lewis <ch...@bellsouth.net>.
If I'm understanding you, it seems that your problem is getting the path
(url) for asset files like JS and CSS. DO NOT hard code these in
templates! Use the @IncludeJavaScriptLibrary and @IncludeStylesheet
annotations on the page class, and that's it.

chris

滕训华 wrote:
> Now I hardcode in my program with the ../securePage ,the program run
> normally.
>
> Before I used a const class and define a static field with securePage as its
> value, it would occur this problem.
>
>
>
> -----邮件原件-----
> 发件人: 滕训华 [mailto:tengxh@magic-sw.com.cn] 
> 发送时间: 2008年4月8日 15:20
> 收件人: 'Tapestry users'
> 主题: 答复: Why it convert my path
>
> Thanks for your reply.
>
> Yes,it will be ok to read the page whatever the " SecurePage" or "
> securepage" 
>
> But because my page need other js file or css file to run normally.I found
> if I use the "securePage" it will be ok but " securepage" I will get the
> errors.
>
> -----邮件原件-----
> 发件人: Chris Lewis [mailto:chris_lewis@bellsouth.net] 
> 发送时间: 2008年4月8日 15:16
> 收件人: Tapestry users
> 主题: Re: Why it convert my path
>
> I'm not sure what you mean by "which leads to some js or css can not
> read", but the case change of page names is normal and should be
> harmless as T5 handles pages in a case-insensitive manner. Therefore it
> won't matter if a link is made to SecurePage, securepage, securePage, or
> even SeCuRePaGe - it will reach the page.
>
> chris
>
> 滕训华 wrote:
>   
>> I have a form in a page and when the form is submitted,it will open
>>     
> another
>   
>> page which is under the securePage path.But when it turn to this page,the
>> “securePage” is change to “securepage”,which leads to some js or css
>>     
> can
>   
>> not read.why and how to solve this?
>>
>>
>>   
>>     
>
>   

-- 
http://thegodcode.net


答复: Why it convert my path

Posted by 滕训华 <te...@magic-sw.com.cn>.
Now I hardcode in my program with the ../securePage ,the program run
normally.

Before I used a const class and define a static field with securePage as its
value, it would occur this problem.



-----邮件原件-----
发件人: 滕训华 [mailto:tengxh@magic-sw.com.cn] 
发送时间: 2008年4月8日 15:20
收件人: 'Tapestry users'
主题: 答复: Why it convert my path

Thanks for your reply.

Yes,it will be ok to read the page whatever the " SecurePage" or "
securepage" 

But because my page need other js file or css file to run normally.I found
if I use the "securePage" it will be ok but " securepage" I will get the
errors.

-----邮件原件-----
发件人: Chris Lewis [mailto:chris_lewis@bellsouth.net] 
发送时间: 2008年4月8日 15:16
收件人: Tapestry users
主题: Re: Why it convert my path

I'm not sure what you mean by "which leads to some js or css can not
read", but the case change of page names is normal and should be
harmless as T5 handles pages in a case-insensitive manner. Therefore it
won't matter if a link is made to SecurePage, securepage, securePage, or
even SeCuRePaGe - it will reach the page.

chris

滕训华 wrote:
> I have a form in a page and when the form is submitted,it will open
another
> page which is under the securePage path.But when it turn to this page,the
> “securePage” is change to “securepage”,which leads to some js or css
can
> not read.why and how to solve this?
>
>
>   

-- 
http://thegodcode.net


---------------------------------------------------------------------
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


答复: Why it convert my path

Posted by 滕训华 <te...@magic-sw.com.cn>.
Thanks for your reply.

Yes,it will be ok to read the page whatever the " SecurePage" or "
securepage" 

But because my page need other js file or css file to run normally.I found
if I use the "securePage" it will be ok but " securepage" I will get the
errors.

-----邮件原件-----
发件人: Chris Lewis [mailto:chris_lewis@bellsouth.net] 
发送时间: 2008年4月8日 15:16
收件人: Tapestry users
主题: Re: Why it convert my path

I'm not sure what you mean by "which leads to some js or css can not
read", but the case change of page names is normal and should be
harmless as T5 handles pages in a case-insensitive manner. Therefore it
won't matter if a link is made to SecurePage, securepage, securePage, or
even SeCuRePaGe - it will reach the page.

chris

滕训华 wrote:
> I have a form in a page and when the form is submitted,it will open
another
> page which is under the securePage path.But when it turn to this page,the
> “securePage” is change to “securepage”,which leads to some js or css
can
> not read.why and how to solve this?
>
>
>   

-- 
http://thegodcode.net


---------------------------------------------------------------------
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: Why it convert my path

Posted by Chris Lewis <ch...@bellsouth.net>.
I'm not sure what you mean by "which leads to some js or css can not
read", but the case change of page names is normal and should be
harmless as T5 handles pages in a case-insensitive manner. Therefore it
won't matter if a link is made to SecurePage, securepage, securePage, or
even SeCuRePaGe - it will reach the page.

chris

滕训华 wrote:
> I have a form in a page and when the form is submitted,it will open another
> page which is under the securePage path.But when it turn to this page,the
> “securePage” is change to “securepage”,which leads to some js or css can
> not read.why and how to solve this?
>
>
>   

-- 
http://thegodcode.net


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