Re: Links in DataTable

2010-06-30 Thread Jeremy Thomerson
On Wed, Jun 30, 2010 at 1:14 PM, Branislav Kalas  wrote:

> and i forgot this in the onclick handler :
> @Override
> protected void onClick() {
> setResponsePage(new HomePage(parameters));
>
> System.out.println("clicked on link");
> }
>
>
The whole point of a constructor that takes PageParameters is to use it with
a bookmarkable URL, which you've avoided by creating an instance of a page
that must be redirected to.  Your code should say:

setResponsePage(getApplication().getHomePage(), parameters);


-- 
Jeremy Thomerson
http://www.wickettraining.com


Re: Links in DataTable

2010-06-30 Thread Nelson Segura
Thanks for your answers.

I set the multi window support settings to true, and that did not make a
difference. Interestingly, the javadoc shows that multiwindow support is
true by default. I also tried setting it to false, with no luck.

However, setting the response to a new page on click seems to conserve the
original page usability. My guess is because a new page is then created, so
the current page is still valid, and the elements on it are still valid.

I am trying a bookmarkable page link instead of the onclick event, which
seems to work, except that the AJAX actions (example paging) in the original
page return an expired page message.

Still investigating, if anyone has more information it will be greatly
appreciated.
I am working in migrating an existing large JSP/Servlet/Struts app to
Wicket, and the pattern, that is open new detail windows or tabs from a AJAX
list, is heavily used by our customers. So I have to find a way to solve
this issue without limiting existing functionality. Sadly, I am pretty new
to wicket, so I dont know the internals of why a page should loses its
containers or expires in this cases.

-Nelson

On Wed, Jun 30, 2010 at 11:14 AM, Branislav Kalas  wrote:

