You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ron Piterman <rp...@gmx.net> on 2006/12/14 12:39:47 UTC

Re: Moving Components inside a Border Component...

you put it in the template of the component, and thats it.
if you want it to be configured from the page/container you use 
parameter chain.

for example:

your border might contain (and probably will):

<html jwcid="@Shell" title="ognl:title">...

since the title is different in every page you add
a title parameter to your border:

@Parameter(required=true) public abstract String getTitle();

and when using the border:

<html jwcid="@Border" title="...">

the title will be "passed through" to the shell.

Quite easy :)

Cheers,
Ron


This High Xvision wrote:
> Hi! (I'm a newbie, so please bear with me...)
> 
> I'm trying to build a Border Component.
> 
> So far so good, it works as long as I don't embed
> another component.
> 
> For example if on my Home.Html page I add
> 
> <span jwcid="@Border">
> <span jwcid="@menu:jsCookMenu ....>
> 
> It works.
> 
> But I want to move the jscookmenu inside the Border
> component, and oh 
> boy, I am beginning to give up and go to JSF... :-)
> 
> So my question is very simple:
> 
> How to instantiate a component inside of a component?
> 
> I've tried everything that I remember of and read the
> forums, but no 
> solution...
> 
> Inside the .JWC file on the <Component-specification>,
> I've put the 
> jscookmenu asset, but I need to instanciate the
> jscookmenu, right?
> 
> How?
> 
> Thanks!
> 
> 
>  
> ____________________________________________________________________________________
> Do you Yahoo!?
> Everyone is raving about the all-new Yahoo! Mail beta.
> http://new.mail.yahoo.com
> 
> ---------------------------------------------------------------------
> 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: Moving Components inside a Border Component...

Posted by Ron Piterman <rp...@gmx.net>.
well, it should work - check if tapestry is actually using your border's 
class, it might be you have a configuration error somewhere...

This should be quite clear if you examine the exception page tapestry 
generates: NoSuchPropertyException - look on which class there is no 
such property...

Cheers,
Ron


Thx1011 wrote:
> Hi!
> 
> Thanks for your help, but I think that this is not quite the problem that I
> have...
> 
> Let's suppose one component named  XPTO, that takes one parameter PARM.
> 
> So in my "normal" Home page I use it like this:
> 
> <span jwcid="@XPTO" PARM="ognl:xmlAsset'">
> 
> This is ok, I think.
> 
> Now I move that line to inside the HTML new component named Border.
> 
> So my Home page becomes:
> 
> <span jwcid="@Border">
> 
> And Inside the new Border HTML, I put the same line above:
> 
> <span jwcid="@XPTO" PARM="ognl:xmlAsset">
> 
> What happens now is that I get an exception saying that can't parse the OGNL
> Expression....
> 
> I've moved the property accessors to the Border.java, but still it doesn't
> work.
> 
> The exception is:
> 
> # ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:123)
> # ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1616)
> # ognl.ASTProperty.getValueBody(ASTProperty.java:96)
> # ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
> # ognl.SimpleNode.getValue(SimpleNode.java:210)
> # ognl.Ognl.getValue(Ognl.java:333)
> # ognl.Ognl.getValue(Ognl.java:310) 
> 
> So what I'm missing?
>  
> I really can't figure it out...
> 
> 
> 
> 
> Ron Piterman-2 wrote:
> 
>>you put it in the template of the component, and thats it.
>>if you want it to be configured from the page/container you use 
>>parameter chain.
>>
>>for example:
>>
>>your border might contain (and probably will):
>>
>><html jwcid="@Shell" title="ognl:title">...
>>
>>since the title is different in every page you add
>>a title parameter to your border:
>>
>>@Parameter(required=true) public abstract String getTitle();
>>
>>and when using the border:
>>
>><html jwcid="@Border" title="...">
>>
>>the title will be "passed through" to the shell.
>>
>>Quite easy :)
>>
>>Cheers,
>>Ron
>>
>>
>>This High Xvision wrote:
>>
>>>Hi! (I'm a newbie, so please bear with me...)
>>>
>>>I'm trying to build a Border Component.
>>>
>>>So far so good, it works as long as I don't embed
>>>another component.
>>>
>>>For example if on my Home.Html page I add
>>>
>>><span jwcid="@Border">
>>><span jwcid="@menu:jsCookMenu ....>
>>>
>>>It works.
>>>
>>>But I want to move the jscookmenu inside the Border
>>>component, and oh 
>>>boy, I am beginning to give up and go to JSF... :-)
>>>
>>>So my question is very simple:
>>>
>>>How to instantiate a component inside of a component?
>>>
>>>I've tried everything that I remember of and read the
>>>forums, but no 
>>>solution...
>>>
>>>Inside the .JWC file on the <Component-specification>,
>>>I've put the 
>>>jscookmenu asset, but I need to instanciate the
>>>jscookmenu, right?
>>>
>>>How?
>>>
>>>Thanks!
>>>
>>>
>>> 
>>>____________________________________________________________________________________
>>>Do you Yahoo!?
>>>Everyone is raving about the all-new Yahoo! Mail beta.
>>>http://new.mail.yahoo.com
>>>
>>>---------------------------------------------------------------------
>>>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


