PageLink example not working

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

PageLink example not working

Gene Volovich
Perhaps this is more of an OGNL question, but I'm just starting to look
at Tapestry, and in making a simple page, I hit upon the following
problem:  I'm taking the PageLink example from the Tapestry 3.0.3
documentation ( Tapestry-3.0.3/web/doc/ComponentReference/PageLink.html
) and trying to do the example at the bottom.  I'm getting a OGNL
Malformed Exception: "engine@NAVIGATION_PAGES" from doing:

<div id="topnav">
<table id="pagelist">
  <tr jwcid="@Foreach" source="ognl:engine@NAVIGATION_PAGES"
      value="ognl:navigationPage" element="tr">
    <td><span jwcid="@PageLink" page="ognl:navigationPage"/></td>
  </tr>
</table>
</div>

which is basically exactly the same as the example.  I tried doing my
full Engine class name, with the package name prepended, instead of
just the name, and various other changes, but this seems to be some
very basic OGNL problem.  Is there something I'm missing here?  Thanks
in advance for any info on this.

Gene


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: PageLink example not working

Shing Hing Man
I do not know whether the following helps.

From
Tapestry-3.0.3/web/doc/ComponentReference/PageLink.html

the engine in engine@NAVIGATION_PAGES
is not the
org.apache.tapestry.engine.BaseEngine .

The engine meant to be an instance of
(from PageLink.html)

public class MailEngine extends SimpleEngine
implements Serializable {
    public static final String[] NAVIGATION_PAGES =
        { "Home", "Inbox", "Sent", "Compose",
"Contacts", "Options", "Help", "Logout" };
}


Shing

--- Gene Volovich <[hidden email]> wrote:
> Perhaps this is more of an OGNL question, but I'm
> just starting to look
> at Tapestry, and in making a simple page, I hit upon
> the following
> problem:  I'm taking the PageLink example from the
> Tapestry 3.0.3
> documentation (
>
Tapestry-3.0.3/web/doc/ComponentReference/PageLink.html

>
> ) and trying to do the example at the bottom.  I'm
> getting a OGNL
> Malformed Exception: "engine@NAVIGATION_PAGES" from
> doing:
>
> <div id="topnav">
> <table id="pagelist">
>   <tr jwcid="@Foreach"
> source="ognl:engine@NAVIGATION_PAGES"
>       value="ognl:navigationPage" element="tr">
>     <td><span jwcid="@PageLink"
> page="ognl:navigationPage"/></td>
>   </tr>
> </table>
> </div>
>
> which is basically exactly the same as the example.
> I tried doing my
> full Engine class name, with the package name
> prepended, instead of
> just the name, and various other changes, but this
> seems to be some
> very basic OGNL problem.  Is there something I'm
> missing here?  Thanks
> in advance for any info on this.
>
> Gene
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [hidden email]
> For additional commands, e-mail:
> [hidden email]
>
>

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


               
___________________________________________________________
How much free photo storage do you get? Store your holiday
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: PageLink example not working

Jamie Orchard-Hays
In reply to this post by Gene Volovich
you can use:
@fully.qualified.path.ClassName@STATIC_PROPERTY

to reference static properties with ognl. In your case, I'd make a
convenience getter so you could refer to the property like this:
engine.navitaionPages

Also, have you defined the navigationPage property in your .page
specification?

jamie
On May 7, 2005, at 2:06 PM, Gene Volovich wrote:

> Perhaps this is more of an OGNL question, but I'm just starting to
> look at Tapestry, and in making a simple page, I hit upon the
> following problem:  I'm taking the PageLink example from the Tapestry
> 3.0.3 documentation (
> Tapestry-3.0.3/web/doc/ComponentReference/PageLink.html ) and trying
> to do the example at the bottom.  I'm getting a OGNL Malformed
> Exception: "engine@NAVIGATION_PAGES" from doing:
>
> <div id="topnav">
> <table id="pagelist">
>  <tr jwcid="@Foreach" source="ognl:engine@NAVIGATION_PAGES"
>      value="ognl:navigationPage" element="tr">
>    <td><span jwcid="@PageLink" page="ognl:navigationPage"/></td>
>  </tr>
> </table>
> </div>
>
> which is basically exactly the same as the example.  I tried doing my
> full Engine class name, with the package name prepended, instead of
> just the name, and various other changes, but this seems to be some
> very basic OGNL problem.  Is there something I'm missing here?  Thanks
> in advance for any info on this.
>
> Gene
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: PageLink example not working

Gene Volovich
Thanks, I did define the navigationPage property, and I did define
"engine" to be my particular engine (someone else had asked if I did
this), but still the same result.  I WAS able to use the
@fully.qualified.path@STATIC_PROPERTY though, as you suggested below.  
However, the links were blank until I put a <span jwcid="@Insert"
value="ognl:navigationPage"/> inside the <span
jwcid="@PageLink">...</span>.  I had expected some sort of default
"filling in" of the text for the link, but oh well.    Again, thanks
very much to all of you for your help.

Gene

On May 7, 2005, at 2:34 PM, Jamie Orchard-Hays wrote:

> you can use:
> @fully.qualified.path.ClassName@STATIC_PROPERTY
>
> to reference static properties with ognl. In your case, I'd make a
> convenience getter so you could refer to the property like this:
> engine.navitaionPages
>
> Also, have you defined the navigationPage property in your .page
> specification?
>
> jamie
> On May 7, 2005, at 2:06 PM, Gene Volovich wrote:
>
>> Perhaps this is more of an OGNL question, but I'm just starting to
>> look at Tapestry, and in making a simple page, I hit upon the
>> following problem:  I'm taking the PageLink example from the Tapestry
>> 3.0.3 documentation (
>> Tapestry-3.0.3/web/doc/ComponentReference/PageLink.html ) and trying
>> to do the example at the bottom.  I'm getting a OGNL Malformed
>> Exception: "engine@NAVIGATION_PAGES" from doing:
>>
>> <div id="topnav">
>> <table id="pagelist">
>>  <tr jwcid="@Foreach" source="ognl:engine@NAVIGATION_PAGES"
>>      value="ognl:navigationPage" element="tr">
>>    <td><span jwcid="@PageLink" page="ognl:navigationPage"/></td>
>>  </tr>
>> </table>
>> </div>
>>
>> which is basically exactly the same as the example.  I tried doing my
>> full Engine class name, with the package name prepended, instead of
>> just the name, and various other changes, but this seems to be some
>> very basic OGNL problem.  Is there something I'm missing here?  
>> Thanks in advance for any info on this.
>>
>> Gene
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]