> and i forgot this in the onclick handler :
> @Override
> protected void onClick() {
> setResponsePage(new HomePage(parameters));
>
> System.out.println("clicked on link");
> }
>
> On 06/30/2010 07:59 PM, Branislav Kalas wrote:
>
>> Put this into WicketApplication.java
>>  @Override
>>protected void init() {
>>super.init();
>>getPageSettings().setAutomaticMultiWindowSupport(true);
>>}
>>
>> Problem was, that you opened new windows in same page map.
>> I cannot explain it better cause, i don't understand page maps very
>> well...
>>
>> On 06/30/2010 07:40 PM, Nelson Segura wrote:
>>
>>> I am attaching a Quickstart project to help reproduce the problem.
>>> On the home page, middle click in the email address shown (usually this
>>> will take a user to a detail page, but in this case it just prints a
>>> message). After that, any click on a link in the page will cause a component
>>> not found exception.
>>>
>>> Thanks for all your help.
>>>
>>> -Nelson
>>>
>>>
>>>
>>> On Wed, Jun 30, 2010 at 9:18 AM, Nelson Segura >> nsegu...@gmail.com>> wrote:
>>>
>>>Can anyone explain to me why this does not work with
>>>AjaxFallbackDefaultDataTable, but does with DefaultDataTable.
>>>Does anyone know of a solution for this problem?
>>>
>>>
>>>On Mon, Jun 28, 2010 at 6:18 PM, Nelson Segura
>>>mailto:nsegu...@gmail.com>> wrote:
>>>
>>>Since AjaxLink is AJAX and not a proper link, then it does
>>>behave as a normal link, i.e. middle click (open link in new
>>>tab or new window) does not trigger the AJAX click even,
>>>which means you cannot chose to open the link in a new page.
>>>
>>>back to square one, except that know I know is a problem with
>>>AjaxFallbackDefaultDataTable, not with DataTable.
>>>
>>>
>>>-Nelson
>>>
>>>
>>>On Mon, Jun 28, 2010 at 5:47 PM, Nelson Segura
>>>mailto:nsegu...@gmail.com>> wrote:
>>>
>>>Jeremy, the code is below.
>>>
>>>I did notice something while researching/testing more.
>>>The LinkPanel solution DOES work for a DataTable. The
>>>problem starts when changed to a
>>>AjaxFallbackDefaultDataTable.
>>>I did testing based in the datatable example in the
>>>wicket examples.
>>>Maybe using an AjaxLink instead of a normal link in the
>>>table is the right answer.
>>>
>>>
>>>Code is mostly taken from the page linked in the original
>>>email
>>>
>>>public abstract class LinkPanel extends Panel {
>>>
>>>private static final long serialVersionUID =
>>>2062173455224348354L;
>>>
>>>public LinkPanel(final Item item, final String
>>>componentId,
>>>final IModel model, final String property) {
>>>super(componentId, model);
>>>
>>>AjaxLink link = new AjaxLink("linkCell") {
>>>
>>>private static final long serialVersionUID =
>>>2574434147588617330L;
>>>
>>>@Override
>>>public void onClick(AjaxRequestTarget target) {
>>>LinkPanel.this.onClick();
>>>}
>>>
>>>
>>>};
>>>add(link);
>>>link.add(new Label("label", new
>>>PropertyModel(model,property)));
>>>}
>>>
>>>protected abstract void onClick();
>>>}
>>>
>>>- Usage ---
>>>
>>>public class LinkPanelPage extends WebPage {
>>>
>>>public LinkPanelPage() {
>>>Form form 

Re: Links in DataTable

2010-06-30 Thread Branislav Kalas

and i forgot this in the onclick handler :
@Override
protected void onClick() {
 setResponsePage(new HomePage(parameters));
 System.out.println("clicked on link");
}

On 06/30/2010 07:59 PM, Branislav Kalas wrote:

Put this into WicketApplication.java
  @Override
protected void init() {
super.init();
getPageSettings().setAutomaticMultiWindowSupport(true);
}

Problem was, that you opened new windows in same page map.
I cannot explain it better cause, i don't understand page maps very 
well...


On 06/30/2010 07:40 PM, Nelson Segura wrote:

I am attaching a Quickstart project to help reproduce the problem.
On the home page, middle click in the email address shown (usually 
this will take a user to a detail page, but in this case it just 
prints a message). After that, any click on a link in the page will 
cause a component not found exception.


Thanks for all your help.

-Nelson



On Wed, Jun 30, 2010 at 9:18 AM, Nelson Segura > wrote:


Can anyone explain to me why this does not work with
AjaxFallbackDefaultDataTable, but does with DefaultDataTable.
Does anyone know of a solution for this problem?


On Mon, Jun 28, 2010 at 6:18 PM, Nelson Segura
mailto:nsegu...@gmail.com>> wrote:

Since AjaxLink is AJAX and not a proper link, then it does
behave as a normal link, i.e. middle click (open link in new
tab or new window) does not trigger the AJAX click even,
which means you cannot chose to open the link in a new page.

back to square one, except that know I know is a problem with
AjaxFallbackDefaultDataTable, not with DataTable.


-Nelson


On Mon, Jun 28, 2010 at 5:47 PM, Nelson Segura
mailto:nsegu...@gmail.com>> wrote:

Jeremy, the code is below.

I did notice something while researching/testing more.
The LinkPanel solution DOES work for a DataTable. The
problem starts when changed to a
AjaxFallbackDefaultDataTable.
I did testing based in the datatable example in the
wicket examples.
Maybe using an AjaxLink instead of a normal link in the
table is the right answer.


Code is mostly taken from the page linked in the original
email

public abstract class LinkPanel extends Panel {

private static final long serialVersionUID =
2062173455224348354L;

public LinkPanel(final Item item, final String
componentId,
final IModel model, final String property) {
super(componentId, model);

AjaxLink link = new AjaxLink("linkCell") {

private static final long serialVersionUID =
2574434147588617330L;

@Override
public void onClick(AjaxRequestTarget target) {
LinkPanel.this.onClick();
}


};
add(link);
link.add(new Label("label", new
PropertyModel(model,property)));
}

protected abstract void onClick();
}

- Usage ---

public class LinkPanelPage extends WebPage {

public LinkPanelPage() {
Form form = new Form("form");
final LinkPanelListProvider provider = new
LinkPanelListProvider();
List columnList = new ArrayList(3);
//columnList.add(new PropertyColumn(new
Model("eMailAddress"),"eMailAddress"));
columnList.add(new AbstractColumn(new
Model("eMailAddress"), "eMailAddress") {
private static final long serialVersionUID =
-1822504503325964706L;

@Override
@SuppressWarnings("unchecked")
public void populateItem(Item cellItem,
String componentId, final IModel rowModel) {
cellItem.add(new LinkPanel(cellItem,
componentId, rowModel, getSortProperty()) {

private static final long
serialVersionUID = -4615958634366803506L;

@Override
protected void onClick() {
System.out.println("clicked on
link");
}
});
}

});

columnList.add(new PropertyColumn(new
Model("firstName"),"firstName"));
columnList.add(new PropertyColumn(new
Model("lastName"),"lastName"));
AjaxFallbackDefaultDataTable tab

Re: Links in DataTable

2010-06-30 Thread Branislav Kalas

Put this into WicketApplication.java
  @Override
protected void init() {
super.init();
getPageSettings().setAutomaticMultiWindowSupport(true);
}

Problem was, that you opened new windows in same page map.
I cannot explain it better cause, i don't understand page maps very well...

On 06/30/2010 07:40 PM, Nelson Segura wrote:

I am attaching a Quickstart project to help reproduce the problem.
On the home page, middle click in the email address shown (usually 
this will take a user to a detail page, but in this case it just 
prints a message). After that, any click on a link in the page will 
cause a component not found exception.


Thanks for all your help.

-Nelson



On Wed, Jun 30, 2010 at 9:18 AM, Nelson Segura > wrote:


Can anyone explain to me why this does not work with
AjaxFallbackDefaultDataTable, but does with DefaultDataTable.
Does anyone know of a solution for this problem?


On Mon, Jun 28, 2010 at 6:18 PM, Nelson Segura mailto:nsegu...@gmail.com>> wrote:

Since AjaxLink is AJAX and not a proper link, then it does
behave as a normal link, i.e. middle click (open link in new
tab or new window) does not trigger the AJAX click even, which
means you cannot chose to open the link in a new page.

back to square one, except that know I know is a problem with
AjaxFallbackDefaultDataTable, not with DataTable.


-Nelson


On Mon, Jun 28, 2010 at 5:47 PM, Nelson Segura
mailto:nsegu...@gmail.com>> wrote:

Jeremy, the code is below.

I did notice something while researching/testing more.
The LinkPanel solution DOES work for a DataTable. The
problem starts when changed to a AjaxFallbackDefaultDataTable.
I did testing based in the datatable example in the wicket
examples.
Maybe using an AjaxLink instead of a normal link in the
table is the right answer.


Code is mostly taken from the page linked in the original
email

public abstract class LinkPanel extends Panel {

private static final long serialVersionUID =
2062173455224348354L;

public LinkPanel(final Item item, final String
componentId,
final IModel model, final String property) {
super(componentId, model);

AjaxLink link = new AjaxLink("linkCell") {

private static final long serialVersionUID =
2574434147588617330L;

@Override
public void onClick(AjaxRequestTarget target) {
LinkPanel.this.onClick();
}


};
add(link);
link.add(new Label("label", new
PropertyModel(model,property)));
}

protected abstract void onClick();
}

- Usage ---

public class LinkPanelPage extends WebPage {

public LinkPanelPage() {
Form form = new Form("form");
final LinkPanelListProvider provider = new
LinkPanelListProvider();
List columnList = new ArrayList(3);
//columnList.add(new PropertyColumn(new
Model("eMailAddress"),"eMailAddress"));
columnList.add(new AbstractColumn(new
Model("eMailAddress"), "eMailAddress") {
private static final long serialVersionUID =
-1822504503325964706L;

@Override
@SuppressWarnings("unchecked")
public void populateItem(Item cellItem, String
componentId, final IModel rowModel) {
cellItem.add(new LinkPanel(cellItem,
componentId, rowModel, getSortProperty()) {

private static final long
serialVersionUID = -4615958634366803506L;

@Override
protected void onClick() {
System.out.println("clicked on link");
}
});
}

});

columnList.add(new PropertyColumn(new
Model("firstName"),"firstName"));
columnList.add(new PropertyColumn(new
Model("lastName"),"lastName"));
AjaxFallbackDefaultDataTable table = new
AjaxFallbackDefaultDataTable("link-panel-table",
columnList, provider, 3);
form.add(table);
add(form);
}
}

-Nelson


On Mon, Jun 28, 2010 a

Re: Links in DataTable

2010-06-30 Thread Nelson Segura
Can anyone explain to me why this does not work with
AjaxFallbackDefaultDataTable, but does with DefaultDataTable.
Does anyone know of a solution for this problem?

On Mon, Jun 28, 2010 at 6:18 PM, Nelson Segura  wrote:

> Since AjaxLink is AJAX and not a proper link, then it does behave as a
> normal link, i.e. middle click (open link in new tab or new window) does not
> trigger the AJAX click even, which means you cannot chose to open the link
> in a new page.
>
> back to square one, except that know I know is a problem with
> AjaxFallbackDefaultDataTable, not with DataTable.
>
>
> -Nelson
>
>
> On Mon, Jun 28, 2010 at 5:47 PM, Nelson Segura  wrote:
>
>> Jeremy, the code is below.
>>
>> I did notice something while researching/testing more.
>> The LinkPanel solution DOES work for a DataTable. The problem starts when
>> changed to a AjaxFallbackDefaultDataTable.
>> I did testing based in the datatable example in the wicket examples.
>> Maybe using an AjaxLink instead of a normal link in the table is the right
>> answer.
>>
>>
>> Code is mostly taken from the page linked in the original email
>>
>> public abstract class LinkPanel extends Panel {
>>
>> private static final long serialVersionUID = 2062173455224348354L;
>>
>> public LinkPanel(final Item item, final String componentId,
>> final IModel model, final String property) {
>> super(componentId, model);
>>
>> AjaxLink link = new AjaxLink("linkCell") {
>>
>> private static final long serialVersionUID =
>> 2574434147588617330L;
>>
>> @Override
>> public void onClick(AjaxRequestTarget target) {
>> LinkPanel.this.onClick();
>> }
>>
>>
>> };
>> add(link);
>> link.add(new Label("label", new PropertyModel(model,property)));
>> }
>>
>> protected abstract void onClick();
>> }
>>
>> - Usage ---
>>
>> public class LinkPanelPage extends WebPage {
>>
>> public LinkPanelPage() {
>> Form form = new Form("form");
>> final LinkPanelListProvider provider = new
>> LinkPanelListProvider();
>> List columnList = new ArrayList(3);
>> //columnList.add(new PropertyColumn(new
>> Model("eMailAddress"),"eMailAddress"));
>> columnList.add(new AbstractColumn(new Model("eMailAddress"),
>> "eMailAddress") {
>> private static final long serialVersionUID =
>> -1822504503325964706L;
>>
>> @Override
>> @SuppressWarnings("unchecked")
>> public void populateItem(Item cellItem, String componentId,
>> final IModel rowModel) {
>> cellItem.add(new LinkPanel(cellItem, componentId,
>> rowModel, getSortProperty()) {
>>
>> private static final long serialVersionUID =
>> -4615958634366803506L;
>>
>> @Override
>> protected void onClick() {
>> System.out.println("clicked on link");
>> }
>> });
>> }
>>
>> });
>>
>> columnList.add(new PropertyColumn(new
>> Model("firstName"),"firstName"));
>> columnList.add(new PropertyColumn(new
>> Model("lastName"),"lastName"));
>> AjaxFallbackDefaultDataTable table = new
>> AjaxFallbackDefaultDataTable("link-panel-table", columnList, provider, 3);
>> form.add(table);
>> add(form);
>> }
>> }
>>
>> -Nelson
>>
>>
>> On Mon, Jun 28, 2010 at 5:14 PM, Jeremy Thomerson <
>> jer...@wickettraining.com> wrote:
>>
>>> please show some code
>>>
>>> On Mon, Jun 28, 2010 at 6:39 PM, Nelson Segura 
>>> wrote:
>>>
>>> > I am trying to create a table based on DataTable, in which one of the
>>> > columns has links on it.
>>> > I tried to use the strategy described here (LinkPanel):
>>> >
>>> >
>>> https://cwiki.apache.org/WICKET/adding-links-in-a-defaultdatatable.html
>>> >
>>> > But this has a problem: clicking in the links in succession soon causes
>>> > "component not found exceptions", or opening the link in a new window
>>> or
>>> > tab
>>> > renders the current page unusable, with the same exception.
>>> >
>>> > rg.apache.wicket.WicketRuntimeException: component . not found on
>>> page
>>> > ...
>>> > at
>>> >
>>> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:426)
>>> > at
>>> >
>>> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:471)
>>> > at
>>> >
>>> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
>>> > at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
>>> > ...
>>> >
>>> > I believe this is due to the fact that a new LinkPanel is created when
>>> > rendering each column cell, and that when the click happens, the
>>> current
>>> > LinkPanels are replaced by new ones, and so the original page is not
>>> usable
>>> > anymore