RE: Moving Components inside a Border Component...

Posted by Thx1011 <th...@yahoo.com>.

WoW!!!!!!

It works!

Thank you very much!!!!

I've done the two things that you described and it started to work right
away!.

Thank you very much.

Now to the next (unknown...) problem... :-)

Best regards!



Shing Hing Man wrote:
> 
> The Border.java should extends BaseComponent instead
> of BasePage.
> 
> Also, 
> In Border.jwc, set the class parameter in
> <component-specification>
> to the associated java class (full package name of 
> Border.java. eg class="man.components.Border").
> 
> 
> Shing
> 
> --- Thx1011 <th...@yahoo.com> wrote:
> 
>> 
>> Ok, I'll post the code:
>> 
>> The Home.html:
>> 
>> <html>
>> <head><title>Tapestry Study</title></head>
>> <body jwcid="$content$">
>>    <span  jwcid="@Border">  </span>
>> </body>
>> </html>
>> 
>> The Home.page:
>> 
>> <page-specification>
>> </page-specification>
>> 
>> The Border Component:
>> 
>> <html>
>> <head></head>
>> <body jwcid="@Body">
>>    <span jwcid="MainMenu@menu:JSCookMenu"
>> source="ognl:menuModel"
>> value="ognl:menuItem" ">
>>        <a_ href="#"
>> jwcid="contentRenderer@DirectLink"
>> listener="listener:onNavigate"
>> parameters="ognl:menuItem.value" >
>>       <span jwcid="@Insert"
>> value="ognl:menuItem.value"/>
>>           </a_>
>>       </span>
>> </body>
>> </html>
>> 
>> The Border.JWC file:
>> 
>> <component-specification>
>>   <asset name="xmlModel"
>>
> path="classpath:/com/partner/tapestry/start-menu.xml"
>>  /> 
>>   <component id="menu" type="menu:JSCookMenu">
>>   </component>
>> </component-specification>
>> 
>> The Border.JAVA file (section of interest):
>> 
>> public abstract class Border extends BasePage
>> implements
>> PageBeginRenderListener{
>>  
>>   private ArrayList<IJSCookMenuItem> model = null;
>> 
>> 
>>   public Iterable<IJSCookMenuItem> getMenuModel(){
>>     return model;
>>   }
>> 
>>   public abstract IJSCookMenuItem getMenuItem();
>>   
>>   public void pageBeginRender(PageEvent arg0) {
>>  ......
>> 
>> The Border.PAGE file:
>> 
>> <page-specification>
>>   <asset path="context:/images/startmenu/book.gif"
>> name="book"/>
>> /// some more assets.... 
>> </page-specification>
>> 
>> Now the errors:
>> 
>> FIRST Exception:
>> 
>> Unable to read OGNL expression '<parsed OGNL
>> expression>' of
>> $BaseComponent_1@13e936f[Home/$Border]:
>> $BaseComponent_1.menuModel
>> 
>> And it show the line <span
>> jwcid="MainMenu@menu:JSCookMenu"
>> source="ognl:menuModel" value="ognl:menuItem"
>> theme="Office2003"
>> position="hbr""> on the BORDER.HTML
>> 
>> The second exception is the same, but it shows the
>> line:
>> 
>> <span jwcid="@Border"> </span>
>> 
>> on the Home.HTML file.
>> 
>> The third is the stack trace.
>> 
>> Thanks for the help! :-)
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> Denis Souza-3 wrote:
>> > 
>> > It might help if you post some code and the actual
>> exception (you only
>> > posted the stack trace).
>> > 
>> > -----Original Message-----
>> > From: Thx1011 [mailto:thx1011@yahoo.com] 
>> > Sent: quinta-feira, 14 de dezembro de 2006 11:00
>> > To: users@tapestry.apache.org
>> > Subject: Re: Moving Components inside a Border
>> Component...
>> > 
>> > 
>> > Hi!
>> > 
>> > Thanks for your help, but I think that this is not
>> quite the problem that
>> > I
>> > have...
>> > 
>> > Let's suppose one component named  XPTO, that
>> takes one parameter PARM.
>> > 
>> > So in my "normal" Home page I use it like this:
>> > 
>> > <span jwcid="@XPTO" PARM="ognl:xmlAsset'">
>> > 
>> > This is ok, I think.
>> > 
>> > Now I move that line to inside the HTML new
>> component named Border.
>> > 
>> > So my Home page becomes:
>> > 
>> > <span jwcid="@Border">
>> > 
>> > And Inside the new Border HTML, I put the same
>> line above:
>> > 
>> > <span jwcid="@XPTO" PARM="ognl:xmlAsset">
>> > 
>> > What happens now is that I get an exception saying
>> that can't parse the
>> > OGNL
>> > Expression....
>> > 
>> > I've moved the property accessors to the
>> Border.java, but still it doesn't
>> > work.
>> > 
>> > The exception is:
>> > 
>> > #
>>
> ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:123)
>> > #
>> ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1616)
>> > #
>> ognl.ASTProperty.getValueBody(ASTProperty.java:96)
>> > #
>>
> ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
>> > # ognl.SimpleNode.getValue(SimpleNode.java:210)
>> > # ognl.Ognl.getValue(Ognl.java:333)
>> > # ognl.Ognl.getValue(Ognl.java:310) 
>> > 
>> > So what I'm missing?
>> >  
>> > I really can't figure it out...
>> > 
>> > 
>> > 
>> > 
>> > Ron Piterman-2 wrote:
>> >> 
>> >> you put it in the template of the component, and
>> thats it.
>> >> if you want it to be configured from the
>> page/container you use 
>> >> parameter chain.
>> >> 
>> >> for example:
>> >> 
>> >> your border might contain (and probably will):
>> >> 
>> >> <html jwcid="@Shell" title="ognl:title">...
>> >> 
>> >> since the title is different in every page you
>> add
>> >> a title parameter to your border:
>> >> 
>> >> @Parameter(required=true) public abstract String
>> getTitle();
>> >> 
>> >> and when using the border:
>> >> 
>> >> <html jwcid="@Border" title="...">
>> >> 
>> 
> === message truncated ===
> 
> 
> Home page :
>   http://uk.geocities.com/matmsh/index.html
> 
> Send instant messages to your online friends http://uk.messenger.yahoo.com 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Moving-Components-inside-a-Border-Component...-tf2819968.html#a7874375
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


