Table Tree example invisible text in dark mode

2024-01-13 Thread Chris Colman

Hi,

I've recently set Chrome to dark mode and now some of the text in the 
tree examples has become "white on white" and so unreadable:


https://examples9x.wicket.apache.org/tree
<https://examples9x.wicket.apache.org/tree>

The text is definitely there because you can see it when you highlight it.

Perhaps, with these browser controlled themes/dark modes each color 
needs to be assigned explicitly rather than leaving it to 'browser default'.


Bootstrap and other CSS frameworks do this as their very first step by 
including a 'resetting' CSS e.g. normalize.css at the start to 
initialize everything so that nothing is left to chance, regardless of 
which browser the page is rendered in.


Perhaps all these example pages need to do to cope with dark mode is to 
include something like normalize.css as the start?


Alternatively we could convert all the examples to Wicket-Bootstrap and 
choose a sexy Bootstrap template to make them all look really awesome 
and 2020s-ish ;)  I realize that the purpose of examples is to, mainly, 
demostrate usage of particular Wicket components but it certainly 
wouldn't hurt if the examples looked sexy and modern.



Regards,

Chris Colman


Re: Cluster setup, random issues with missing tree nodes and ComponentNotFoundException

2019-04-26 Thread Bergmann Manfred
I think I found the issue.

Sorry for bothering.

Doing a network trace shows that there is a component that deploys a JavaScript 
behavior that triggers a second Ajax call.



Manfred



> Am 26.04.2019 um 10:31 schrieb Bergmann Manfred :
> 
> Hi.
> 
> I’m using Wicket 8.4 with Kendo widgets (8.3) in a cluster setup.
> Meaning Wicket is configured to use HttpSessionStore and Jetty uses 
> NullSessionCache with a custom SessionDataStore.
> All session data goes straight to a backend that distributes the session data.
> 
> I have two issues.
> 
> One is that when using the Kendo AjaxTreeView and a node is opened and I 
> click on that node it is not in the model anymore.
> That is, nodes are loaded lazily and stored inside the TreeViewModel as a 
> field that is serialized as part of the session.
> This effect doesn’t always happen though. When it happens I observed that on 
> expanding a node (click to expand) there are two session writes to the store 
> almost concurrently.
> The first of the writes has slightly larger data (serialized session data) 
> than the second.
> When the expanded node (still visible in browser) is clicked the session is 
> loaded from store, but the last loaded node is missing.
> My assumption is that the second write to the store overrides the session 
> data with obsolete data (loaded node missing).
> 
> The question here is what triggers this second write to the store. Is it from 
> some client Ajax call?
> 
> The second issue is, and probably it’s related.
> Sometimes (couldn’t find a pattern yet) when a view is loaded and I click a 
> button (Kendo Button), it is not present on the page anymore, hence a 
> ComponentNotFoundException is thrown.
> 
> 
> I’m not exactly certain what I want to ask.
> For the first case I found a workaround. The missing node is just re-loaded 
> on demand when it’s missing.
> But there is some general quirk here.
> 
> Any ideas how to trouble shoot this further?
> 
> 
> Regards,
> Manfred


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



Cluster setup, random issues with missing tree nodes and ComponentNotFoundException

2019-04-26 Thread Bergmann Manfred
Hi.

I’m using Wicket 8.4 with Kendo widgets (8.3) in a cluster setup.
Meaning Wicket is configured to use HttpSessionStore and Jetty uses 
NullSessionCache with a custom SessionDataStore.
All session data goes straight to a backend that distributes the session data.

I have two issues.

One is that when using the Kendo AjaxTreeView and a node is opened and I click 
on that node it is not in the model anymore.
That is, nodes are loaded lazily and stored inside the TreeViewModel as a field 
that is serialized as part of the session.
This effect doesn’t always happen though. When it happens I observed that on 
expanding a node (click to expand) there are two session writes to the store 
almost concurrently.
The first of the writes has slightly larger data (serialized session data) than 
the second.
When the expanded node (still visible in browser) is clicked the session is 
loaded from store, but the last loaded node is missing.
My assumption is that the second write to the store overrides the session data 
with obsolete data (loaded node missing).

The question here is what triggers this second write to the store. Is it from 
some client Ajax call?

The second issue is, and probably it’s related.
Sometimes (couldn’t find a pattern yet) when a view is loaded and I click a 
button (Kendo Button), it is not present on the page anymore, hence a 
ComponentNotFoundException is thrown.


I’m not exactly certain what I want to ask.
For the first case I found a workaround. The missing node is just re-loaded on 
demand when it’s missing.
But there is some general quirk here.

Any ideas how to trouble shoot this further?


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



Re: "com.inmethod.grid.treegrid" for advanced grid with tree - is it updated for wicket 7?

2016-09-30 Thread Martin Grigorov
Hi,

The old Wicket Tree component has been deprecated and replaced by a new one
in 6.0.0.
Later it has been removed in Wicket 7.0.0 and moved to WicketStuff.

On Sep 30, 2016 4:58 PM, "durairaj t" <durairaj@gmail.com> wrote:

> The "inmethod.grid for wicket 7.4" using following classes in TreeGrid.java
> from the "org.apache.wicket.extensions.markup.html.tree", but those are
> removed in wicket7.4.
>
> import org.apache.wicket.extensions.markup.html.tree.AbstractTree;
> import org.apache.wicket.extensions.markup.html.tree.DefaultTreeState;
> import org.apache.wicket.extensions.markup.html.tree.ITreeState;
> import org.apache.wicket.extensions.markup.html.tree.ITreeStateListener;
>
>
> On Fri, Sep 30, 2016 at 9:19 AM, durairaj t <durairaj@gmail.com>
> wrote:
>
> > Thank you!
> >
> > On Fri, Sep 30, 2016 at 2:36 AM, Martin Grigorov <mgrigo...@apache.org>
> > wrote:
> >
> >> Hi,
> >>
> >> InMethod-Grid is available for 7.x:
> >> http://search.maven.org/#artifactdetails%7Corg.wicketstuff%
> >> 7Cwicketstuff-inmethod-grid%7C7.4.0%7Cbundle
> >>
> >> Martin Grigorov
> >> Wicket Training and Consulting
> >> https://twitter.com/mtgrigorov
> >>
> >> On Thu, Sep 29, 2016 at 9:33 PM, durairaj t <durairaj....@gmail.com>
> >> wrote:
> >>
> >> >Do I need to remove the entire package (com.inmethod.grid.treegrid
> -
> >> >   auther: Matej Knoop) and should use the Wicket 7 feature
> (Advanced
> >> >   tabular tree)?
> >> >
> >> >   I have used this package in many places in my application with
> the
> >> >   older versions of wicket.
> >> >
> >> >   Any help?
> >> >
> >>
> >
> >
>


Re: "com.inmethod.grid.treegrid" for advanced grid with tree - is it updated for wicket 7?

2016-09-30 Thread durairaj t
The "inmethod.grid for wicket 7.4" using following classes in TreeGrid.java
from the "org.apache.wicket.extensions.markup.html.tree", but those are
removed in wicket7.4.

import org.apache.wicket.extensions.markup.html.tree.AbstractTree;
import org.apache.wicket.extensions.markup.html.tree.DefaultTreeState;
import org.apache.wicket.extensions.markup.html.tree.ITreeState;
import org.apache.wicket.extensions.markup.html.tree.ITreeStateListener;


On Fri, Sep 30, 2016 at 9:19 AM, durairaj t <durairaj@gmail.com> wrote:

> Thank you!
>
> On Fri, Sep 30, 2016 at 2:36 AM, Martin Grigorov <mgrigo...@apache.org>
> wrote:
>
>> Hi,
>>
>> InMethod-Grid is available for 7.x:
>> http://search.maven.org/#artifactdetails%7Corg.wicketstuff%
>> 7Cwicketstuff-inmethod-grid%7C7.4.0%7Cbundle
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Thu, Sep 29, 2016 at 9:33 PM, durairaj t <durairaj@gmail.com>
>> wrote:
>>
>> >Do I need to remove the entire package (com.inmethod.grid.treegrid -
>> >   auther: Matej Knoop) and should use the Wicket 7 feature (Advanced
>> >   tabular tree)?
>> >
>> >   I have used this package in many places in my application with the
>> >   older versions of wicket.
>> >
>> >   Any help?
>> >
>>
>
>


Re: "com.inmethod.grid.treegrid" for advanced grid with tree - is it updated for wicket 7?

2016-09-30 Thread durairaj t
Thank you!

On Fri, Sep 30, 2016 at 2:36 AM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> Hi,
>
> InMethod-Grid is available for 7.x:
> http://search.maven.org/#artifactdetails%7Corg.wicketstuff%7Cwicketstuff-
> inmethod-grid%7C7.4.0%7Cbundle
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Thu, Sep 29, 2016 at 9:33 PM, durairaj t <durairaj@gmail.com>
> wrote:
>
> >Do I need to remove the entire package (com.inmethod.grid.treegrid -
> >   auther: Matej Knoop) and should use the Wicket 7 feature (Advanced
> >   tabular tree)?
> >
> >   I have used this package in many places in my application with the
> >   older versions of wicket.
> >
> >   Any help?
> >
>


Re: "com.inmethod.grid.treegrid" for advanced grid with tree - is it updated for wicket 7?

2016-09-30 Thread Martin Grigorov
Hi,

InMethod-Grid is available for 7.x:
http://search.maven.org/#artifactdetails%7Corg.wicketstuff%7Cwicketstuff-inmethod-grid%7C7.4.0%7Cbundle

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Sep 29, 2016 at 9:33 PM, durairaj t <durairaj@gmail.com> wrote:

>Do I need to remove the entire package (com.inmethod.grid.treegrid -
>   auther: Matej Knoop) and should use the Wicket 7 feature (Advanced
>   tabular tree)?
>
>   I have used this package in many places in my application with the
>   older versions of wicket.
>
>   Any help?
>


"com.inmethod.grid.treegrid" for advanced grid with tree - is it updated for wicket 7?

2016-09-29 Thread durairaj t
   Do I need to remove the entire package (com.inmethod.grid.treegrid -
  auther: Matej Knoop) and should use the Wicket 7 feature (Advanced
  tabular tree)?

  I have used this package in many places in my application with the
  older versions of wicket.

  Any help?


Re: Wicket Tree - Getting The Selected Node

2015-09-25 Thread Anup
Sven Meier wrote
> a NestedTree does not have any notion of 'selection'.
> But the set of expanded nodes is kept in the tree's model object, see 
> AbstractTree#expand() and #collapse().
> 
> You decide how to represent each node's content, for this you'll have to 
> override AbstractTree#newContentComponent(). The default will just 
> expand and collapse the tree branches on each click, see
> 
> org.apache.wicket.extensions.markup.html.repeater.tree.content.Folder
> 
> You can override Folder's methods or use any other component to 
> represent your nodes.

Thanks Sven. I have understood the above as I can see the expanded nodes by
inspecting tree.getModel(). What still foxes me is how do I take some
action, when the user clicks a particular node? For example if each node is
representing an employee, then how can I display the details of the desired
employee when the user clicks/selects on the corresponding employee node?

Regards,
Anup

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Tree-Getting-The-Selected-Node-tp4672040p4672042.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 Tree - Getting The Selected Node

2015-09-25 Thread Sven Meier

Hi,

a NestedTree does not have any notion of 'selection'.
But the set of expanded nodes is kept in the tree's model object, see 
AbstractTree#expand() and #collapse().


You decide how to represent each node's content, for this you'll have to 
override AbstractTree#newContentComponent(). The default will just 
expand and collapse the tree branches on each click, see


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

You can override Folder's methods or use any other component to 
represent your nodes.


Have fun
Sven


On 25.09.2015 13:41, Anup Gokhale wrote:

Hi.

  


Am a complete noob to Wicket and am currently learning Wicket by writing
small example applications. Have worked my way through all the basic
components like TextField, Links, Labels, Buttons, ListView, DataTable etc.
Have now reached DefaultNestedTree and it's many avatars. Am totally stuck
in fetching the currently selected nodes. How do our models know which
node(s) the user has currently selected in the tree? Also are there any
events that get fired when the user clicks on a tree node?

  


This is my very first post to the wicket user group, and I must say that
Wicket developers and committers have done a commendable job. Thanks for
developing such a wonderful framework.

  


Warm regards,

  


Anup Gokhale

  




---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus




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



Wicket Tree - Getting The Selected Node

2015-09-25 Thread Anup Gokhale
Hi.

 

Am a complete noob to Wicket and am currently learning Wicket by writing
small example applications. Have worked my way through all the basic
components like TextField, Links, Labels, Buttons, ListView, DataTable etc.
Have now reached DefaultNestedTree and it's many avatars. Am totally stuck
in fetching the currently selected nodes. How do our models know which
node(s) the user has currently selected in the tree? Also are there any
events that get fired when the user clicks on a tree node?

 

This is my very first post to the wicket user group, and I must say that
Wicket developers and committers have done a commendable job. Thanks for
developing such a wonderful framework.

 

Warm regards,

 

Anup Gokhale

 



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


Re: Wicket Tree - Getting The Selected Node

2015-09-25 Thread Sven Meier

Hi,

@Override
public Component newContentComponent(String id, IModel model)
{
return new Folder(id, this, model)
{
/**
 * Always clickable.
 */
@Override
protected boolean isClickable()
{
return true;
}

@Override
protected void onClick(AjaxRequestTarget target)
{
Employee employee = getModelObject();
// keep selection somewhere, exchange components or 
switch to other page

}

@Override
protected boolean isSelected()
{
// get selected status somewhere
return false;
}
};
}

Have fun
Sven


On 25.09.2015 14:12, Anup wrote:

Sven Meier wrote

a NestedTree does not have any notion of 'selection'.
But the set of expanded nodes is kept in the tree's model object, see
AbstractTree#expand() and #collapse().

You decide how to represent each node's content, for this you'll have to
override AbstractTree#newContentComponent(). The default will just
expand and collapse the tree branches on each click, see

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

You can override Folder's methods or use any other component to
represent your nodes.

Thanks Sven. I have understood the above as I can see the expanded nodes by
inspecting tree.getModel(). What still foxes me is how do I take some
action, when the user clicks a particular node? For example if each node is
representing an employee, then how can I display the details of the desired
employee when the user clicks/selects on the corresponding employee node?

Regards,
Anup

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Tree-Getting-The-Selected-Node-tp4672040p4672042.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 Tree - Getting The Selected Node

2015-09-25 Thread Anup
Thanks Sven. Things are clear to me now.

Regards,

Anup

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Tree-Getting-The-Selected-Node-tp4672040p4672044.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: Table Tree expand node

2014-10-17 Thread Sven Meier

Hi,

can you reproduce the same problem here?

http://wicket-dnd-jquery.appspot.com

On the bottom of the page you'll find a TableTree, once you expand a 
node the scrollbars appear correctly.


Regards
Sven



On 10/16/2014 11:20 PM, Mihir Chhaya wrote:

Thanks, Sven for your suggestion. I am using custom CSS, and also the
project is using Wicket Bootstrap.

But, the scroll bar is not displayed even after making TableTree page
independent (removing CSS, and free from bootstrap). Following is from my
modified version of AdvancedTreePage.html.

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;

html xmlns:wicket
head
 titleFolder structure/title
/head
body
form wicket:id=form
 p
 a wicket:id=collapseAllcollapse all/a a
wicket:id=expandAllexpand all/a
 /p

 p
 wicket:child/
 /p

 input type=submit wicket:id=submit value=OK/
/form
/body
/html

And here is for from wicket:child/ page:

