You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Denis Souza <de...@gmail.com> on 2006/03/22 20:46:40 UTC

Hivemind object in squeeze adaptor

Hi,

 

I'm implementing a squeeze adaptor for my app and I was wondering how I
could inject other hivemind objects or services into it.

 

I would have guessed something like this:

 

<contribution configuration-id="tapestry.data.SqueezeAdaptors">

   <adaptor object="instance:MySqueezeAdaptor">

      <set-object property="applicationStateManager"
value="infrastructure:applicationStateManager"/>

   </adaptor>

</contribution>

 

.but of course, it doesn't work. Can anyone help?

 

Thanks,

Denis


RE: [NEW-B] Formatted output - tricky!!

Posted by Hacer Soran <hs...@yahoo.com>.
I did but it displayed the span tag as if it is part of the word instead of underlining it :(

James Carman <ja...@carmanconsulting.com> wrote:  Try 



-----Original Message-----
From: Hacer Soran [mailto:hsoran@yahoo.com] 
Sent: Wednesday, March 22, 2006 3:50 PM
To: Tapestry users
Subject: [NEW-B] Formatted output - tricky!!

 Thank you in advance.
  Imagine you have a string "hello" and a  method to pull the vowels. You
need to highlight vowels by underlining them in  the word. Is this possible
to with Tapestry?
  
      
  PS The @Insert doesn't seem to like the  following in the formatted output
text.
       
      help 
  
  It turns the < into <
     Please help this is very important for the app, is there any way?. 
  
  H
  
    
  
---------------------------------
Win a BlackBerry device from O2 with Yahoo!. Enter now.



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



		
---------------------------------
Yahoo! Photos – NEW, now offering a quality print service from just 8p a photo.

RE: [NEW-B] Formatted output - tricky!!

Posted by James Carman <ja...@carmanconsulting.com>.
Try <span jwcid="@Insert" raw="true" value="..." />



-----Original Message-----
From: Hacer Soran [mailto:hsoran@yahoo.com] 
Sent: Wednesday, March 22, 2006 3:50 PM
To: Tapestry users
Subject: [NEW-B] Formatted output - tricky!!

 Thank you in advance.
  Imagine you have a string "hello" and a  method to pull the vowels. You
need to highlight vowels by underlining them in  the word. Is this possible
to with Tapestry?
  
      
  PS The @Insert doesn't seem to like the  following in the formatted output
text.
       
      h<span  class="udl">e</span>lp 
  
  It turns the < into &lt;
     Please help this is very important for the app, is there any way?. 
  
  H
  
    
		
---------------------------------
Win a BlackBerry device from O2 with Yahoo!. Enter now.



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


[NEW-B] Formatted output - tricky!!

Posted by Hacer Soran <hs...@yahoo.com>.
 Thank you in advance.
  Imagine you have a string “hello” and a  method to pull the vowels. You need to highlight vowels by underlining them in  the word. Is this possible to with Tapestry?
  
      
  PS The @Insert doesn't seem to like the  following in the formatted output text.
       
      h<span  class="udl">e</span>lp 
  
  It turns the < into &lt;
     Please help this is very important for the app, is there any way?. 
  
  H
  
    
		
---------------------------------
Win a BlackBerry device from O2 with Yahoo!. Enter now.

Re: Hivemind object in squeeze adaptor

Posted by Jason Dyer <jd...@bluetarp.com>.
I believe that you need to specify the property injection in the service 
descriptor, not  the <contribution> section.  Mine looks like this (injecting 
a Dao object.)

  <!-- configure our own Hibernate data squeezer... -->
  <service-point id="HibernateAdapter" 
interface="bt.havoc.data.util.IHibernateSqueezeAdapter">
    <invoke-factory>
      <construct class="bt.havoc.data.util.HibernateSqueezeAdapter">
        <set-object property="dao" value="service:genericDao"/>
      </construct>
    </invoke-factory>
  </service-point>

<!-- add it to tapestry's squeeze adaptors -->
  <contribution configuration-id="tapestry.data.SqueezeAdaptors">
    <adaptor object="service:HibernateAdapter"/>
  </contribution>

HTH,
-Jason

On Wednesday 22 March 2006 15:39, Denis Souza wrote:
> Here it is...
>
> In my hivemodule.xml:
>
> <contribution configuration-id="tapestry.data.SqueezeAdaptors">
>    <adaptor
> object="instance:com.camerum.tapestry.squeeze.EntityBeanSqueezeAdaptor"/>
> </contribution>
>
> My squeeze adaptor class (I left out most of the body of the squeeze and
> unsqueeze methods so it wouldn't take so much space).
>
> public class EntityBeanSqueezeAdaptor implements SqueezeAdaptor {
>
> public String getPrefix() {
> 	return String.valueOf('*');
> }
>
> public Class getDataClass() {
> 	return EntityBeanAbstract.class;
> }
>
> public String squeeze(DataSqueezer squeezer, Object object) {
> 	...
> 	return getPrefix() + id;
> }
>
> public Object unsqueeze(DataSqueezer squeezer, String id) {
> 	...
> 	return object;
> }
>
> private ApplicationStateManager stateManager;
>
> public void setStateManager(ApplicationStateManager stateManager) {
> 	this.stateManager = stateManager;
> }
>
> ... that's about it. Inside the squeeze and unsqueeze methods the state
> manager is always null. I also tried using "setApplicationStateManager" as
> the setter method, but with the same results.
>
>
> -----Original Message-----
> From: James Carman [mailto:james@carmanconsulting.com]
> Sent: quarta-feira, 22 de março de 2006 17:24
> To: 'Tapestry users'
> Subject: RE: Hivemind object in squeeze adaptor
>
> If HiveMind sees a "writable" property of a type for which it has exactly
> one matching service point, it will set that property.  I know this works,
> because I do it in one of my own services.  Can you post some code and your
> applicable hivemodule.xml file contents?
>
> -----Original Message-----
> From: Denis Souza [mailto:dsouza@sti.com.br]
> Sent: Wednesday, March 22, 2006 3:21 PM
> To: 'Tapestry users'
> Subject: RE: Hivemind object in squeeze adaptor
>
> ... still not happening. The state manager remains null.
>
> Anyway I don't really understand how it could work. What's the logic with
> this "autowire"? How does hivemind know to fill it in?
>
> -----Original Message-----
> From: James Carman [mailto:james@carmanconsulting.com]
> Sent: quarta-feira, 22 de março de 2006 17:06
> To: 'Tapestry users'
> Subject: RE: Hivemind object in squeeze adaptor
>
> Drop the set-object altogether.  HiveMind will "autowire" it.
>
> -----Original Message-----
> From: Denis Souza [mailto:dsouza@sti.com.br]
> Sent: Wednesday, March 22, 2006 3:04 PM
> To: 'Tapestry users'
> Subject: RE: Hivemind object in squeeze adaptor
>
> I did, it just won't allow me to use a "set-object" inside an adaptor tag:
>
> "Element adaptor/set-object is not allowed here."
>
> But since this is not allowed, I don't know how it can be done.
>
> -----Original Message-----
> From: James Carman [mailto:james@carmanconsulting.com]
> Sent: quarta-feira, 22 de março de 2006 16:53
> To: 'Tapestry users'
> Subject: RE: Hivemind object in squeeze adaptor
>
> Try adding a "setter" to your implementation class...
>
> public class MySqueezeAdaptor
> {
>   private ApplicationStateManager stateManager;
>
>   public void setStateManager( ApplicationStateManager stateManager )
>   {
>     this.stateManager = stateManager;
>   }
> }
>
> -----Original Message-----
> From: Denis Souza [mailto:denis.souza@gmail.com]
> Sent: Wednesday, March 22, 2006 2:47 PM
> To: 'Tapestry users'
> Subject: Hivemind object in squeeze adaptor
>
> Hi,
>
>
>
> I'm implementing a squeeze adaptor for my app and I was wondering how I
> could inject other hivemind objects or services into it.
>
>
>
> I would have guessed something like this:
>
>
>
> <contribution configuration-id="tapestry.data.SqueezeAdaptors">
>
>    <adaptor object="instance:MySqueezeAdaptor">
>
>       <set-object property="applicationStateManager"
> value="infrastructure:applicationStateManager"/>
>
>    </adaptor>
>
> </contribution>
>
>
>
> .but of course, it doesn't work. Can anyone help?
>
>
>
> Thanks,
>
> Denis
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>
>
>
> ---------------------------------------------------------------------
> 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

-- 

----------------------
Marriage is like twirling a baton, turning handsprings, or eating with
chopsticks.  It looks easy until you try it.

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


RE: Hivemind object in squeeze adaptor

Posted by James Carman <ja...@carmanconsulting.com>.
No problem.  Glad to help.  Don't feel bad.  I'm a HiveMind committer and
I seem to learn something new when I start playing around with it in my
projects! :-)


> It works great now! Thanks for your help. I'm still not that fluent in
> hivemind. I learn something every time I need to use it.
>
> -----Original Message-----
> From: James Carman [mailto:james@carmanconsulting.com]
> Sent: quarta-feira, 22 de março de 2006 17:45
> To: 'Tapestry users'
> Subject: RE: Hivemind object in squeeze adaptor
>
> You're not using BuilderFactory to instantiate your squeeze adaptor.  You
> should define a service point for your squeeze adaptor and use that as
> your
> "object" for your contribution...
>
> <service-point id="EntityBeanSqueezeAdaptor"
> interface="org.apache.tapestry.util.io.SqueezeAdaptor">
>   <invoke-factory>
>     <construct
> class="com.camerum.tapestry.squeeze.EntityBeanSqueezeAdaptor">
>   </invoke-factory>
> </service-point>
>
> <contribution configuration-id="tapestry.data.SqueezeAdaptors">
>   <adaptor object="service:EntityBeanSqueezeAdaptor "/>
> </contribution>
>
> -----Original Message-----
> From: Denis Souza [mailto:dsouza@sti.com.br]
> Sent: Wednesday, March 22, 2006 3:40 PM
> To: 'Tapestry users'
> Subject: RE: Hivemind object in squeeze adaptor
>
> Here it is...
>
> In my hivemodule.xml:
>
> <contribution configuration-id="tapestry.data.SqueezeAdaptors">
>    <adaptor
> object="instance:com.camerum.tapestry.squeeze.EntityBeanSqueezeAdaptor"/>
> </contribution>
>
> My squeeze adaptor class (I left out most of the body of the squeeze and
> unsqueeze methods so it wouldn't take so much space).
>
> public class EntityBeanSqueezeAdaptor implements SqueezeAdaptor {
>
> public String getPrefix() {
> 	return String.valueOf('*');
> }
>
> public Class getDataClass() {
> 	return EntityBeanAbstract.class;
> }
>
> public String squeeze(DataSqueezer squeezer, Object object) {
> 	...
> 	return getPrefix() + id;
> }
>
> public Object unsqueeze(DataSqueezer squeezer, String id) {
> 	...
> 	return object;
> }
>
> private ApplicationStateManager stateManager;
>
> public void setStateManager(ApplicationStateManager stateManager) {
> 	this.stateManager = stateManager;
> }
>
> ... that's about it. Inside the squeeze and unsqueeze methods the state
> manager is always null. I also tried using "setApplicationStateManager" as
> the setter method, but with the same results.
>
>
> -----Original Message-----
> From: James Carman [mailto:james@carmanconsulting.com]
> Sent: quarta-feira, 22 de março de 2006 17:24
> To: 'Tapestry users'
> Subject: RE: Hivemind object in squeeze adaptor
>
> If HiveMind sees a "writable" property of a type for which it has exactly
> one matching service point, it will set that property.  I know this works,
> because I do it in one of my own services.  Can you post some code and
> your
> applicable hivemodule.xml file contents?
>
> -----Original Message-----
> From: Denis Souza [mailto:dsouza@sti.com.br]
> Sent: Wednesday, March 22, 2006 3:21 PM
> To: 'Tapestry users'
> Subject: RE: Hivemind object in squeeze adaptor
>
> ... still not happening. The state manager remains null.
>
> Anyway I don't really understand how it could work. What's the logic with
> this "autowire"? How does hivemind know to fill it in?
>
> -----Original Message-----
> From: James Carman [mailto:james@carmanconsulting.com]
> Sent: quarta-feira, 22 de março de 2006 17:06
> To: 'Tapestry users'
> Subject: RE: Hivemind object in squeeze adaptor
>
> Drop the set-object altogether.  HiveMind will "autowire" it.
>
> -----Original Message-----
> From: Denis Souza [mailto:dsouza@sti.com.br]
> Sent: Wednesday, March 22, 2006 3:04 PM
> To: 'Tapestry users'
> Subject: RE: Hivemind object in squeeze adaptor
>
> I did, it just won't allow me to use a "set-object" inside an adaptor tag:
>
> "Element adaptor/set-object is not allowed here."
>
> But since this is not allowed, I don't know how it can be done.
>
> -----Original Message-----
> From: James Carman [mailto:james@carmanconsulting.com]
> Sent: quarta-feira, 22 de março de 2006 16:53
> To: 'Tapestry users'
> Subject: RE: Hivemind object in squeeze adaptor
>
> Try adding a "setter" to your implementation class...
>
> public class MySqueezeAdaptor
> {
>   private ApplicationStateManager stateManager;
>
>   public void setStateManager( ApplicationStateManager stateManager )
>   {
>     this.stateManager = stateManager;
>   }
> }
>
> -----Original Message-----
> From: Denis Souza [mailto:denis.souza@gmail.com]
> Sent: Wednesday, March 22, 2006 2:47 PM
> To: 'Tapestry users'
> Subject: Hivemind object in squeeze adaptor
>
> Hi,
>
>
>
> I'm implementing a squeeze adaptor for my app and I was wondering how I
> could inject other hivemind objects or services into it.
>
>
>
> I would have guessed something like this:
>
>
>
> <contribution configuration-id="tapestry.data.SqueezeAdaptors">
>
>    <adaptor object="instance:MySqueezeAdaptor">
>
>       <set-object property="applicationStateManager"
> value="infrastructure:applicationStateManager"/>
>
>    </adaptor>
>
> </contribution>
>
>
>
> .but of course, it doesn't work. Can anyone help?
>
>
>
> Thanks,
>
> Denis
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>


James Carman, President
Carman Consulting, Inc.


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


RE: Hivemind object in squeeze adaptor

Posted by Denis Souza <ds...@sti.com.br>.
It works great now! Thanks for your help. I'm still not that fluent in
hivemind. I learn something every time I need to use it.

-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com] 
Sent: quarta-feira, 22 de março de 2006 17:45
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

You're not using BuilderFactory to instantiate your squeeze adaptor.  You
should define a service point for your squeeze adaptor and use that as your
"object" for your contribution...

<service-point id="EntityBeanSqueezeAdaptor"
interface="org.apache.tapestry.util.io.SqueezeAdaptor">
  <invoke-factory>
    <construct
class="com.camerum.tapestry.squeeze.EntityBeanSqueezeAdaptor">
  </invoke-factory>             
</service-point>

<contribution configuration-id="tapestry.data.SqueezeAdaptors">
  <adaptor object="service:EntityBeanSqueezeAdaptor "/>
</contribution>

-----Original Message-----
From: Denis Souza [mailto:dsouza@sti.com.br] 
Sent: Wednesday, March 22, 2006 3:40 PM
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

Here it is...

In my hivemodule.xml:

<contribution configuration-id="tapestry.data.SqueezeAdaptors">
   <adaptor
object="instance:com.camerum.tapestry.squeeze.EntityBeanSqueezeAdaptor"/>
</contribution>

My squeeze adaptor class (I left out most of the body of the squeeze and
unsqueeze methods so it wouldn't take so much space).

public class EntityBeanSqueezeAdaptor implements SqueezeAdaptor {

public String getPrefix() {
	return String.valueOf('*');
}

public Class getDataClass() {
	return EntityBeanAbstract.class;
}

public String squeeze(DataSqueezer squeezer, Object object) {
	...
	return getPrefix() + id;
}

public Object unsqueeze(DataSqueezer squeezer, String id) {
	...
	return object;
}

private ApplicationStateManager stateManager;

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

... that's about it. Inside the squeeze and unsqueeze methods the state
manager is always null. I also tried using "setApplicationStateManager" as
the setter method, but with the same results.


-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com] 
Sent: quarta-feira, 22 de março de 2006 17:24
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

If HiveMind sees a "writable" property of a type for which it has exactly
one matching service point, it will set that property.  I know this works,
because I do it in one of my own services.  Can you post some code and your
applicable hivemodule.xml file contents?

-----Original Message-----
From: Denis Souza [mailto:dsouza@sti.com.br] 
Sent: Wednesday, March 22, 2006 3:21 PM
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

... still not happening. The state manager remains null.

Anyway I don't really understand how it could work. What's the logic with
this "autowire"? How does hivemind know to fill it in?

-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com] 
Sent: quarta-feira, 22 de março de 2006 17:06
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

Drop the set-object altogether.  HiveMind will "autowire" it.

-----Original Message-----
From: Denis Souza [mailto:dsouza@sti.com.br] 
Sent: Wednesday, March 22, 2006 3:04 PM
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

I did, it just won't allow me to use a "set-object" inside an adaptor tag:

"Element adaptor/set-object is not allowed here."

But since this is not allowed, I don't know how it can be done.

-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com] 
Sent: quarta-feira, 22 de março de 2006 16:53
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

Try adding a "setter" to your implementation class...

public class MySqueezeAdaptor
{
  private ApplicationStateManager stateManager;

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

-----Original Message-----
From: Denis Souza [mailto:denis.souza@gmail.com] 
Sent: Wednesday, March 22, 2006 2:47 PM
To: 'Tapestry users'
Subject: Hivemind object in squeeze adaptor

Hi,

 

I'm implementing a squeeze adaptor for my app and I was wondering how I
could inject other hivemind objects or services into it.

 

I would have guessed something like this:

 

<contribution configuration-id="tapestry.data.SqueezeAdaptors">

   <adaptor object="instance:MySqueezeAdaptor">

      <set-object property="applicationStateManager"
value="infrastructure:applicationStateManager"/>

   </adaptor>

</contribution>

 

.but of course, it doesn't work. Can anyone help?

 

Thanks,

Denis




---------------------------------------------------------------------
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




---------------------------------------------------------------------
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




---------------------------------------------------------------------
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




---------------------------------------------------------------------
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


RE: Hivemind object in squeeze adaptor

Posted by James Carman <ja...@carmanconsulting.com>.
You're not using BuilderFactory to instantiate your squeeze adaptor.  You
should define a service point for your squeeze adaptor and use that as your
"object" for your contribution...

<service-point id="EntityBeanSqueezeAdaptor"
interface="org.apache.tapestry.util.io.SqueezeAdaptor">
  <invoke-factory>
    <construct
class="com.camerum.tapestry.squeeze.EntityBeanSqueezeAdaptor">
  </invoke-factory>             
</service-point>

<contribution configuration-id="tapestry.data.SqueezeAdaptors">
  <adaptor object="service:EntityBeanSqueezeAdaptor "/>
</contribution>

-----Original Message-----
From: Denis Souza [mailto:dsouza@sti.com.br] 
Sent: Wednesday, March 22, 2006 3:40 PM
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

Here it is...

In my hivemodule.xml:

<contribution configuration-id="tapestry.data.SqueezeAdaptors">
   <adaptor
object="instance:com.camerum.tapestry.squeeze.EntityBeanSqueezeAdaptor"/>
</contribution>

My squeeze adaptor class (I left out most of the body of the squeeze and
unsqueeze methods so it wouldn't take so much space).

public class EntityBeanSqueezeAdaptor implements SqueezeAdaptor {

public String getPrefix() {
	return String.valueOf('*');
}

public Class getDataClass() {
	return EntityBeanAbstract.class;
}

public String squeeze(DataSqueezer squeezer, Object object) {
	...
	return getPrefix() + id;
}

public Object unsqueeze(DataSqueezer squeezer, String id) {
	...
	return object;
}

private ApplicationStateManager stateManager;

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

... that's about it. Inside the squeeze and unsqueeze methods the state
manager is always null. I also tried using "setApplicationStateManager" as
the setter method, but with the same results.


-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com] 
Sent: quarta-feira, 22 de março de 2006 17:24
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

If HiveMind sees a "writable" property of a type for which it has exactly
one matching service point, it will set that property.  I know this works,
because I do it in one of my own services.  Can you post some code and your
applicable hivemodule.xml file contents?

-----Original Message-----
From: Denis Souza [mailto:dsouza@sti.com.br] 
Sent: Wednesday, March 22, 2006 3:21 PM
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

... still not happening. The state manager remains null.

Anyway I don't really understand how it could work. What's the logic with
this "autowire"? How does hivemind know to fill it in?

-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com] 
Sent: quarta-feira, 22 de março de 2006 17:06
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

Drop the set-object altogether.  HiveMind will "autowire" it.

-----Original Message-----
From: Denis Souza [mailto:dsouza@sti.com.br] 
Sent: Wednesday, March 22, 2006 3:04 PM
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

I did, it just won't allow me to use a "set-object" inside an adaptor tag:

"Element adaptor/set-object is not allowed here."

But since this is not allowed, I don't know how it can be done.

-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com] 
Sent: quarta-feira, 22 de março de 2006 16:53
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

Try adding a "setter" to your implementation class...

public class MySqueezeAdaptor
{
  private ApplicationStateManager stateManager;

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

-----Original Message-----
From: Denis Souza [mailto:denis.souza@gmail.com] 
Sent: Wednesday, March 22, 2006 2:47 PM
To: 'Tapestry users'
Subject: Hivemind object in squeeze adaptor

Hi,

 

I'm implementing a squeeze adaptor for my app and I was wondering how I
could inject other hivemind objects or services into it.

 

I would have guessed something like this:

 

<contribution configuration-id="tapestry.data.SqueezeAdaptors">

   <adaptor object="instance:MySqueezeAdaptor">

      <set-object property="applicationStateManager"
value="infrastructure:applicationStateManager"/>

   </adaptor>

</contribution>

 

.but of course, it doesn't work. Can anyone help?

 

Thanks,

Denis




---------------------------------------------------------------------
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




---------------------------------------------------------------------
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




---------------------------------------------------------------------
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




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


RE: Hivemind object in squeeze adaptor

Posted by Denis Souza <ds...@sti.com.br>.
Here it is...

In my hivemodule.xml:

<contribution configuration-id="tapestry.data.SqueezeAdaptors">
   <adaptor
object="instance:com.camerum.tapestry.squeeze.EntityBeanSqueezeAdaptor"/>
</contribution>

My squeeze adaptor class (I left out most of the body of the squeeze and
unsqueeze methods so it wouldn't take so much space).

public class EntityBeanSqueezeAdaptor implements SqueezeAdaptor {

public String getPrefix() {
	return String.valueOf('*');
}

public Class getDataClass() {
	return EntityBeanAbstract.class;
}

public String squeeze(DataSqueezer squeezer, Object object) {
	...
	return getPrefix() + id;
}

public Object unsqueeze(DataSqueezer squeezer, String id) {
	...
	return object;
}

private ApplicationStateManager stateManager;

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

... that's about it. Inside the squeeze and unsqueeze methods the state
manager is always null. I also tried using "setApplicationStateManager" as
the setter method, but with the same results.


-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com] 
Sent: quarta-feira, 22 de março de 2006 17:24
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

If HiveMind sees a "writable" property of a type for which it has exactly
one matching service point, it will set that property.  I know this works,
because I do it in one of my own services.  Can you post some code and your
applicable hivemodule.xml file contents?

-----Original Message-----
From: Denis Souza [mailto:dsouza@sti.com.br] 
Sent: Wednesday, March 22, 2006 3:21 PM
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

... still not happening. The state manager remains null.

Anyway I don't really understand how it could work. What's the logic with
this "autowire"? How does hivemind know to fill it in?

-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com] 
Sent: quarta-feira, 22 de março de 2006 17:06
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

Drop the set-object altogether.  HiveMind will "autowire" it.

-----Original Message-----
From: Denis Souza [mailto:dsouza@sti.com.br] 
Sent: Wednesday, March 22, 2006 3:04 PM
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

I did, it just won't allow me to use a "set-object" inside an adaptor tag:

"Element adaptor/set-object is not allowed here."

But since this is not allowed, I don't know how it can be done.

-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com] 
Sent: quarta-feira, 22 de março de 2006 16:53
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

Try adding a "setter" to your implementation class...

public class MySqueezeAdaptor
{
  private ApplicationStateManager stateManager;

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

-----Original Message-----
From: Denis Souza [mailto:denis.souza@gmail.com] 
Sent: Wednesday, March 22, 2006 2:47 PM
To: 'Tapestry users'
Subject: Hivemind object in squeeze adaptor

Hi,

 

I'm implementing a squeeze adaptor for my app and I was wondering how I
could inject other hivemind objects or services into it.

 

I would have guessed something like this:

 

<contribution configuration-id="tapestry.data.SqueezeAdaptors">

   <adaptor object="instance:MySqueezeAdaptor">

      <set-object property="applicationStateManager"
value="infrastructure:applicationStateManager"/>

   </adaptor>

</contribution>

 

.but of course, it doesn't work. Can anyone help?

 

Thanks,

Denis




---------------------------------------------------------------------
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




---------------------------------------------------------------------
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




---------------------------------------------------------------------
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


RE: Hivemind object in squeeze adaptor

Posted by James Carman <ja...@carmanconsulting.com>.
If HiveMind sees a "writable" property of a type for which it has exactly
one matching service point, it will set that property.  I know this works,
because I do it in one of my own services.  Can you post some code and your
applicable hivemodule.xml file contents?

-----Original Message-----
From: Denis Souza [mailto:dsouza@sti.com.br] 
Sent: Wednesday, March 22, 2006 3:21 PM
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

... still not happening. The state manager remains null.

Anyway I don't really understand how it could work. What's the logic with
this "autowire"? How does hivemind know to fill it in?

-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com] 
Sent: quarta-feira, 22 de março de 2006 17:06
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

Drop the set-object altogether.  HiveMind will "autowire" it.

-----Original Message-----
From: Denis Souza [mailto:dsouza@sti.com.br] 
Sent: Wednesday, March 22, 2006 3:04 PM
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

I did, it just won't allow me to use a "set-object" inside an adaptor tag:

"Element adaptor/set-object is not allowed here."

But since this is not allowed, I don't know how it can be done.

-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com] 
Sent: quarta-feira, 22 de março de 2006 16:53
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

Try adding a "setter" to your implementation class...

public class MySqueezeAdaptor
{
  private ApplicationStateManager stateManager;

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

-----Original Message-----
From: Denis Souza [mailto:denis.souza@gmail.com] 
Sent: Wednesday, March 22, 2006 2:47 PM
To: 'Tapestry users'
Subject: Hivemind object in squeeze adaptor

Hi,

 

I'm implementing a squeeze adaptor for my app and I was wondering how I
could inject other hivemind objects or services into it.

 

I would have guessed something like this:

 

<contribution configuration-id="tapestry.data.SqueezeAdaptors">

   <adaptor object="instance:MySqueezeAdaptor">

      <set-object property="applicationStateManager"
value="infrastructure:applicationStateManager"/>

   </adaptor>

</contribution>

 

.but of course, it doesn't work. Can anyone help?

 

Thanks,

Denis




---------------------------------------------------------------------
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




---------------------------------------------------------------------
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




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


RE: Hivemind object in squeeze adaptor

Posted by Denis Souza <ds...@sti.com.br>.
... still not happening. The state manager remains null.

Anyway I don't really understand how it could work. What's the logic with
this "autowire"? How does hivemind know to fill it in?

-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com] 
Sent: quarta-feira, 22 de março de 2006 17:06
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

Drop the set-object altogether.  HiveMind will "autowire" it.

-----Original Message-----
From: Denis Souza [mailto:dsouza@sti.com.br] 
Sent: Wednesday, March 22, 2006 3:04 PM
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

I did, it just won't allow me to use a "set-object" inside an adaptor tag:

"Element adaptor/set-object is not allowed here."

But since this is not allowed, I don't know how it can be done.

-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com] 
Sent: quarta-feira, 22 de março de 2006 16:53
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