RE: Moving Components inside a Border Component...

Posted by Shing Hing Man <ma...@yahoo.com>.
The Border.java should extends BaseComponent instead
of BasePage.

Also, 
In Border.jwc, set the class parameter in
<component-specification>
to the associated java class (full package name of 
Border.java. eg class="man.components.Border").


Shing

--- Thx1011 <th...@yahoo.com> wrote:

> 
> Ok, I'll post the code:
> 
> The Home.html:
> 
> <html>
> <head><title>Tapestry Study</title></head>
> <body jwcid="$content$">
>    <span  jwcid="@Border">  </span>
> </body>
> </html>
> 
> The Home.page:
> 
> <page-specification>
> </page-specification>
> 
> The Border Component:
> 
> <html>
> <head></head>
> <body jwcid="@Body">
>    <span jwcid="MainMenu@menu:JSCookMenu"
> source="ognl:menuModel"
> value="ognl:menuItem" ">
>        <a_ href="#"
> jwcid="contentRenderer@DirectLink"
> listener="listener:onNavigate"
> parameters="ognl:menuItem.value" >
>       <span jwcid="@Insert"
> value="ognl:menuItem.value"/>
>           </a_>
>       </span>
> </body>
> </html>
> 
> The Border.JWC file:
> 
> <component-specification>
>   <asset name="xmlModel"
>
path="classpath:/com/partner/tapestry/start-menu.xml"
>  /> 
>   <component id="menu" type="menu:JSCookMenu">
>   </component>
> </component-specification>
> 
> The Border.JAVA file (section of interest):
> 
> public abstract class Border extends BasePage
> implements
> PageBeginRenderListener{
>  
>   private ArrayList<IJSCookMenuItem> model = null;
> 
> 
>   public Iterable<IJSCookMenuItem> getMenuModel(){
>     return model;
>   }
> 
>   public abstract IJSCookMenuItem getMenuItem();
>   
>   public void pageBeginRender(PageEvent arg0) {
>  ......
> 
> The Border.PAGE file:
> 
> <page-specification>
>   <asset path="context:/images/startmenu/book.gif"
> name="book"/>
> /// some more assets.... 
> </page-specification>
> 
> Now the errors:
> 
> FIRST Exception:
> 
> Unable to read OGNL expression '<parsed OGNL
> expression>' of
> $BaseComponent_1@13e936f[Home/$Border]:
> $BaseComponent_1.menuModel
> 
> And it show the line <span
> jwcid="MainMenu@menu:JSCookMenu"
> source="ognl:menuModel" value="ognl:menuItem"
> theme="Office2003"
> position="hbr""> on the BORDER.HTML
> 
> The second exception is the same, but it shows the
> line:
> 
> <span jwcid="@Border"> </span>
> 
> on the Home.HTML file.
> 
> The third is the stack trace.
> 
> Thanks for the help! :-)
> 
> 
> 
> 
> 
> 
> 
> Denis Souza-3 wrote:
> > 
> > It might help if you post some code and the actual
> exception (you only
> > posted the stack trace).
> > 
> > -----Original Message-----
> > From: Thx1011 [mailto:thx1011@yahoo.com] 
> > Sent: quinta-feira, 14 de dezembro de 2006 11:00
> > To: users@tapestry.apache.org
> > Subject: Re: Moving Components inside a Border
> Component...
> > 
> > 
> > Hi!
> > 
> > Thanks for your help, but I think that this is not
> quite the problem that
> > I
> > have...
> > 
> > Let's suppose one component named  XPTO, that
> takes one parameter PARM.
> > 
> > So in my "normal" Home page I use it like this:
> > 
> > <span jwcid="@XPTO" PARM="ognl:xmlAsset'">
> > 
> > This is ok, I think.
> > 
> > Now I move that line to inside the HTML new
> component named Border.
> > 
> > So my Home page becomes:
> > 
> > <span jwcid="@Border">
> > 
> > And Inside the new Border HTML, I put the same
> line above:
> > 
> > <span jwcid="@XPTO" PARM="ognl:xmlAsset">
> > 
> > What happens now is that I get an exception saying
> that can't parse the
> > OGNL
> > Expression....
> > 
> > I've moved the property accessors to the
> Border.java, but still it doesn't
> > work.
> > 
> > The exception is:
> > 
> > #
>
ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:123)
> > #
> ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1616)
> > #
> ognl.ASTProperty.getValueBody(ASTProperty.java:96)
> > #
>
ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
> > # ognl.SimpleNode.getValue(SimpleNode.java:210)
> > # ognl.Ognl.getValue(Ognl.java:333)
> > # ognl.Ognl.getValue(Ognl.java:310) 
> > 
> > So what I'm missing?
> >  
> > I really can't figure it out...
> > 
> > 
> > 
> > 
> > Ron Piterman-2 wrote:
> >> 
> >> you put it in the template of the component, and
> thats it.
> >> if you want it to be configured from the
> page/container you use 
> >> parameter chain.
> >> 
> >> for example:
> >> 
> >> your border might contain (and probably will):
> >> 
> >> <html jwcid="@Shell" title="ognl:title">...
> >> 
> >> since the title is different in every page you
> add
> >> a title parameter to your border:
> >> 
> >> @Parameter(required=true) public abstract String
> getTitle();
> >> 
> >> and when using the border:
> >> 
> >> <html jwcid="@Border" title="...">
> >> 
> 
=== message truncated ===