html xmlns:wicket=
http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd; 
head
 wicket:head
 style
 table {
 width: 90%;
 border: 1px solid #DD;
 }
 tr.even {
 background-color: #FF;
 }
 tr.odd {
 background-color: #EE;
 }
 td.number {
 text-align: right;
 padding-right: 1em;
 }
 /style
 /wicket:head
/head
body
wicket:extend
 div wicket:id=tree[tree]/div
/wicket:extend
/body
/html

Thanks,
-Mihir.

On Thu, Oct 16, 2014 at 4:36 PM, Sven Meier s...@meiers.net wrote:


Hi,


Expand and collapse of the node using '+' icon next to Folder path.
It shows the scroll bar only if I revisit the same page by clicking the

menu option.

are you using custom CSS to style your page?
What happens if you run without this CSS, does the scrollbar appear
immedtiately?

Sven


On 10/16/2014 09:41 PM, Mihir Chhaya wrote:


Hello,

Could anybody please help me on following?

This is related to:
-
Table Tree with custom Tree Provider to display folder structure.
I am referring to Sven Meier's Advanced Tabular Tree Structure example for
Wicket 6.x. (
http://www.wicket-library.com/wicket-examples-6.0.x/tree/
wicket/bookmarkable/org.apache.wicket.examples.tree.
TableTreePage?0foo=AAA
)


My goal is:
-
To display vertical scroll bar on expanding single folder/subfolder in
Table Tree.


The part working is:
-
Expand and collapse of the node using '+' icon next to Folder path.


The part I am struggling with is:
---
Table Tree is not showing vertical scroll bar if there are more files, so
not allowing to view complete folder/sub folder content. It shows the
scroll bar only if I revisit the same page by clicking the menu option.


Thanks,
-Mihir.



-
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: Table Tree expand node

2014-10-17 Thread Mihir Chhaya
Thanks, Sven.

I tried to play around with CSS in chrome dev tools to reproduce the error
on web link above but could not. Also, I compared CSS with my code from
chrome dev tools. I can see some additional Bootstrap css for my page, but
un-checking those references did not do help.

I have made some progress though. I realized I did not have tree.expand(t)
and tree.collapse(t) when clicking on folder path (as I am using
SelectedFolderContent from Tree example, and have 'select' method which is
calling tree.update()). With those in, the folder click is now toggle, and
with setReponsePage(MyTreePage.class) followed, the sub-folder is opened
completely with scrollbar for page.

So, now scroll bar + toggle (expand/collapse) is working when clicking on
folder path link. But still no luck when clicking '+' button.

Additionally, while debugging I found the Folder onClick is called only
when clicking on Folder path (C:\folderA\folderAA\), but it is not when
clicking on '+'.

Thanks again for your time,
-Mihir.

On Fri, Oct 17, 2014 at 10:07 AM, Sven Meier s...@meiers.net wrote:

 Hi,

 can you reproduce the same problem here?

 http://wicket-dnd-jquery.appspot.com

 On the bottom of the page you'll find a TableTree, once you expand a node
 the scrollbars appear correctly.

 Regards
 Sven




 On 10/16/2014 11:20 PM, Mihir Chhaya wrote:

 Thanks, Sven for your suggestion. I am using custom CSS, and also the
 project is using Wicket Bootstrap.

 But, the scroll bar is not displayed even after making TableTree page
 independent (removing CSS, and free from bootstrap). Following is from my
 modified version of AdvancedTreePage.html.

 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN 
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;

 html xmlns:wicket
 head
  titleFolder structure/title
 /head
 body
 form wicket:id=form
  p
  a wicket:id=collapseAllcollapse all/a a
 wicket:id=expandAllexpand all/a
  /p

  p
  wicket:child/
  /p

  input type=submit wicket:id=submit value=OK/
 /form
 /body
 /html

 And here is for from wicket:child/ page:

 html xmlns:wicket=
 http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd; 
 head
  wicket:head
  style
  table {
  width: 90%;
  border: 1px solid #DD;
  }
  tr.even {
  background-color: #FF;
  }
  tr.odd {
  background-color: #EE;
  }
  td.number {
  text-align: right;
  padding-right: 1em;
  }
  /style
  /wicket:head
 /head
 body
 wicket:extend
  div wicket:id=tree[tree]/div
 /wicket:extend
 /body
 /html

 Thanks,
 -Mihir.

 On Thu, Oct 16, 2014 at 4:36 PM, Sven Meier s...@meiers.net wrote:

  Hi,

  Expand and collapse of the node using '+' icon next to Folder path.
 It shows the scroll bar only if I revisit the same page by clicking the

 menu option.

 are you using custom CSS to style your page?
 What happens if you run without this CSS, does the scrollbar appear
 immedtiately?

 Sven


 On 10/16/2014 09:41 PM, Mihir Chhaya wrote:

  Hello,

 Could anybody please help me on following?

 This is related to:
 -
 Table Tree with custom Tree Provider to display folder structure.
 I am referring to Sven Meier's Advanced Tabular Tree Structure example
 for
 Wicket 6.x. (
 http://www.wicket-library.com/wicket-examples-6.0.x/tree/
 wicket/bookmarkable/org.apache.wicket.examples.tree.
 TableTreePage?0foo=AAA
 )


 My goal is:
 -
 To display vertical scroll bar on expanding single folder/subfolder in
 Table Tree.


 The part working is:
 -
 Expand and collapse of the node using '+' icon next to Folder path.


 The part I am struggling with is:
 ---
 Table Tree is not showing vertical scroll bar if there are more files,
 so
 not allowing to view complete folder/sub folder content. It shows the
 scroll bar only if I revisit the same page by clicking the menu option.


 Thanks,
 -Mihir.


  -
 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




Table Tree expand node

2014-10-16 Thread Mihir Chhaya
Hello,

Could anybody please help me on following?

This is related to:
-
Table Tree with custom Tree Provider to display folder structure.
I am referring to Sven Meier's Advanced Tabular Tree Structure example for
Wicket 6.x. (
http://www.wicket-library.com/wicket-examples-6.0.x/tree/wicket/bookmarkable/org.apache.wicket.examples.tree.TableTreePage?0foo=AAA
)


My goal is:
-
To display vertical scroll bar on expanding single folder/subfolder in
Table Tree.


The part working is:
-
Expand and collapse of the node using '+' icon next to Folder path.


The part I am struggling with is:
---
Table Tree is not showing vertical scroll bar if there are more files, so
not allowing to view complete folder/sub folder content. It shows the
scroll bar only if I revisit the same page by clicking the menu option.


Thanks,
-Mihir.


Re: Table Tree expand node

2014-10-16 Thread Sven Meier

Hi,

Expand and collapse of the node using '+' icon next to Folder path.
It shows the scroll bar only if I revisit the same page by clicking 
the menu option.


are you using custom CSS to style your page?
What happens if you run without this CSS, does the scrollbar appear 
immedtiately?


Sven

On 10/16/2014 09:41 PM, Mihir Chhaya wrote:

Hello,

Could anybody please help me on following?

This is related to:
-
Table Tree with custom Tree Provider to display folder structure.
I am referring to Sven Meier's Advanced Tabular Tree Structure example for
Wicket 6.x. (
http://www.wicket-library.com/wicket-examples-6.0.x/tree/wicket/bookmarkable/org.apache.wicket.examples.tree.TableTreePage?0foo=AAA
)


My goal is:
-
To display vertical scroll bar on expanding single folder/subfolder in
Table Tree.


The part working is:
-
Expand and collapse of the node using '+' icon next to Folder path.


The part I am struggling with is:
---
Table Tree is not showing vertical scroll bar if there are more files, so
not allowing to view complete folder/sub folder content. It shows the
scroll bar only if I revisit the same page by clicking the menu option.


Thanks,
-Mihir.




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



Re: Table Tree expand node

2014-10-16 Thread Mihir Chhaya
Thanks, Sven for your suggestion. I am using custom CSS, and also the
project is using Wicket Bootstrap.

But, the scroll bar is not displayed even after making TableTree page
independent (removing CSS, and free from bootstrap). Following is from my
modified version of AdvancedTreePage.html.

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;

html xmlns:wicket
head
titleFolder structure/title
/head
body
form wicket:id=form
p
a wicket:id=collapseAllcollapse all/a a
wicket:id=expandAllexpand all/a
/p

p
wicket:child/
/p

input type=submit wicket:id=submit value=OK/
/form
/body
/html

And here is for from wicket:child/ page:

html xmlns:wicket=
http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd; 
head
wicket:head
style
table {
width: 90%;
border: 1px solid #DD;
}
tr.even {
background-color: #FF;
}
tr.odd {
background-color: #EE;
}
td.number {
text-align: right;
padding-right: 1em;
}
/style
/wicket:head
/head
body
wicket:extend
div wicket:id=tree[tree]/div
/wicket:extend
/body
/html

Thanks,
-Mihir.

On Thu, Oct 16, 2014 at 4:36 PM, Sven Meier s...@meiers.net wrote:

 Hi,

 Expand and collapse of the node using '+' icon next to Folder path.
 It shows the scroll bar only if I revisit the same page by clicking the
 menu option.

 are you using custom CSS to style your page?
 What happens if you run without this CSS, does the scrollbar appear
 immedtiately?

 Sven


 On 10/16/2014 09:41 PM, Mihir Chhaya wrote:

 Hello,

 Could anybody please help me on following?

 This is related to:
 -
 Table Tree with custom Tree Provider to display folder structure.
 I am referring to Sven Meier's Advanced Tabular Tree Structure example for
 Wicket 6.x. (
 http://www.wicket-library.com/wicket-examples-6.0.x/tree/
 wicket/bookmarkable/org.apache.wicket.examples.tree.
 TableTreePage?0foo=AAA
 )


 My goal is:
 -
 To display vertical scroll bar on expanding single folder/subfolder in
 Table Tree.


 The part working is:
 -
 Expand and collapse of the node using '+' icon next to Folder path.


 The part I am struggling with is:
 ---
 Table Tree is not showing vertical scroll bar if there are more files, so
 not allowing to view complete folder/sub folder content. It shows the
 scroll bar only if I revisit the same page by clicking the menu option.


 Thanks,
 -Mihir.



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




Re: Component Queueing is here (master), aka Free Wicket From Hierarchy Hell, aka Markup Driven Component Tree

2014-02-28 Thread Tom Götz
Having read your article, I think this sounds like a very promising approach. 
Thanks Igor!

Cheers,
   -Tom


On 28.02.2014, at 03:00, Igor Vaynberg igor.vaynb...@gmail.com wrote:

 in the past couple of weeks i finally had some time to finish up the
 component queueing feature. it is meant to greatly decrease common
 maintenance headaches associated with markup tweaks and moving
 components around. see the intro here:
 
 https://www.42lines.net/2014/02/28/component-queueing-in-wicket-7/
 
 -igor


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



Re: Component Queueing is here (master), aka Free Wicket From Hierarchy Hell, aka Markup Driven Component Tree

2014-02-28 Thread Decebal Suiu
Thanks! It is a major feature in Wicket 7.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Component-Queueing-is-here-master-aka-Free-Wicket-From-Hierarchy-Hell-aka-Markup-Driven-Component-Tre-tp4664719p4664722.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



Component Queueing is here (master), aka Free Wicket From Hierarchy Hell, aka Markup Driven Component Tree

2014-02-27 Thread Igor Vaynberg
in the past couple of weeks i finally had some time to finish up the
component queueing feature. it is meant to greatly decrease common
maintenance headaches associated with markup tweaks and moving
components around. see the intro here:

https://www.42lines.net/2014/02/28/component-queueing-in-wicket-7/

-igor

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



Re: Component Queueing is here (master), aka Free Wicket From Hierarchy Hell, aka Markup Driven Component Tree

2014-02-27 Thread Ernesto Reinaldo Barreiro
Thanks!


On Fri, Feb 28, 2014 at 3:00 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 in the past couple of weeks i finally had some time to finish up the
 component queueing feature. it is meant to greatly decrease common
 maintenance headaches associated with markup tweaks and moving
 components around. see the intro here:

 https://www.42lines.net/2014/02/28/component-queueing-in-wicket-7/

 -igor

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




-- 
Regards - Ernesto Reinaldo Barreiro


Little issue with tree component

2013-12-11 Thread Decebal Suiu
Hi

I write this post for sven as a feedback for his excellent tree component
from wicket 6.
I encounter a problem with the tree component (nothing happens on expand) in
the conversion process of NextReports from wicket 1.5 to wicket 6. My
problem happened because the NestedTree.updateBranch method compares two
model objects (with equals):

 if (model.equals(branch.getModel())) // line 118 in wicket 6.12.0

My EntityModel (the model returned by ITreeProvider.(Entity object)) hasn't
an equals method because I didn't find usefully to implement this method in
my (wicket) models. For this reason the above line return false in all
scenario;

I don't know if it's a better idea to compare the model objects instead
models (I see a little performance with model objects comparation - my
EntityModel extends extends LoadableDetachableModelEntity) but in the
current implementation it's hard to debug what it's wrong with my tree.

Obviously, I resolved my problem with a simple equals method added in my
EntityModel but take me some time to found what wasn't wrong with my tree.

Best regards,
Decebal



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Little-issue-with-tree-component-tp4662914.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: Little issue with tree component

2013-12-11 Thread Sven Meier

Hi Decebal,

yes, the tree's models should implement equals() and hashcode(). Usually 
it's sufficient to forward these calls to the wrapped entity.
We're doing it this way to allow some optimization: If the model is able 
to identify an entity by its identifier, then it can shortcut the 
comparison by comparing the ids instead.


Note that
a) ITreeProvider#model()'s javadoc has a note on implementing these methods
b) model equality is used in IItemReuseStrategy too.

Many thanks for your feedback.
Sven


On 12/11/2013 03:07 PM, Decebal Suiu wrote:

Hi

I write this post for sven as a feedback for his excellent tree component
from wicket 6.
I encounter a problem with the tree component (nothing happens on expand) in
the conversion process of NextReports from wicket 1.5 to wicket 6. My
problem happened because the NestedTree.updateBranch method compares two
model objects (with equals):

  if (model.equals(branch.getModel())) // line 118 in wicket 6.12.0

My EntityModel (the model returned by ITreeProvider.(Entity object)) hasn't
an equals method because I didn't find usefully to implement this method in
my (wicket) models. For this reason the above line return false in all
scenario;

I don't know if it's a better idea to compare the model objects instead
models (I see a little performance with model objects comparation - my
EntityModel extends extends LoadableDetachableModelEntity) but in the
current implementation it's hard to debug what it's wrong with my tree.

Obviously, I resolved my problem with a simple equals method added in my
EntityModel but take me some time to found what wasn't wrong with my tree.

Best regards,
Decebal



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Little-issue-with-tree-component-tp4662914.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: popup Tree node

2013-09-06 Thread Piratenvisier

This is an application in my 1.5 wicket production application
Version 6.9 is with a lot of annotations using appfuse is still in 
evaluation mode

final Tree tree = new Tree(tree, treeModel)
{
@Override
protected String renderNode(TreeNode node)
{
DefaultMutableTreeNode treeNode = 
(DefaultMutableTreeNode)node;

Object userObject = treeNode.getUserObject();
if (userObject instanceof Something) return 
((Something)userObject).getSomething();





}
@Override
 protected void onNodeLinkClicked(AjaxRequestTarget 
target, TreeNode node) {
if (((DefaultMutableTreeNode) node).getUserObject() 
instanceof Something){

PageParameterspars=new PageParameters();
pars.add(context, blind);
pars.add(objid,((Something)((DefaultMutableTreeNode) 
node).getUserObject()).getSomething().getId());

// This should popup in a new window
setResponsePage(Some.class,pars);
}
};

Am 05.09.2013 14:09, schrieb Martin Grigorov:

By giving us more details what you need :-)


