Weird classClassNotFoundException Was: Re: How to pass a reference of ASO to my SqueezeAdaptor

2006-09-06 Thread Borut Bolčina

Thanks Barry, the squeezer now works, but now I am having problem passing
the object to and from component on the page. Becouse the error is so weird,
I conclude something is wrong with component parametrs not being properly
handled. It works without the component. Page includes component

   
   
   
   
   

The component gets a list (children) which are value objects registered for
squeezing and their parent (category - also the same type) and should
display a list of their names. When a child category is clicked the
component sends a message through listener to the page that contains it to
invoke

  public IPage onClickCategory(CategoryVO categoryVO) {
 WizardStep2 wizardStep2 = getWizardStep2Page();
 wizardStep2.setCategory(categoryVO);
 return (IPage) wizardStep2;
  }

which should display children's children, but instead I am getting the

Could not load class com.package.ClassName from WebappClassLoader delegate:
false repositories: /WEB-INF/classes/ --> Parent Classloader:
[EMAIL PROTECTED] :
com.package.ClassName

In my

  public Collection getChildren() {
 logger.info("get children of " + getCategory());
 Collection children = getManager().getChildren(getCategory(), null);
 logger.info("= " + children);
 return children;
  }

page class method getCategory() returns null. The setter and getter are
defined

  abstract public CategoryVO getCategory();
  abstract public void setCategory(CategoryVO categoryVO);

Advice appreciated!


2006/9/6, Barry Books <[EMAIL PROTECTED]>:


Here is mine. Just add the state manager as a property and pull out
what you need.

public Object unsqueeze(DataSqueezer squeezer, String string) {
try {
Repository repository = (Repository)
stateManager.get("repository");
User user = (User) stateManager.get("user");
return repository.select(user, new Long(
string.substring(1)));
} catch (NumberFormatException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}


private ApplicationStateManager stateManager;
public void setStateManager(ApplicationStateManager stateManager)
{
   this.stateManager = stateManager;
}
}


  

  









   




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: How to pass a reference of ASO to my SqueezeAdaptor

2006-09-06 Thread Shing Hing Man
The HiveMind registry is stored as a context
parameter.
Please check out the 
following post in the archive.

http://article.gmane.org/gmane.comp.java.tapestry.user/38716/match=shing

You  can retrieve the 
ApplicationStateManager
from the HiveMind registry,

Shing 

--- [EMAIL PROTECTED] wrote:

> Ohhh. . . .this is *so* close to what I need!
> 
> I have a stand-alone HttpSessionListener impl class
> in my Tap 4 project
> that needs access to an ASO.
> 
> As a hivemodule noob, how can I get access to the
> ApplicationStateManager like shown in Barry's
> awesome example below?
> 
> I *assume* I can't define my HttpSessionListener as
> a 'service point' or
> 'contribution' or 'purple elephant' or any other
> hivemodule glyph, which
> is why I'm posting here.
> 
> Thanks in advance!
> 
> Tom
> 
> -Original Message-
> From: Barry Books [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 06, 2006 10:50 AM
> To: Tapestry users
> Subject: Re: How to pass a reference of ASO to my
> SqueezeAdaptor
> 
> Here is mine. Just add the state manager as a
> property and pull out
> what you need.
> 
> public Object unsqueeze(DataSqueezer squeezer,
> String string) {
>   try {
>   Repository repository = (Repository)
> stateManager.get("repository");
>   User user = (User) stateManager.get("user");
>   return repository.select(user, new
> Long(string.substring(1)));
>   } catch (NumberFormatException e) {
>   // TODO Auto-generated catch block
>   e.printStackTrace();
>   }
>   return null;
>   }
> 
> 
>   private ApplicationStateManager stateManager;
>   public void setStateManager(ApplicationStateManager
> stateManager) {
>  this.stateManager = stateManager;
>   }
> }
> 
> 
configuration-id="tapestry.state.ApplicationObjects">
>   
>  class="com.trsvax.mill.baseobject.party.User"/>
>   
> 
> 
>  configuration-id="tapestry.data.SqueezeAdaptors">
> 
> 
> 
>  interface="com.trsvax.mill.MillSqueezer"
> id="millSqueezer">
> 
> 
> value="infrastructure:applicationStateManager"/>
> 
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


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



___ 
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre. http://uk.security.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to pass a reference of ASO to my SqueezeAdaptor

2006-09-06 Thread Thomas.Vaughan
Ohhh. . . .this is *so* close to what I need!

I have a stand-alone HttpSessionListener impl class in my Tap 4 project
that needs access to an ASO.

As a hivemodule noob, how can I get access to the
ApplicationStateManager like shown in Barry's awesome example below?

I *assume* I can't define my HttpSessionListener as a 'service point' or
'contribution' or 'purple elephant' or any other hivemodule glyph, which
is why I'm posting here.

Thanks in advance!

Tom

-Original Message-
From: Barry Books [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 06, 2006 10:50 AM
To: Tapestry users
Subject: Re: How to pass a reference of ASO to my SqueezeAdaptor

Here is mine. Just add the state manager as a property and pull out
what you need.

public Object unsqueeze(DataSqueezer squeezer, String string) {
try {
Repository repository = (Repository)
stateManager.get("repository");
User user = (User) stateManager.get("user");
return repository.select(user, new
Long(string.substring(1)));
} catch (NumberFormatException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}


private ApplicationStateManager stateManager;
public void setStateManager(ApplicationStateManager
stateManager) {
   this.stateManager = stateManager;
}
}


  

  









   




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to pass a reference of ASO to my SqueezeAdaptor

2006-09-06 Thread Barry Books

Here is mine. Just add the state manager as a property and pull out
what you need.

public Object unsqueeze(DataSqueezer squeezer, String string) {
try {
Repository repository = (Repository) 
stateManager.get("repository");
User user = (User) stateManager.get("user");
return repository.select(user, new 
Long(string.substring(1)));
} catch (NumberFormatException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}


private ApplicationStateManager stateManager;
public void setStateManager(ApplicationStateManager stateManager) {
   this.stateManager = stateManager;
}
}


 
   
 









  




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to pass a reference of ASO to my SqueezeAdaptor

2006-09-06 Thread Borut Bolčina

Hi,

I want to pass objects between the pages so I am trying to write my custom
squeezer adaptor. In my hivemodule.xml I have an application ASO

   
   
   
   
   

In my unsqueeze method in my class which implements SqueezeAdaptor I need a
reference to initialized Manager ASO object which holds an initialized data
stucture (value objects of Cayenne data objects), so I can construct the
right value object from the oid (object id).

I am a complete newby to Hivemind. I saw in the archives something like

   
   
   
   
   
   

   
   
   

which uses some spring stuff (also new stuff to me). Can some veteran show
me an example of how can I obtain the required reference to Manager?

Regards,
Borut