You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Guido Wegener <gw...@startext.de> on 2004/01/28 10:00:18 UTC

Vera long HREF's generated by Tapestry/Tacos-Tree

When using org.apache.tapestry.contrib.tree, the generated HTML contains extremely long
href's for the tree's nodes. The workbench examples run fine with reasonable href's.
The length of the href seems to double for every level of the tree, the example below
was taken from a direct child of the root node.

How are the parameters of such links generated? I was not able to change them by changing
TreeNode.hashCode or TreeDataModel.getParentUniqueKey.

Best regards,
  Guido Wegener

<a href="/vera/app?service=direct/1/Recherche/treeNodeView.direct&amp;sp=OH4sIAAAAAAAAAM1YTWgbRxQeK85_0jhOSAO9DC4EG5TVSrIT_zRpJWtjbyzLRrtOQkxxRtpZ7cSrXXV2ZCsOCaWkUHoqhSaXQC85BnpLS8lN19JLT731Uuilp0LJoYe-2V1Jbk2QnUDIguWdnfe-9-Z938xb6emfaH_AkerzmkIapOpQRZAGDQS_o1R9T3BWUQSnVAlYveFSxYT7ZSKcX_7-7Og_9BjZhwaK6EiDcOoJ-VygTBGwUhFWqoOVirFSEisVYaU6WDOtRvAJuo9QAzIZuk02iNIUzFWu0arw-a-P7q1-OvPdQALt09HJqgRm4o7uVTmtQ1AdHaNueDfrNz2xio7GwwIRRKBTq0UJmHKJV0stVW4DJIRD0ZVo8o6BIg2U2OCrn298OxSMuQmEQtsjAp10SRAucNavN3wP8CFXxYK6CMIFbQllg3LSqx2nsHwuy3klL9dZ8i16f_jWezcf_f5HAh3U0X6LNoSzigYrrl8RKLGaL6JDVYe5liwlGorSlnVIFVkgZooowSyBhrctx4CKejWYGfRIncoKHu9yIeMJNNWfizoYuil9sSlIxaWdVCVoA1Ybgrb2qA8JcNgRSfblyNcJlCiiE_U1v3J7uZuYRH2niI7X1wIqZrtrPrFtzQaVPElBnOwJYp4EDkz8WPj8m4c_fD--T9KzeQwIGvrwo4jRlvyQXqd7XkXmrVNLFvHYmPHx1VtfjESOg2C6PxTekUh_wzuxBkAhQM3Tv959ceCQ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RcGQxngnCwLbMc5iR-hFAAhgGm9txjAB7JwYk4fFgxi8RrnLwidzNKCuGwGEYS72lfKOBpF5WYNAfTpEJuoQ53a3IeIzPtU943fntttTemD5LTile4dECXqRaZi5nFmMehY0qTI0pLkVE49eXSnr0J7gEfSiUgGXcmb7cTk0xMta2VgqaaWxvR8g47s5QHbQP_6K7wfjEfv5119prIyFrjJeH3LXqjn7VqnGyC0uFldKc1pp7-xPvBL7E6_I_kTE_pFexjGLp7os9qZ2zcbwy9iY5ZRAU9MLUN95bQQvbXq0NwpnofHAV3_wyahqVlEvKuoUVqems-PT6uS0mlXBTL7J0D5Ge-B9x9cZw3yFrxuGeSPn0N2ewWf-_5YeuQs0KMPHHBzf9h5tmK2GQAeiJw1pMN2Ir1aIPdj9UUSODsqfPeTNYflxpmv6L8wpYAYwEgAA&amp;sp=F&amp;sp=ARecherche%2FtreeView#tree" name="">

-- 
Guido Wegener
startext Unternehmensberatung GmbH
Kennedyallee 2, D-53175 Bonn
Tel: +49 (0)228 959 96-26, Fax: +49 (0)228 959 96-66
Internet: http://www.startext.de, E-Mail: gwe@startext.de
 


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


RE: Vera long HREF's generated by Tapestry/Tacos-Tree

Posted by tsvetelin <ts...@rushmore-digital.com>.
Hi Guido,

I suppose that you are using the default implementation of ITreeDataModel.
When the TreeNodeView component generate node link it take the ID object of
current rendered node from ITreeDataModel. The default implementation return
a TreePath object as ID, this object contains  pointers to the node and to
the parent id object(parent TreePath) and the sequence go to the root node.
So when the TreeNodeView serialize the ID for rendered node it serialize all
sequence of node to the root node. This is the reason why the link are long.
This is implemented in this way because in general case you can have only
one node with particular unique ID in parent node, but you can have another
node with same id in second parent node. For example - the file system, you
can have one folder/file with particular name in particular directory, but
you can have another file with the same name in second directory.

