You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by mirko kleiner <mi...@yahoo.com> on 2004/01/15 17:46:21 UTC

directlink and updating page

Hello
I'm trying to do a directlinkt with it's listener,
which get's (1) data from the visit-object and stores
(2) it back to it. This would be necessairy to update
the page.
Please follow my code:

.Page:
<component id="nextList" type="DirectLink">
  <binding name="listener"
expression="listeners.nextListLink"/>
</component>   

.java:
/**nextListLink: show next list of results.*/
public void nextListLink(IRequestCycle cycle){
  Visit visit = (Visit)getVisit();        
  int sum =
visit.getTelSearchContainer().getIndex()+RESULTNUMBERS;
     //(1)
  visit.getTelSearchContainer().setIndex(sum);				
//(2)
  ...
  SearchResult searchResult = new SearchResult();
    try {
      searchResult = sf.getMatchingAddresses(address,
sum, searchResult, false, false);
     
visit.getTelSearchContainer().setSearchResult(searchResult);
 //(2)
    } catch (Exception e) {
      log.error(e.getMessage());
    }
    ...

By debugging It seem's that it wont update the visit
in (2)?

Any idea?

Mirko

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

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


Re: directlink and updating page

Posted by Jamie Orchard-Hays <ja...@dang.com>.
I don't see what the problem is with #2, but if you're not sending a
parameter with DirectLink, why not use ActionLink instead?

Are you catching an error in your try/catch block?

Jamie
----- Original Message ----- 
From: "mirko kleiner" <mi...@yahoo.com>
To: <ta...@jakarta.apache.org>
Sent: Thursday, January 15, 2004 11:46 AM
Subject: directlink and updating page


> Hello
> I'm trying to do a directlinkt with it's listener,
> which get's (1) data from the visit-object and stores
> (2) it back to it. This would be necessairy to update
> the page.
> Please follow my code:
>
> .Page:
> <component id="nextList" type="DirectLink">
>   <binding name="listener"
> expression="listeners.nextListLink"/>
> </component>
>
> .java:
> /**nextListLink: show next list of results.*/
> public void nextListLink(IRequestCycle cycle){
>   Visit visit = (Visit)getVisit();
>   int sum =
> visit.getTelSearchContainer().getIndex()+RESULTNUMBERS;
>      //(1)
>   visit.getTelSearchContainer().setIndex(sum);
> //(2)
>   ...
>   SearchResult searchResult = new SearchResult();
>     try {
>       searchResult = sf.getMatchingAddresses(address,
> sum, searchResult, false, false);
>
> visit.getTelSearchContainer().setSearchResult(searchResult);
>  //(2)
>     } catch (Exception e) {
>       log.error(e.getMessage());
>     }
>     ...
>
> By debugging It seem's that it wont update the visit
> in (2)?
>
> Any idea?
>
> Mirko
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


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