On Thu, Sep 5, 2013 at 3:02 PM, Piratenvisier hansheinrichbr...@yahoo.dewrote:


How can I make a tree node popup on click ?

--**--**-
To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apache.orgusers-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: popup Tree node

2013-09-06 Thread Sven Meier

Hi,

so you want the new page to be opened in a new browser window?

Then you have to override #newNodeLink() and add a target attribute to 
the a tag (e.g. via an AttributeModifier).


Regards
Sven


On 09/06/2013 09:59 AM, Piratenvisier wrote:

This is an application in my 1.5 wicket production application
Version 6.9 is with a lot of annotations using appfuse is still in 
evaluation mode

final Tree tree = new Tree(tree, treeModel)
{
@Override
protected String renderNode(TreeNode node)
{
DefaultMutableTreeNode treeNode = 
(DefaultMutableTreeNode)node;

Object userObject = treeNode.getUserObject();
if (userObject instanceof Something) return 
((Something)userObject).getSomething();





}
@Override
 protected void onNodeLinkClicked(AjaxRequestTarget 
target, TreeNode node) {
if (((DefaultMutableTreeNode) 
node).getUserObject() instanceof Something){

PageParameterspars=new PageParameters();
pars.add(context, blind);
pars.add(objid,((Something)((DefaultMutableTreeNode) 
node).getUserObject()).getSomething().getId());

// This should popup in a new window
setResponsePage(Some.class,pars);
}
};

Am 05.09.2013 14:09, schrieb Martin Grigorov:

By giving us more details what you need :-)


On Thu, Sep 5, 2013 at 3:02 PM, Piratenvisier 
hansheinrichbr...@yahoo.dewrote:



How can I make a tree node popup on click ?

--**--**- 

To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apache.orgusers-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




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



popup Tree node

2013-09-05 Thread Piratenvisier

How can I make a tree node popup on click ?

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



Re: popup Tree node

2013-09-05 Thread Martin Grigorov
By giving us more details what you need :-)


On Thu, Sep 5, 2013 at 3:02 PM, Piratenvisier hansheinrichbr...@yahoo.dewrote:

 How can I make a tree node popup on click ?

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




Re: popup Tree node

2013-09-05 Thread Sven Meier

Well, just take your code from here:

http://apache-wicket.1842946.n4.nabble.com/Tree-with-different-BookmarkablePageLink-per-Node-tp4660096p4660103.html

... and use an AjaxLink to represent the content of a node:

public Component newContentComponent(String id, final AbstractTreeFoo 
tree, IModelFoo model)

{
  return new FolderFoo(id, tree, model)
  {
@Override
protected MarkupContainer newLinkComponent(String id, IModelFoo 
model)

{
  Foo foo = model.getObject();
  return new AjaxLink(id) {
public void onClick(AjaxRequestTarget art) {
  // show a div or open a modal dialog or ...
}
  };
}
  };
}

Sven


On 09/05/2013 02:02 PM, Piratenvisier wrote:

How can I make a tree node popup on click ?

-
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: Tree with different BookmarkablePageLink per Node

2013-07-17 Thread Piratenvisier

I made a solution of the first kind. I made Foo a subclass of WebPage.
I think the only reason to use this class is that the parent brings in 
the call setResponsePage
where the page  itsself is a Field in Foo of Type Page which can be 
loaded externally, so that I don't need

declare the pages explicitly in Foo.
Do you think there is a better class in the UI-layer for this.
It works satisfactory with google chrome on my debian system.
When I have time I think about your other suggestion.
I try as Response an adaption of the breadcrumb solution as flow adaption



Am 06.07.2013 10:50, schrieb Sven Meier:

It depends on you node implementation:

If Foo is an object from your UI layer, just add #createContent() to 
it and let it return a suitable representation.
If Foo is part of the domain layer, I'd prefer a factory for that, 
e.g. ContentFactory#createContent(Foo). This factory could consists of 
a huge switch statement, be configured via Spring or use some lookup 
to be extensible from different modules.


Just some ideas
Sven

On 07/05/2013 11:11 PM, Piratenvisier wrote:
What is the best way to build a nested Tree with different 
BookmarkablePageLinks per node?
The best would be when I build the Foo node to give the information 
to build the  BookmarkablePageLink.

Who should know the different PageClasses?



-
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




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



Re: Tree with different BookmarkablePageLink per Node

2013-07-06 Thread Paul Borș
What have you tried so far? Has it worked for you?

Have a great day,
   Paul Bors

On Jul 5, 2013, at 5:11 PM, Piratenvisier hansheinrichbr...@yahoo.de wrote:

 What is the best way to build a nested Tree with different 
 BookmarkablePageLinks per node?
 The best would be when I build the Foo node to give the information to build 
 the  BookmarkablePageLink.
 Who should know the different PageClasses?
 
 
 
 -
 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: Tree with different BookmarkablePageLink per Node

2013-07-06 Thread Sven Meier

It depends on you node implementation:

If Foo is an object from your UI layer, just add #createContent() to it 
and let it return a suitable representation.
If Foo is part of the domain layer, I'd prefer a factory for that, e.g. 
ContentFactory#createContent(Foo). This factory could consists of a huge 
switch statement, be configured via Spring or use some lookup to be 
extensible from different modules.


Just some ideas
Sven

On 07/05/2013 11:11 PM, Piratenvisier wrote:
What is the best way to build a nested Tree with different 
BookmarkablePageLinks per node?
The best would be when I build the Foo node to give the information to 
build the  BookmarkablePageLink.

Who should know the different PageClasses?



-
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: Tree with different BookmarkablePageLink per Node

2013-07-06 Thread Piratenvisier

Here my first solution:

public BeginnersTreePage()
{
TreeApplication.get().foos.clear();
Angebot angebot=angebotManager.get(RH996);
Foo fooA = new Foo(angebot.getId());
PageParameters parameters = new PageParameters();

String href = getRequestCycle().getUrlRenderer().renderFullUrl(
org.apache.wicket.request.Url.parse(urlFor(new 
org.apache.wicket.core.request.handler.BookmarkablePageRequestHandler(new org.apache.wicket.core.request.handler.PageProvider(

braunimmobilien.webapp.pages.AngebotList.class, parameters))).toString()));

fooA.setBar(href);
TreeApplication.get().foos.add(fooA);

href = getRequestCycle().getUrlRenderer().renderFullUrl(
org.apache.wicket.request.Url.parse(urlFor(new 
org.apache.wicket.core.request.handler.BookmarkablePageRequestHandler(new org.apache.wicket.core.request.handler.PageProvider(
braunimmobilien.webapp.pages.breadcrumb.Index.class, 
parameters))).toString()));


Iterator iterator=angebot.getAngobjzuords().iterator();
new Foo(fooA, weiteres Objekt).setBar(href);
while(iterator.hasNext()){
Angobjzuord angobjzuord=(Angobjzuord)iterator.next();
href = getRequestCycle().getUrlRenderer().renderFullUrl(
org.apache.wicket.request.Url.parse(urlFor(new 
org.apache.wicket.core.request.handler.BookmarkablePageRequestHandler(new org.apache.wicket.core.request.handler.PageProvider(

braunimmobilien.webapp.pages.wizard.Index.class, parameters))).toString()));

Foo fooAA=new Foo(fooA, 
angobjzuord.getObjekte().getObjektart().getObjartname());

fooAA.setBar(href);
href = getRequestCycle().getUrlRenderer().renderFullUrl(
org.apache.wicket.request.Url.parse(urlFor(new 
org.apache.wicket.core.request.handler.BookmarkablePageRequestHandler(new org.apache.wicket.core.request.handler.PageProvider(
org.apache.wicket.examples.tree.BeginnersTreePage.class, 
parameters))).toString()));


new Foo(fooAA, weitere Person).setBar(href);
Iterator iterator1=angobjzuord.getObjekte().getObjperszuords().iterator();
while(iterator1.hasNext()){
href = getRequestCycle().getUrlRenderer().renderFullUrl(
org.apache.wicket.request.Url.parse(urlFor(new 
org.apache.wicket.core.request.handler.BookmarkablePageRequestHandler(new org.apache.wicket.core.request.handler.PageProvider(

braunimmobilien.webapp.pages.Index.class, parameters))).toString()));

Objperszuord objperszuord=(Objperszuord)iterator1.next();
new Foo(fooAA, objperszuord.getPersonen().getEigtName()).setBar(href);

}
}
add(new MyNestedTree(tree, new FooProvider()));
}


public class MyNestedTree extends NestedTreeFoo {
private static final long serialVersionUID = 1L;


public Component newContentComponent(String id, final AbstractTreeFoo 
tree, IModelFoo model)

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

@Override
protected MarkupContainer newLinkComponent(String id, IModelFoo model)
{
Foo foo = model.getObject();
org.apache.wicket.markup.html.link.ExternalLink downloadLink = new 
org.apache.wicket.markup.html.link.ExternalLink(id, foo.getBar());

return downloadLink;

}
};
}

public MyNestedTree(String id, ITreeProviderFoo provider)
{
this(id, provider, null);
}


public MyNestedTree(String id, ITreeProviderFoo provider, 
IModelSetFoo state)

{
super(id, provider, state);

add(new WindowsTheme());
}


@Override
protected Component newContentComponent(String id, IModelFoo node)
{
return newContentComponent(id, this, node);
}

}

I still think about transferring Parameters and the href of the responsePage

Am 06.07.2013 09:58, schrieb Paul Borș:

What have you tried so far? Has it worked for you?

Have a great day,
Paul Bors

On Jul 5, 2013, at 5:11 PM, Piratenvisier hansheinrichbr...@yahoo.de wrote:


What is the best way to build a nested Tree with different 
BookmarkablePageLinks per node?
The best would be when I build the Foo node to give the information to build 
the  BookmarkablePageLink.
Who should know the different PageClasses?



-
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




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



Re: Tree with different BookmarkablePageLink per Node

2013-07-06 Thread Piratenvisier

I am not too much accustomed to your definitions.
what is UI Layer,what is domain Layer.
In my solution I kept all the Page Classes outside by going back to the 
good old http

In your both cases: who knows defintively the PageClasses in those cases.
Maybe I could think about  Interfaces and casting.
Without having totally understood your suggestions I will do some 
research about it

to better understand your argument.



Am 06.07.2013 10:50, schrieb Sven Meier:

It depends on you node implementation:

If Foo is an object from your UI layer, just add #createContent() to 
it and let it return a suitable representation.
If Foo is part of the domain layer, I'd prefer a factory for that, 
e.g. ContentFactory#createContent(Foo). This factory could consists of 
a huge switch statement, be configured via Spring or use some lookup 
to be extensible from different modules.


Just some ideas
Sven

On 07/05/2013 11:11 PM, Piratenvisier wrote:
What is the best way to build a nested Tree with different 
BookmarkablePageLinks per node?
The best would be when I build the Foo node to give the information 
to build the  BookmarkablePageLink.

Who should know the different PageClasses?



-
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




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



Re: fault in tree view

2013-07-05 Thread Piratenvisier

I am using debian sid iceweasel with wicket 6.9.0
I updated the System but the result was not better.
  public Component newContentComponent(String id, final 
AbstractTreeFoo tree, IModelFoo

can not be overridden because this is not an abstract method
So I tried the following solution
public class MyNestedTree extends NestedTreeFoo {
   private static final long serialVersionUID = 1L;


// @Override
public Component newContentComponent(String id, final 
AbstractTreeFoo tree, IModelFoo model)

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

@Override
protected MarkupContainer newLinkComponent(String id, 
IModelFoo model)

{
Foo foo = model.getObject();

  /*  if (tree.getProvider().hasChildren(foo))
{
return super.newLinkComponent(id, model);
}
else
{*/
PageParameters parameters = new PageParameters();
parameters.add(foo, foo.getId());

return new 
BookmarkablePageLinkVoid(id,braunimmobilien.webapp.pages.Index.class);

  //  }
}
};
}



/**
 * Construct.
 *
 * @param id
 *component id
 * @param provider
 *provider of the tree
 */
public MyNestedTree(String id, ITreeProviderFoo provider)
{
this(id, provider, null);
}

/**
 * Construct.
 *
 * @param id
 *component id
 * @param provider
 *provider of the tree
 * @param state
 *expansion state
 */
public MyNestedTree(String id, ITreeProviderFoo provider, 
IModelSetFoo state)

{
super(id, provider, state);

add(new WindowsTheme());
}

/**
 * Creates {@link Folder} for each node.
 *
 * @param id
 *component id
 * @param node
 *the node model
 */
@Override
protected Component newContentComponent(String id, IModelFoo node)
{
return newContentComponent(id, this, node);
}

  }
but the result was not satisfying

Am 04.07.2013 21:13, schrieb Sven Meier:

That's really strange, the tree looks fine here.

Can you retry with a vanilla Firefox? Please clear the browser cache too.
Which Wicket version?

Sven

On 07/04/2013 04:16 PM, Piratenvisier wrote:

Ok I try it again


Am 04.07.2013 15:14, schrieb Sven Meier:

ascii art?

;)

On 07/04/2013 03:05 PM, Piratenvisier wrote:

Hello Sven,

here are the screenshots.

Am 04.07.2013 09:10, schrieb Sven Meier:

Hi,

I don't see a difference here. Can you post screenshots somewhere?

Sven

On 07/03/2013 11:02 PM, Piratenvisier wrote:
If you open the stucture in beginners view you have an other 
sequence of nodes than in advanced nested view
Follow the path A AB ABB ABBA ABBB ABBBA ABC ABD AC in advanced 
nested view and try to follow it in beginners view.


Am 03.07.2013 22:53, schrieb Sven Meier:

Hi,

can you please explain how the branch is faulty or 'wrong'?

You can override NestedTree#newContentComponent(String, IModel) 
to decide the representation of a node's content:


  MyNestedTree extends NestedTree {
@Override
public Component newContentComponent(String id, final 
AbstractTreeFoo tree, IModelFoo model)

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

@Override
protected MarkupContainer newLinkComponent(String 
id, IModelFoo model)

{
Foo foo = model.getObject();

if (tree.getProvider().hasChildren(foo))
{
return super.newLinkComponent(id, model);
}
else
{
PageParameters parameters = new 
PageParameters();

parameters.add(foo, foo.getId());

return new BookmarkablePageLinkVoid(id, 
tree.getPage().getClass(), parameters);

}
}
};
}
  }

Hope this helps
Sven


On 07/03/2013 10:24 PM, Piratenvisier wrote:

When you look at the tree structure in advanced nested view
there is a wrong branch A AB ABB ABBA ABBB ABBBA ABC ABD AC
I would like to use a tree structure where the nodes are links 
to wicket pages

or where you can open a nodes panel in accordion style

- 


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: fault in tree view

2013-07-05 Thread Piratenvisier

Hello Sven,

I tested your tre application and my adaption with google chrome
and it is ok.
So I think its a problem of debian iceweasel
Best regards
Am 04.07.2013 21:13, schrieb Sven Meier:

That's really strange, the tree looks fine here.

Can you retry with a vanilla Firefox? Please clear the browser cache too.
Which Wicket version?

Sven

On 07/04/2013 04:16 PM, Piratenvisier wrote:

Ok I try it again


Am 04.07.2013 15:14, schrieb Sven Meier:

ascii art?

;)

On 07/04/2013 03:05 PM, Piratenvisier wrote:

Hello Sven,

here are the screenshots.

Am 04.07.2013 09:10, schrieb Sven Meier:

Hi,

I don't see a difference here. Can you post screenshots somewhere?

Sven

