Re: How to stay on same page

2013-05-14 Thread Mark Ashworth
Hi,

Is there a reason why the *default:* case of the switch statement is not
handled. Maybe if you raise and error here or log out the reportType that
you receive in submit() will give a clue why the beanType is not set
correctly for the passivate method.

Regards,
Mark P Ashworth


On Mon, May 13, 2013 at 9:03 PM, nhhockeyplayer nashua <
nhhockeypla...@hotmail.com> wrote:

> Thnanks jens Here is my passivate   @OnEvent(EventConstants.PASSIVATE)
>  Object[] passivate() {return new Object[] { beanType }; } but
> I toggle it when I hit submit  @OnEvent(value = "go")
>  public Object submit() {
>   logger.debug("In submit : ");  switch (reportType) {
>   case TEAM:
>beanType = Team.class;
>break;
>   case PLAYER:
>beanType = Player.class;
>break;
>   default:
>   }  beanCollection =
> TynamoUTIL.loadCollection(hibernatePersistenceService, beanType);
>
>   return this;
>  }




-- 
Mark P. Ashworth


RE: How to stay on same page

2013-05-13 Thread nhhockeyplayer nashua
Thnanks jens Here is my passivate   @OnEvent(EventConstants.PASSIVATE)  
Object[] passivate() {return new Object[] { beanType }; } but I toggle 
it when I hit submit  @OnEvent(value = "go")
 public Object submit() {
  logger.debug("In submit : ");  switch (reportType) {
  case TEAM:
   beanType = Team.class;
   break;
  case PLAYER:
   beanType = Player.class;
   break;
  default:
  }  beanCollection = TynamoUTIL.loadCollection(hibernatePersistenceService, 
beanType);
  
  return this;
 }

Re: How to stay on same page

2013-05-13 Thread mailingl...@j-b-s.de
Hi Ken!

Can you paste your onPassivate method? Maybe you always return Team.class as 
context parameter instead of beanType member? I expect  you want to see the 
selection in the URL like: query/team right?
Than you need an proper on activate, too. So if you use your enum ReportType in 
onPassivate you can use it in onActivate(ReportType rt) later and load the list 
here?

Jens


Jens

Sent from my iPhone

On 13.05.2013, at 05:42, nhhockeyplayer nashua  
wrote:

> Hi Folks,
> 
> I created a page called Query.
> 
> 
> 
> http://powerplayhockey.noip.us:9011/pphl/query
> 
> 
> It offers two things to the user... a select component and a grid.
> 
> My select has two options... TEAM or PLAYER.
> 
> So I toggle my beanType to Team.class or Player.class and render a grid based 
> on the collection I pull out of the database.
> 
> I am having an issue though. On the submit form method, it currently returns 
> nothing.
> 
>@OnEvent(value = "go")
>void submit() {
>logger.debug("In submit : ");
> 
>switch (reportType) {
>case TEAM:
>beanType = Team.class;
>break;
>case PLAYER:
>beanType = Team.class;
>break;
>default:
>}
>collection = loadCollection(beanType);
>}
> 
> 
> Maybe I can return THIS... Currently it seems to be taking me to 
> http://powerplayhockey.noip.us:9011/team
> 
> Thanks for any tips.
> 
> Best regards 
> and thanks... KEN 

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



How to stay on same page

2013-05-12 Thread nhhockeyplayer nashua
Hi Folks,

I created a page called Query.



http://powerplayhockey.noip.us:9011/pphl/query


It offers two things to the user... a select component and a grid.

My select has two options... TEAM or PLAYER.

So I toggle my beanType to Team.class or Player.class and render a grid based 
on the collection I pull out of the database.

I am having an issue though. On the submit form method, it currently returns 
nothing.

@OnEvent(value = "go")
void submit() {
logger.debug("In submit : ");

switch (reportType) {
case TEAM:
beanType = Team.class;
break;
case PLAYER:
beanType = Team.class;
break;
default:
}
collection = loadCollection(beanType);
}


Maybe I can return THIS... Currently it seems to be taking me to 
http://powerplayhockey.noip.us:9011/team

Thanks for any tips.

Best regards 
and thanks... KEN