CVS: Tapestry/framework/src/net/sf/tapestry ComponentAddress.java,1.3,1.4 AbstractPage.java,1.10,1.11 IPage.java,1.11,1.12 AbstractComponent.java,1.20,1.21
Mind Bridge <[email protected]>
| Newsgroups | gmane.comp.java.tapestry.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/tapestry/Tapestry/framework/src/net/sf/tapestry
In directory sc8-pr-cvs1:/tmp/cvs-serv8214/framework/src/net/sf/tapestry
Modified Files:
ComponentAddress.java AbstractPage.java IPage.java
AbstractComponent.java
Log Message:
IPage changes:
getQualifiedName() -> getName()
getName() -> getPageName()
(as definitions. as implementation AbstractPage.getName() remains the same)
Index: ComponentAddress.java
===================================================================
RCS file: /cvsroot/tapestry/Tapestry/framework/src/net/sf/tapestry/ComponentAddress.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ComponentAddress.java 27 Nov 2002 17:58:45 -0000 1.3
--- ComponentAddress.java 23 Dec 2002 12:47:47 -0000 1.4
***************
*** 12,17 ****
* It allows those components to serialize and
* pass as a service parameter information about what component they have to
! * talk to if control returns back to them and they have not been initialized
! * in another way.
*
* <p>This situation often occurs when the component used via IRender contains
--- 12,16 ----
* It allows those components to serialize and
* pass as a service parameter information about what component they have to
! * talk to if control returns back to them.
*
* <p>This situation often occurs when the component used via IRender contains
***************
*** 25,58 ****
public class ComponentAddress implements Serializable
{
! private String m_strPageName;
! private String m_strIdPath;
/**
* Creates a new ComponentAddress object that carries the identification
* information of the given component (the page name and the ID path).
! * @param objComponent the component to get the address of
*/
! public ComponentAddress(IComponent objComponent)
{
! init(objComponent);
}
/**
* Creates a new ComponentAddress using the given Page Name and ID Path
! * @param strPageName the Page Name of the component
! * @param strIdPath the ID Path of the component
*/
! public ComponentAddress(String strPageName, String strIdPath)
{
! m_strPageName = strPageName;
! m_strIdPath = strIdPath;
}
! private void init(IComponent objComponent)
{
! IPage objPage = objComponent.getPage();
! m_strPageName = objPage.getQualifiedName();
! m_strIdPath = objComponent.getIdPath();
}
--- 24,73 ----
public class ComponentAddress implements Serializable
{
! private String _pageName;
! private String _idPath;
/**
* Creates a new ComponentAddress object that carries the identification
* information of the given component (the page name and the ID path).
! * @param component the component to get the address of
*/
! public ComponentAddress(IComponent component)
{
! init(component);
}
/**
* Creates a new ComponentAddress using the given Page Name and ID Path
! * @param pageName the name of the page that contains the component
! * @param idPath the ID Path of the component
*/
! public ComponentAddress(String pageName, String idPath)
{
! _pageName = pageName;
! _idPath = idPath;
}
! /**
! * Creates a new ComponentAddress using the given Page Name and ID Path
! * relative on the provided Namespace
! * @param namespace the namespace of the page that contains the component
! * @param pageName the name of the page that contains the component
! * @param idPath the ID Path of the component
! */
! public ComponentAddress(
! INamespace namespace,
! String pageName,
! String idPath)
{
! _pageName = namespace.constructQualifiedName(pageName);
! _idPath = idPath;
! }
! private void init(IComponent component)
! {
! IPage objPage = component.getPage();
!
! _pageName = objPage.getName();
! _idPath = component.getIdPath();
}
***************
*** 62,69 ****
* @return IComponent a component that has been initialized for the given RequestCycle
*/
! public IComponent findComponent(IRequestCycle objCycle)
{
! IPage objPage = objCycle.getPage(m_strPageName);
! return objPage.getNestedComponent(m_strIdPath);
}
/**
--- 77,84 ----
* @return IComponent a component that has been initialized for the given RequestCycle
*/
! public IComponent findComponent(IRequestCycle cycle)
{
! IPage objPage = cycle.getPage(_pageName);
! return objPage.getNestedComponent(_idPath);
}
/**
***************
*** 73,77 ****
public String getIdPath()
{
! return m_strIdPath;
}
--- 88,92 ----
public String getIdPath()
{
! return _idPath;
}
***************
*** 82,86 ****
public String getPageName()
{
! return m_strPageName;
}
--- 97,101 ----
public String getPageName()
{
! return _pageName;
}
***************
*** 90,94 ****
public int hashCode()
{
! return m_strPageName.hashCode() * 31 + m_strIdPath.hashCode();
}
--- 105,109 ----
public int hashCode()
{
! return _pageName.hashCode() * 31 + _idPath.hashCode();
}
Index: AbstractPage.java
===================================================================
RCS file: /cvsroot/tapestry/Tapestry/framework/src/net/sf/tapestry/AbstractPage.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** AbstractPage.java 27 Nov 2002 17:58:45 -0000 1.10
--- AbstractPage.java 23 Dec 2002 12:47:48 -0000 1.11
***************
*** 65,69 ****
/**
! * The qualified name of the page, which may be prefixed by the
* namespace.
*
--- 65,69 ----
/**
! * The simple name of the page, which must not be prefixed by the
* namespace.
*
***************
*** 72,76 ****
**/
! private String _qualifiedName;
/**
--- 72,76 ----
**/
! private String _pageName;
/**
***************
*** 553,562 ****
/** @since 2.3 **/
! public String getQualifiedName()
{
! if (_qualifiedName == null)
! _qualifiedName = getNamespace().constructQualifiedName(_name);
! return _qualifiedName;
}
}
--- 553,569 ----
/** @since 2.3 **/
! public String getPageName()
{
! if (_pageName == null) {
! _pageName = _name;
!
! // this parsing has to be placed into a separate location
! // there are private class implementating it in PageLoader and PageSource
! int separatorIndex = _pageName.lastIndexOf(INamespace.SEPARATOR);
! if (separatorIndex >= 0)
! _pageName = _pageName.substring(separatorIndex + 1);
! }
! return _pageName;
}
}
Index: IPage.java
===================================================================
RCS file: /cvsroot/tapestry/Tapestry/framework/src/net/sf/tapestry/IPage.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** IPage.java 27 Nov 2002 17:58:45 -0000 1.11
--- IPage.java 23 Dec 2002 12:47:48 -0000 1.12
***************
*** 78,82 ****
/**
! * Returns the simple name of the page within its namespace.
*
**/
--- 78,83 ----
/**
! * Returns the fully qualified name of the page, including its
! * namespace prefix, if any.
*
**/
***************
*** 85,90 ****
/**
! * Returns the fully qualified name of the page, including its
! * namespace prefix, if any.
*
* @since 2.3
--- 86,90 ----
/**
! * Returns the simple name of the page within its namespace.
*
* @since 2.3
***************
*** 92,96 ****
**/
! public String getQualifiedName();
/**
--- 92,96 ----
**/
! public String getPageName();
/**
Index: AbstractComponent.java
===================================================================
RCS file: /cvsroot/tapestry/Tapestry/framework/src/net/sf/tapestry/AbstractComponent.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** AbstractComponent.java 28 Nov 2002 15:05:21 -0000 1.20
--- AbstractComponent.java 23 Dec 2002 12:47:48 -0000 1.21
***************
*** 566,570 ****
return null;
! return _page.getQualifiedName() + "/" + getIdPath();
}
--- 566,570 ----
return null;
! return _page.getName() + "/" + getIdPath();
}
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf