Datatable Bottom Toolbars issue

2018-12-07 Thread Sharofiddin Pardayev
Good afternoon. I have trouble to use method Datatable.getBottomToolbars()
in my project. It gives following error "The type
DataTable.ToolbarsContainer is not visible". Please, explain to me if
ToolbarsContainer class is private why getBottomToolbars() method is
public? I also see from github you changed method return type to
WebMarkupContainer. But after checking out your repo I get "public final
ToolbarsContainer getBottomToolbars()" again. Please fix it immediately or
show me other solution. (I must hide bottom toolbars in some cases)


Re: Datatable Bottom Toolbars issue

2018-12-07 Thread Martin Grigorov
Hi,

On Fri, Dec 7, 2018 at 10:36 AM Sharofiddin Pardayev <
pardayev.sharofid...@gmail.com> wrote:

> Good afternoon. I have trouble to use method Datatable.getBottomToolbars()
> in my project. It gives following error "The type
> DataTable.ToolbarsContainer is not visible". Please, explain to me if
> ToolbarsContainer class is private why getBottomToolbars() method is
> public? I also see from github you changed method return type to

WebMarkupContainer. But after checking out your repo I get "public final
> ToolbarsContainer getBottomToolbars()" again. Please fix it immediately or
> show me other solution. (I must hide bottom toolbars in some cases)
>

The problem has been fixed only in master branch (Wicket 9) which is not
yet released.

I thought it should work if you do : WebMarkupContainer toolbab =
dataTable.getXyzToolbars();
This way you don't mention ToolbarsContainer in your code and the compiler
must be happy, even with Wicket 6/7/8.
Doesn't this work for you ?


Re: Wicket 6.x -> Wicket 8.x extensions NestedTree expand fails ( Components can no longer be added)

2018-12-07 Thread Sven Meier

Hi,

the stacktrace shows clearly that you add a component to the ART while 
it is already rendering the response.

This is not allowed, and this wasn't allowed in previous version.

You'll have to provide a quickstart to prove that it worked previously.

Regards
Sven

Am 06.12.18 um 13:50 schrieb nino martinez wael:

@svenme...@apache.com  what/how do I need to check
during the call? For now I have a breakpoint the place in the code where it
fails, but I need to figure out what closes the request target..

On Mon, Dec 3, 2018 at 10:55 AM nino martinez wael <
nino.martinez.w...@gmail.com> wrote:


I've debugged a lot further. But still unable to pinpoint it.. For now
I've switched to rendering the full page instead, which of course works.

We are a couple of things in conjunction with TREE, like wicket jquery ui
draggable and droppable.. We also have a custom loading mechanism that pops
a veil if the request are too long to load.. And some custom form handling
aswell (auto show an marker for error'd form fields)..

PS writing this for other to see, if they hit  this challenge..

-Regards Nino


On Thu, Nov 29, 2018 at 8:50 AM nino martinez wael <
nino.martinez.w...@gmail.com> wrote:


currently unable to reproduce in examples, something must be wrong in my
code..

I'll comeback if it turns out otherwise..

Thanks for helping :)

On Thu, Nov 29, 2018 at 6:54 AM nino martinez wael <
nino.martinez.w...@gmail.com> wrote:


Yes I understand.. Let me see if it breaks in wicket examples, or I can
make it so.. Do you know another way to make a node/folder expand during
construction time? Feels like the expand method are meant for ajax calls
only.

-regards Nino

On Wed, Nov 28, 2018 at 4:16 PM sven  wrote:



Hi Nino,



during rendering of components no additional components can be added to
the ART any more.

I surprised that your code worked in 6.x, can you build a quickstart
demonstrating the problem?



Have fun

Sven










