Re: Wicket 6 trees

2012-10-23 Thread PDiefent
yes, i've overridden this method:
@Override
protected Component newContentComponent(String id, IModelSerializable
model) {
return new StyledLinkLabelSerializable(id, model)
{
private static final long serialVersionUID = 1L;


@Override
protected String getStyleClass() {
return treeIcon;
}

}; 
}

Now I get a link without markup followed by the icon and the text from the
model:

div id=node78 class=tree-node
../page?4-1.ILinkListener-tree-subtree-branches-1-node-junction  


em
1 - The space is you - Kurt Klavier (more in time)
/em


/div



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-trees-tp4653082p4653246.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket 6 trees

2012-10-23 Thread Sven Meier

Hi,

if I paste your code into BeginnersTreePage from wicket-examples:

@Override
protected Component newContentComponent(String id, 
IModelFoo node)

{
return new StyledLinkLabelFoo(id, node)
{
private static final long serialVersionUID = 1L;


@Override
protected String getStyleClass()
{
return treeIcon;
}

};
}

... it works as expected.


Now I get a link without markup followed by the icon and the text from the model


Please check your markup in the containing component/page. Perhaps a tag isn't 
properly closed?

Sve



On 10/23/2012 10:06 AM, PDiefent wrote:

return new StyledLinkLabelSerializable(id, model)
{
private static final long serialVersionUID = 1L;


@Override
protected String getStyleClass() {
return treeIcon;
}

};



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket 6 trees

2012-10-22 Thread PDiefent
Hi,
this helped a lot. But I'm struggling with the link component of the node.
If I'm using a StyledLinkLabel inside the newContentComponent method I get a
link for the textual part of the node but there is no icon for toggling the
subtree.
Do you have a hint for me to solve this problem.
Thanks a lot, Peter
 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-trees-tp4653082p4653201.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket 6 trees

2012-10-22 Thread Sven Meier

Are you sure you've overriden #newContentComponent() ?

The component returned by #newNodeComponent() renders the toggle link 
and uses #newContentComponent() to represent the actual content of the node.


Sven


On 10/22/2012 02:57 PM, PDiefent wrote:

Hi,
this helped a lot. But I'm struggling with the link component of the node.
If I'm using a StyledLinkLabel inside the newContentComponent method I get a
link for the textual part of the node but there is no icon for toggling the
subtree.
Do you have a hint for me to solve this problem.
Thanks a lot, Peter
  




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-trees-tp4653082p4653201.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket 6 trees

2012-10-19 Thread Sven Meier

Hi,

by default the new tree implementation uses CSS classes, see

org.apache.wicket.extensions.markup.html.repeater.tree.content.Folder

Of course you can still use images (like LabelIconPanel did):
Overwrite AbstractTree#newContentComponent() creating your own component 
to represent a node's content.


Hope this helps
Sven

On 10/19/2012 08:28 AM, Peter Diefenthaeler wrote:

Hi Sven,
thanks for your reply. The next thing is using different customized icons
for the nodes and leaves dependent on the object's state. In my old Wicket
1.4.x tree this was simply done by overriding PackageResourceReference
getResourceFolderClosed(Object node) for instance.
Is there a solution in Wicket 6 trees also?

Thanks, Peter

http://markmail.org/message/5at4m5uohfpawyck




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Wicket 6 trees

2012-10-18 Thread Peter Diefenthaeler
Hallo,
I would like to use the new wicket tree model to build a tree with 
different node and leaf objects. If I use an ITreeProvider I can only use 
one type for nodes and leaves.
Is there a best practice to build a tree constisting of nodes (i.e. bag, 
sack) and leaves (i.e. apple, pear).

Thanks, Peter


Re: Wicket 6 trees

2012-10-18 Thread Sven Meier

Hi Peter,

just use the nearest common superclass. If there's no other, you'll have 
to use ITreeProviderObject.


Sven


On 10/18/2012 04:11 PM, Peter Diefenthaeler wrote:

Hallo,
I would like to use the new wicket tree model to build a tree with
different node and leaf objects. If I use an ITreeProvider I can only use
one type for nodes and leaves.
Is there a best practice to build a tree constisting of nodes (i.e. bag,
sack) and leaves (i.e. apple, pear).

Thanks, Peter




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket 6 trees

2012-10-18 Thread tiffany
I'm new to Wicket and have created several pages and have a very rudimentary
site up. I am now using version 6.1.1. Is there an example of how to
implement the DefaultNestedTree and DefaultTableTree? I think if I saw code
using those, I'd be off and running, but I am seriously stuck.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-trees-tp4653063p4653071.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org