Try adding a "setter" to your implementation class...

public class MySqueezeAdaptor
{
  private ApplicationStateManager stateManager;

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

-----Original Message-----
From: Denis Souza [mailto:denis.souza@gmail.com] 
Sent: Wednesday, March 22, 2006 2:47 PM
To: 'Tapestry users'
Subject: Hivemind object in squeeze adaptor

Hi,

 

I'm implementing a squeeze adaptor for my app and I was wondering how I
could inject other hivemind objects or services into it.

 

I would have guessed something like this:

 

<contribution configuration-id="tapestry.data.SqueezeAdaptors">

   <adaptor object="instance:MySqueezeAdaptor">

      <set-object property="applicationStateManager"
value="infrastructure:applicationStateManager"/>

   </adaptor>

</contribution>

 

.but of course, it doesn't work. Can anyone help?

 

Thanks,

Denis




---------------------------------------------------------------------
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




---------------------------------------------------------------------
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


RE: Hivemind object in squeeze adaptor

Posted by James Carman <ja...@carmanconsulting.com>.
Drop the set-object altogether.  HiveMind will "autowire" it.

-----Original Message-----
From: Denis Souza [mailto:dsouza@sti.com.br] 
Sent: Wednesday, March 22, 2006 3:04 PM
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

I did, it just won't allow me to use a "set-object" inside an adaptor tag:

"Element adaptor/set-object is not allowed here."

But since this is not allowed, I don't know how it can be done.

-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com] 
Sent: quarta-feira, 22 de março de 2006 16:53
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