On 28.11.2018 at 14:38,wrote:


  Hi In wicket 6 this worked, there are another input field (ajax

activated) that triggers the update : ChildAwareNestedTree
profilePartitionTree = new ChildAwareNestedTree("skillsetSelect", provider,
sharedExpansionState) { @Override protected Component
newContentComponent(String id, IModel model) { TreeNode node =
model.getObject(); if (node instanceof TreeNodeProvider.PartitionNode) {
Partition partition = ((TreeNodeProvider.PartitionNode)
node).getPartition(); if
(getPartitionsWithProfiles().containsKey(partition.getId())) {*
expand(node);* } } else if (node instanceof
TreeNodeProvider.NoPartitionNode  &&  isNoPartitionProfilesPresent()) {*
expand(node);* } } The triggering field: searchTerm.add(new
AjaxFormComponentUpdatingBehavior("keydown") { @Override protected void
onUpdate(AjaxRequestTarget target) { if (searchTermModel.getObject() !=
null  &&  !searchTermModel.getObject().isEmpty()) {
profilePartitionTree.rebuildExpandedPartitions(); } else {
profilePartitionTree.getP
artitionsWithProfiles().clear(); }* target.add(profilePartitionTree);*
} @Override protected void updateAjaxAttributes(AjaxRequestAttributes
attributes) { super.updateAjaxAttributes(attributes);
attributes.setThrottlingSettings(new
ThrottlingSettings(searchTerm.getMarkupId(), Duration.milliseconds(400),
true)); } }); But I get an this error message in wicket 8, my line below:
2018-11-28 14:26:44,127 | ERROR | qtp938432184-652 | DefaultExceptionMapper
| 136 - org.apache.wicket.core - 8.1.0 | Unexpected error occurred
org.apache.wicket.WicketRuntimeException: Error attaching this container
for rendering: [Subtree [Component id = subtree]] at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1765)[136:org.apache.wicket.core:8.1.0]
at
org.apache.wicket.Component.onBeforeRender(Component.java:3788)[136:org.apache.wicket.core:8.1.0]
at
org.apache.wicket.Component.beforeRender(Component.java:937)[136:org.apache.wicket.core:8.1.0]
at org.apache.wicket.MarkupContai
ner.onBeforeRenderChildren(MarkupContainer.java:1753)[136:org.apache.wicket.core:8.1.0]
at
org.apache.wicket.Component.onBeforeRender(Component.java:3788)[136:org.apache.wicket.core:8.1.0]
at
dk.netdesign.XXX.frontend.tree.ChildAwareNestedTree.onBeforeRender(ChildAwareNestedTree.java:41)[106:XXX-frontend:1.0.4.RC_01]
at
org.apache.wicket.Component.beforeRender(Component.java:937)[136:org.apache.wicket.core:8.1.0]
at
org.apache.wicket.page.PartialPageUpdate.prepareComponent(PartialPageUpdate.java:322)[136:org.apache.wicket.core:8.1.0]
at
org.apache.wicket.page.PartialPageUpdate.writeComponents(PartialPageUpdate.java:250)[136:org.apache.wicket.core:8.1.0]
at
org.apache.wicket.page.PartialPageUpdate.writeTo(PartialPageUpdate.java:162)[136:org.apache.wicket.core:8.1.0]
at
org.apache.wicket.ajax.AjaxRequestHandler.respond(AjaxRequestHandler.java:384)[136:org.apache.wicket.core:8.1.0]
at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:912)[136:org.apa
che.wic

RequestHandlerExecutor.ReplaceHandlerException and default handling by web container

2018-12-07 Thread Илья Нарыжный
Hello,

According to source code, it seems not possible to replace current handler
by 'null' - assuming that wicket in this case will allow web-server to
handle request further.

That's a code of wicket filter:
if (requestCycle.processRequestAndDetach())
{
webResponse.flush();
}
else
{
...
}

and here no way to fallback to default handling if at least one handler was
initially found:

public boolean processRequest()
{
try
{
set(this);
listeners.onBeginRequest(this);
onBeginRequest();
IRequestHandler handler = resolveRequestHandler();
if (handler == null)
{
// Did not find any suitable handler, thus not executing the request
log.debug(
"No suitable handler found for URL {}, falling back to container to process
this request",
request.getUrl());
}
else
{
execute(handler);
return true;
}
}

Please consider ability to fallback to default web-app handling of after
set of attempts to find proper handler system can't find out proper handler.

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform