Hi

you can either do a 

<a t:type='PageLink' page='admin/probeshealth'>Probes Health</a>

or 

<a t:type='PageLink' page='prop:myDynamicPageProperty'></a>

// Return page name.
public String getMyDynamicPageProperty(){
   return "admin/probehealth";
}


or 

<a href='${pageUrl'></a>

public String getPageUrl(){
   return pageLinkSource.createPageRenderLink(ProbesHealth.class);
}

You are confusing the three.

PS: Have not looked at your code, will do that tomorrow

regards
Taha



On Aug 31, 2012, at 2:09 PM, Muhammad Gelbana wrote:

> So I'm trying to create page links using the *PageLinkResource* service
> through the *createPageRenderLink* method.
> 
> public Link getProbesHealthUrl() {
>> return pageLinkSource.createPageRenderLink(ProbesHealth.class);
>> }
> 
> 
> The page link component in the template is
> 
> <t:pagelink page="*prop:probesHealthUrl*">Probes Health</t:pagelink>
>> 
> 
> But an error occurs and shows the following message:
> 
> Render queue error in BeginRender[admin/MenuBlocks:pagelink]: Unable to
> resolve '/admin/probeshealth' to a known page name.
> 
> Although the known tapestry pages are
> 
> Page names:
>> 
>>   -
>> 
>> 
>>   - About
>> 
>> 
>>   - Contact
>> 
>> 
>>   - ExceptionReport
>> 
>> 
>>   - Index
>> 
>> 
>>   - PageCatalog
>> 
>> 
>>   - PropertyDisplayBlocks
>> 
>> 
>>   - PropertyEditBlocks
>> 
>> 
>>   - ServiceStatus
>> 
>> 
>>   - admin/MenuBlocks
>> 
>> 
>>   - *admin/ProbesHealth*
>> 
>> 
> So the only difference between the identified page and the one I generate
> using the *PageLinkResource* service is the preceeding slash */*. So I
> tried this instead:
> 
> return
>> pageLinkSource.createPageRenderLink(ProbesHealth.class).toURI().substring(1);
> 
> 
> And returned a string instead and it worked ! I don't think that's the best
> way to do this so what am I doing wrong here ?
> 
> 
> On Thu, Aug 30, 2012 at 12:57 AM, Bob Harner <bobhar...@gmail.com> wrote:
> 
>> Unfortunately, there is a bit of ambiguity in the term "component" as
>> used by Tapestry. It can actually mean 2 different things, depending
>> on whether you're talking in a specific or general way:
>> 
>> 1) Specific: objects defined by the classes in in your
>> {package-name}/components folders
>> 
>> 2) General: objects defined by all those classes under your
>> {package-name}/pages, {package-name}/components and
>> {package-name}/mixins folders
>> 
>> The documentation intermixes both of these meanings -- probably
>> because no one has come up two words that work better than this one
>> word.
>> 
>> In the *general* sense (#2), a page *is* a component. In the
>> *specific* sense, they are distinct things that are 95% similar, as
>> Thiago says.
>> 
>> In my way of thinking (not sure if this is universally agreed upon), a
>> component library is just a Tapestry IOC module that contains
>> components (that is, components in the "general" sense above).
>> 
>> On Wed, Aug 29, 2012 at 5:00 PM, Thiago H de Paula Figueiredo
>> <thiag...@gmail.com> wrote:
>>> On Wed, 29 Aug 2012 17:28:06 -0300, Muhammad Gelbana <
>> m.gelb...@gmail.com>
>>> wrote:
>>> 
>>>> Yes that's true.
>>>> Is including pages in a component library not common ?
>>> 
>>> 
>>> Including pages in a component library is common. And don't forget that
>> in
>>> Tapestry pages and components are 95% the same. A page is a component
>> with
>>> URL and activation context, but without parameters and that can't be
>>> declared inside other components or pages.
>>> 
>>> 
>>>> Calling it a "component library" makes it sound like it's only for
>>>> components.
>>> 
>>> 
>>> It's just the shorter name possible. A component library can have pages,
>>> components, mixins, resources, etc.
>>> 
>>> 
>>>> Was modules supported mainly as component libraries ?
>>> 
>>> 
>>> Absolutely no. Modules are a Tapestry-IoC feature, and Tapestry-IoC
>> doesn't
>>> know about web apps, not even Tapestry(-core) itself.
>>> 
>>> Pages *are* components. And pages in component libraries is common.
>>> 
>>> --
>>> Thiago H. de Paula Figueiredo
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
>> 
> 
> 
> -- 
> *Regards,*
> *Muhammad Gelbana
> Java Developer*


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

Reply via email to