Home page :
  http://uk.geocities.com/matmsh/index.html

Send instant messages to your online friends http://uk.messenger.yahoo.com 

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


RE: Moving Components inside a Border Component...

Posted by Thx1011 <th...@yahoo.com>.
Ok, I'll post the code:

The Home.html:

<html>
<head><title>Tapestry Study</title></head>
<body jwcid="$content$">
   <span  jwcid="@Border">  </span>
</body>
</html>

The Home.page:

<page-specification>
</page-specification>

The Border Component:

<html>
<head></head>
<body jwcid="@Body">
   <span jwcid="MainMenu@menu:JSCookMenu" source="ognl:menuModel"
value="ognl:menuItem" ">
       <a_ href="#" jwcid="contentRenderer@DirectLink"
listener="listener:onNavigate" parameters="ognl:menuItem.value" >
      <span jwcid="@Insert" value="ognl:menuItem.value"/>
          </a_>
      </span>
</body>
</html>

The Border.JWC file:

<component-specification>
  <asset name="xmlModel"
path="classpath:/com/partner/tapestry/start-menu.xml"  /> 
  <component id="menu" type="menu:JSCookMenu">
  </component>
</component-specification>

The Border.JAVA file (section of interest):

public abstract class Border extends BasePage implements
PageBeginRenderListener{
 
  private ArrayList<IJSCookMenuItem> model = null;


  public Iterable<IJSCookMenuItem> getMenuModel(){
    return model;
  }

  public abstract IJSCookMenuItem getMenuItem();
  
  public void pageBeginRender(PageEvent arg0) {
 ......

The Border.PAGE file:

<page-specification>
  <asset path="context:/images/startmenu/book.gif" name="book"/>
/// some more assets.... 
</page-specification>

Now the errors:

FIRST Exception:

Unable to read OGNL expression '<parsed OGNL expression>' of
$BaseComponent_1@13e936f[Home/$Border]: $BaseComponent_1.menuModel

And it show the line <span jwcid="MainMenu@menu:JSCookMenu"
source="ognl:menuModel" value="ognl:menuItem" theme="Office2003"
position="hbr""> on the BORDER.HTML

The second exception is the same, but it shows the line:

<span jwcid="@Border"> </span>

on the Home.HTML file.

The third is the stack trace.

Thanks for the help! :-)







Denis Souza-3 wrote:
> 
> It might help if you post some code and the actual exception (you only
> posted the stack trace).
> 
> -----Original Message-----
> From: Thx1011 [mailto:thx1011@yahoo.com] 
> Sent: quinta-feira, 14 de dezembro de 2006 11:00
> To: users@tapestry.apache.org
> Subject: Re: Moving Components inside a Border Component...
> 
> 
> Hi!
> 
> Thanks for your help, but I think that this is not quite the problem that
> I
> have...
> 
> Let's suppose one component named  XPTO, that takes one parameter PARM.
> 
> So in my "normal" Home page I use it like this:
> 
> <span jwcid="@XPTO" PARM="ognl:xmlAsset'">
> 
> This is ok, I think.
> 
> Now I move that line to inside the HTML new component named Border.
> 
> So my Home page becomes:
> 
> <span jwcid="@Border">
> 
> And Inside the new Border HTML, I put the same line above:
> 
> <span jwcid="@XPTO" PARM="ognl:xmlAsset">
> 
> What happens now is that I get an exception saying that can't parse the
> OGNL
> Expression....
> 
> I've moved the property accessors to the Border.java, but still it doesn't
> work.
> 
> The exception is:
> 
> # ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:123)
> # ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1616)
> # ognl.ASTProperty.getValueBody(ASTProperty.java:96)
> # ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
> # ognl.SimpleNode.getValue(SimpleNode.java:210)
> # ognl.Ognl.getValue(Ognl.java:333)
> # ognl.Ognl.getValue(Ognl.java:310) 
> 
> So what I'm missing?
>  
> I really can't figure it out...
> 
> 
> 
> 
> Ron Piterman-2 wrote:
>> 
>> you put it in the template of the component, and thats it.
>> if you want it to be configured from the page/container you use 
>> parameter chain.
>> 
>> for example:
>> 
>> your border might contain (and probably will):
>> 
>> <html jwcid="@Shell" title="ognl:title">...
>> 
>> since the title is different in every page you add
>> a title parameter to your border:
>> 
>> @Parameter(required=true) public abstract String getTitle();
>> 
>> and when using the border:
>> 
>> <html jwcid="@Border" title="...">
>> 
>> the title will be "passed through" to the shell.
>> 
>> Quite easy :)
>> 
>> Cheers,
>> Ron
>> 
>> 
>> This High Xvision wrote:
>>> Hi! (I'm a newbie, so please bear with me...)
>>> 
>>> I'm trying to build a Border Component.
>>> 
>>> So far so good, it works as long as I don't embed
>>> another component.
>>> 
>>> For example if on my Home.Html page I add
>>> 
>>> <span jwcid="@Border">
>>> <span jwcid="@menu:jsCookMenu ....>
>>> 
>>> It works.
>>> 
>>> But I want to move the jscookmenu inside the Border
>>> component, and oh 
>>> boy, I am beginning to give up and go to JSF... :-)
>>> 
>>> So my question is very simple:
>>> 
>>> How to instantiate a component inside of a component?
>>> 
>>> I've tried everything that I remember of and read the
>>> forums, but no 
>>> solution...
>>> 
>>> Inside the .JWC file on the <Component-specification>,
>>> I've put the 
>>> jscookmenu asset, but I need to instanciate the
>>> jscookmenu, right?
>>> 
>>> How?
>>> 
>>> Thanks!
>>> 
>>> 
>>>  
>>>
> ____________________________________________________________________________
> ________
>>> Do you Yahoo!?
>>> Everyone is raving about the all-new Yahoo! Mail beta.
>>> http://new.mail.yahoo.com
>>> 
>>> ---------------------------------------------------------------------
>>> 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
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Moving-Components-inside-a-Border-Component...-tf28199
> 68.html#a7871990
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Moving-Components-inside-a-Border-Component...-tf2819968.html#a7873807
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