On 07/03/2013 11:02 PM, Piratenvisier wrote:
If you open the stucture in beginners view you have an other 
sequence of nodes than in advanced nested view
Follow the path A AB ABB ABBA ABBB ABBBA ABC ABD AC in advanced 
nested view and try to follow it in beginners view.


Am 03.07.2013 22:53, schrieb Sven Meier:

Hi,

can you please explain how the branch is faulty or 'wrong'?

You can override NestedTree#newContentComponent(String, IModel) 
to decide the representation of a node's content:


  MyNestedTree extends NestedTree {
@Override
public Component newContentComponent(String id, final 
AbstractTreeFoo tree, IModelFoo model)

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

@Override
protected MarkupContainer newLinkComponent(String 
id, IModelFoo model)

{
Foo foo = model.getObject();

if (tree.getProvider().hasChildren(foo))
{
return super.newLinkComponent(id, model);
}
else
{
PageParameters parameters = new 
PageParameters();

parameters.add(foo, foo.getId());

return new BookmarkablePageLinkVoid(id, 
tree.getPage().getClass(), parameters);

}
}
};
}
  }

Hope this helps
Sven


On 07/03/2013 10:24 PM, Piratenvisier wrote:

When you look at the tree structure in advanced nested view
there is a wrong branch A AB ABB ABBA ABBB ABBBA ABC ABD AC
I would like to use a tree structure where the nodes are links 
to wicket pages

or where you can open a nodes panel in accordion style

- 


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




- 


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






-
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: fault in tree view

2013-07-05 Thread Piratenvisier

Hello Sven,
In my adaption there is still a fault.
When click on the link and come back I have two root nodes
Regards
Heiner
Am 05.07.2013 16:59, schrieb Piratenvisier:

Hello Sven,

I tested your tre application and my adaption with google chrome
and it is ok.
So I think its a problem of debian iceweasel
Best regards
Am 04.07.2013 21:13, schrieb Sven Meier:

That's really strange, the tree looks fine here.

Can you retry with a vanilla Firefox? Please clear the browser cache 
too.

Which Wicket version?

Sven

On 07/04/2013 04:16 PM, Piratenvisier wrote:

Ok I try it again


Am 04.07.2013 15:14, schrieb Sven Meier:

ascii art?

;)

On 07/04/2013 03:05 PM, Piratenvisier wrote:

Hello Sven,

here are the screenshots.

Am 04.07.2013 09:10, schrieb Sven Meier:

Hi,

I don't see a difference here. Can you post screenshots somewhere?

Sven

On 07/03/2013 11:02 PM, Piratenvisier wrote:
If you open the stucture in beginners view you have an other 
sequence of nodes than in advanced nested view
Follow the path A AB ABB ABBA ABBB ABBBA ABC ABD AC in advanced 
nested view and try to follow it in beginners view.


Am 03.07.2013 22:53, schrieb Sven Meier:

Hi,

can you please explain how the branch is faulty or 'wrong'?

You can override NestedTree#newContentComponent(String, IModel) 
to decide the representation of a node's content:


  MyNestedTree extends NestedTree {
@Override
public Component newContentComponent(String id, final 
AbstractTreeFoo tree, IModelFoo model)

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

@Override
protected MarkupContainer newLinkComponent(String 
id, IModelFoo model)

{
Foo foo = model.getObject();

if (tree.getProvider().hasChildren(foo))
{
return super.newLinkComponent(id, model);
}
else
{
PageParameters parameters = new 
PageParameters();

parameters.add(foo, foo.getId());

return new BookmarkablePageLinkVoid(id, 
tree.getPage().getClass(), parameters);

}
}
};
}
  }

Hope this helps
Sven


On 07/03/2013 10:24 PM, Piratenvisier wrote:

When you look at the tree structure in advanced nested view
there is a wrong branch A AB ABB ABBA ABBB ABBBA ABC ABD AC
I would like to use a tree structure where the nodes are links 
to wicket pages

or where you can open a nodes panel in accordion style

- 


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




- 


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






-
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




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



Re: fault in tree view

2013-07-05 Thread Piratenvisier

forget my comments.
The fault was that I filled the foos list in the Page.

Am 05.07.2013 17:10, schrieb Piratenvisier:

Hello Sven,
In my adaption there is still a fault.
When click on the link and come back I have two root nodes
Regards
Heiner
Am 05.07.2013 16:59, schrieb Piratenvisier:

Hello Sven,

I tested your tre application and my adaption with google chrome
and it is ok.
So I think its a problem of debian iceweasel
Best regards
Am 04.07.2013 21:13, schrieb Sven Meier:

That's really strange, the tree looks fine here.

Can you retry with a vanilla Firefox? Please clear the browser cache 
too.

Which Wicket version?

Sven

On 07/04/2013 04:16 PM, Piratenvisier wrote:

Ok I try it again


Am 04.07.2013 15:14, schrieb Sven Meier:

ascii art?

;)

On 07/04/2013 03:05 PM, Piratenvisier wrote:

Hello Sven,

here are the screenshots.

Am 04.07.2013 09:10, schrieb Sven Meier:

Hi,

I don't see a difference here. Can you post screenshots somewhere?

Sven

On 07/03/2013 11:02 PM, Piratenvisier wrote:
If you open the stucture in beginners view you have an other 
sequence of nodes than in advanced nested view
Follow the path A AB ABB ABBA ABBB ABBBA ABC ABD AC in advanced 
nested view and try to follow it in beginners view.


Am 03.07.2013 22:53, schrieb Sven Meier:

Hi,

can you please explain how the branch is faulty or 'wrong'?

You can override NestedTree#newContentComponent(String, 
IModel) to decide the representation of a node's content:


  MyNestedTree extends NestedTree {
@Override
public Component newContentComponent(String id, final 
AbstractTreeFoo tree, IModelFoo model)

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

@Override
protected MarkupContainer newLinkComponent(String 
id, IModelFoo model)

{
Foo foo = model.getObject();

if (tree.getProvider().hasChildren(foo))
{
return super.newLinkComponent(id, model);
}
else
{
PageParameters parameters = new 
PageParameters();

parameters.add(foo, foo.getId());

return new BookmarkablePageLinkVoid(id, 
tree.getPage().getClass(), parameters);

}
}
};
}
  }

Hope this helps
Sven


On 07/03/2013 10:24 PM, Piratenvisier wrote:

When you look at the tree structure in advanced nested view
there is a wrong branch A AB ABB ABBA ABBB ABBBA ABC ABD AC
I would like to use a tree structure where the nodes are 
links to wicket pages

or where you can open a nodes panel in accordion style

- 


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




- 


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






- 


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




-
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



Tree with different BookmarkablePageLink per Node

2013-07-05 Thread Piratenvisier
What is the best way to build a nested Tree with different 
BookmarkablePageLinks per node?
The best would be when I build the Foo node to give the information to 
build the  BookmarkablePageLink.

Who should know the different PageClasses?



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



Re: fault in tree view

2013-07-04 Thread Sven Meier

Hi,

I don't see a difference here. Can you post screenshots somewhere?

Sven

On 07/03/2013 11:02 PM, Piratenvisier wrote:
If you open the stucture in beginners view you have an other sequence 
of nodes than in advanced nested view
Follow the path A AB ABB ABBA ABBB ABBBA ABC ABD AC in advanced nested 
view and try to follow it in beginners view.


Am 03.07.2013 22:53, schrieb Sven Meier:

Hi,

can you please explain how the branch is faulty or 'wrong'?

You can override NestedTree#newContentComponent(String, IModel) to 
decide the representation of a node's content:


  MyNestedTree extends NestedTree {
@Override
public Component newContentComponent(String id, final 
AbstractTreeFoo tree, IModelFoo model)

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

@Override
protected MarkupContainer newLinkComponent(String id, 
IModelFoo model)

{
Foo foo = model.getObject();

if (tree.getProvider().hasChildren(foo))
{
return super.newLinkComponent(id, model);
}
else
{
PageParameters parameters = new PageParameters();
parameters.add(foo, foo.getId());

return new BookmarkablePageLinkVoid(id, 
tree.getPage().getClass(), parameters);

}
}
};
}
  }

Hope this helps
Sven


On 07/03/2013 10:24 PM, Piratenvisier wrote:

When you look at the tree structure in advanced nested view
there is a wrong branch A AB ABB ABBA ABBB ABBBA ABC ABD AC
I would like to use a tree structure where the nodes are links to 
wicket pages

or where you can open a nodes panel in accordion style

-
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




-
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: fault in tree view

2013-07-04 Thread Piratenvisier

Hello Sven,

here are the screenshots.

Am 04.07.2013 09:10, schrieb Sven Meier:

Hi,

I don't see a difference here. Can you post screenshots somewhere?

Sven

On 07/03/2013 11:02 PM, Piratenvisier wrote:
If you open the stucture in beginners view you have an other sequence 
of nodes than in advanced nested view
Follow the path A AB ABB ABBA ABBB ABBBA ABC ABD AC in advanced 
nested view and try to follow it in beginners view.


Am 03.07.2013 22:53, schrieb Sven Meier:

Hi,

can you please explain how the branch is faulty or 'wrong'?

You can override NestedTree#newContentComponent(String, IModel) to 
decide the representation of a node's content:


  MyNestedTree extends NestedTree {
@Override
public Component newContentComponent(String id, final 
AbstractTreeFoo tree, IModelFoo model)

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

@Override
protected MarkupContainer newLinkComponent(String id, 
IModelFoo model)

{
Foo foo = model.getObject();

if (tree.getProvider().hasChildren(foo))
{
return super.newLinkComponent(id, model);
}
else
{
PageParameters parameters = new PageParameters();
parameters.add(foo, foo.getId());

return new BookmarkablePageLinkVoid(id, 
tree.getPage().getClass(), parameters);

}
}
};
}
  }

Hope this helps
Sven


On 07/03/2013 10:24 PM, Piratenvisier wrote:

When you look at the tree structure in advanced nested view
there is a wrong branch A AB ABB ABBA ABBB ABBBA ABC ABD AC
I would like to use a tree structure where the nodes are links to 
wicket pages

or where you can open a nodes panel in accordion style

-
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




-
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





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

Re: fault in tree view

2013-07-04 Thread Sven Meier

ascii art?

;)

On 07/04/2013 03:05 PM, Piratenvisier wrote:

Hello Sven,

here are the screenshots.

Am 04.07.2013 09:10, schrieb Sven Meier:

Hi,

I don't see a difference here. Can you post screenshots somewhere?

Sven

On 07/03/2013 11:02 PM, Piratenvisier wrote:
If you open the stucture in beginners view you have an other 
sequence of nodes than in advanced nested view
Follow the path A AB ABB ABBA ABBB ABBBA ABC ABD AC in advanced 
nested view and try to follow it in beginners view.


Am 03.07.2013 22:53, schrieb Sven Meier:

Hi,

can you please explain how the branch is faulty or 'wrong'?

You can override NestedTree#newContentComponent(String, IModel) to 
decide the representation of a node's content:


  MyNestedTree extends NestedTree {
@Override
public Component newContentComponent(String id, final 
AbstractTreeFoo tree, IModelFoo model)

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

@Override
protected MarkupContainer newLinkComponent(String id, 
IModelFoo model)

{
Foo foo = model.getObject();

if (tree.getProvider().hasChildren(foo))
{
return super.newLinkComponent(id, model);
}
else
{
PageParameters parameters = new PageParameters();
parameters.add(foo, foo.getId());

return new BookmarkablePageLinkVoid(id, 
tree.getPage().getClass(), parameters);

}
}
};
}
  }

Hope this helps
Sven


On 07/03/2013 10:24 PM, Piratenvisier wrote:

When you look at the tree structure in advanced nested view
there is a wrong branch A AB ABB ABBA ABBB ABBBA ABC ABD AC
I would like to use a tree structure where the nodes are links to 
wicket pages

or where you can open a nodes panel in accordion style

-
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




-
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






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




Re: fault in tree view

2013-07-04 Thread Sven Meier

That's really strange, the tree looks fine here.

Can you retry with a vanilla Firefox? Please clear the browser cache too.
Which Wicket version?

Sven

On 07/04/2013 04:16 PM, Piratenvisier wrote:

Ok I try it again


Am 04.07.2013 15:14, schrieb Sven Meier:

ascii art?

;)

On 07/04/2013 03:05 PM, Piratenvisier wrote:

Hello Sven,

here are the screenshots.

Am 04.07.2013 09:10, schrieb Sven Meier:

Hi,

I don't see a difference here. Can you post screenshots somewhere?

Sven

On 07/03/2013 11:02 PM, Piratenvisier wrote:
If you open the stucture in beginners view you have an other 
sequence of nodes than in advanced nested view
Follow the path A AB ABB ABBA ABBB ABBBA ABC ABD AC in advanced 
nested view and try to follow it in beginners view.


Am 03.07.2013 22:53, schrieb Sven Meier:

Hi,

can you please explain how the branch is faulty or 'wrong'?

You can override NestedTree#newContentComponent(String, IModel) 
to decide the representation of a node's content:


  MyNestedTree extends NestedTree {
@Override
public Component newContentComponent(String id, final 
AbstractTreeFoo tree, IModelFoo model)

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

@Override
protected MarkupContainer newLinkComponent(String id, 
IModelFoo model)

{
Foo foo = model.getObject();

if (tree.getProvider().hasChildren(foo))
{
return super.newLinkComponent(id, model);
}
else
{
PageParameters parameters = new 
PageParameters();

parameters.add(foo, foo.getId());

return new BookmarkablePageLinkVoid(id, 
tree.getPage().getClass(), parameters);

}
}
};
}
  }

Hope this helps
Sven


On 07/03/2013 10:24 PM, Piratenvisier wrote:

When you look at the tree structure in advanced nested view
there is a wrong branch A AB ABB ABBA ABBB ABBBA ABC ABD AC
I would like to use a tree structure where the nodes are links 
to wicket pages

or where you can open a nodes panel in accordion style

- 


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




-
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






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









fault in tree view

2013-07-03 Thread Piratenvisier

When you look at the tree structure in advanced nested view
there is a wrong branch A AB ABB ABBA ABBB ABBBA ABC ABD AC
I would like to use a tree structure where the nodes are links to wicket 
pages

or where you can open a nodes panel in accordion style

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



Re: fault in tree view

2013-07-03 Thread Sven Meier

Hi,

can you please explain how the branch is faulty or 'wrong'?

You can override NestedTree#newContentComponent(String, IModel) to 
decide the representation of a node's content:


  MyNestedTree extends NestedTree {
@Override
public Component newContentComponent(String id, final 
AbstractTreeFoo tree, IModelFoo model)

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

@Override
protected MarkupContainer newLinkComponent(String id, 
IModelFoo model)

{
Foo foo = model.getObject();

if (tree.getProvider().hasChildren(foo))
{
return super.newLinkComponent(id, model);
}
else
{
PageParameters parameters = new PageParameters();
parameters.add(foo, foo.getId());

return new BookmarkablePageLinkVoid(id, 
tree.getPage().getClass(), parameters);

}
}
};
}
  }

Hope this helps
Sven


On 07/03/2013 10:24 PM, Piratenvisier wrote:

When you look at the tree structure in advanced nested view
there is a wrong branch A AB ABB ABBA ABBB ABBBA ABC ABD AC
I would like to use a tree structure where the nodes are links to 
wicket pages

or where you can open a nodes panel in accordion style

-
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: fault in tree view

2013-07-03 Thread Piratenvisier
If you open the stucture in beginners view you have an other sequence of 
nodes than in advanced nested view
Follow the path A AB ABB ABBA ABBB ABBBA ABC ABD AC in advanced nested 
view and try to follow it in beginners view.


