I have a tapestry class which loads a variable
public class Component1 {
Object onActionFromEdit(MyClass object){
String param = object.getMyParam();
...}
}
I would like to access the param value from other component.
What is the best way to get it? Is there some common context where I could store variables? I tried to search the documentation but had no luck so far.
I think you are looking for the ComponentResources class which will allow you to do the following:
If the component is not embedded but part of a sibling, you can also
resources.getContainerResources().getEmbeddedComponent("ComponentId")or even fetch it from the page like so:resources.getPage().getComponentResources().getEmbeddedComponent("ComponentId")