RE: Moving Components inside a Border Component...

Posted by Denis Souza <de...@camerum.com.br>.
It might help if you post some code and the actual exception (you only
posted the stack trace).

-----Original Message-----
From: Thx1011 [mailto:thx1011@yahoo.com] 
Sent: quinta-feira, 14 de dezembro de 2006 11:00
To: users@tapestry.apache.org
Subject: Re: Moving Components inside a Border Component...


Hi!

Thanks for your help, but I think that this is not quite the problem that I
have...

Let's suppose one component named  XPTO, that takes one parameter PARM.

So in my "normal" Home page I use it like this:

<span jwcid="@XPTO" PARM="ognl:xmlAsset'">

This is ok, I think.

Now I move that line to inside the HTML new component named Border.

So my Home page becomes:

<span jwcid="@Border">

And Inside the new Border HTML, I put the same line above:

<span jwcid="@XPTO" PARM="ognl:xmlAsset">

What happens now is that I get an exception saying that can't parse the OGNL
Expression....

I've moved the property accessors to the Border.java, but still it doesn't
work.

The exception is:

# ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:123)
# ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1616)
# ognl.ASTProperty.getValueBody(ASTProperty.java:96)
# ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
# ognl.SimpleNode.getValue(SimpleNode.java:210)
# ognl.Ognl.getValue(Ognl.java:333)
# ognl.Ognl.getValue(Ognl.java:310) 