Am 03.07.2013 22:53, schrieb Sven Meier:

Hi,

can you please explain how the branch is faulty or 'wrong'?

You can override NestedTree#newContentComponent(String, IModel) to 
decide the representation of a node's content:


  MyNestedTree extends NestedTree {
@Override
public Component newContentComponent(String id, final 
AbstractTreeFoo tree, IModelFoo model)

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

@Override
protected MarkupContainer newLinkComponent(String id, 
IModelFoo model)

{
Foo foo = model.getObject();

if (tree.getProvider().hasChildren(foo))
{
return super.newLinkComponent(id, model);
}
else
{
PageParameters parameters = new PageParameters();
parameters.add(foo, foo.getId());

return new BookmarkablePageLinkVoid(id, 
tree.getPage().getClass(), parameters);

}
}
};
}
  }

Hope this helps
Sven


On 07/03/2013 10:24 PM, Piratenvisier wrote:

When you look at the tree structure in advanced nested view
there is a wrong branch A AB ABB ABBA ABBB ABBBA ABC ABD AC
I would like to use a tree structure where the nodes are links to 
wicket pages

or where you can open a nodes panel in accordion style

-
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




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



Re: editable tree table: submit all changes at once

2013-01-29 Thread grazia
Sorry, I got the source code



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/editable-tree-table-make-an-editable-row-rather-than-an-editable-cell-tp4655768p4655879.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: editable tree table: submit all changes at once

2013-01-29 Thread Paul Bors
Try to use that project out of the box, and if you find bugs or
improvements feel free to contribute back :)
It's better that way as it is mainted by a wide range of members rather
than just your or your team.

~ Thank you,
   Paul Bors
On Tue, Jan 29, 2013 at 9:54 AM, grazia grazia.russolass...@gmail.comwrote:

 Sorry, I got the source code



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/editable-tree-table-make-an-editable-row-rather-than-an-editable-cell-tp4655768p4655879.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: editable tree table: submit all changes at once

2013-01-29 Thread Paul Bors
Why don't you just switch your code to use it and then put it to a test. See
if it dose what you need, and if it's not then feel free to steal as much
code from it as you please.

I believe it's open source under the same license as Wicket (Apache 2.0).

I don't use that particular editable tree table so I can't answer you
directly, but I do use other components from Wicket Stuff.

~ Thank you,
Paul Bors



-
~ Thank you,
p...@bors.ws
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/editable-tree-table-make-an-editable-row-rather-than-an-editable-cell-tp4655768p4655893.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: editable tree table: submit all changes at once

2013-01-28 Thread grazia
This is what I did, comments are welcome. 
On each row, I have an action's cell (actions like save or delete).
That cell is represented by a class that extends Panel. Its constructor
takes an id and a PropertyModel as arguments. The PropertyModel allows me to
get the tree node in that row. 

final DefaultMutableTreeNode node =
((DefaultMutableTreeNode)inputModel.getTarget());
final MyObject obj = (MyObject)node.getUserObject();


Please let me know if there is a better way. Thanks. 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/editable-tree-table-make-an-editable-row-rather-than-an-editable-cell-tp4655768p4655859.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: editable tree table: submit all changes at once

2013-01-28 Thread Paul Bors
Why re-invent the wheel?

Take a look at the examples for Wicket Components at:
http://www.wicket-library.com/

The  Wicketstuff InMethod Grid's Editable TreeGrid:
http://www.wicket-library.com/inmethod-grid/tree-grid/editable

The project you're looking for is at:
https://github.com/wicketstuff/core/wiki/InMethodGrid

~ Thank you,
   Paul C Bors

On Jan 28, 2013, at 21:24, grazia grazia.russolass...@gmail.com wrote:

 This is what I did, comments are welcome. 
 On each row, I have an action's cell (actions like save or delete).
 That cell is represented by a class that extends Panel. Its constructor
 takes an id and a PropertyModel as arguments. The PropertyModel allows me to
 get the tree node in that row. 
 
final DefaultMutableTreeNode node =
 ((DefaultMutableTreeNode)inputModel.getTarget());
final MyObject obj = (MyObject)node.getUserObject();

 
 Please let me know if there is a better way. Thanks. 
 
 
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/editable-tree-table-make-an-editable-row-rather-than-an-editable-cell-tp4655768p4655859.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: editable tree table: submit all changes at once

2013-01-25 Thread Sven Meier
Sure, just configure it columns with inputs (e.g. a Panel with a 
contained TextField) for the table cells and wrap the whole table in a form.


Sven

On 01/25/2013 03:27 PM, grazia wrote:

Currently the editable tree table builds rows of editable cells. Each cell is
a panel, and each panel contains fields to which we can add an
AjaxFormComponentUpdatingBehavior so that on blur we can update our
persistent data.
Instead of updating at each onblur event on a cell, would it be possible to
modify the row so that the user could click on a Submit button and all
changes be pushed at the same time to the database ?
How ?



  




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/editable-tree-table-submit-all-changes-at-once-tp4655768.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: how to remove the file icons from the editable tree table ?

2013-01-24 Thread Colin Rogers
Extend DefaultAbstractTree and override getFolderOpen() and getFolderClosed()  
- which are called by newNodeIcon() (eventually)?

-Original Message-
From: grazia [mailto:grazia.russolass...@gmail.com]
Sent: 25 January 2013 04:18
To: users@wicket.apache.org
Subject: Re: how to remove the file icons from the editable tree table ?

DefaultAbstractTree.newNodeIcon is the culprit ... I guess I can extend class 
TreeTable, which extends DefaultAbstractTree, and then override newNodeIcon as 
I need to ...
Any easier way  ?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-remove-the-file-icons-from-the-editable-tree-table-tp4655709p4655733.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

EMAIL DISCLAIMER This email message and its attachments are confidential and 
may also contain copyright or privileged material. If you are not the intended 
recipient, you may not forward the email or disclose or use the information 
contained in it. If you have received this email message in error, please 
advise the sender immediately by replying to this email and delete the message 
and any associated attachments. Any views, opinions, conclusions, advice or 
statements expressed in this email message are those of the individual sender 
and should not be relied upon as the considered view, opinion, conclusions, 
advice or statement of this company except where the sender expressly, and with 
authority, states them to be the considered view, opinion, conclusions, advice 
or statement of this company. Every care is taken but we recommend that you 
scan any attachments for viruses.

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



Re: how to remove the file icons from the editable tree table ?

2013-01-23 Thread Paul Bors
You can:

1) Extend the java class and override its HTML mark-up by preserving the
wicket:id component tree in your own markup
Then in your own java you can call setVisible(false) or replace it with
an empty panel
2) Analyze the HTML for the component:
span class=icon style=background-image:
url(../../wicket/resource/org.apache.wicket.extensions.markup.html.tree.DefaultAbstractTree/res/folder-closed-ver-EA16980AB437FA6BA4ABA3D480E83E9E.gif);/
Notice is using CSS w/ a icon class so override that.

~ Thank you,
   Paul Bors

On Wed, Jan 23, 2013 at 3:25 PM, grazia grazia.russolass...@gmail.comwrote:

 http://apache-wicket.1842946.n4.nabble.com/file/n4655709/editabletree.png
 

 How could we remove the icons in the attached image from the editable tree
 table ? Or at least replace them with something customized ?
 It is also on the wicket example page :
 http://www.wicket-library.com/wicket-examples/ajax/tree/table/editable?0

 Thank you in advance



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/how-to-remove-the-file-icons-from-the-editable-tree-table-tp4655709.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: tree component problems in 6.x

2012-12-31 Thread Sandor Feher
Hi Sven,

I though so you're my man  .getTable() works fine but I have two other
problems left.
First is adding windowstheme has no affect for me.
Second one if I open a node with child items then it doubles the displayed
items. If I keep clicking then it triples the content and so one. It might
be they related to each other. (See screenshots.)
It's not so easy to create a quickstart from this situation so if you have
any idea I would appreciate that.
(The bottom line is that the code worked fine in 1.5.9).

thnx., Sandor

http://apache-wicket.1842946.n4.nabble.com/file/n4655107/1.png 
http://apache-wicket.1842946.n4.nabble.com/file/n4655107/2.png 
http://apache-wicket.1842946.n4.nabble.com/file/n4655107/3.png 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/tree-component-problems-in-6-x-tp4655101p4655107.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: tree component problems in 6.x

2012-12-31 Thread Sven Meier

Hi Sandor,

TableTree nests a table tag inside its markup, so make sure itself is 
*not* mapped to a table but a div tag.


Sven

On 12/31/2012 01:54 PM, Sandor Feher wrote:

Hi Sven,

I though so you're my man  .getTable() works fine but I have two other
problems left.
First is adding windowstheme has no affect for me.
Second one if I open a node with child items then it doubles the displayed
items. If I keep clicking then it triples the content and so one. It might
be they related to each other. (See screenshots.)
It's not so easy to create a quickstart from this situation so if you have
any idea I would appreciate that.
(The bottom line is that the code worked fine in 1.5.9).

thnx., Sandor

http://apache-wicket.1842946.n4.nabble.com/file/n4655107/1.png
http://apache-wicket.1842946.n4.nabble.com/file/n4655107/2.png
http://apache-wicket.1842946.n4.nabble.com/file/n4655107/3.png



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/tree-component-problems-in-6-x-tp4655101p4655107.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: tree component problems in 6.x

2012-12-31 Thread Sandor Feher
Hi,

Thanks for the hint. It was the table tag. WindowsTheme problem still
persists but I will be working on it.
So happy new year!

thnx. ,Sandor



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/tree-component-problems-in-6-x-tp4655101p4655110.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



tree component problems in 6.x

2012-12-30 Thread Sandor Feher
Hi,

I'm just upgraded my project from 1.5.9 to 6.4.0 without major problems. The
only thing I can't get rid so far is tree component.

My 1.5.9 code is this.

tree.addTopToolbar(new HeadersToolbar(tree));
tree.addBottomToolbar(new NoRecordsToolbar(tree));
tree.add(new Behavior() {

@Override
public void renderHead( Component component, IHeaderResponse
response) {
response.renderCSSReference(new WindowsTheme());
}

Now it looks to me that there is no addTopToolbar/addBottomToolbar method
belongs to tree component.
I'm also struggling with WindowsTheme behavior. Please let me know the
replacements things above.


thnx. Sandor



});




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/tree-component-problems-in-6-x-tp4655101.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: tree component problems in 6.x

2012-12-30 Thread Sven Meier

Hi Sandor,

you'll have a TableTree's table first to change the toolbars:

  tree.getTable().addTopToolbar(...);

If you're not using DefaultTableTree but extend from TableTree you'll 
have to add the theme as follows:


  tree.add(new 
org.apache.wicket.extensions.markup.html.repeater.tree.theme.WindowsTheme());


Hope this helps
Sven




On 12/30/2012 03:55 PM, Sandor Feher wrote:

Hi,

I'm just upgraded my project from 1.5.9 to 6.4.0 without major problems. The
only thing I can't get rid so far is tree component.

My 1.5.9 code is this.

 tree.addTopToolbar(new HeadersToolbar(tree));
 tree.addBottomToolbar(new NoRecordsToolbar(tree));
 tree.add(new Behavior() {

 @Override
 public void renderHead( Component component, IHeaderResponse
response) {
 response.renderCSSReference(new WindowsTheme());
 }

Now it looks to me that there is no addTopToolbar/addBottomToolbar method
belongs to tree component.
I'm also struggling with WindowsTheme behavior. Please let me know the
replacements things above.


thnx. Sandor



 });




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/tree-component-problems-in-6-x-tp4655101.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



Selectable Tree WicketTester

2012-11-12 Thread void
I took the following classes from the tree example to implement a selectable 
tree:
 - Foo
 - FooExpansion
 - FooProvider
 - SelectableFolderContent

 Now I'd like to test the tree with WicketTester:
 - click on the plus sign of a node; does the sub tree open? Are the children 
visible?
 - click on the minus sing of an node; does the sub tree close?
 - click on expandAll / collapseAll; does the tree collapse or extned?
 - click on a node; does the node shown as selected?

 I'm not sure how to do that. Could somebody offer an aproach?

 Thanks
 Oliver


Wicket Selectable Tree

2012-11-09 Thread void
Hi,

 I implemented a tree component similar to the SelectableFolderContent example 
(http://www.wicket-library.com/wicket-examples-6.0.x/tree/wicket/bookmarkable/org.apache.wicket.examples.tree.NestedTreePage).
 It works fine as long as the nodes do have unique names. If thehe is more then 
one node with the same name, they all get selected by clicking on one of them. 
Can anyone offer a solution for that?

 Thanks
 Oliver


Re: Wicket Selectable Tree

2012-11-09 Thread Sven Meier
What is the generic parameter of your ITreeProvider ?

Sven

v...@gmx.it schrieb:

Hi,

 I implemented a tree component similar to the SelectableFolderContent example 
 (http://www.wicket-library.com/wicket-examples-6.0.x/tree/wicket/bookmarkable/org.apache.wicket.examples.tree.NestedTreePage).
  It works fine as long as the nodes do have unique names. If thehe is more 
 then one node with the same name, they all get selected by clicking on one of 
 them. Can anyone offer a solution for that?

 Thanks
 Oliver

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



Wicket Selectable Tree

2012-11-09 Thread void
It's a custom Node class, pretty similar to Foo in the example. I resolved this 
by adding a second attribute name to Node. name is returned by 
Node.toString() for display. The id attribute is set to 
hierarchy1.hierarchy2.name. So the id is unique: Selection works as expected.

 Regards
 Oliver

 --- Sven Meier (sv...@meiers.net) schrieb:

 What is the generic parameter of your ITreeProvider ?
 Sven

--- vo...@gmx.it schrieb:

 Hi,
 I implemented a tree component similar to the SelectableFolderContent example
 
(http://www.wicket-library.com/wicket-examples-6.0.x/tree/wicket/bookmarkable/org.apache.wicket.examples.tree.NestedTreePage
 ).
 It works fine as long as the nodes do have unique names. If thehe is more then
 one node with the same name, they all get selected by clicking on one of them.
 Can anyone offer a solution for that?
 Thanks
 Oliver


Re: Navigate through Wicket 6 tree

2012-11-02 Thread Jered Myers
I am still using the deprecated tree and am building the new tree in a 
sandbox, so I am able to put the update on hold if there is a good 
solution on the way in the next few weeks.  We are attempting to move to 
the new tree so that we are not having to scramble once the deprecated 
methods are removed.  In 1.5, I am extending DefaultMutableTreeNode and 
the tree model took care of setting up the the next and previous nodes.  
I was able to call DefaultMutableTreeNode#getPreviousNode() to get the 
previous node. I still had to write more complex logic to move up 
through parent nodes when my selected node was index 0.


For now, I am adding the parent node and its children to each tree node 
object after sorting it in ITreeProvider#Iterator? extends T 
getChildren(T node);.  Once that happens, I can grab the parent from the 
selected node and move through the children via indexes.  I tried just 
moving through the nodes in my data cache in the provider, but that 
created a problem as the data cache is not sorted and I am using 
ISortableTreeProvider to do that work.  I may be going about this the 
right way for what I need, but it seems to me that I am making it harder 
than it should be.


Thanks for any help!

On 11/02/2012 03:30 AM, Sven Meier wrote:

Hi,

when do you need this information? How did you do it in 1.5?

Sven

On 11/01/2012 10:34 PM, Jered Myers wrote:
I am updating my trees from Wicket 1.5 to 6.2.  I need to get the 
next node and previous node related to the node the user has 
selected.  I am using a NestedTree similar to 
http://wicket-tree.appspot.com/nested (set Content to 
SelectableFolderContent).  Is there an easy way to do this?





-
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: Navigate through Wicket 6 tree

2012-11-02 Thread Sven Meier

I see, you've been using part of Swing's API to traverse the tree.

Don't your domain objects of the tree know their parents? If not, you 
may be able to walk up the Wicket component tree to the parental tree 
item to get the parent domain object.


What do you use this for? What's your usecase?

Sven

On 11/02/2012 05:07 PM, Jered Myers wrote:
I am still using the deprecated tree and am building the new tree in a 
sandbox, so I am able to put the update on hold if there is a good 
solution on the way in the next few weeks.  We are attempting to move 
to the new tree so that we are not having to scramble once the 
deprecated methods are removed.  In 1.5, I am extending 
DefaultMutableTreeNode and the tree model took care of setting up the 
the next and previous nodes.  I was able to call 
DefaultMutableTreeNode#getPreviousNode() to get the previous node. I 
still had to write more complex logic to move up through parent nodes 
when my selected node was index 0.


For now, I am adding the parent node and its children to each tree 
node object after sorting it in ITreeProvider#Iterator? extends T 
getChildren(T node);.  Once that happens, I can grab the parent from 
the selected node and move through the children via indexes.  I tried 
just moving through the nodes in my data cache in the provider, but 
that created a problem as the data cache is not sorted and I am using 
ISortableTreeProvider to do that work.  I may be going about this the 
right way for what I need, but it seems to me that I am making it 
harder than it should be.


Thanks for any help!

On 11/02/2012 03:30 AM, Sven Meier wrote:

Hi,

when do you need this information? How did you do it in 1.5?

Sven

On 11/01/2012 10:34 PM, Jered Myers wrote:
I am updating my trees from Wicket 1.5 to 6.2.  I need to get the 
next node and previous node related to the node the user has 
selected.  I am using a NestedTree similar to 
http://wicket-tree.appspot.com/nested (set Content to 
SelectableFolderContent).  Is there an easy way to do this?