If you have some kind of ID field in your tree node data object, you should
make your implementation of ITreeDataModel. This is done in the file system
demo. There is a custom FileSystemDataModel and one of its methods that
return a object ID is:

    /**
     * @see
org.apache.tapestry.contrib.tree.model.ITreeDataModel#getUniqueKey(Object,
Object)
     */
    public Object getUniqueKey(Object objTarget, Object objParentUniqueKey)
{
        IFileSystemTreeNode objNode = (IFileSystemTreeNode) objTarget;
        return objNode.getAbsolutePath();
    }

In this case the sequence of TreePath is removed. There is only one String
ID for each file system node.

I hope this will be helpful.

Tsvetelin Saykov

-----Original Message-----
From: Guido Wegener [mailto:gwe@startext.de]
Sent: Wednesday, January 28, 2004 11:00 AM
To: tapestry-user@jakarta.apache.org
Subject: Vera long HREF's generated by Tapestry/Tacos-Tree


When using org.apache.tapestry.contrib.tree, the generated HTML contains
extremely long
href's for the tree's nodes. The workbench examples run fine with reasonable
href's.
The length of the href seems to double for every level of the tree, the
example below
was taken from a direct child of the root node.

How are the parameters of such links generated? I was not able to change
them by changing
TreeNode.hashCode or TreeDataModel.getParentUniqueKey.

Best regards,
  Guido Wegener

<a
href="/vera/app?service=direct/1/Recherche/treeNodeView.direct&amp;sp=OH4sIA
AAAAAAAAM1YTWgbRxQeK85_0jhOSAO9DC4EG5TVSrIT_zRpJWtjbyzLRrtOQkxxRtpZ7cSrXXV2Z
CsOCaWkUHoqhSaXQC85BnpLS8lN19JLT731Uuilp0LJoYe-2V1Jbk2QnUDIguWdnfe-9-Z938xb6
emfaH_AkerzmkIapOpQRZAGDQS_o1R9T3BWUQSnVAlYveFSxYT7ZSKcX_7-7Og_9BjZhwaK6EiDc
OoJ-VygTBGwUhFWqoOVirFSEisVYaU6WDOtRvAJuo9QAzIZuk02iNIUzFWu0arw-a-P7q1-OvPdQ
ALt09HJqgRm4o7uVTmtQ1AdHaNueDfrNz2xio7GwwIRRKBTq0UJmHKJV0stVW4DJIRD0ZVo8o6BI
g2U2OCrn298OxSMuQmEQtsjAp10SRAucNavN3wP8CFXxYK6CMIFbQllg3LSqx2nsHwuy3klL9dZ8
i16f_jWezcf_f5HAh3U0X6LNoSzigYrrl8R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07NwVzfwymKTIJDPJXXX4Zi3p
Xk3-6yCdW86mlDwTQVPXsCj6anM1JgCm1NGhfACXkKSuMAoNtpP1psu4Swggvk9PUhOslJKZYcyT
xIc5sG2hVTwNcqDJhABFiDP9uMK5RUX0g6iHBZ9Dzh3qC1oJBsLAtINSIHJpgQiAD3IDUBDsXcjB
Tirypwn02HOeQVfh9iyQjLjMrV9Xg9VnaekDsoHFGILmZuURghTAYcg2hdRLhqAUJD46HxNGUvGI
GANK-ShQ_u5Z8VaLdCmlLdMRcGQxngnCwLbMc5iR-hFAAhgGm9txjAB7JwYk4fFgxi8RrnLwidzN
KCuGwGEYS72lfKOBpF5WYNAfTpEJuoQ53a3IeIzPtU943fntttTemD5LTile4dECXqRaZ
QHbQP_6K7wfjEfv5119prIyFrjJeH3LXqjn7VqnGyC0uFldKc1pp7-xPvBL7E6_I_kTE_pFexjGL
p7os9qZ2zcbwy9iY5ZRAU9MLUN95bQQvbXq0NwpnofHAV3_wyahqVlEvKuoUVqems-PT6uS0mlXB
TL7J0D5Ge-B9x9cZw3yFrxuGeSPn0N2ewWf-_5YeuQs0KMPHHBzf9h5tmK2GQAeiJw1pMN2Ir1aI
Pdj9UUSODsqfPeTNYflxpmv6L8wpYAYwEgAA&amp;sp=F&amp;sp=ARecherche%2FtreeView#t
ree" name="">

--
Guido Wegener
startext Unternehmensberatung GmbH
Kennedyallee 2, D-53175 Bonn
Tel: +49 (0)228 959 96-26, Fax: +49 (0)228 959 96-66
Internet: http://www.startext.de, E-Mail: gwe@startext.de



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