Try adding a "setter" to your implementation class...

public class MySqueezeAdaptor
{
  private ApplicationStateManager stateManager;

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

-----Original Message-----
From: Denis Souza [mailto:denis.souza@gmail.com] 
Sent: Wednesday, March 22, 2006 2:47 PM
To: 'Tapestry users'
Subject: Hivemind object in squeeze adaptor

Hi,

 

I'm implementing a squeeze adaptor for my app and I was wondering how I
could inject other hivemind objects or services into it.

 

I would have guessed something like this:

 

<contribution configuration-id="tapestry.data.SqueezeAdaptors">

   <adaptor object="instance:MySqueezeAdaptor">

      <set-object property="applicationStateManager"
value="infrastructure:applicationStateManager"/>

   </adaptor>

</contribution>

 

.but of course, it doesn't work. Can anyone help?

 

Thanks,

Denis




---------------------------------------------------------------------
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




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


RE: Hivemind object in squeeze adaptor

Posted by Denis Souza <ds...@sti.com.br>.
I did, it just won't allow me to use a "set-object" inside an adaptor tag:

"Element adaptor/set-object is not allowed here."

But since this is not allowed, I don't know how it can be done.

-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com] 
Sent: quarta-feira, 22 de março de 2006 16:53
To: 'Tapestry users'
Subject: RE: Hivemind object in squeeze adaptor

