when web application has a context other that ROOT, i got this error.

i test this sample with ROOT context, in FireFox successful. but when if i
set any context name instead of  "/" i got this  java script error :

Tapestry.onDOMLoaded is not a function

it seems that .js files path is incorrect.

here is my rendere page with context named "app" :

<html>
    <head><link href="/app/assets/tapestry/default.css"
rel="stylesheet" type="text/css">
        <title>Start Page</title>
    </head>
    <body><script src="/app/assets/scriptaculous/prototype.js"
type="text/javascript"></script><script
src="/app/assets/scriptaculous/scriptaculous.js"
type="text/javascript"></script><script
src="/app/assets/scriptaculous/effects.js"
type="text/javascript"></script><script
src="/app/assets/tapestry/tapestry.js"
type="text/javascript"></script><script
src="/app/assets/scriptaculous/controls.js"
type="text/javascript"></script>
        <h1>Start Page</h1>

        <p> This is the start page for this application, a good place
to start your modifications.
            Just to prove this is live: </p>

        <p> The current time is: Fri Dec 28 17:00:52 GMT 2007. </p>

        <form action="/app/start.form" id="form" method="post"
name="form"><div class="t-invisible"><input name="t:formdata"
type="hidden" 
value="H4sIAAAAAAAAAFvzloG1nJuBM7gksajEKjG5pLiIwSq/KF0vsSAxOSNVrySxILW4pKhSLzm/KDUnM0kvKbE4Vc8xCSgGVOyWmZqTohKcWlJa4Jhckpmfpxp6mPuh6PE/TAyMPgw88ak5qbmpeSV+ibmpJQxCPlmJZYn6OYl56frBJUWZeenWFQUlDMxAc9Bd4EaiCwKK8pNTi4uDS5NyM4uLge6AuObwuhSTtG/zzjExMFQUAAB3U2qw6gAAAA=="></div>
               <!-- <input t:type="TextField"
t:value="prop:clientName"  t:mixins="autocomplete"  /> -->
               <input id="act" name="act" type="text" value=""><img
alt="[Error]" class="t-error-icon t-invisible" id="act:icon"
src="/app/assets/tapestry/field-error-marker.png"><img
class="t-invisible" id="act:loader"
src="/app/assets/tapestry/ajax-loader.gif"><div
class="t-autocomplete-menu" id="act:menu"></div>

           </form>


        <p>
            [<a href="/app/start" id="pagelink">refresh</a>]
        </p>
    <script type="text/javascript">
<!--
Tapestry.onDOMLoaded(function() {
new Ajax.Autocompleter('act', 'act:menu',
'/app/start.act:autocomplete',
{"indicator":"act:loader","paramName":"t:input"});
Tapestry.registerForm('form', {});
});
// -->
</script></body>

</html>



>
>
>
>
> On Dec 28, 2007 7:32 PM, Howard Lewis Ship < [EMAIL PROTECTED]> wrote:
>
> > This kind of error looks too easy to make.  The Autocompleter mixin
> > should complain if it is triggered from the client browser and no
> > event handler for its "providecompletions" event is found.
> >
> > On Dec 28, 2007 7:48 AM, Mohammad Shamsi < [EMAIL PROTECTED]> wrote:
> > > Hi Joshua,
> > >
> > > i think that your method names is wrong, your textfield on template
> > has no
> > > t:id,
> > > try it with  t:id="clientName"
> > >
> > > onProvideCompletionsFromClientName
> > >
> > >
> > >
> > >
> > >
> > > On Dec 28, 2007 2:25 PM, Joshua Jackson <[EMAIL PROTECTED]> wrote:
> > >
> > > > I know. Perhaps this is due to the incompatibility of scriptaculous
> > > > library.
> > > >
> > > > :(
> > > > :sigh:
> > > >
> > > > On 12/28/07, Angelo Chen < [EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Hi Joshua,
> > > > >
> > > > > I tried your sample, it does not work in IE/Firefox/Safari, maybe
> > I miss
> > > > > something, I can see calls to the server :
> > > > > http://localhost:8080/myapp/testajax.textfield:autocomplete? here
> > is
> > > > what I
> > > > > did:
> > > > >
> > > > >  public List<String> onProvideCompletionsFromClientName(String
> > input)
> > > > >    {
> > > > >        List<String> result = new ArrayList<String>();
> > > > >         result.add("test1");
> > > > >        result.add("test2");
> > > > >        System.out.println("Inside Autocompletion Event Handler");
> > > > >        return result;
> > > > >    }
> > > > >
> > > > >  <t:form>
> > > > >        <input t:type="TextField" t:value="prop:clientName"
> > > > > t:mixins="autocomplete"  />
> > > > >    </t:form>
> > > >
> > > > --
> > > > I'm a coder not a drag-n-dropper
> > > >
> > > > Blog: http://joshuajava.wordpress.com/
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > > --
> > > sincerely yours
> > > M. H. Shamsi
> > >
> >
> >
> >
> > --
> > Howard M. Lewis Ship
> >
> > Creator Apache Tapestry and Apache HiveMind
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
>
> sincerely yours
> M. H. Shamsi
>



-- 
sincerely yours
M. H. Shamsi

Reply via email to