-
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




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



Re: Navigate through Wicket 6 tree

2012-11-02 Thread Sven Meier
If your domain objects have a reference to their parents, why bother 
with the component structure?
You can walk up your domain tree to search the 'previous' one. All you 
have to do, is re-applying the ordering when you iterate over the children.


Sven



On 11/02/2012 08:08 PM, Jered Myers wrote:
The domain objects do know the parent, but they do not know what order 
they exist within their siblings.


Usecase:
- I have a tree of departments that has a list of employees in the 
tree where the parent node is the department and the child nodes are 
employees.
- The tree is handling navigation on the left of my screen.  When an 
employee is selected, the right side of the screen allows the employee 
to be edited.
- If I remove an employee by clicking a delete link on the right of 
the screen, I want the node to be removed in the tree and  the 
selection to move to the previous node in the list.
- The user can toggle the employee tree nodes between an alphabetical 
order and an order that groups the employees by the job they perform.


Changing how the employee nodes in the tree are ordered is part of the 
ISortableTreeProvider and not the domain objects.  The domain objects 
are always the same as it is only the display that is being manipulated.


Walking the Wicket component tree sounds like it would work, but I am 
not sure how much easier it would be than setting parent and children 
on node in ITreeProvider#Iterator? extends T getChildren(T node).  
It does seem like it would remove the need for redundant data.  Is 
there a good way to grab the content component associated to the 
selected model?  I suppose I could just store the component when I 
store the selected model.


On 11/02/2012 10:03 AM, Sven Meier wrote:

I see, you've been using part of Swing's API to traverse the tree.

Don't your domain objects of the tree know their parents? If not, you 
may be able to walk up the Wicket component tree to the parental tree 
item to get the parent domain object.


What do you use this for? What's your usecase?

Sven

On 11/02/2012 05:07 PM, Jered Myers wrote:
I am still using the deprecated tree and am building the new tree in 
a sandbox, so I am able to put the update on hold if there is a good 
solution on the way in the next few weeks.  We are attempting to 
move to the new tree so that we are not having to scramble once the 
deprecated methods are removed.  In 1.5, I am extending 
DefaultMutableTreeNode and the tree model took care of setting up 
the the next and previous nodes.  I was able to call 
DefaultMutableTreeNode#getPreviousNode() to get the previous node. I 
still had to write more complex logic to move up through parent 
nodes when my selected node was index 0.


For now, I am adding the parent node and its children to each tree 
node object after sorting it in ITreeProvider#Iterator? extends T 
getChildren(T node);.  Once that happens, I can grab the parent from 
the selected node and move through the children via indexes.  I 
tried just moving through the nodes in my data cache in the 
provider, but that created a problem as the data cache is not sorted 
and I am using ISortableTreeProvider to do that work. I may be going 
about this the right way for what I need, but it seems to me that I 
am making it harder than it should be.


Thanks for any help!

On 11/02/2012 03:30 AM, Sven Meier wrote:

Hi,

when do you need this information? How did you do it in 1.5?

Sven

On 11/01/2012 10:34 PM, Jered Myers wrote:
I am updating my trees from Wicket 1.5 to 6.2.  I need to get the 
next node and previous node related to the node the user has 
selected.  I am using a NestedTree similar to 
http://wicket-tree.appspot.com/nested (set Content to 
SelectableFolderContent).  Is there an easy way to do this?





-
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




-
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




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



Re: Navigate through Wicket 6 tree

2012-11-02 Thread Jered Myers
That is a good idea!  That will keep me from messing with the extra 
storage and I won't have to go to two different places for parent child 
relationships.  I was hoping there was something already created for 
what I am trying to do that would make the process easier.  I appreciate 
your help!  Thanks for the examples at 
http://wicket-tree.appspot.com/nested. There is not much out there on 
the trees in Wicket 6 yet and that helped tremendously!


On 11/02/2012 01:45 PM, Sven Meier wrote:
If your domain objects have a reference to their parents, why bother 
with the component structure?
You can walk up your domain tree to search the 'previous' one. All you 
have to do, is re-applying the ordering when you iterate over the 
children.


Sven



On 11/02/2012 08:08 PM, Jered Myers wrote:
The domain objects do know the parent, but they do not know what 
order they exist within their siblings.


Usecase:
- I have a tree of departments that has a list of employees in the 
tree where the parent node is the department and the child nodes are 
employees.
- The tree is handling navigation on the left of my screen. When an 
employee is selected, the right side of the screen allows the 
employee to be edited.
- If I remove an employee by clicking a delete link on the right of 
the screen, I want the node to be removed in the tree and the 
selection to move to the previous node in the list.
- The user can toggle the employee tree nodes between an alphabetical 
order and an order that groups the employees by the job they perform.


Changing how the employee nodes in the tree are ordered is part of 
the ISortableTreeProvider and not the domain objects.  The domain 
objects are always the same as it is only the display that is being 
manipulated.


Walking the Wicket component tree sounds like it would work, but I am 
not sure how much easier it would be than setting parent and children 
on node in ITreeProvider#Iterator? extends T getChildren(T node).  
It does seem like it would remove the need for redundant data.  Is 
there a good way to grab the content component associated to the 
selected model?  I suppose I could just store the component when I 
store the selected model.


On 11/02/2012 10:03 AM, Sven Meier wrote:

I see, you've been using part of Swing's API to traverse the tree.

Don't your domain objects of the tree know their parents? If not, 
you may be able to walk up the Wicket component tree to the parental 
tree item to get the parent domain object.


What do you use this for? What's your usecase?

Sven

On 11/02/2012 05:07 PM, Jered Myers wrote:
I am still using the deprecated tree and am building the new tree 
in a sandbox, so I am able to put the update on hold if there is a 
good solution on the way in the next few weeks.  We are attempting 
to move to the new tree so that we are not having to scramble once 
the deprecated methods are removed.  In 1.5, I am extending 
DefaultMutableTreeNode and the tree model took care of setting up 
the the next and previous nodes.  I was able to call 
DefaultMutableTreeNode#getPreviousNode() to get the previous node. 
I still had to write more complex logic to move up through parent 
nodes when my selected node was index 0.


For now, I am adding the parent node and its children to each tree 
node object after sorting it in ITreeProvider#Iterator? extends T 
getChildren(T node);.  Once that happens, I can grab the parent 
from the selected node and move through the children via indexes.  
I tried just moving through the nodes in my data cache in the 
provider, but that created a problem as the data cache is not 
sorted and I am using ISortableTreeProvider to do that work. I may 
be going about this the right way for what I need, but it seems to 
me that I am making it harder than it should be.


Thanks for any help!

On 11/02/2012 03:30 AM, Sven Meier wrote:

Hi,

when do you need this information? How did you do it in 1.5?

Sven

On 11/01/2012 10:34 PM, Jered Myers wrote:
I am updating my trees from Wicket 1.5 to 6.2.  I need to get the 
next node and previous node related to the node the user has 
selected.  I am using a NestedTree similar to 
http://wicket-tree.appspot.com/nested (set Content to 
SelectableFolderContent).  Is there an easy way to do this?





-
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




-
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

Re: wicket-tree with two Hibernate entities

2012-10-20 Thread Sandor Feher
Thanks. All work fine.

s



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-tree-with-two-Hibernate-entities-tp4653122p4653163.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-tree with two Hibernate entities

2012-10-20 Thread Sven Meier

That's good to hear :).

Sven

On 10/20/2012 09:41 PM, Sandor Feher wrote:

Thanks. All work fine.

s



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-tree-with-two-Hibernate-entities-tp4653122p4653163.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



wicket-tree with two Hibernate entities

2012-10-19 Thread Sandor Feher
Hi,

I dig myself into wicket-tree. 

I store my files in an entity by categories. Categories listed in another
entity. I would like the files get listed by category in a TableTree.
Nothing tricky just two levels. Roots are the categories, children are files
belong to categories.
As I followed the examples realized that the listed items belongs to the
same class. Should I create a helper class based on a view  ?  
I would like to find the best approach if possible.


thnx., Sandor



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-tree-with-two-Hibernate-entities-tp4653122.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-tree with two Hibernate entities

2012-10-19 Thread Sven Meier
Either you have a common super-class already or just use 
ITreeProviderObject.


Introducing a helper class might save you some instanceof checks though.

Sven


On 10/19/2012 05:18 PM, Sandor Feher wrote:

Hi,

I dig myself into wicket-tree.

I store my files in an entity by categories. Categories listed in another
entity. I would like the files get listed by category in a TableTree.
Nothing tricky just two levels. Roots are the categories, children are files
belong to categories.
As I followed the examples realized that the listed items belongs to the
same class. Should I create a helper class based on a view  ?
I would like to find the best approach if possible.


thnx., Sandor



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-tree-with-two-Hibernate-entities-tp4653122.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-tree with two Hibernate entities

2012-10-19 Thread Sandor Feher
Hi Sven,

Thank you for the prompt answer. Please make me sure if I do it well.

FileHelper.class

import java.util.Collections;
import java.util.List;


public class FileTreeHelper implements Serializable {



private HrpBbfparam parent; // this is the dictionary class with fields
Id and Name

public HrpBbfparam getParent() {
return parent;
}

public void setParent(HrpBbfparam parent) {
this.parent = parent;
}

private ListHrpFiles children; // files belong to parent

public ListHrpFiles getChildren() {
return children;
}

public void setChildren(ListHrpFiles children) {
this.children = children;
}


}

thnx., Sandor



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-tree-with-two-Hibernate-entities-tp4653122p4653130.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: Add bottom row to editable tree table

2012-10-03 Thread Martin Grigorov
Hi,

I think you just need to update its model with an additional
entry/node and repaint it.

On Wed, Oct 3, 2012 at 9:36 PM, grazia grazia.russolass...@gmail.com wrote:
 Would it be possible to modify a tree table by adding the Add and Delete
 functionality ?



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Add-bottom-row-to-editable-tree-table-tp4652637.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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: urgent-help.. how to click a specific tree node at the default

2012-08-06 Thread Sven Meier
Just override LinkTree#onNodeLinkClicked()

Sven

On 08/06/2012 02:57 AM, swwa...@tsmc.com wrote:

 Hello:

 I have seen this article.
 http://www.wicket-library.com/wicket-examples/ajax/

 It only select the node but can't trigger the on-click event.

 Any one could help?

 Joan



 |-
 |Paul Bors p...@bors.ws |
 | |
 | |
 | |
 |2012/08/06 上午 01:17|
 | |
 | |
 |Please respond to|
 | users@wicket.apache.org |
 | |
 |-
   
 --|
   |   
|
   |   
|
   |   
  To|
   |users@wicket.apache.org users@wicket.apache.org
|
   |   
  cc|
   |   
|
   |   
 Subject|
   |Re: urgent-help.. how to click a specific tree node at the default 
|
   |   
|
   |   
|
   |   
|
   |   
|
   |   
|
   
 --|




 See the Wicket Ajax examples section on Tree and Table:

 http://www.wicket-library.com/wicket-examples/ajax/

 Tree and TreeTable: shows ajax tree and ajax tree table.

 ~ Thank you,
Paul C Bors

 On Aug 4, 2012, at 23:52, swwa...@tsmc.com wrote:

 Hello:
I am new to wicket..please help to give suggestion to this
 requirment.
 I will expand the tree at the default. But I need to start(click) the
 first
 node at the default.

 Do anyone could help me how to implement this??
 I have use selectNode to select the first node but it can not start to
 trigger the onclick event..


 Joan

 ---

 TSMC PROPERTY
 This email communication (and any attachments) is proprietary information
 for the sole use of its
 intended recipient. Any unauthorized review, use or distribution by
 anyone
 other than the intended
 recipient is strictly prohibited.  If you are not the intended recipient,
 please notify the sender by
 replying to this email, and then delete this email and any copies of it
 immediately. Thank you.
 ---





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


  --- 
  TSMC PROPERTY   
  This email communication (and any attachments) is proprietary information   
  for the sole use of its 
  intended recipient. Any unauthorized review, use or distribution by anyone  
  other than the intended 
  recipient

Re: urgent-help.. how to click a specific tree node at the default

2012-08-05 Thread Paul Bors
See the Wicket Ajax examples section on Tree and Table:

http://www.wicket-library.com/wicket-examples/ajax/

Tree and TreeTable: shows ajax tree and ajax tree table. 

~ Thank you,
   Paul C Bors

On Aug 4, 2012, at 23:52, swwa...@tsmc.com wrote:

 
 Hello:
I am new to wicket..please help to give suggestion to this
 requirment.
 I will expand the tree at the default. But I need to start(click) the first
 node at the default.
 
 Do anyone could help me how to implement this??
 I have use selectNode to select the first node but it can not start to
 trigger the onclick event..
 
 
 Joan
 --- 
 TSMC PROPERTY   
 This email communication (and any attachments) is proprietary information   
 for the sole use of its 
 intended recipient. Any unauthorized review, use or distribution by anyone  
 other than the intended 
 recipient is strictly prohibited.  If you are not the intended recipient,   
 please notify the sender by 
 replying to this email, and then delete this email and any copies of it 
 immediately. Thank you. 
 --- 
 
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 


Re: urgent-help.. how to click a specific tree node at the default

2012-08-05 Thread swwangl


Hello:

I have seen this article.
http://www.wicket-library.com/wicket-examples/ajax/

It only select the node but can't trigger the on-click event.

Any one could help?

Joan



|-
|Paul Bors p...@bors.ws |
| |
| |
| |
|2012/08/06 上午 01:17|
| |
| |
|Please respond to|
| users@wicket.apache.org |
| |
|-
  
--|
  | 
 |
  | 
 |
  | 
   To|
  |users@wicket.apache.org users@wicket.apache.org  
 |
  | 
   cc|
  | 
 |
  | 
  Subject|
  |Re: urgent-help.. how to click a specific tree node at the default   
 |
  | 
 |
  | 
 |
  | 
 |
  | 
 |
  | 
 |
  