Try adding a "setter" to your implementation class...

public class MySqueezeAdaptor
{
  private ApplicationStateManager stateManager;

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

-----Original Message-----
From: Denis Souza [mailto:denis.souza@gmail.com] 
Sent: Wednesday, March 22, 2006 2:47 PM
To: 'Tapestry users'
Subject: Hivemind object in squeeze adaptor

Hi,

 

I'm implementing a squeeze adaptor for my app and I was wondering how I
could inject other hivemind objects or services into it.

 

I would have guessed something like this:

 

<contribution configuration-id="tapestry.data.SqueezeAdaptors">

   <adaptor object="instance:MySqueezeAdaptor">

      <set-object property="applicationStateManager"
value="infrastructure:applicationStateManager"/>

   </adaptor>

</contribution>

 

.but of course, it doesn't work. Can anyone help?

 

Thanks,

Denis




---------------------------------------------------------------------
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


RE: Hivemind object in squeeze adaptor

Posted by James Carman <ja...@carmanconsulting.com>.
Try adding a "setter" to your implementation class...

public class MySqueezeAdaptor
{
  private ApplicationStateManager stateManager;

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

-----Original Message-----
From: Denis Souza [mailto:denis.souza@gmail.com] 
Sent: Wednesday, March 22, 2006 2:47 PM
To: 'Tapestry users'
Subject: Hivemind object in squeeze adaptor

Hi,

 

I'm implementing a squeeze adaptor for my app and I was wondering how I
could inject other hivemind objects or services into it.

 

I would have guessed something like this:

 

<contribution configuration-id="tapestry.data.SqueezeAdaptors">

   <adaptor object="instance:MySqueezeAdaptor">

      <set-object property="applicationStateManager"
value="infrastructure:applicationStateManager"/>

   </adaptor>

</contribution>

 

.but of course, it doesn't work. Can anyone help?

 

Thanks,

Denis




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