Re: Links in DataTable

2010-06-28 Thread Nelson Segura
Since AjaxLink is AJAX and not a proper link, then it does behave as a
normal link, i.e. middle click (open link in new tab or new window) does not
trigger the AJAX click even, which means you cannot chose to open the link
in a new page.

back to square one, except that know I know is a problem with
AjaxFallbackDefaultDataTable, not with DataTable.


-Nelson

On Mon, Jun 28, 2010 at 5:47 PM, Nelson Segura  wrote:

> Jeremy, the code is below.
>
> I did notice something while researching/testing more.
> The LinkPanel solution DOES work for a DataTable. The problem starts when
> changed to a AjaxFallbackDefaultDataTable.
> I did testing based in the datatable example in the wicket examples.
> Maybe using an AjaxLink instead of a normal link in the table is the right
> answer.
>
>
> Code is mostly taken from the page linked in the original email
>
> public abstract class LinkPanel extends Panel {
>
> private static final long serialVersionUID = 2062173455224348354L;
>
> public LinkPanel(final Item item, final String componentId,
> final IModel model, final String property) {
> super(componentId, model);
>
> AjaxLink link = new AjaxLink("linkCell") {
>
> private static final long serialVersionUID =
> 2574434147588617330L;
>
> @Override
> public void onClick(AjaxRequestTarget target) {
> LinkPanel.this.onClick();
> }
>
>
> };
> add(link);
> link.add(new Label("label", new PropertyModel(model,property)));
> }
>
> protected abstract void onClick();
> }
>
> - Usage ---
>
> public class LinkPanelPage extends WebPage {
>
> public LinkPanelPage() {
> Form form = new Form("form");
> final LinkPanelListProvider provider = new LinkPanelListProvider();
> List columnList = new ArrayList(3);
> //columnList.add(new PropertyColumn(new
> Model("eMailAddress"),"eMailAddress"));
> columnList.add(new AbstractColumn(new Model("eMailAddress"),
> "eMailAddress") {
> private static final long serialVersionUID =
> -1822504503325964706L;
>
> @Override
> @SuppressWarnings("unchecked")
> public void populateItem(Item cellItem, String componentId,
> final IModel rowModel) {
> cellItem.add(new LinkPanel(cellItem, componentId, rowModel,
> getSortProperty()) {
>
> private static final long serialVersionUID =
> -4615958634366803506L;
>
> @Override
> protected void onClick() {
> System.out.println("clicked on link");
> }
> });
> }
>
> });
>
> columnList.add(new PropertyColumn(new
> Model("firstName"),"firstName"));
> columnList.add(new PropertyColumn(new
> Model("lastName"),"lastName"));
> AjaxFallbackDefaultDataTable table = new
> AjaxFallbackDefaultDataTable("link-panel-table", columnList, provider, 3);
> form.add(table);
> add(form);
> }
> }
>
> -Nelson
>
>
> On Mon, Jun 28, 2010 at 5:14 PM, Jeremy Thomerson <
> jer...@wickettraining.com> wrote:
>
>> please show some code
>>
>> On Mon, Jun 28, 2010 at 6:39 PM, Nelson Segura 
>> wrote:
>>
>> > I am trying to create a table based on DataTable, in which one of the
>> > columns has links on it.
>> > I tried to use the strategy described here (LinkPanel):
>> >
>> > https://cwiki.apache.org/WICKET/adding-links-in-a-defaultdatatable.html
>> >
>> > But this has a problem: clicking in the links in succession soon causes
>> > "component not found exceptions", or opening the link in a new window or
>> > tab
>> > renders the current page unusable, with the same exception.
>> >
>> > rg.apache.wicket.WicketRuntimeException: component . not found on
>> page
>> > ...
>> > at
>> >
>> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:426)
>> > at
>> >
>> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:471)
>> > at
>> >
>> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
>> > at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
>> > ...
>> >
>> > I believe this is due to the fact that a new LinkPanel is created when
>> > rendering each column cell, and that when the click happens, the current
>> > LinkPanels are replaced by new ones, and so the original page is not
>> usable
>> > anymore, because it is referring to the original LinkPanels.
>> >
>> > Our users make heavy use of opening links in a list in new pages or
>> tabs,
>> > so
>> > this is a big deal for us :(
>> >
>> > Is there any solution for this problem? The only one I can think of is
>> to
>> > use AjaxLink instead, but I am not sure whether that is correct, or if
>> it
>> > could cause even more proble

Re: Links in DataTable

2010-06-28 Thread Nelson Segura
Jeremy, the code is below.

I did notice something while researching/testing more.
The LinkPanel solution DOES work for a DataTable. The problem starts when
changed to a AjaxFallbackDefaultDataTable.
I did testing based in the datatable example in the wicket examples.
Maybe using an AjaxLink instead of a normal link in the table is the right
answer.


Code is mostly taken from the page linked in the original email

public abstract class LinkPanel extends Panel {

private static final long serialVersionUID = 2062173455224348354L;

public LinkPanel(final Item item, final String componentId,
final IModel model, final String property) {
super(componentId, model);

AjaxLink link = new AjaxLink("linkCell") {

private static final long serialVersionUID =
2574434147588617330L;

@Override
public void onClick(AjaxRequestTarget target) {
LinkPanel.this.onClick();
}


};
add(link);
link.add(new Label("label", new PropertyModel(model,property)));
}

protected abstract void onClick();
}

- Usage ---

public class LinkPanelPage extends WebPage {

public LinkPanelPage() {
Form form = new Form("form");
final LinkPanelListProvider provider = new LinkPanelListProvider();
List columnList = new ArrayList(3);
//columnList.add(new PropertyColumn(new
Model("eMailAddress"),"eMailAddress"));
columnList.add(new AbstractColumn(new Model("eMailAddress"),
"eMailAddress") {
private static final long serialVersionUID =
-1822504503325964706L;

@Override
@SuppressWarnings("unchecked")
public void populateItem(Item cellItem, String componentId,
final IModel rowModel) {
cellItem.add(new LinkPanel(cellItem, componentId, rowModel,
getSortProperty()) {

private static final long serialVersionUID =
-4615958634366803506L;

@Override
protected void onClick() {
System.out.println("clicked on link");
}
});
}

});

columnList.add(new PropertyColumn(new
Model("firstName"),"firstName"));
columnList.add(new PropertyColumn(new
Model("lastName"),"lastName"));
AjaxFallbackDefaultDataTable table = new
AjaxFallbackDefaultDataTable("link-panel-table", columnList, provider, 3);
form.add(table);
add(form);
}
}