So what I'm missing?
 
I really can't figure it out...




Ron Piterman-2 wrote:
> 
> you put it in the template of the component, and thats it.
> if you want it to be configured from the page/container you use 
> parameter chain.
> 
> for example:
> 
> your border might contain (and probably will):
> 
> <html jwcid="@Shell" title="ognl:title">...
> 
> since the title is different in every page you add
> a title parameter to your border:
> 
> @Parameter(required=true) public abstract String getTitle();
> 
> and when using the border:
> 
> <html jwcid="@Border" title="...">
> 
> the title will be "passed through" to the shell.
> 
> Quite easy :)
> 
> Cheers,
> Ron
> 
> 
> This High Xvision wrote:
>> Hi! (I'm a newbie, so please bear with me...)
>> 
>> I'm trying to build a Border Component.
>> 
>> So far so good, it works as long as I don't embed
>> another component.
>> 
>> For example if on my Home.Html page I add
>> 
>> <span jwcid="@Border">
>> <span jwcid="@menu:jsCookMenu ....>
>> 
>> It works.
>> 
>> But I want to move the jscookmenu inside the Border
>> component, and oh 
>> boy, I am beginning to give up and go to JSF... :-)
>> 
>> So my question is very simple:
>> 
>> How to instantiate a component inside of a component?
>> 
>> I've tried everything that I remember of and read the
>> forums, but no 
>> solution...
>> 
>> Inside the .JWC file on the <Component-specification>,
>> I've put the 
>> jscookmenu asset, but I need to instanciate the
>> jscookmenu, right?
>> 
>> How?
>> 
>> Thanks!
>> 
>> 
>>  
>>
____________________________________________________________________________
________
>> Do you Yahoo!?
>> Everyone is raving about the all-new Yahoo! Mail beta.
>> http://new.mail.yahoo.com
>> 
>> ---------------------------------------------------------------------
>> 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
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/Moving-Components-inside-a-Border-Component...-tf28199
68.html#a7871990
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
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: Moving Components inside a Border Component...