--|




See the Wicket Ajax examples section on Tree and Table:

http://www.wicket-library.com/wicket-examples/ajax/

Tree and TreeTable: shows ajax tree and ajax tree table.

~ Thank you,
   Paul C Bors

On Aug 4, 2012, at 23:52, swwa...@tsmc.com wrote:


 Hello:
I am new to wicket..please help to give suggestion to this
 requirment.
 I will expand the tree at the default. But I need to start(click) the
first
 node at the default.

 Do anyone could help me how to implement this??
 I have use selectNode to select the first node but it can not start to
 trigger the onclick event..


 Joan

---

 TSMC PROPERTY

 This email communication (and any attachments) is proprietary information

 for the sole use of its

 intended recipient. Any unauthorized review, use or distribution by
anyone
 other than the intended

 recipient is strictly prohibited.  If you are not the intended recipient,

 please notify the sender by

 replying to this email, and then delete this email and any copies of it

 immediately. Thank you.


---






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



 --- 
 TSMC PROPERTY   
 This email communication (and any attachments) is proprietary information   
 for the sole use of its 
 intended recipient. Any unauthorized review, use or distribution by anyone  
 other than the intended 
 recipient is strictly prohibited.  If you are not the intended recipient,   
 please notify the sender by 
 replying

urgent-help.. how to click a specific tree node at the default

2012-08-04 Thread swwangl

Hello:
I am new to wicket..please help to give suggestion to this
requirment.
I will expand the tree at the default. But I need to start(click) the first
node at the default.

Do anyone could help me how to implement this??
I have use selectNode to select the first node but it can not start to
trigger the onclick event..


Joan
 --- 
 TSMC PROPERTY   
 This email communication (and any attachments) is proprietary information   
 for the sole use of its 
 intended recipient. Any unauthorized review, use or distribution by anyone  
 other than the intended 
 recipient is strictly prohibited.  If you are not the intended recipient,   
 please notify the sender by 
 replying to this email, and then delete this email and any copies of it 
 immediately. Thank you. 
 --- 





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



Re: wicket tree + wiquery ajax draggable + droppable behavior

2012-07-23 Thread Chris Turchin
to get this to work, we ended up having to refresh the entire tree
component when the children of a node are loaded, kinda defeating the
purpose of the ajax lazy loading. otherwise, the subnodes are not droppable
targets in the DOM.

still open to better more jq/wiquery-like approach if someone has any ideas.

thanks.
-c

On Wed, Jul 18, 2012 at 7:06 PM, Chris Turchin ch...@turchin.net wrote:

 hi,

 we have a wicket 1.5.7 tree
 (org.apache.wicket.extensions.markup.html.tree) that we are loading
 subnodes into via ajax. the tree supports ajax dnd events using wiquery
 (dnd to copy/move/link page objects into the tree nodes) and it works great
 when the page loads (e.g at level one in the tree).

 when we add subnode (level two) to the tree via ajax (lazy loading nodes),
 these nodes are at first not droppable. after loading an additional
 sublevel (level three), then the nodes of  level two are droppable. the
 level three nodes are not. and this continues down the tree level by
 level... alternately, when the page is refreshed (f5) all nodes in the tree
 are droppable.

 i know that jquery brings a live() function for reacting to ajax-y DOM
 changes. i cannot figure out how this plays into the wiquery context or how
 we can get the ajax nodes to be ui-droppable right after loading.

 advice appreciated. thanks.

 best regards
 -chris

 --
 Chris Turchin ch...@turchin.net




-- 
Chris Turchin ch...@turchin.net


wicket tree + wiquery ajax draggable + droppable behavior

2012-07-18 Thread Chris Turchin
hi,

we have a wicket 1.5.7 tree (org.apache.wicket.extensions.markup.html.tree)
that we are loading subnodes into via ajax. the tree supports ajax dnd
events using wiquery (dnd to copy/move/link page objects into the tree
nodes) and it works great when the page loads (e.g at level one in the
tree).

when we add subnode (level two) to the tree via ajax (lazy loading nodes),
these nodes are at first not droppable. after loading an additional
sublevel (level three), then the nodes of  level two are droppable. the
level three nodes are not. and this continues down the tree level by
level... alternately, when the page is refreshed (f5) all nodes in the tree
are droppable.

i know that jquery brings a live() function for reacting to ajax-y DOM
changes. i cannot figure out how this plays into the wiquery context or how
we can get the ajax nodes to be ui-droppable right after loading.

advice appreciated. thanks.

best regards
-chris

-- 
Chris Turchin ch...@turchin.net


RE: Tree onClick() question...

2012-03-09 Thread Wilhelmsen Tor Iver
 My question is why is target always null in the onClick handler? 

Typically that happens for AjaxFallback* components when the click is not an 
Ajax request, e.g. the user has disabled Javascript. In those cases target is 
null and the whole page will be rendered in the (normal) response.

- Tor Iver

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



Re: Tree onClick() question...

2012-03-09 Thread Sven Meier

Check the tree's link type, if it is REGULAR the target will always be null.

Sven

On 03/09/2012 12:14 AM, mlabs wrote:

I'm using a Tree and I have declared an onClick() handler in the usual way :

new Tree(treeID, treeModel){
@Override
protected MarkupContainer newNodeLink(MarkupContainer parent, String id,
final TreeNode){
  return newLink(parent, id, new ILinkCallback(){
  public void onClick(AjaxRequestLink target){

 // why is target always null in here?
  }
  });
}

My question is why is target always null in the onClick handler?
My problem is that I want to alter the model of another component when the
user clicks a tree node, and then refresh that component in the page... so
I'm thinking I need to make a target.addComponent(..) call at the end of
this... but, well, I don't appear to have a target?
What am I missing?
TIA


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Tree-onClick-question-tp4457980p4457980.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



Tree onClick() question...

2012-03-08 Thread mlabs
I'm using a Tree and I have declared an onClick() handler in the usual way :

new Tree(treeID, treeModel){
@Override
protected MarkupContainer newNodeLink(MarkupContainer parent, String id,
final TreeNode){
 return newLink(parent, id, new ILinkCallback(){
 public void onClick(AjaxRequestLink target){
 
// why is target always null in here?
 }
 });
}

My question is why is target always null in the onClick handler? 
My problem is that I want to alter the model of another component when the
user clicks a tree node, and then refresh that component in the page... so
I'm thinking I need to make a target.addComponent(..) call at the end of
this... but, well, I don't appear to have a target?
What am I missing?
TIA


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Tree-onClick-question-tp4457980p4457980.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: Checkbox tree component

2012-03-06 Thread javanrell
Hi all, 
I made some changes based on the CheckBoxIconPanel.java posted by Doug,
basically I added behavior to update all parents or childrens when we check
or uncheck a node:
 * When we check a node, we verify all its brothers, if they are all checked
then we check its parent and recursively.
 * When we check a non leaf node we check all its children recursively.
 * When we uncheck a node we uncheck all its parents until the root.
I hope it will useful for someone.

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the License); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import javax.swing.tree.TreeNode;

import org.apache.wicket.MarkupContainer;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.markup.html.tree.BaseTree;
import org.apache.wicket.markup.html.tree.LabelIconPanel;
import org.apache.wicket.model.IModel;

/**
 * Simple panel that contains a link with icon and a link with a label.
 * 
 * @author Matej Knopp
 */
public class CheckBoxIconPanel extends LabelIconPanel {
private static final long serialVersionUID = 1L;

/**
 * Constructs the panel.
 * 
 * @param id
 *component id
 * @param model
 *model that is used to access the TreeNode
 * @param tree
 */
public CheckBoxIconPanel(String id, IModel model, CheckBoxTree tree) {
super(id, model, tree);
}

/**
 * @see
org.apache.wicket.markup.html.tree.LabelIconPanel#addComponents(org.apache.wicket.model.IModel,
 *  org.apache.wicket.markup.html.tree.BaseTree)
 */
protected void addComponents(final IModel model, final BaseTree tree) {
final CheckBoxTree cbTree = (CheckBoxTree)tree;
CheckBoxTree.ICheckCallback callback = new 
CheckBoxTree.ICheckCallback() {
private static final long serialVersionUID = 1L;

public void onUpdate(AjaxRequestTarget target) {
onNodeCheckUpdated((TreeNode)model.getObject(), 
cbTree, target);
}
};

add(newImageComponent(icon, tree, model));

IModel dataModel = 
cbTree.newCheckBoxModel((TreeNode)model.getObject());
MarkupContainer cb = null;
add( cb = cbTree.newCheckBox(checkbox, dataModel, callback) );
add(newContentComponent(content, tree, model));
}

/**
 * Handler invoked when the checkbox is clicked. By default makes the 
node
selected
 * 
 * @param node
 * @param tree
 * @param target
 */
protected void onNodeCheckUpdated(TreeNode node, CheckBoxTree tree,
AjaxRequestTarget target) {
if (tree.getTreeState().isNodeSelected(node)) {
deselectAllParent(node, tree);
selectAllChildren(node, tree, false);
} else {
selectAllChildren(node, tree, true);
updateSelectionIfLastSelected(node, tree);
}   
tree.updateTree(target);
}

/**
 * When a node of leaf is selected we search for all its brothers, if 
all
are selected too we select the parent and recursively until the root.
 * 
 * @param node
 * @param tree
 * @param target
 */
protected void updateSelectionIfLastSelected(TreeNode node, CheckBoxTree
tree) {
TreeNode parent = node.getParent(); 
while(parent != null) {
int childCount = parent.getChildCount();
for (int i = 0; i  childCount; i++) {

if(!tree.getTreeState().isNodeSelected(parent.getChildAt(i))) {
return;
}
}
tree.getTreeState().selectNode(parent, true);
parent = parent.getParent();
}
}

/**
 * When a node / leaf is deselected all its parent are deselected too

How to render a Tree with a preselected node?

2011-12-09 Thread Emmanouil Batsis (Manos)


Looking around the APIs and all, but haven't figured out how to have a 
LabelTree rendered with the tree expanded properly to point to a 
preselected node.


Manos

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



Re: How to render a Tree with a preselected node?

2011-12-09 Thread Emmanouil Batsis (Manos)

On 12/09/2011 03:30 PM, Emmanouil Batsis (Manos) wrote:


Looking around the APIs and all, but haven't figured out how to have a
LabelTree rendered with the tr


To answer my own email, it's all about

// select the apropriate node, in my case a
// DefaultMutableTreeNode
tree.getTreeState().selectNode(selectedNode, true);

// call a recursive method to
// expand accordingly
expandToNode(selectedNode);

// the method can be something like
private void expandToNode(DefaultMutableTreeNode node) {
tree.getTreeState().expandNode(node);
if(!node.isRoot()){
expandToNode((DefaultMutableTreeNode) node.getParent());
}
}


I still need to figure out how to scroll into-view though, I've wrapped 
the trees into fixed-height divs.


Manos

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



Re: Tree selection form component?

2011-12-09 Thread Emmanouil Batsis (Manos)

On 12/06/2011 02:55 PM, Emmanouil Batsis (Manos) wrote:


On 11/19/2011 05:09 PM, Emmanouil Batsis (Manos) wrote:
  I was wondering if anyone has implemented a reusable component for
  handling hierarchical/dependent dropdowns as I'm thinking of having a go
  at it... I hijacked the thread as it seems relevant.

At first I was after a component that adds an arbitrary number of
chained selects (the example bellow was just that), but a tree makes a
lot more sense in many cases. Any examples of a tree used to update a
text field? I'd happily turn that to a FormComponentPanel if none is
available.


It really needs some cleanup and improvements but in case anyone needs 
to see an example:


http://code.google.com/p/calipso/source/browse/trunk/calipso-war/src/main/java/gr/abiss/calipso/wicket/components/formfields/TreeChoice.java

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



Tree selection form component? (was: Re: Component for chained/dependent drop downs?)

2011-12-06 Thread Emmanouil Batsis (Manos)


On 11/19/2011 05:09 PM, Emmanouil Batsis (Manos) wrote:
 I was wondering if anyone has implemented a reusable component for
 handling hierarchical/dependent dropdowns as I'm thinking of having a go
 at it... I hijacked the thread as it seems relevant.

At first I was after a component that adds an arbitrary number of 
chained selects (the example bellow was just that), but a tree makes a 
lot more sense in many cases. Any examples of a tree used to update a 
text field? I'd happily turn that to a FormComponentPanel if none is 
available.


Manos



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



Re: Error with tree component with 1.5.2

2011-11-07 Thread PDiefent
One new hint concerning the error messages. If I use the Tree class instead
of AbstractTree and set the linktype after constructing the tree, the
message doesn't appear any more but the tree component slows down extremely!

...
tm = createTreeModel(animals);
tree = new CdTree(tree, tm);
tree.setRootLess(true);
*   tree.setLinkType(LinkType.REGULAR);*
tree.getTreeState().collapseAll();
testForm.add(tree.setOutputMarkupId(true));


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-with-tree-component-with-1-5-2-tp3956513p3997926.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: Error with tree component with 1.5.2

2011-11-02 Thread PDiefent
The same problem occurs if I use a PackageResourceReference as an image model
and try to update it in an AjaxLink. When erasing the toggleIcon component
from the target.add method, the error doesn't occur.

/**
 * @author Peter Diefenthäler
 * Link to toggle visibility of a dependent component.
 * br/br
 * Make sure that Component is Ajax enabled:
 * precomp.setOutputMarkupPlaceholderTag(true);/pre  
 */
public class ToggleLink extends AjaxFallbackLinkBoolean {
private static final long serialVersionUID = 1L;
private static final Log LOG = LogFactory.getLog(ToggleLink.class);
private static final PackageResourceReference RES_MAXIMIZED = new
PackageResourceReference(ToggleLink.class,icon_min_container.gif);
private static final PackageResourceReference RES_MINIMIZED = new
PackageResourceReference(ToggleLink.class,icon_max_container.gif);
private final Image toggleIcon = new Image(toggleIcon,new
PropertyModelPackageResourceReference(this,imgResource)); 

@SuppressWarnings(unused)
private PackageResourceReference imgResource;
private final Component toggleComp;

/**
 * Constructor
 * 
 * @param id
 *Identifier
 * @param comp
 *Content component to toggle visibility of
 */
public ToggleLink(String id, final Component comp) {
super(id);
this.setDefaultModel(new 
PropertyModelBoolean(comp,visible));
this.toggleComp = comp;
syncImg();
add(toggleIcon.setOutputMarkupId(true));
}

@Override
public void onClick(AjaxRequestTarget target) {
LOG.debug(toggle ...);
toggleComp.setVisible(!this.getModel().getObject());
syncImg();
LOG.debug(visible:  + toggleComp.isVisible());
target.add(toggleIcon,toggleComp);
}

private void syncImg() {
imgResource =  this.getModel().getObject() ? RES_MAXIMIZED :
RES_MINIMIZED;
}
}

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-with-tree-component-with-1-5-2-tp3956513p3978018.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: Error with tree component with 1.5.2

2011-11-02 Thread Martin Grigorov
Hi,

I have Maven-ized your quickstart app in the ticket because I don't
use Eclipse WTP.
Unfortunately I wasn't able to reproduce this problem with it.
Please modify it so that it fail.

On Wed, Nov 2, 2011 at 6:58 PM, PDiefent pdief...@csc.com wrote:
 The same problem occurs if I use a PackageResourceReference as an image model
 and try to update it in an AjaxLink. When erasing the toggleIcon component
 from the target.add method, the error doesn't occur.

 /**
  * @author Peter Diefenthäler
  * Link to toggle visibility of a dependent component.
  * br/br
  * Make sure that Component is Ajax enabled:
  * precomp.setOutputMarkupPlaceholderTag(true);/pre
  */
 public class ToggleLink extends AjaxFallbackLinkBoolean {
        private static final long serialVersionUID = 1L;
        private static final Log LOG = LogFactory.getLog(ToggleLink.class);
        private static final PackageResourceReference RES_MAXIMIZED = new
 PackageResourceReference(ToggleLink.class,icon_min_container.gif);
        private static final PackageResourceReference RES_MINIMIZED = new
 PackageResourceReference(ToggleLink.class,icon_max_container.gif);
        private final Image toggleIcon = new Image(toggleIcon,new
 PropertyModelPackageResourceReference(this,imgResource));

        @SuppressWarnings(unused)
        private PackageResourceReference imgResource;
        private final Component toggleComp;

        /**
         * Constructor
         *
         * @param id
         *            Identifier
         * @param comp
         *            Content component to toggle visibility of
         */
        public ToggleLink(String id, final Component comp) {
                super(id);
                this.setDefaultModel(new 
 PropertyModelBoolean(comp,visible));
                this.toggleComp = comp;
                syncImg();
                add(toggleIcon.setOutputMarkupId(true));
        }

        @Override
        public void onClick(AjaxRequestTarget target) {
                LOG.debug(toggle ...);
                toggleComp.setVisible(!this.getModel().getObject());
                syncImg();
                LOG.debug(visible:  + toggleComp.isVisible());
                target.add(toggleIcon,toggleComp);
        }

        private void syncImg() {
                imgResource =  this.getModel().getObject() ? RES_MAXIMIZED :
 RES_MINIMIZED;
        }
 }

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Error-with-tree-component-with-1-5-2-tp3956513p3978018.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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Error with tree component with 1.5.2

2011-11-01 Thread PDiefent
@Martin: It's on FireFox also.

I don't thimk it's an serialization issue because it works fine with an
older Wicket release. The error occurs on expanding and collapsing single
nodes in the tree (inside the updateTree(target) method). 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-with-tree-component-with-1-5-2-tp3956513p3963083.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



Error with tree component with 1.5.2

2011-10-31 Thread Peter Diefenthaeler
Hallo,
I tried to upgrade my wicket projects to the new wicket 1.5.2 release and now 
my tree component crashes.
Any Idea?
Thanks, Peter
 
ERROR [http-bio-8037-exec-9]: Connection lost, give up responding. 
at 
org.apache.wicket.DefaultExceptionMapper.internalMap(DefaultExceptionMapper.java:105)
org.apache.wicket.protocol.http.servlet.ResponseIOException: 
ClientAbortException:  java.net.SocketException: Connection reset by peer: 
socket write error
at 
org.apache.wicket.protocol.http.servlet.ServletWebResponse.flush(ServletWebResponse.java:254)
at 
org.apache.wicket.protocol.http.HeaderBufferingWebResponse.flush(HeaderBufferingWebResponse.java:92)
at 
org.apache.wicket.request.resource.AbstractResource.setResponseHeaders(AbstractResource.java:611)
at 
org.apache.wicket.request.resource.AbstractResource.respond(AbstractResource.java:485)
at 
org.apache.wicket.request.handler.resource.ResourceRequestHandler.respond(ResourceRequestHandler.java:77)
at 
org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler.respond(ResourceReferenceRequestHandler.java:105)
at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:750)
at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at 
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
at 
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)
at 
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
at 
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: ClientAbortException:  java.net.SocketException: Connection reset by 
peer: socket write error
at 
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:333)
at 
org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:299)
at org.apache.catalina.connector.Response.flushBuffer(Response.java:560)
at 
org.apache.catalina.connector.ResponseFacade.flushBuffer(ResponseFacade.java:303)
at 
org.apache.wicket.protocol.http.servlet.ServletWebResponse.flush(ServletWebResponse.java:250)
... 28 more
Caused by: java.net.SocketException: Connection reset by peer: socket write 
error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at 
org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:216)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:437)
at 
org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:119)
at 
org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:758)
at org.apache.coyote.Response.action(Response.java:170)
at 
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:328)
... 32 more
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Error with tree component with 1.5.2