-Nelson

On Mon, Jun 28, 2010 at 5:14 PM, Jeremy Thomerson  wrote:

> please show some code
>
> On Mon, Jun 28, 2010 at 6:39 PM, Nelson Segura  wrote:
>
> > I am trying to create a table based on DataTable, in which one of the
> > columns has links on it.
> > I tried to use the strategy described here (LinkPanel):
> >
> > https://cwiki.apache.org/WICKET/adding-links-in-a-defaultdatatable.html
> >
> > But this has a problem: clicking in the links in succession soon causes
> > "component not found exceptions", or opening the link in a new window or
> > tab
> > renders the current page unusable, with the same exception.
> >
> > rg.apache.wicket.WicketRuntimeException: component . not found on
> page
> > ...
> > at
> >
> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:426)
> > at
> >
> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:471)
> > at
> >
> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
> > at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
> > ...
> >
> > I believe this is due to the fact that a new LinkPanel is created when
> > rendering each column cell, and that when the click happens, the current
> > LinkPanels are replaced by new ones, and so the original page is not
> usable
> > anymore, because it is referring to the original LinkPanels.
> >
> > Our users make heavy use of opening links in a list in new pages or tabs,
> > so
> > this is a big deal for us :(
> >
> > Is there any solution for this problem? The only one I can think of is to
> > use AjaxLink instead, but I am not sure whether that is correct, or if it
> > could cause even more problems.
> >
> > Any help?
> >
> > -Nelson
> >
>
>
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>


Re: Links in DataTable

2010-06-28 Thread Jeremy Thomerson
please show some code

On Mon, Jun 28, 2010 at 6:39 PM, Nelson Segura  wrote:

> I am trying to create a table based on DataTable, in which one of the
> columns has links on it.
> I tried to use the strategy described here (LinkPanel):
>
> https://cwiki.apache.org/WICKET/adding-links-in-a-defaultdatatable.html
>
> But this has a problem: clicking in the links in succession soon causes
> "component not found exceptions", or opening the link in a new window or
> tab
> renders the current page unusable, with the same exception.
>
> rg.apache.wicket.WicketRuntimeException: component . not found on page
> ...
> at
> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:426)
> at
> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:471)
> at
> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
> at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
> ...
>
> I believe this is due to the fact that a new LinkPanel is created when
> rendering each column cell, and that when the click happens, the current
> LinkPanels are replaced by new ones, and so the original page is not usable
> anymore, because it is referring to the original LinkPanels.
>
> Our users make heavy use of opening links in a list in new pages or tabs,
> so
> this is a big deal for us :(
>
> Is there any solution for this problem? The only one I can think of is to
> use AjaxLink instead, but I am not sure whether that is correct, or if it
> could cause even more problems.
>
> Any help?
>
> -Nelson
>



-- 
Jeremy Thomerson
http://www.wickettraining.com


Links in DataTable

2010-06-28 Thread Nelson Segura
I am trying to create a table based on DataTable, in which one of the
columns has links on it.
I tried to use the strategy described here (LinkPanel):

https://cwiki.apache.org/WICKET/adding-links-in-a-defaultdatatable.html

But this has a problem: clicking in the links in succession soon causes
"component not found exceptions", or opening the link in a new window or tab
renders the current page unusable, with the same exception.

rg.apache.wicket.WicketRuntimeException: component . not found on page ...
 at 
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:426)
 at 
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:471)
 at 
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
...

I believe this is due to the fact that a new LinkPanel is created when
rendering each column cell, and that when the click happens, the current
LinkPanels are replaced by new ones, and so the original page is not usable
anymore, because it is referring to the original LinkPanels.

Our users make heavy use of opening links in a list in new pages or tabs, so
this is a big deal for us :(

Is there any solution for this problem? The only one I can think of is to
use AjaxLink instead, but I am not sure whether that is correct, or if it
could cause even more problems.

Any help?

-Nelson


Reorder links in DataTable

2008-08-19 Thread Artem D.

Hi,

is there a way to implement reordering of rows in DatTable?
I'd like to add a column with moveUp,moveDown,remove having the same
behaviour as corresponging links of the ListView component.
I suppose DataTable should be set to model reusing with
setItemReuseStrategy(ReuseIfModelsEqualStrategy.getInstance()) and
DataProvider should be a simple wrapper around List object but could not
find a more or less generic way to implement ListView reordering behavior.




-- 
View this message in context: 
http://www.nabble.com/Reorder-links-in-DataTable-tp19062831p19062831.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]