Posted by Thx1011 <th...@yahoo.com>.
Hi!

Thanks for your help, but I think that this is not quite the problem that I
have...

Let's suppose one component named  XPTO, that takes one parameter PARM.

So in my "normal" Home page I use it like this:

<span jwcid="@XPTO" PARM="ognl:xmlAsset'">

This is ok, I think.

Now I move that line to inside the HTML new component named Border.

So my Home page becomes:

<span jwcid="@Border">

And Inside the new Border HTML, I put the same line above:

<span jwcid="@XPTO" PARM="ognl:xmlAsset">

What happens now is that I get an exception saying that can't parse the OGNL
Expression....

I've moved the property accessors to the Border.java, but still it doesn't
work.

The exception is:

# ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:123)
# ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1616)
# ognl.ASTProperty.getValueBody(ASTProperty.java:96)
# ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
# ognl.SimpleNode.getValue(SimpleNode.java:210)
# ognl.Ognl.getValue(Ognl.java:333)
# ognl.Ognl.getValue(Ognl.java:310) 

So what I'm missing?
 
I really can't figure it out...




Ron Piterman-2 wrote:
> 
> you put it in the template of the component, and thats it.
> if you want it to be configured from the page/container you use 
> parameter chain.
> 
> for example:
> 
> your border might contain (and probably will):
> 
> <html jwcid="@Shell" title="ognl:title">...
> 
> since the title is different in every page you add
> a title parameter to your border:
> 
> @Parameter(required=true) public abstract String getTitle();
> 
> and when using the border:
> 
> <html jwcid="@Border" title="...">
> 
> the title will be "passed through" to the shell.
> 
> Quite easy :)
> 
> Cheers,
> Ron
> 
> 
> This High Xvision wrote:
>> Hi! (I'm a newbie, so please bear with me...)
>> 
>> I'm trying to build a Border Component.
>> 
>> So far so good, it works as long as I don't embed
>> another component.
>> 
>> For example if on my Home.Html page I add
>> 
>> <span jwcid="@Border">
>> <span jwcid="@menu:jsCookMenu ....>
>> 
>> It works.
>> 
>> But I want to move the jscookmenu inside the Border
>> component, and oh 
>> boy, I am beginning to give up and go to JSF... :-)
>> 
>> So my question is very simple:
>> 
>> How to instantiate a component inside of a component?
>> 
>> I've tried everything that I remember of and read the
>> forums, but no 
>> solution...
>> 
>> Inside the .JWC file on the <Component-specification>,
>> I've put the 
>> jscookmenu asset, but I need to instanciate the
>> jscookmenu, right?
>> 
>> How?
>> 
>> Thanks!
>> 
>> 
>>  
>> ____________________________________________________________________________________
>> Do you Yahoo!?
>> Everyone is raving about the all-new Yahoo! Mail beta.
>> http://new.mail.yahoo.com
>> 
>> ---------------------------------------------------------------------
>> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Moving-Components-inside-a-Border-Component...-tf2819968.html#a7871990
Sent from the Tapestry - User mailing list archive at Nabble.com.


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