2011-10-31 Thread Martin Grigorov
I guess only IE is problematic ?

Create a quickstart and attach it to Jira

On Mon, Oct 31, 2011 at 7:26 PM, Peter Diefenthaeler pdief...@csc.com wrote:
 Hallo,
 I tried to upgrade my wicket projects to the new wicket 1.5.2 release and now 
 my tree component crashes.
 Any Idea?
 Thanks, Peter

 ERROR [http-bio-8037-exec-9]: Connection lost, give up responding.
        at 
 org.apache.wicket.DefaultExceptionMapper.internalMap(DefaultExceptionMapper.java:105)
 org.apache.wicket.protocol.http.servlet.ResponseIOException: 
 ClientAbortException:  java.net.SocketException: Connection reset by peer: 
 socket write error
        at 
 org.apache.wicket.protocol.http.servlet.ServletWebResponse.flush(ServletWebResponse.java:254)
        at 
 org.apache.wicket.protocol.http.HeaderBufferingWebResponse.flush(HeaderBufferingWebResponse.java:92)
        at 
 org.apache.wicket.request.resource.AbstractResource.setResponseHeaders(AbstractResource.java:611)
        at 
 org.apache.wicket.request.resource.AbstractResource.respond(AbstractResource.java:485)
        at 
 org.apache.wicket.request.handler.resource.ResourceRequestHandler.respond(ResourceRequestHandler.java:77)
        at 
 org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler.respond(ResourceReferenceRequestHandler.java:105)
        at 
 org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:750)
        at 
 org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
        at 
 org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252)
        at 
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209)
        at 
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
        at 
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
        at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
        at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
        at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
        at 
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
        at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
        at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
        at 
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
        at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
        at 
 org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)
        at 
 org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
        at 
 org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
 Caused by: ClientAbortException:  java.net.SocketException: Connection reset 
 by peer: socket write error
        at 
 org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:333)
        at 
 org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:299)
        at 
 org.apache.catalina.connector.Response.flushBuffer(Response.java:560)
        at 
 org.apache.catalina.connector.ResponseFacade.flushBuffer(ResponseFacade.java:303)
        at 
 org.apache.wicket.protocol.http.servlet.ServletWebResponse.flush(ServletWebResponse.java:250)
        ... 28 more
 Caused by: java.net.SocketException: Connection reset by peer: socket write 
 error
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(Unknown Source)
        at java.net.SocketOutputStream.write(Unknown Source)
        at 
 org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:216)
        at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:437)
        at 
 org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:119)
        at 
 org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:758)
        at org.apache.coyote.Response.action(Response.java:170)
        at 
 org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:328)
        ... 32 more
 -
 To unsubscribe, e-mail: users-unsubscr

Re: Error with tree component with 1.5.2

2011-10-31 Thread Pavol Zibrita
Probably serialization issue? And the browser still holds some old
serialized classes? Or somwhere saved old sessions with old
classes?

just guess.

Regards,
Pavol

On Mon, Oct 31, 2011 at 7:27 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 I guess only IE is problematic ?

 Create a quickstart and attach it to Jira

 On Mon, Oct 31, 2011 at 7:26 PM, Peter Diefenthaeler pdief...@csc.com
 wrote:
  Hallo,
  I tried to upgrade my wicket projects to the new wicket 1.5.2 release
 and now my tree component crashes.
  Any Idea?
  Thanks, Peter
 
  ERROR [http-bio-8037-exec-9]: Connection lost, give up responding.
 at
 org.apache.wicket.DefaultExceptionMapper.internalMap(DefaultExceptionMapper.java:105)
  org.apache.wicket.protocol.http.servlet.ResponseIOException:
 ClientAbortException:  java.net.SocketException: Connection reset by peer:
 socket write error
 at
 org.apache.wicket.protocol.http.servlet.ServletWebResponse.flush(ServletWebResponse.java:254)
 at
 org.apache.wicket.protocol.http.HeaderBufferingWebResponse.flush(HeaderBufferingWebResponse.java:92)
 at
 org.apache.wicket.request.resource.AbstractResource.setResponseHeaders(AbstractResource.java:611)
 at
 org.apache.wicket.request.resource.AbstractResource.respond(AbstractResource.java:485)
 at
 org.apache.wicket.request.handler.resource.ResourceRequestHandler.respond(ResourceRequestHandler.java:77)
 at
 org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler.respond(ResourceReferenceRequestHandler.java:105)
 at
 org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:750)
 at
 org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
 at
 org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252)
 at
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209)
 at
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
 at
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
 at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
 at
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
 at
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
 at
 org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)
 at
 org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
 at
 org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown
 Source)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
 Source)
 at java.lang.Thread.run(Unknown Source)
  Caused by: ClientAbortException:  java.net.SocketException: Connection
 reset by peer: socket write error
 at
 org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:333)
 at
 org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:299)
 at
 org.apache.catalina.connector.Response.flushBuffer(Response.java:560)
 at
 org.apache.catalina.connector.ResponseFacade.flushBuffer(ResponseFacade.java:303)
 at
 org.apache.wicket.protocol.http.servlet.ServletWebResponse.flush(ServletWebResponse.java:250)
 ... 28 more
  Caused by: java.net.SocketException: Connection reset by peer: socket
 write error
 at java.net.SocketOutputStream.socketWrite0(Native Method)
 at java.net.SocketOutputStream.socketWrite(Unknown Source)
 at java.net.SocketOutputStream.write(Unknown Source)
 at
 org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:216)
 at
 org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:437)
 at
 org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:119)
 at
 org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:758

Re: Using SubmitLink as a tree node ?

2011-10-18 Thread Martin Grigorov
You need to override
org.apache.wicket.markup.html.tree.BaseTree.newLink(String,
ILinkCallback)

On Tue, Oct 18, 2011 at 10:00 AM, rawe ralph.wey...@dachser.com wrote:
 I'm using a Tree with LinkTree components for the nodes.
 Is there a way to use SubmitLink instead of LinkTree components for the tree
 nodes ??
 My intention is to call a form submit each time when changing a node in the
 tree.

 Thanks for hints!

 Ralph

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Using-SubmitLink-as-a-tree-node-tp3914407p3914407.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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Using SubmitLink as a tree node ?

2011-10-18 Thread rawe
Hi Martin,

thank you! This was the helping hint!
works perfectly!

Ralph

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-SubmitLink-as-a-tree-node-tp3914407p3914691.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



Expanding tree and scrolling to item

2011-06-06 Thread Christian Mader

Hello,

I have an ajax link and a tree located at the same page. When I click on 
the link I want the tree to expose a specific item and scroll the item 
into view.
Exposing the item works well using getTreeState().expandNode(childNode); 
and after adding the tree component to the AjaxRequestTarget it displays 
properly.
I append javascript code to the AjaxRequestTarget to scroll to the 
expanded item, but this only works if the tree is already completely 
expanded. Otherwise, the scroll location is not correct.


I assume this is because the scroll js command is issued before the tree 
is completely expanded. Is there any possiblity to wait for the tree to 
be displayed and then issue the scroll command? Would overriding 
onAfterRender() help on this issue? How can I get an AjaxRequestTarget 
in onAfterRender()?


I would be happy for any reply that points me into the right direction 
to solve this problem.


Best,
Christian

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



Re: Expanding tree and scrolling to item

2011-06-06 Thread Pedro Santos
Hi Christian, the appended JavaScript with
AjaxReuqestTarget#appendJavascript already will be called after tree
DOM update. Try to postpone your scroll JavaScript wrapping it in an
function to setTimeout method.

On Mon, Jun 6, 2011 at 10:38 AM, Christian Mader
christian.ma...@univie.ac.at wrote:
 Hello,

 I have an ajax link and a tree located at the same page. When I click on the
 link I want the tree to expose a specific item and scroll the item into
 view.
 Exposing the item works well using getTreeState().expandNode(childNode); and
 after adding the tree component to the AjaxRequestTarget it displays
 properly.
 I append javascript code to the AjaxRequestTarget to scroll to the expanded
 item, but this only works if the tree is already completely expanded.
 Otherwise, the scroll location is not correct.

 I assume this is because the scroll js command is issued before the tree is
 completely expanded. Is there any possiblity to wait for the tree to be
 displayed and then issue the scroll command? Would overriding
 onAfterRender() help on this issue? How can I get an AjaxRequestTarget in
 onAfterRender()?

 I would be happy for any reply that points me into the right direction to
 solve this problem.

 Best,
 Christian

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





-- 
Pedro Henrique Oliveira dos Santos

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



Re: WicketTester and clicking a tree node

2011-06-02 Thread msalman
Pedro, thanks for your response.

I solved my problem in the following way:


For my derived DefaultMutableTreeNode class I added an Ajax link element:


public class CheckBoxSelectableTreeItem 
extends DefaultMutableTreeNode
{
   
   protected AjaxLink clickLink;  // for testing the expand/collapse link

public AjaxLink getClickLink() {
return clickLink;
}




public void setClickLink(AjaxLink clickLink) {
this.clickLink = clickLink;
}

   

}



For my tree class I overrode the newJunctionLink  method like this:


public class CheckBoxTree extends LinkTree
{
  .

@Override
protected Component newJunctionLink(MarkupContainer parent, final String
id, final Object node)
{
AjaxLink link = (AjaxLink) super.newJunctionLink(parent, id, 
node);


((CheckBoxSelectableTreeItem)node).setClickLink(link);

return link;
}
  

}



So in the test when you have the node you can open (expand) it this way:

CheckBoxSelectableTreeItem node=  get Node

AjaxLink nodeLink = node.getClickLink();

tester.executeAjaxEvent(nodeLink, onclick);







--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketTester-and-clicking-a-tree-node-tp3556724p3568831.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: WicketTester and clicking a tree node

2011-06-02 Thread Pedro Santos
Hi Mohammad, nice you created the test case. I just would recommend to
don't make any reference from your domains objects (TreeNode) to view
ones (AjaxLink) because they are usually packaged in different places.
Take a look at how I created a similar test:

http://svn.apache.org/repos/asf/wicket/releases/wicket-1.4.17/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/tree/MoveChildToParentNodeMarkedForRecreationTest.java

On Thu, Jun 2, 2011 at 1:53 PM, msalman mohammad_sal...@yahoo.com wrote:
 Pedro, thanks for your response.

 I solved my problem in the following way:


 For my derived DefaultMutableTreeNode class I added an Ajax link element:


 public class CheckBoxSelectableTreeItem
 extends DefaultMutableTreeNode
 {
   
   protected AjaxLink clickLink;  // for testing the expand/collapse link

        public AjaxLink getClickLink() {
                return clickLink;
        }




        public void setClickLink(AjaxLink clickLink) {
                this.clickLink = clickLink;
        }

   

 }



 For my tree class I overrode the newJunctionLink  method like this:


 public class CheckBoxTree extends LinkTree
 {
  .

        @Override
        protected Component newJunctionLink(MarkupContainer parent, final 
 String
 id, final Object node)
        {
                AjaxLink link = (AjaxLink) super.newJunctionLink(parent, id, 
 node);


                ((CheckBoxSelectableTreeItem)node).setClickLink(link);

                return link;
        }
  

 }



 So in the test when you have the node you can open (expand) it this way:

                CheckBoxSelectableTreeItem node=  get Node

                AjaxLink nodeLink = node.getClickLink();

                tester.executeAjaxEvent(nodeLink, onclick);







 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/WicketTester-and-clicking-a-tree-node-tp3556724p3568831.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





-- 
Pedro Henrique Oliveira dos Santos

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



  1   2   3   4   5   >