You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Patrick Casey <pa...@adelphia.net> on 2005/08/16 18:50:42 UTC

contrib:Palette Problems

 

            Hi Folks,

 

            I've got a contrib.:Palette on one of my forms. The relevant
definition is here:

 

            From the .page file:

 

<component id="selectFields" type="contrib:Palette">

           <binding name="selected" expression="selectedFields" />

           <binding name="model" expression="list" />

           <binding name="sort"
expression="@org.apache.tapestry.contrib.palette.SortMode@USER" />

    </component>    

 

            From the .html file:

 

    <form jwcid="@Form" >

        <input type="text" jwcid="@Hidden" value="ognl:persistKey"/>

        <select jwcid="selectFields" />

            <input type="submit" value="Save"
jwcid="@Submit"listener="ognl:listeners.saveList"/> 

    </form>

 

      It draws all right, the only problem is that the appropriate javascipt
file doesn't appear to be loading. When I try to use it, I get errors in my
javascript console like "select_selectFields is not defined". The function
in question is part of the palette's .js file (in the contrib. jar), but
nowhere on my page is a script tag showing up, hence no script, hence the
errors.

 

      To make matters more confusing, if I turn the page cache off - never
works.

      With the page cache on - fails on the *first* creation of a page,
works subsequently

 

      So it smells like some sort of an initialization issue either with my
pages or with the palette itself.

 

      Can anyone offer some advice on what's going on here and (hopefully)
some suggestions as to how to fix it?

 

      --- Pat