You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by binu pankajakshan <p_...@yahoo.com> on 2005/12/22 05:58:27 UTC

Problem using tapestry for dynamic generation of page.

Hi,
  
  Let me put down what I am trying to do so that the problem can be better understood.  
      I am trying to create a login screen which leads to a second  page which lists out some values read from a ‘.properties’ file. Now I want  that the read values should be displayed as a link which when clicked should be  directed to a third page which again displays a list of items read from an  ‘.xml’ file.
          I want that when the link is clicked a unique id be passed  on to the third page so that I can use it for certain operation in it. 
  
          The entire thing needs to be done in tapestry. 
  
      Things I have tried out.
        
   I am       done with the login screen. Its working fine.
   I have       also been able to create the links
   I extended       the AbstractComponent class to define the component used to display the       links. The renderComponent(IMarkupWriter writer, IRequestCycle cycle) method was       overridden to render the component.   
       
      Problems that I am facing is
        
      
        
      Once        I am clicking on the link and going to the third page am not able to        display any of the user defined components.
      But        if I am trying to display the same component at a go (i.e. without any        kind of interaction with the UI) it’s working fine.
  
        
   How to       capture the data sent from the second page in the third page.   
           
      If needed the sample code written can be provided.
    

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Problem using tapestry for dynamic generation of page.

Posted by Ron Piterman <rp...@gmx.net>.
if you use directLink, you can pass parameters to  listener method in 
the page/component where the link is generated from.
in the listener method, you get a page instance of another page by 
calling requestCycle.getPage(...).
you can then cast the IPage you have to the instance of the Page class 
you know it is, and set some properties, for example the id you passed 
to the listener.

I assume you use 4.0 : on the target page, implement the validate method 
(pageValidate() ? - look at the docu for exact name), to check that the 
needed property is set. if not, throw a PageRedirectException.

Hope that helps,
Cheers,
ROn



binu pankajakshan wrote:
> Hi,
>   
>   Let me put down what I am trying to do so that the problem can be better understood.  
>       I am trying to create a login screen which leads to a second  page which lists out some values read from a ‘.properties’ file. Now I want  that the read values should be displayed as a link which when clicked should be  directed to a third page which again displays a list of items read from an  ‘.xml’ file.
>           I want that when the link is clicked a unique id be passed  on to the third page so that I can use it for certain operation in it. 
>   
>           The entire thing needs to be done in tapestry. 
>   
>       Things I have tried out.
>         
>    I am       done with the login screen. Its working fine.
>    I have       also been able to create the links
>    I extended       the AbstractComponent class to define the component used to display the       links. The renderComponent(IMarkupWriter writer, IRequestCycle cycle) method was       overridden to render the component.   
>        
>       Problems that I am facing is
>         
>       
>         
>       Once        I am clicking on the link and going to the third page am not able to        display any of the user defined components.
>       But        if I am trying to display the same component at a go (i.e. without any        kind of interaction with the UI) it’s working fine.
>   
>         
>    How to       capture the data sent from the second page in the third page.   
>            
>       If needed the sample code written can be provided.
>     
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 


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


Re: Problem using tapestry for dynamic generation of page.

Posted by Gunna Satria <gu...@yahoo.com>.
Hi,
  In Tap 3, you can use parameters like @DirectLink or @ExternalLink components.
  And you can get the value in your listener(if you use DirectLink) or activateExternalPage(if you use ExternalLink).
   
  >>>>>>>>
   I want that when the link is clicked a unique id be passed  
on to the third page so that I can use it for certain operation in it. 



regards,

Gunna SHK
Java Consultant
mail:gunna_satria@yahoo.com
YM:gunna_satria
__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com