Sorry @Environment is lacking
But still no luck heheheh...


alanearl wrote:
> 
> Excuse Me Sir Howard,
> 
> Could you help me with this? Im receiving error...
> 
> 
> org.apache.tapestry5.internal.services.RenderQueueException
> Render queue error in BeginRender[Index:myblock]:
> org.apache.tapestry5.ioc.internal.util.TapestryException
> 
> Template Class
>         <t:actionlink t:id="Button1" t:zone="output">Click
> Me1!</t:actionlink>&nbsp;
>         <t:actionlink t:id="Button2" t:zone="output">Click
> Me2!</t:actionlink>&nbsp;
> 
>         <t:zone t:id="output" t:update="show">
>             Hello
>             <t:delegate to="prop:blockToRender" />
>         </t:zone>
> 
>         <t:Myblock>
> 
>       <t:block t:id="block1">
>       </t:block>
>       <t:block t:id="block2">
>       </t:block>
>             
>         </t:Myblock>
> 
> Page Class
> 
> public class Index
> {
>     @InjectComponent
>     private Zone output;
> 
>     @Inject
>     private Block block1;
> 
>     @Inject
>     private Block block2;
> 
>     private Block blockToRender;
> 
>     public Block getBlockToRender() {
>         return blockToRender;
>     }
> 
>     public void setBlockToRender(Block blockToRender) {
>         this.blockToRender = blockToRender;
>     }
> 
>     Object onActionFromButton1()
>     {
>         setBlockToRender(block1);
>         return blockToRender;
>     }
> 
>     Object onActionFromButton2()
>     {
>         setBlockToRender(block2);
>         return blockToRender;
>     }
> 
> }
> 
> Component Class
> 
> public class Myblock {
> 
>     @Inject 
>     @Path("context:layout/scripts/jquery-1.3.2.min.js")
>     private Asset jquery;
> 
>     @Inject
>     @Path("context:layout/scripts/pagination.js")
>     private Asset pagination;
> 
>     private RenderSupport rendersupport;
> 
>     @BeginRender
>     public void beginRender(){
>         rendersupport.addScriptLink(jquery);
>         rendersupport.addScriptLink(pagination);
>     }
> }
> 
> 
> Howard Lewis Ship wrote:
>> 
>> Search the archives, I'm pretty sure this has come up before.
>> 
>> On Mon, Nov 23, 2009 at 3:24 PM, alanearl <alan-lua...@dash.com.ph>
>> wrote:
>>>
>>> Sory Oakstair i did not detail my problem.
>>> First I dont have any problem integrating Tapestry & JQuery.
>>> My Problem is executing my javascript when it is inside the BLOCK.
>>> I think it will not execute....
>>>
>>> Excuse me Sir Howard,
>>>
>>> I don't understand this part:
>>>
>>> This can be accomplished by using the Delegate component to call back
>>> into your outer component (you have a getter method return an inner
>>> class of type Renderable), and then you inject the stylesheets as
>>> Assets and use RenderSupport to include them.
>>>
>>> What do you mean i need to create a new component then it will be called
>>> by
>>> my page
>>> using injectcomponent & put my javascript in the asset & use render
>>> support?
>>>
>>> Sorry but Im confuse ...
>>>
>>>
>>>
>>>
>>>
>>> Howard Lewis Ship wrote:
>>>>
>>>> The @IncludeJavascriptLibrary annotation changes the beginRender phase
>>>> of your component to add the JavaScript.
>>>>
>>>> When a block within your component is rendered, the component's
>>>> beginRender phase does not execute, just the
>>>> beginRender phase of components *inside* the block.
>>>>
>>>> This can be accomplished by using the Delegate component to call back
>>>> into your outer component (you have a getter method return an inner
>>>> class of type Renderable), and then you inject the stylesheets as
>>>> Assets and use RenderSupport to include them.
>>>>
>>>> On Sun, Nov 22, 2009 at 6:44 PM, alanearl <alan-lua...@dash.com.ph>
>>>> wrote:
>>>>>
>>>>> My Question is when one of my block has jquery. It will not load the
>>>>> jquery
>>>>> then action link perform.
>>>>> Any help is appreciated.... Thanks!
>>>>>
>>>>> My Code .tml
>>>>>
>>>>>   <t:actionlink t:id="testPage" t:zone="output">
>>>>>
>>>>>   <t:zone t:id="output" t:update="show">
>>>>>      Default
>>>>>   <t:delegate to="prop:blockToRender" />
>>>>>   </t:zone>
>>>>>
>>>>>   <t:block id="testBlock">
>>>>>      <!-- With JQuery  it will not load the JQuery -->
>>>>>      Test
>>>>>   </t:block>
>>>>>
>>>>> My Class
>>>>> @IncludeJavaScriptLibrary({"jquery-1.3.2.min.js","test.js"})
>>>>>
>>>>>   �...@injectcomponent
>>>>>    private Zone output;
>>>>>
>>>>>   �...@inject
>>>>>    private Block testBlock;
>>>>>
>>>>>    private Block blockToRender;
>>>>>
>>>>>    public Block getBlockToRender()
>>>>>    {
>>>>>        return blockToRender;
>>>>>    }
>>>>>
>>>>>    Object onActionFromtestPage()
>>>>>    {
>>>>>        blockToRender = testBlock;
>>>>>        return blockToRender;
>>>>>    }
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://old.nabble.com/Help-Tapestry5-Block-with-JavaScript--Anyone-tp26471839p26471839.html
>>>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Howard M. Lewis Ship
>>>>
>>>> Creator of Apache Tapestry
>>>>
>>>> The source for Tapestry training, mentoring and support. Contact me to
>>>> learn how I can get you up and productive in Tapestry fast!
>>>>
>>>> (971) 678-5210
>>>> http://howardlewisship.com
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Help-Tapestry5-Block-with-JavaScript--Anyone-tp26471839p26487973.html
>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>> 
>> 
>> 
>> -- 
>> Howard M. Lewis Ship
>> 
>> Creator of Apache Tapestry
>> 
>> The source for Tapestry training, mentoring and support. Contact me to
>> learn how I can get you up and productive in Tapestry fast!
>> 
>> (971) 678-5210
>> http://howardlewisship.com
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Help-Tapestry5-Block-with-JavaScript--Anyone-tp26471839p26492409.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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

Reply via email to