Re: AjaxFallbackLink in DefaultDataTable

2017-01-11 Thread Martin Grigorov
Hi,

The reason is here: 
There could be just one HTML element with a given id. In your case you have
many with "editLink".
Wicket uses the markupId from the markup template if it is provided. If it
is not provided then generates a unique one for each component.
Remove id="editLink".

Do you really need AjaxFallbackLink ? Because you don't make a check for
non-null AjaxRequestTarget.
Most of the applications these days are JavaScript heavy, so the "fallback"
part is not really needed. It just produce twice bigger response.
Just use AjaxLink.

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

On Wed, Jan 11, 2017 at 1:26 PM, <christoph.ma...@t-systems.com> wrote:

> Hello,
>
> I created a page to manage all users of my application. It contains a form
> for creating and updating users and a table below to delete and edit users.
>
> Here is the creation of the table and its columns:
> List<IColumn<UserModel, String>> columns = new
> ArrayList<IColumn<UserModel, String>>();
>
> columns.add(new AbstractColumn<UserModel, String>(new
> ResourceModel("datatable.action")) {
> /** serialVersionUID */
> private static final long serialVersionUID = 6160557212653571302L;
>
> @Override
> public void populateItem(Item<ICellPopulator>
> cellItem, String componentId, IModel model) {
> cellItem.add(new UsermanagementPanel(componentId, model));
> }
> });
> columns.add(new PropertyColumn<UserModel, String>(new
> ResourceModel("user.username"), "username", "username"));
> columns.add(new PropertyColumn<UserModel, String>(new
> ResourceModel("user.firstname"), "firstname", "firstname"));
> columns.add(new PropertyColumn<UserModel, String>(new
> ResourceModel("user.lastname"), "lastname", "lastname"));
> columns.add(new PropertyColumn<UserModel, String>(new 
> ResourceModel("user.eMailaddress"),
> "eMailaddress", "eMailaddress"));
> columns.add(new PropertyColumn<UserModel, String>(new 
> ResourceModel("user.phoneNumber"),
> "phoneNumber", "phoneNumber"));
>
> new DefaultDataTable<UserModel, String>(this.id, initColumns(),
> new 
> DAPDataProvider(userDao.getAllUsers(),
> "username"), 10);
>
> As you can see every row of the column gets a UsermanagementPanel which
> only contains 2 links. One for editing a user and one for deletion.
>
> The link for editing should be an AjaxFallbackLink. It should set the user
> of the row where the edit link was clicked as the default model of the form
> above and add it to the AjaxRequestTarget for reloading the form.
> Here is the Panel:
> public class UsermanagementPanel extends Panel {
> /** The user which should be changed or deleted. */
> private UserModel userForAction;
>
> /**
>  * The constructor which creates the panel with the edit and
> delete link.
>  *
>  * @param id
>  *the id of the panel
>  * @param model
>  */
> public UsermanagementPanel(String id, IModel model) {
> super(id, model);
> addLinks();
>
> userForAction = model.getObject();
> log.info("Creates Panel for user: " +
> userForAction.getUsername());
> }
>
> /**
>  * Add the edit and delete link.
>  *
>  * @param model
>  */
> private void addLinks() {
> AjaxFallbackLink edit = new
> AjaxFallbackLink("editUser") {
> /** serialVersionUID */
> private static final long serialVersionUID =
> 4045653268294938060L;
>
> @Override
> public void onClick(AjaxRequestTarget target) {
> Usermanagement usermanagement =
> (Usermanagement) getPage();
> Form form =
> usermanagement.getUserForm();
> form.setDefaultModelObject(userForAction);
> target.add(form);
> }
> };
>
> Link delete = new Link("deleteUser") {
> /** serialVersionUID */
> private static final long serialVersionUID =
> 3217036727482973672L;
>
> @Override
> pub

AjaxFallbackLink in DefaultDataTable

2017-01-11 Thread Christoph.Manig
Hello,

I created a page to manage all users of my application. It contains a form for 
creating and updating users and a table below to delete and edit users.

Here is the creation of the table and its columns:
List<IColumn<UserModel, String>> columns = new ArrayList<IColumn<UserModel, 
String>>();

columns.add(new AbstractColumn<UserModel, String>(new 
ResourceModel("datatable.action")) {
/** serialVersionUID */
private static final long serialVersionUID = 6160557212653571302L;

@Override
public void populateItem(Item<ICellPopulator> cellItem, 
String componentId, IModel model) {
cellItem.add(new UsermanagementPanel(componentId, model));
}
});
columns.add(new PropertyColumn<UserModel, String>(new 
ResourceModel("user.username"), "username", "username"));
columns.add(new PropertyColumn<UserModel, String>(new 
ResourceModel("user.firstname"), "firstname", "firstname"));
columns.add(new PropertyColumn<UserModel, String>(new 
ResourceModel("user.lastname"), "lastname", "lastname"));
columns.add(new PropertyColumn<UserModel, String>(new 
ResourceModel("user.eMailaddress"), "eMailaddress", "eMailaddress"));
columns.add(new PropertyColumn<UserModel, String>(new 
ResourceModel("user.phoneNumber"), "phoneNumber", "phoneNumber"));

new DefaultDataTable<UserModel, String>(this.id, initColumns(),
new 
DAPDataProvider(userDao.getAllUsers(), "username"), 10);

As you can see every row of the column gets a UsermanagementPanel which only 
contains 2 links. One for editing a user and one for deletion.

The link for editing should be an AjaxFallbackLink. It should set the user of 
the row where the edit link was clicked as the default model of the form above 
and add it to the AjaxRequestTarget for reloading the form.
Here is the Panel:
public class UsermanagementPanel extends Panel {
/** The user which should be changed or deleted. */
private UserModel userForAction;

/**
 * The constructor which creates the panel with the edit and delete 
link.
 *
 * @param id
 *the id of the panel
 * @param model
 */
public UsermanagementPanel(String id, IModel model) {
super(id, model);
addLinks();

userForAction = model.getObject();
log.info("Creates Panel for user: " + 
userForAction.getUsername());
}

/**
 * Add the edit and delete link.
 *
 * @param model
 */
private void addLinks() {
AjaxFallbackLink edit = new 
AjaxFallbackLink("editUser") {
/** serialVersionUID */
private static final long serialVersionUID = 
4045653268294938060L;

@Override
public void onClick(AjaxRequestTarget target) {
Usermanagement usermanagement = 
(Usermanagement) getPage();
Form form = 
usermanagement.getUserForm();
form.setDefaultModelObject(userForAction);
target.add(form);
}
};

Link delete = new Link("deleteUser") {
/** serialVersionUID */
private static final long serialVersionUID = 
3217036727482973672L;

@Override
public void onClick() {
log.info("Triggering deleting of user" + 
userForAction.getUsername());
UserDao userDao = new UserDaoImpl();

userDao.deleteUserById(userForAction.getUserID());
log.debug("Deleting complete, reload page");
setResponsePage(Usermanagement.class);
}
};

add(edit);
add(delete);
}
}

http://wicket.apache.org;>








In the table of the usermanagement page I can see 3 users and their 
UsermanagementPanels. Now I click the edit link in the first row.
In the AjaxDebugWindow and in the browsers development tools, I can see that 3 
Requests where send. One for each user. Then It renders the form by using ajax 
with every user. So it renders the form 3 times. Finally I see the data of the
User in the 3rd row in the form.

If I click the edit link in the 2nd or 3rd row of the table, a 
NullPointerException will be thrown, because the AjaxRequestTarget is null.

Can somebody explain why 3 Requests where send when I click only the link in 
the first row? Why is the AjaxRequestTarget null for the other rows? I only 
want one Request to show only the user of the row. What am I doing wrong?


Mit freundlichen Grüßen
Christoph Manig





Re: Adding checkbox column to DefaultDataTable

2013-07-31 Thread BrianWilliams
Sorry to take so long to reply.  I've been working on other things.  Looking
at this again I had to change the model I was using, and my problem is
solved with this CheckboxColumn:

private class CheckboxColumnT extends HeaderlessColumnT, Object {

private String expression;
public CheckboxColumn(String expression) {
this.expression = expression;
}

@Override
public Component getHeader(String componentId) {
return new Label(componentId, new ModelString(Select));
// return new CheckGroupSelector(componentId, checkGroup);
}

@Override
public void populateItem(ItemICellPopulatorlt;T cellItem, String
componentId, IModelT rowModel) {
Panel panel = new CheckboxPanel(componentId, rowModel) {};
cellItem.add(panel);
panel.add(new Check(checkbox, rowModel));
}
}

Thank you for your consideration.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Adding-checkbox-column-to-DefaultDataTable-tp4660374p4660578.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: Adding checkbox column to DefaultDataTable

2013-07-22 Thread Sven Meier

What does CheckboxColumn look like?

Sven

On 07/19/2013 07:28 PM, BrianWilliams wrote:

This works just fine to add checkboxes to a ListView:
 final CheckGroupPerson group = new CheckGroupPerson(group,
new ArrayListPerson());
 Form? form = new Form(form) {
 @Override
 protected void onSubmit() {
 info(selected person(s):  +
group.getDefaultModelObjectAsString());
 }
 };

 add(form);
 form.add(group);
 group.add(new CheckGroupSelector(groupselector));
 ListViewPerson listView = new ListViewPerson(persons,
getModel()) {
 /**
  * @see
  *
org.apache.wicket.markup.html.list.ListView#populateItem(org.apache.wicket.markup.html.list.ListItem)
  */
 @Override
 protected void populateItem(ListItemPerson item) {
 item.add(new CheckPerson(checkbox,
item.getModel()));
 item.add(new Label(name, new
PropertyModelString(item.getDefaultModel(), name)));
 }
 };

 listView.setReuseItems(true);
 group.add(listView);

However, similar code to add a checkbox column to a DefaultDataTable fails.

 final CheckGroupPerson group = new CheckGroupPerson(group,
new ArrayListPerson());
 Form? form = new Form(form2) {
 @Override
 protected void onSubmit() {
 info(selected person(s):  +
group.getDefaultModelObjectAsString());
 }
 };

 List columns = new ArrayList();
 columns.add(new CheckboxColumn(id));

 columns.add(new PsPropertyColumn(Name, name) {

 @Override
 public void populateItem(Item cellItem, String componentId,
IModel rowModel)
 {
 super.populateItem(cellItem, componentId, rowModel);
 }
 });
 final DataProvider dataProvider = new DataProvider(getModel());

 add(form);
 form.add(group);
 group.add(new CheckGroupSelector(groupselector));
 DefaultDataTable table = new DefaultDataTable(dataTable,
columns, dataProvider, 5) {
 };

 group.add(table);

The checkboxes appear, but selecting on actually selects the column rather
than the individual item.  This causes multiple problems, such as
getDefaultModelObjectAsString() returns the column and the
CheckGroupSelector, thinking the column is selected and the same column is
used for all checkboxes, selects all boxes on post back.  Any advice?





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Adding-checkbox-column-to-DefaultDataTable-tp4660374.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



Adding checkbox column to DefaultDataTable

2013-07-19 Thread BrianWilliams
This works just fine to add checkboxes to a ListView:
final CheckGroupPerson group = new CheckGroupPerson(group,
new ArrayListPerson());
Form? form = new Form(form) {
@Override
protected void onSubmit() {
info(selected person(s):  +
group.getDefaultModelObjectAsString());
}
};

add(form);
form.add(group);
group.add(new CheckGroupSelector(groupselector));
ListViewPerson listView = new ListViewPerson(persons,
getModel()) {
/**
 * @see
 *
org.apache.wicket.markup.html.list.ListView#populateItem(org.apache.wicket.markup.html.list.ListItem)
 */
@Override
protected void populateItem(ListItemPerson item) {
item.add(new CheckPerson(checkbox,
item.getModel()));
item.add(new Label(name, new
PropertyModelString(item.getDefaultModel(), name)));
}
};

listView.setReuseItems(true);
group.add(listView);

However, similar code to add a checkbox column to a DefaultDataTable fails.  

final CheckGroupPerson group = new CheckGroupPerson(group,
new ArrayListPerson());
Form? form = new Form(form2) {
@Override
protected void onSubmit() {
info(selected person(s):  +
group.getDefaultModelObjectAsString());
}
};

List columns = new ArrayList();
columns.add(new CheckboxColumn(id));

columns.add(new PsPropertyColumn(Name, name) {

@Override
public void populateItem(Item cellItem, String componentId,
IModel rowModel)
{
super.populateItem(cellItem, componentId, rowModel);
}
});
final DataProvider dataProvider = new DataProvider(getModel());

add(form);
form.add(group);
group.add(new CheckGroupSelector(groupselector));
DefaultDataTable table = new DefaultDataTable(dataTable,
columns, dataProvider, 5) {
};

group.add(table);

The checkboxes appear, but selecting on actually selects the column rather
than the individual item.  This causes multiple problems, such as
getDefaultModelObjectAsString() returns the column and the
CheckGroupSelector, thinking the column is selected and the same column is
used for all checkboxes, selects all boxes on post back.  Any advice?





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Adding-checkbox-column-to-DefaultDataTable-tp4660374.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: How to dynamically add a hyperlink (BookmarkablePageLink) to DefaultDataTable that is rendered as an anchor

2013-06-17 Thread David Solum
Hi,

As I said in my original post, that markup works, but the
BookmarkablePageLinks that I add are rendered as div tags with onclick
handlers.  I am trying to get anchor tags.

I believe the post that Sven referred to is a step in the right direction,
but my markup gives me the unclosed tag error.

Has anyone gotten a BookmarkablePageLink to render as an anchor tag?  If so,
may I see the markup you used?  Thank you very much in advance.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-dynamically-add-a-hyperlink-BookmarkablePageLink-to-DefaultDataTable-that-is-rendered-as-an-ar-tp4659502p4659551.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: How to dynamically add a hyperlink (BookmarkablePageLink) to DefaultDataTable that is rendered as an anchor

2013-06-17 Thread Martin Grigorov
Show us your new markup.


On Mon, Jun 17, 2013 at 5:09 PM, David Solum djso...@yahoo.com wrote:

 Hi,

 As I said in my original post, that markup works, but the
 BookmarkablePageLinks that I add are rendered as div tags with onclick
 handlers.  I am trying to get anchor tags.

 I believe the post that Sven referred to is a step in the right direction,
 but my markup gives me the unclosed tag error.

 Has anyone gotten a BookmarkablePageLink to render as an anchor tag?  If
 so,
 may I see the markup you used?  Thank you very much in advance.



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/How-to-dynamically-add-a-hyperlink-BookmarkablePageLink-to-DefaultDataTable-that-is-rendered-as-an-ar-tp4659502p4659551.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: How to dynamically add a hyperlink (BookmarkablePageLink) to DefaultDataTable that is rendered as an anchor

2013-06-17 Thread David Solum
Here is the simplest thing I've tried: 

 wicket:panel 
 table wicket:id=dataTable border=0 cellpadding=1
cellspacing=1 width=90% 
 a href=# wicket:id=link /a 
 /table 
 /wicket:panel 

(I added the spaces after the angled brackets just for posting, they are not
part of the markup in my code.)



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-dynamically-add-a-hyperlink-BookmarkablePageLink-to-DefaultDataTable-that-is-rendered-as-an-ar-tp4659502p4659556.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: How to dynamically add a hyperlink (BookmarkablePageLink) to DefaultDataTable that is rendered as an anchor

2013-06-17 Thread Martin Grigorov
You have to use just table wicket:id=... .../table for the DataTable.
And a separate markup for the cell content. For example with a Fragment:
wicket:fragment id=linkFragmenta
wicket:id=link/a/wicket:fragment
Or use Panel if you don't have experience with Fragments


On Mon, Jun 17, 2013 at 6:19 PM, David Solum djso...@yahoo.com wrote:

 Here is the simplest thing I've tried:

  wicket:panel
  table wicket:id=dataTable border=0 cellpadding=1
 cellspacing=1 width=90%
  a href=# wicket:id=link /a
  /table
  /wicket:panel

 (I added the spaces after the angled brackets just for posting, they are
 not
 part of the markup in my code.)



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/How-to-dynamically-add-a-hyperlink-BookmarkablePageLink-to-DefaultDataTable-that-is-rendered-as-an-ar-tp4659502p4659556.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: How to dynamically add a hyperlink (BookmarkablePageLink) to DefaultDataTable that is rendered as an anchor

2013-06-17 Thread David Solum
If you're saying to add the fragment tag outside the table tag, I don't get
any errors, but the Links I add are still rendered as div tags with onclick
handlers.  What would tie the BookmarkablePageLinks that I add to the
DefaultDataTable to the anchor tags in your markup?  Thank you.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-dynamically-add-a-hyperlink-BookmarkablePageLink-to-DefaultDataTable-that-is-rendered-as-an-ar-tp4659502p4659570.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: How to dynamically add a hyperlink (BookmarkablePageLink) to DefaultDataTable that is rendered as an anchor

2013-06-17 Thread Martin Grigorov
Please create a mini application (a quickstart) that shows the problem and
upload it somewhere. Or put it in GitHub/BitBucket.
Then someone of us will fix it and send it back to you.


On Tue, Jun 18, 2013 at 12:25 AM, David Solum djso...@yahoo.com wrote:

 If you're saying to add the fragment tag outside the table tag, I don't get
 any errors, but the Links I add are still rendered as div tags with onclick
 handlers.  What would tie the BookmarkablePageLinks that I add to the
 DefaultDataTable to the anchor tags in your markup?  Thank you.



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/How-to-dynamically-add-a-hyperlink-BookmarkablePageLink-to-DefaultDataTable-that-is-rendered-as-an-ar-tp4659502p4659570.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: How to dynamically add a hyperlink (BookmarkablePageLink) to DefaultDataTable that is rendered as an anchor

2013-06-17 Thread Jesse Long

Hi David,

The IColumn#populateItem method populates a cell in the HTML table. It 
is as if you are adding your components to markup like this:


td wicket:id=xyz/td

If you have that, and you do:

add(new LinkVoid(xyz){...});

then you will have the same results. Why? Because Link was not designed 
to be added to td markup. Actually, it can be added to td, but then 
you get the onclick behaviour you are describing.


What the link Sven sent is trying to say is this: you cant add a Link 
directly to the cellItem. You must create an intermediate component, the 
example shows it as the LinkPanel. The LinkPanel is added to the td, 
and this works nicely. The link panel then makes a markup available, 
and you add the link to that.


I usually use an abstract LinkPanel that has one abstract factory method 
to create the link, so my populateItem method looks like:


cellItem.add(
// adding link panel to cell
new LinkPanelRowType(componentId, rowModel){
// link panel has abstract factory method for link
@Override
protected Component createLink(String componentId, IModelRowType 
model)

{
return new LinkRowType(componentId, model)
{
@Override
public void onClick()
{
getModel().doSomething();
setResponsePage();
}
}.setBody(Model.of(Whatever));
}
});

hth,
Jesse

On 14/06/2013 18:22, David Solum wrote:

I am using Wicket 6.8 and have a sortable DefaultDataTable that gets its
columns programmatically.

The markup to get this table and the dynamically generated columns simple
(I've added spaces so it all shows):

  wicket:panel
  table wicket:id=dataTable border=0 cellpadding=1
cellspacing=1 width=90% / 
  /wicket:panel

All of the columns are generated from a passed in LinkedHashMap of labels
and attributes:

 for (EntryString, String entry : entrySet) {
 final String label = entry.getKey();
 final String attribute = entry.getValue();
 columns.add(new PsPropertyColumn(label, attribute) {

 @Override
 public void populateItem(Item cellItem, String componentId,
IModel model)
 {
 final Object modelObject = model.getObject();
 final Object value = PropertyResolver.getValue(attribute,
modelObject);
 // Add an edit link
 BookmarkablePageLink link = new ...;
 ...
 cellItem.add(link);
 }
 }
 }

 DefaultDataTable table = new DefaultDataTable(dataTable, columns,
dataProvider, MAX_ROWS) {
 ...
 }
 add(table);

So this properly displays as a sortable table with clickable columns that
send the user to the required page.  However, as many posts have mentioned,
this is rendered as a cell with an onclick handler rather than an anchor (
a href=... /) tag. I want the anchor tag for a couple of reasons, one if
which is that I want to add my own onclick handler without having an
existing onclick handler in the way.

I have seen a solution that says to put an anchor tag inside a panel in the
HTML markup, and to add the link inside of a Panel subclass.  Sadly for me
the markup in the examples wasn't complete, and whatever I try (anchor tags,
tr/td tags, panel tags, etc.), I get the same error:

  Last cause: Close tag not found for tag:
. For Components only raw markup is allow in between the tags but not other
Wicket Component. Component: [DefaultDataTable [Component id = dataTable]]

Here is the simplest thing I've tried:

  wicket:panel
  table wicket:id=dataTable border=0 cellpadding=1
cellspacing=1 width=90%
  a href=# wicket:id=link /a
  /table
  /wicket:panel

Again, no success.  I would love to see markup that allows the
BookmarkablePageLinks be rendered insided the DefaultDataTable as anchor
tags.  Thanks in advance for any help.





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-dynamically-add-a-hyperlink-BookmarkablePageLink-to-DefaultDataTable-that-is-rendered-as-an-ar-tp4659502.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 dynamically add a hyperlink (BookmarkablePageLink) to DefaultDataTable that is rendered as an anchor

2013-06-16 Thread Martin Grigorov
Hi,

DataTable should be used with markup like:
table wicket:id=tableId/table

If you want complex markup for the cells' content than you have to add
Panel|Fragment|Border component to the column's item, as described in the
Wiki page.


On Fri, Jun 14, 2013 at 10:40 PM, David Solum djso...@yahoo.com wrote:

 Yes Sven, that is where I got the HTML I posted that gives me the Close
 tag
 not found error.



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/How-to-dynamically-add-a-hyperlink-BookmarkablePageLink-to-DefaultDataTable-that-is-rendered-as-an-ar-tp4659502p4659514.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




How to dynamically add a hyperlink (BookmarkablePageLink) to DefaultDataTable that is rendered as an anchor

2013-06-14 Thread David Solum
I am using Wicket 6.8 and have a sortable DefaultDataTable that gets its
columns programmatically. 

The markup to get this table and the dynamically generated columns simple
(I've added spaces so it all shows):

 wicket:panel
 table wicket:id=dataTable border=0 cellpadding=1
cellspacing=1 width=90% / 
 /wicket:panel

All of the columns are generated from a passed in LinkedHashMap of labels
and attributes:

for (EntryString, String entry : entrySet) {
final String label = entry.getKey();
final String attribute = entry.getValue();
columns.add(new PsPropertyColumn(label, attribute) {

@Override
public void populateItem(Item cellItem, String componentId,
IModel model)
{
final Object modelObject = model.getObject();
final Object value = PropertyResolver.getValue(attribute,
modelObject);
// Add an edit link
BookmarkablePageLink link = new ...;
...
cellItem.add(link);
}
}
}

DefaultDataTable table = new DefaultDataTable(dataTable, columns,
dataProvider, MAX_ROWS) {
...
}
add(table);

So this properly displays as a sortable table with clickable columns that
send the user to the required page.  However, as many posts have mentioned,
this is rendered as a cell with an onclick handler rather than an anchor (
a href=... /) tag. I want the anchor tag for a couple of reasons, one if
which is that I want to add my own onclick handler without having an
existing onclick handler in the way.

I have seen a solution that says to put an anchor tag inside a panel in the
HTML markup, and to add the link inside of a Panel subclass.  Sadly for me
the markup in the examples wasn't complete, and whatever I try (anchor tags,
tr/td tags, panel tags, etc.), I get the same error:

 Last cause: Close tag not found for tag: 
. For Components only raw markup is allow in between the tags but not other
Wicket Component. Component: [DefaultDataTable [Component id = dataTable]] 

Here is the simplest thing I've tried:

 wicket:panel
 table wicket:id=dataTable border=0 cellpadding=1
cellspacing=1 width=90%
 a href=# wicket:id=link /a
 /table
 /wicket:panel

Again, no success.  I would love to see markup that allows the
BookmarkablePageLinks be rendered insided the DefaultDataTable as anchor
tags.  Thanks in advance for any help.





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-dynamically-add-a-hyperlink-BookmarkablePageLink-to-DefaultDataTable-that-is-rendered-as-an-ar-tp4659502.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: How to dynamically add a hyperlink (BookmarkablePageLink) to DefaultDataTable that is rendered as an anchor

2013-06-14 Thread Sven Meier

Have you read the following?

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

Sven

On 06/14/2013 06:22 PM, David Solum wrote:

I am using Wicket 6.8 and have a sortable DefaultDataTable that gets its
columns programmatically.

The markup to get this table and the dynamically generated columns simple
(I've added spaces so it all shows):

  wicket:panel
  table wicket:id=dataTable border=0 cellpadding=1
cellspacing=1 width=90% / 
  /wicket:panel

All of the columns are generated from a passed in LinkedHashMap of labels
and attributes:

 for (EntryString, String entry : entrySet) {
 final String label = entry.getKey();
 final String attribute = entry.getValue();
 columns.add(new PsPropertyColumn(label, attribute) {

 @Override
 public void populateItem(Item cellItem, String componentId,
IModel model)
 {
 final Object modelObject = model.getObject();
 final Object value = PropertyResolver.getValue(attribute,
modelObject);
 // Add an edit link
 BookmarkablePageLink link = new ...;
 ...
 cellItem.add(link);
 }
 }
 }

 DefaultDataTable table = new DefaultDataTable(dataTable, columns,
dataProvider, MAX_ROWS) {
 ...
 }
 add(table);

So this properly displays as a sortable table with clickable columns that
send the user to the required page.  However, as many posts have mentioned,
this is rendered as a cell with an onclick handler rather than an anchor (
a href=... /) tag. I want the anchor tag for a couple of reasons, one if
which is that I want to add my own onclick handler without having an
existing onclick handler in the way.

I have seen a solution that says to put an anchor tag inside a panel in the
HTML markup, and to add the link inside of a Panel subclass.  Sadly for me
the markup in the examples wasn't complete, and whatever I try (anchor tags,
tr/td tags, panel tags, etc.), I get the same error:

  Last cause: Close tag not found for tag:
. For Components only raw markup is allow in between the tags but not other
Wicket Component. Component: [DefaultDataTable [Component id = dataTable]]

Here is the simplest thing I've tried:

  wicket:panel
  table wicket:id=dataTable border=0 cellpadding=1
cellspacing=1 width=90%
  a href=# wicket:id=link /a
  /table
  /wicket:panel

Again, no success.  I would love to see markup that allows the
BookmarkablePageLinks be rendered insided the DefaultDataTable as anchor
tags.  Thanks in advance for any help.





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-dynamically-add-a-hyperlink-BookmarkablePageLink-to-DefaultDataTable-that-is-rendered-as-an-ar-tp4659502.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 dynamically add a hyperlink (BookmarkablePageLink) to DefaultDataTable that is rendered as an anchor

2013-06-14 Thread David Solum
Yes Sven, that is where I got the HTML I posted that gives me the Close tag
not found error.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-dynamically-add-a-hyperlink-BookmarkablePageLink-to-DefaultDataTable-that-is-rendered-as-an-ar-tp4659502p4659514.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



DefaultDataTable with NavigationToolbar

2013-04-26 Thread Christoph.Manig
Hello,

I'm using a DefaultDataTable with a NavigationToolbar. I want to show on every 
TablePage 10 rows. Now when I have more than 10 rows (e.g  11) the 
navigationtoolbar appears and I can switch on the 2nd page to see the 11th row. 
But on the 2nd page the Table shows again the first row and not the 11th.

Can you help me please?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com





Re: DefaultDataTable with NavigationToolbar

2013-04-26 Thread Martin Grigorov
Hi,

The problem seems to be in your implementation of
org.apache.wicket.markup.repeater.data.IDataProvider#iterator(long first,
long count)


On Fri, Apr 26, 2013 at 1:10 PM, christoph.ma...@t-systems.com wrote:

 Hello,

 I'm using a DefaultDataTable with a NavigationToolbar. I want to show on
 every TablePage 10 rows. Now when I have more than 10 rows (e.g  11) the
 navigationtoolbar appears and I can switch on the 2nd page to see the 11th
 row. But on the 2nd page the Table shows again the first row and not the
 11th.

 Can you help me please?


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics
 Hoyerswerdaer Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 - 209
 email:  christoph.ma...@t-systems.com






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


AW: DefaultDataTable with NavigationToolbar

2013-04-26 Thread Christoph.Manig
Hello,

this is the implementation of the DataProvider:

@Override
public IteratorUserRecord iterator(long l, long l2) {
if (userList != null){
Collections.sort(userList,comparator);
}else{
System.out.println(User-List ist leer!);
}
return userList.iterator();
}

What should have been changed? Can you explain me what these 2 parameters 
should do?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden 
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 – 209
email:  christoph.ma...@t-systems.com

-Ursprüngliche Nachricht-
Von: Martin Grigorov [mailto:mgrigo...@apache.org] 
Gesendet: Freitag, 26. April 2013 13:22
An: users@wicket.apache.org
Betreff: Re: DefaultDataTable with NavigationToolbar

Hi,

The problem seems to be in your implementation of 
org.apache.wicket.markup.repeater.data.IDataProvider#iterator(long first, long 
count)


On Fri, Apr 26, 2013 at 1:10 PM, christoph.ma...@t-systems.com wrote:

 Hello,

 I'm using a DefaultDataTable with a NavigationToolbar. I want to show 
 on every TablePage 10 rows. Now when I have more than 10 rows (e.g  
 11) the navigationtoolbar appears and I can switch on the 2nd page to 
 see the 11th row. But on the 2nd page the Table shows again the first 
 row and not the 11th.

 Can you help me please?


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer 
 Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 - 209
 email:  christoph.ma...@t-systems.com






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

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



Re: DefaultDataTable with NavigationToolbar

2013-04-26 Thread Martin Grigorov
On Fri, Apr 26, 2013 at 1:37 PM, christoph.ma...@t-systems.com wrote:

 Hello,

 this is the implementation of the DataProvider:

 @Override
 public IteratorUserRecord iterator(long l, long l2) {
 if (userList != null){
 Collections.sort(userList,comparator);
 }else{
 System.out.println(User-List ist leer!);
 }
 return userList.iterator();


try with: userList.subList((int)l, (int)l2).iterator();


 }

 What should have been changed? Can you explain me what these 2 parameters
 should do?


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics
 Hoyerswerdaer Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 – 209
 email:  christoph.ma...@t-systems.com

 -Ursprüngliche Nachricht-
 Von: Martin Grigorov [mailto:mgrigo...@apache.org]
 Gesendet: Freitag, 26. April 2013 13:22
 An: users@wicket.apache.org
 Betreff: Re: DefaultDataTable with NavigationToolbar

 Hi,

 The problem seems to be in your implementation of
 org.apache.wicket.markup.repeater.data.IDataProvider#iterator(long first,
 long count)


 On Fri, Apr 26, 2013 at 1:10 PM, christoph.ma...@t-systems.com wrote:

  Hello,
 
  I'm using a DefaultDataTable with a NavigationToolbar. I want to show
  on every TablePage 10 rows. Now when I have more than 10 rows (e.g
  11) the navigationtoolbar appears and I can switch on the 2nd page to
  see the 11th row. But on the 2nd page the Table shows again the first
  row and not the 11th.
 
  Can you help me please?
 
 
  Mit freundlichen Grüßen
  Christoph Manig
  Systems Engineer
 
  T-Systems International GmbH
  Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer
  Str. 18
  01099 Dresden
  tel.:   +49 (0) 351 / 8152 - 188
  fax:+49 (0) 351 / 8152 - 209
  email:  christoph.ma...@t-systems.com
 
 
 
 


 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.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 http://jweekend.com/


AW: DefaultDataTable with NavigationToolbar

2013-04-26 Thread Christoph.Manig
This works. Thank you.


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden 
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 – 209
email:  christoph.ma...@t-systems.com


-Ursprüngliche Nachricht-
Von: Martin Grigorov [mailto:mgrigo...@apache.org] 
Gesendet: Freitag, 26. April 2013 13:49
An: users@wicket.apache.org
Betreff: Re: DefaultDataTable with NavigationToolbar

On Fri, Apr 26, 2013 at 1:37 PM, christoph.ma...@t-systems.com wrote:

 Hello,

 this is the implementation of the DataProvider:

 @Override
 public IteratorUserRecord iterator(long l, long l2) {
 if (userList != null){
 Collections.sort(userList,comparator);
 }else{
 System.out.println(User-List ist leer!);
 }
 return userList.iterator();


try with: userList.subList((int)l, (int)l2).iterator();


 }

 What should have been changed? Can you explain me what these 2 
 parameters should do?


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer 
 Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 – 209
 email:  christoph.ma...@t-systems.com

 -Ursprüngliche Nachricht-
 Von: Martin Grigorov [mailto:mgrigo...@apache.org]
 Gesendet: Freitag, 26. April 2013 13:22
 An: users@wicket.apache.org
 Betreff: Re: DefaultDataTable with NavigationToolbar

 Hi,

 The problem seems to be in your implementation of 
 org.apache.wicket.markup.repeater.data.IDataProvider#iterator(long 
 first, long count)


 On Fri, Apr 26, 2013 at 1:10 PM, christoph.ma...@t-systems.com wrote:

  Hello,
 
  I'm using a DefaultDataTable with a NavigationToolbar. I want to 
  show on every TablePage 10 rows. Now when I have more than 10 rows 
  (e.g
  11) the navigationtoolbar appears and I can switch on the 2nd page 
  to see the 11th row. But on the 2nd page the Table shows again the 
  first row and not the 11th.
 
  Can you help me please?
 
 
  Mit freundlichen Grüßen
  Christoph Manig
  Systems Engineer
 
  T-Systems International GmbH
  Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer 
  Str. 18
  01099 Dresden
  tel.:   +49 (0) 351 / 8152 - 188
  fax:+49 (0) 351 / 8152 - 209
  email:  christoph.ma...@t-systems.com
 
 
 
 


 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.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 http://jweekend.com/

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



AW: AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-24 Thread Christoph.Manig
Hello,

Now I can see the exporttoolbar but when I click the link the csv is empty. Why 
is that empty?

Here the code:
@Override
public void onSubmit(AjaxRequestTarget target, Form form) {
target.add(feedback);
FilterCreatorProtocol filter = 
(FilterCreatorProtocol)form.getModelObject();

if(ConsoleDataHandlerImpl.getInstance().queryProtocolRowsByFilter(filter) = 
MAX_SEARCH_RESULTS){
ListProtocolRecord protocolData = 
ConsoleDataHandlerImpl.getInstance().queryProtocolDataWithSearchFilter(filter);

target.add(ProtokollierungPage.this.get(searchTable).replaceWith(getSearchTable(protocolData)));
}else{
error(ErrorMessage);
}
}

private DefaultDataTable getSearchTable(ListProtocolRecord dataList) {
 DefaultDataTableProtocolRecord,String searchTable = new 
DefaultDataTableProtocolRecord, String(searchTable,getTableHead(),new 
ProtocolDataSortDataProvider(dataList),10);
 searchTable.setOutputMarkupId(true);
 searchTable.addBottomToolbar(new ExportToolbar(searchTable, new 
ModelString(Export to), new ModelString(export)).addDataExporter(new 
CSVDataExporter()));

 return searchTable;
}

ListIColumnProtocolRecord,String columns = new 
ArrayListIColumnProtocolRecord,String();
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.retentionID), retentionId, retentionId));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.protocolID), protocolId, protocolId){
@Override
public void populateItem(ItemICellPopulatorProtocolRecord 
cellItem, String componentId, IModelProtocolRecord model)
{
cellItem.add(new ActionPanel(componentId, model));
}
});
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.externalID), externalId, externalId));
columns.add(new DatePropertyColumn(new 
ResourceModel(protocolRecord.eventTimestamp),eventTimestamp,eventTimestamp,dd.MM.
 HH:mm:ss));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.integrationService),integrationService,integrationService));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.endpoint),endpoint,endpoint));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.endpointType),endpointType,endpointType));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.messageStatus),messageStatus.description,messageStatus.description));


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden 
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com


-Ursprüngliche Nachricht-
Von: Manig, Christoph 
Gesendet: Mittwoch, 24. April 2013 07:54
An: users@wicket.apache.org
Betreff: AW: AW: DefaultDataTable will not render bottomtoolbar for export

Hello,

now I see the Problem. Thank you for your help and sorry for my blindness.


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer Str. 18
01099 Dresden 
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com

-Ursprüngliche Nachricht-
Von: Jesse Long [mailto:j...@unknown.za.net]
Gesendet: Dienstag, 23. April 2013 15:57
An: users@wicket.apache.org
Betreff: Re: AW: DefaultDataTable will not render bottomtoolbar for export

Hi Christoph,

PropertyColumns are already exportable. Exportable means implements 
IExportableColumn.

Sven identified that the replaced data table does not have the export toolbar 
added to it. This is why it does not display after being replaced.

Cheers,
Jesse

On 23/04/2013 15:49, christoph.ma...@t-systems.com wrote:
 Ok. Thanks for your answer.

 Here are my columns:
 ListIColumnProtocolRecord,String columns = new 
 ArrayListIColumnProtocolRecord,String();
 columns.add(new PropertyColumnProtocolRecord, String(new 
 ResourceModel(protocolRecord.retentionID), retentionId, retentionId)); 
 columns.add(new PropertyColumnProtocolRecord, String(new 
 ResourceModel(protocolRecord.protocolID), protocolId, protocolId){
  @Override
  public void populateItem(ItemICellPopulatorProtocolRecord 
 cellItem, String componentId, IModelProtocolRecord model)
  {
  cellItem.add(new ActionPanel(componentId, model));
  }
  });
 columns.add(new PropertyColumnProtocolRecord, String(new 
 ResourceModel(protocolRecord.externalID), externalId, 
 externalId)); columns.add(new DatePropertyColumn(new 
 ResourceModel(protocolRecord.eventTimestamp),eventTimestamp,event
 Timestamp,dd.MM. HH:mm:ss)); columns.add(new

Re: AW: AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-24 Thread Jesse Long

Hi Christoph,

Are the headers present in the CSV file? (No, indicates some sort of 
error generating the CSV, look at server logs. Yes, would indicate no 
records, but possibly error encountered after rendering headers, again, 
check server logs).


Are there records displayed in the HTML data table? If there are no 
records there, then none will be present in the exported CSV.


Thanks,
Jesse

On 24/04/2013 09:13, christoph.ma...@t-systems.com wrote:

Hello,

Now I can see the exporttoolbar but when I click the link the csv is empty. Why 
is that empty?

Here the code:
@Override
public void onSubmit(AjaxRequestTarget target, Form form) {
target.add(feedback);
FilterCreatorProtocol filter = 
(FilterCreatorProtocol)form.getModelObject();
if(ConsoleDataHandlerImpl.getInstance().queryProtocolRowsByFilter(filter) 
= MAX_SEARCH_RESULTS){
ListProtocolRecord protocolData = 
ConsoleDataHandlerImpl.getInstance().queryProtocolDataWithSearchFilter(filter);

target.add(ProtokollierungPage.this.get(searchTable).replaceWith(getSearchTable(protocolData)));
}else{
error(ErrorMessage);
}
}

private DefaultDataTable getSearchTable(ListProtocolRecord dataList) {
  DefaultDataTableProtocolRecord,String searchTable = new 
DefaultDataTableProtocolRecord, String(searchTable,getTableHead(),new 
ProtocolDataSortDataProvider(dataList),10);
  searchTable.setOutputMarkupId(true);
  searchTable.addBottomToolbar(new ExportToolbar(searchTable, new ModelString(Export 
to), new ModelString(export)).addDataExporter(new CSVDataExporter()));

  return searchTable;
}

ListIColumnProtocolRecord,String columns = new 
ArrayListIColumnProtocolRecord,String();
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.retentionID), retentionId, retentionId));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.protocolID), protocolId, protocolId){
 @Override
 public void populateItem(ItemICellPopulatorProtocolRecord cellItem, 
String componentId, IModelProtocolRecord model)
 {
 cellItem.add(new ActionPanel(componentId, model));
 }
 });
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.externalID), externalId, externalId));
columns.add(new DatePropertyColumn(new 
ResourceModel(protocolRecord.eventTimestamp),eventTimestamp,eventTimestamp,dd.MM.
 HH:mm:ss));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.integrationService),integrationService,integrationService));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.endpoint),endpoint,endpoint));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.endpointType),endpointType,endpointType));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.messageStatus),messageStatus.description,messageStatus.description));


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com


-Ursprüngliche Nachricht-
Von: Manig, Christoph
Gesendet: Mittwoch, 24. April 2013 07:54
An: users@wicket.apache.org
Betreff: AW: AW: DefaultDataTable will not render bottomtoolbar for export

Hello,

now I see the Problem. Thank you for your help and sorry for my blindness.


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com

-Ursprüngliche Nachricht-
Von: Jesse Long [mailto:j...@unknown.za.net]
Gesendet: Dienstag, 23. April 2013 15:57
An: users@wicket.apache.org
Betreff: Re: AW: DefaultDataTable will not render bottomtoolbar for export

Hi Christoph,

PropertyColumns are already exportable. Exportable means implements 
IExportableColumn.

Sven identified that the replaced data table does not have the export toolbar 
added to it. This is why it does not display after being replaced.

Cheers,
Jesse

On 23/04/2013 15:49, christoph.ma...@t-systems.com wrote:

Ok. Thanks for your answer.

Here are my columns:
ListIColumnProtocolRecord,String columns = new
ArrayListIColumnProtocolRecord,String();
columns.add(new PropertyColumnProtocolRecord, String(new
ResourceModel(protocolRecord.retentionID), retentionId, retentionId)); columns.add(new 
PropertyColumnProtocolRecord, String(new ResourceModel(protocolRecord.protocolID), protocolId, 
protocolId){
  @Override
  public void populateItem(ItemICellPopulatorProtocolRecord cellItem, 
String

AW: AW: AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-24 Thread Christoph.Manig
=labelZeitBisbis:/entry
entry key=labelSystemSystem:/entry
entry key=labelStatusStatus:/entry
entry key=labelServiceTypServicetyp:/entry


!-- Datatable --
entry key=datatable.no-records-foundKeine Einträge vorhanden/entry
entry key=datatable.export-to=Export toExport to/entry
entry key=datatable.export-file-nameexport/entry
entry key=NavigatorLabelAngezeigt werden die Einträge/entry
entry key=protocolRecord.retentionIDRetention-ID/entry
entry key=protocolRecord.protocolIDProtocol-ID/entry
entry key=protocolRecord.externalIDExternal-ID/entry
entry key=protocolRecord.eventTimestampEvent-Timestamp/entry
entry key=protocolRecord.integrationServiceIntegration-Service/entry
entry key=protocolRecord.endpointEndpoint/entry
entry key=protocolRecord.endpointTypeEndpoint-Typ/entry
entry key=protocolRecord.messageStatusMessage-Status/entry

/properties


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com


-Ursprüngliche Nachricht-
Von: Jesse Long [mailto:j...@unknown.za.net]
Gesendet: Mittwoch, 24. April 2013 10:10
An: users@wicket.apache.org
Betreff: Re: AW: AW: DefaultDataTable will not render bottomtoolbar for export

Hi Christoph,

Are the headers present in the CSV file? (No, indicates some sort of error 
generating the CSV, look at server logs. Yes, would indicate no records, but 
possibly error encountered after rendering headers, again, check server logs).

Are there records displayed in the HTML data table? If there are no records 
there, then none will be present in the exported CSV.

Thanks,
Jesse

On 24/04/2013 09:13, christoph.ma...@t-systems.com wrote:
 Hello,

 Now I can see the exporttoolbar but when I click the link the csv is empty. 
 Why is that empty?

 Here the code:
 @Override
 public void onSubmit(AjaxRequestTarget target, Form form) {
   target.add(feedback);
   FilterCreatorProtocol filter = 
 (FilterCreatorProtocol)form.getModelObject();
   
 if(ConsoleDataHandlerImpl.getInstance().queryProtocolRowsByFilter(filter) = 
 MAX_SEARCH_RESULTS){
   ListProtocolRecord protocolData = 
 ConsoleDataHandlerImpl.getInstance().queryProtocolDataWithSearchFilter(filter);
   
 target.add(ProtokollierungPage.this.get(searchTable).replaceWith(getSearchTable(protocolData)));
   }else{
   error(ErrorMessage);
   }
 }

 private DefaultDataTable getSearchTable(ListProtocolRecord dataList) {
   DefaultDataTableProtocolRecord,String searchTable = new 
 DefaultDataTableProtocolRecord, String(searchTable,getTableHead(),new 
 ProtocolDataSortDataProvider(dataList),10);
   searchTable.setOutputMarkupId(true);
   searchTable.addBottomToolbar(new ExportToolbar(searchTable, new
 ModelString(Export to), new
 ModelString(export)).addDataExporter(new CSVDataExporter()));

   return searchTable;
 }

 ListIColumnProtocolRecord,String columns = new
 ArrayListIColumnProtocolRecord,String();
 columns.add(new PropertyColumnProtocolRecord, String(new
 ResourceModel(protocolRecord.retentionID), retentionId, retentionId)); 
 columns.add(new PropertyColumnProtocolRecord, String(new 
 ResourceModel(protocolRecord.protocolID), protocolId, protocolId){
  @Override
  public void populateItem(ItemICellPopulatorProtocolRecord 
 cellItem, String componentId, IModelProtocolRecord model)
  {
  cellItem.add(new ActionPanel(componentId, model));
  }
  });
 columns.add(new PropertyColumnProtocolRecord, String(new
 ResourceModel(protocolRecord.externalID), externalId,
 externalId)); columns.add(new DatePropertyColumn(new
 ResourceModel(protocolRecord.eventTimestamp),eventTimestamp,event
 Timestamp,dd.MM. HH:mm:ss)); columns.add(new
 PropertyColumnProtocolRecord, String(new
 ResourceModel(protocolRecord.integrationService),integrationService
 ,integrationService)); columns.add(new
 PropertyColumnProtocolRecord, String(new
 ResourceModel(protocolRecord.endpoint),endpoint,endpoint));
 columns.add(new PropertyColumnProtocolRecord, String(new
 ResourceModel(protocolRecord.endpointType),endpointType,endpointT
 ype)); columns.add(new PropertyColumnProtocolRecord, String(new
 ResourceModel(protocolRecord.messageStatus),messageStatus.descripti
 on,messageStatus.description));


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer
 Str. 18
 01099 Dresden
 tel.: +49 (0) 351 / 8152 - 188
 fax:  +49 (0) 351 / 8152 - 209
 email:  christoph.ma...@t-systems.com


 -Ursprüngliche Nachricht-
 Von: Manig, Christoph
 Gesendet: Mittwoch, 24. April 2013 07:54
 An: users@wicket.apache.org
 Betreff: AW: AW

Re: AW: AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-24 Thread Martin Grigorov
=labelContentSearchNach Inhalt:/entry
 entry key=labelExtIDExternal-ID:/entry
 entry key=labelIntServiceIntegration Service:/entry
 entry key=labelServiceNameServicename:/entry
 entry key=labelZeitVonZeitraum von:/entry
 entry key=labelZeitBisbis:/entry
 entry key=labelSystemSystem:/entry
 entry key=labelStatusStatus:/entry
 entry key=labelServiceTypServicetyp:/entry


 !-- Datatable --
 entry key=datatable.no-records-foundKeine Einträge
 vorhanden/entry
 entry key=datatable.export-to=Export toExport to/entry
 entry key=datatable.export-file-nameexport/entry
 entry key=NavigatorLabelAngezeigt werden die Einträge/entry
 entry key=protocolRecord.retentionIDRetention-ID/entry
 entry key=protocolRecord.protocolIDProtocol-ID/entry
 entry key=protocolRecord.externalIDExternal-ID/entry
 entry key=protocolRecord.eventTimestampEvent-Timestamp/entry
 entry
 key=protocolRecord.integrationServiceIntegration-Service/entry
 entry key=protocolRecord.endpointEndpoint/entry
 entry key=protocolRecord.endpointTypeEndpoint-Typ/entry
 entry key=protocolRecord.messageStatusMessage-Status/entry

 /properties


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics
 Hoyerswerdaer Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 - 209
 email:  christoph.ma...@t-systems.com


 -Ursprüngliche Nachricht-
 Von: Jesse Long [mailto:j...@unknown.za.net]
 Gesendet: Mittwoch, 24. April 2013 10:10
 An: users@wicket.apache.org
 Betreff: Re: AW: AW: DefaultDataTable will not render bottomtoolbar for
 export

 Hi Christoph,

 Are the headers present in the CSV file? (No, indicates some sort of error
 generating the CSV, look at server logs. Yes, would indicate no records,
 but possibly error encountered after rendering headers, again, check server
 logs).

 Are there records displayed in the HTML data table? If there are no
 records there, then none will be present in the exported CSV.

 Thanks,
 Jesse

 On 24/04/2013 09:13, christoph.ma...@t-systems.com wrote:
  Hello,
 
  Now I can see the exporttoolbar but when I click the link the csv is
 empty. Why is that empty?
 
  Here the code:
  @Override
  public void onSubmit(AjaxRequestTarget target, Form form) {
target.add(feedback);
FilterCreatorProtocol filter =
 (FilterCreatorProtocol)form.getModelObject();
 
 if(ConsoleDataHandlerImpl.getInstance().queryProtocolRowsByFilter(filter)
 = MAX_SEARCH_RESULTS){
ListProtocolRecord protocolData =
 ConsoleDataHandlerImpl.getInstance().queryProtocolDataWithSearchFilter(filter);
 
 target.add(ProtokollierungPage.this.get(searchTable).replaceWith(getSearchTable(protocolData)));
}else{
error(ErrorMessage);
}
  }
 
  private DefaultDataTable getSearchTable(ListProtocolRecord dataList) {
DefaultDataTableProtocolRecord,String searchTable = new
 DefaultDataTableProtocolRecord, String(searchTable,getTableHead(),new
 ProtocolDataSortDataProvider(dataList),10);
searchTable.setOutputMarkupId(true);
searchTable.addBottomToolbar(new ExportToolbar(searchTable, new
  ModelString(Export to), new
  ModelString(export)).addDataExporter(new CSVDataExporter()));
 
return searchTable;
  }
 
  ListIColumnProtocolRecord,String columns = new
  ArrayListIColumnProtocolRecord,String();
  columns.add(new PropertyColumnProtocolRecord, String(new
  ResourceModel(protocolRecord.retentionID), retentionId,
 retentionId)); columns.add(new PropertyColumnProtocolRecord, String(new
 ResourceModel(protocolRecord.protocolID), protocolId, protocolId){
   @Override
   public void
 populateItem(ItemICellPopulatorProtocolRecord cellItem, String
 componentId, IModelProtocolRecord model)
   {
   cellItem.add(new ActionPanel(componentId, model));
   }
   });
  columns.add(new PropertyColumnProtocolRecord, String(new
  ResourceModel(protocolRecord.externalID), externalId,
  externalId)); columns.add(new DatePropertyColumn(new
  ResourceModel(protocolRecord.eventTimestamp),eventTimestamp,event
  Timestamp,dd.MM. HH:mm:ss)); columns.add(new
  PropertyColumnProtocolRecord, String(new
  ResourceModel(protocolRecord.integrationService),integrationService
  ,integrationService)); columns.add(new
  PropertyColumnProtocolRecord, String(new
  ResourceModel(protocolRecord.endpoint),endpoint,endpoint));
  columns.add(new PropertyColumnProtocolRecord, String(new
  ResourceModel(protocolRecord.endpointType),endpointType,endpointT
  ype)); columns.add(new PropertyColumnProtocolRecord, String(new
  ResourceModel(protocolRecord.messageStatus),messageStatus.descripti
  on,messageStatus.description));
 
 
  Mit freundlichen Grüßen
  Christoph Manig
  Systems Engineer
 
  T-Systems International GmbH
  Systems Integration - SC Travel, Transport

AW: AW: AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-24 Thread Christoph.Manig
But I user this columns in my Table:
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.retentionID), retentionId, retentionId));

And in my Browser the property Retention-ID will be loaded from this:
entry key=protocolRecord.retentionIDRetention-ID/entry

I can see the right String for this property. This Webpage is used on a VM with 
Red Hat 64 Bit could this be the problem?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 – 209
email:  christoph.ma...@t-systems.com


-Ursprüngliche Nachricht-
Von: Martin Grigorov [mailto:mgrigo...@apache.org]
Gesendet: Mittwoch, 24. April 2013 10:26
An: users@wicket.apache.org
Betreff: Re: AW: AW: DefaultDataTable will not render bottomtoolbar for export

Maybe the file is not used at all. I.e. doesn't load it for some reason.


On Wed, Apr 24, 2013 at 11:23 AM, christoph.ma...@t-systems.com wrote:

 Hello,

 I get this Exception
 2013-04-24 08:18:52,766 | ERROR | tp1448118192-654 |
 DefaultExceptionMapper   | ?   ? |
 269 - org.apache.wicket.core - 6.5.0 | Unexpected error occurred
 org.apache.wicket.WicketRuntimeException: Method onResourceRequested
 of interface org.apache.wicket.IResourceListener targeted at
 [ResourceLink [Component id = exportLink]] on component [ResourceLink
 [Component id = exportLink]] threw an exception
 at
 org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:268)[269:org.apache.wicket.core:6.5.0]
 at
 org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:216)[269:org.apache.wicket.core:6.5.0]
 at
 org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:240)[269:org.apache.wicket.core:6.5.0]
 at
 org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:226)[269:org.apache.wicket.core:6.5.0]
 at
 org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:840)[269:org.apache.wicket.core:6.5.0]
 at
 org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)[268:org.apache.wicket.request:6.5.0]
 at
 org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:254)[269:org.apache.wicket.core:6.5.0]
 at
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:211)[269:org.apache.wicket.core:6.5.0]
 at
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:282)[269:org.apache.wicket.core:6.5.0]
 at
 org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:244)[269:org.apache.wicket.core:6.5.0]
 at
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)[269:org.apache.wicket.core:6.5.0]
 at
 org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)[269:org.apache.wicket.core:6.5.0]
 at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:693)[95:org.apache.geronimo.specs.geronimo-servlet_2.5_spec:1.1.2]
 at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:806)[95:org.apache.geronimo.specs.geronimo-servlet_2.5_spec:1.1.2]
 at
 org.ops4j.pax.wicket.internal.FilterDelegator$Chain.doFilter(FilterDelegator.java:80)[274:org.ops4j.pax.wicket.service:2.1.0]
 at
 org.ops4j.pax.wicket.internal.FilterDelegator.doFilter(FilterDelegator.java:62)[274:org.ops4j.pax.wicket.service:2.1.0]
 at
 org.ops4j.pax.wicket.internal.ServletProxy$ServletInvocationHandler.invoke(ServletProxy.java:72)[274:org.ops4j.pax.wicket.service:2.1.0]
 at $Proxy67.service(Unknown
 Source)[274:org.ops4j.pax.wicket.service:2.1.0]
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
 Method)[:1.6.0_37]
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_37]
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_37]
 at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_37]
 at
 org.ops4j.pax.web.service.internal.HttpServiceStarted$1.invoke(HttpServiceStarted.java:182)[100:org.ops4j.pax.web.pax-web-runtime:1.1.9]
 at org.ops4j.pax.web.service.internal.$Proxy54.service(Unknown
 Source)[100:org.ops4j.pax.web.pax-web-runtime:1.1.9]
 at
 org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)[80:org.eclipse.jetty.servlet:7.6.7.v20120910]
 at
 org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:447)[80:org.eclipse.jetty.servlet:7.6.7.v20120910

Re: AW: AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-24 Thread Martin Grigorov
What is the full path of your properties.xml ?


On Wed, Apr 24, 2013 at 11:30 AM, christoph.ma...@t-systems.com wrote:

 But I user this columns in my Table:
 columns.add(new PropertyColumnProtocolRecord, String(new
 ResourceModel(protocolRecord.retentionID), retentionId, retentionId));

 And in my Browser the property Retention-ID will be loaded from this:
 entry key=protocolRecord.retentionIDRetention-ID/entry

 I can see the right String for this property. This Webpage is used on a VM
 with Red Hat 64 Bit could this be the problem?


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics
 Hoyerswerdaer Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 – 209
 email:  christoph.ma...@t-systems.com


 -Ursprüngliche Nachricht-
 Von: Martin Grigorov [mailto:mgrigo...@apache.org]
 Gesendet: Mittwoch, 24. April 2013 10:26
 An: users@wicket.apache.org
 Betreff: Re: AW: AW: DefaultDataTable will not render bottomtoolbar for
 export

 Maybe the file is not used at all. I.e. doesn't load it for some reason.


 On Wed, Apr 24, 2013 at 11:23 AM, christoph.ma...@t-systems.com wrote:

  Hello,
 
  I get this Exception
  2013-04-24 08:18:52,766 | ERROR | tp1448118192-654 |
  DefaultExceptionMapper   | ?   ?
 |
  269 - org.apache.wicket.core - 6.5.0 | Unexpected error occurred
  org.apache.wicket.WicketRuntimeException: Method onResourceRequested
  of interface org.apache.wicket.IResourceListener targeted at
  [ResourceLink [Component id = exportLink]] on component [ResourceLink
  [Component id = exportLink]] threw an exception
  at
 
 org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:268)[269:org.apache.wicket.core:6.5.0]
  at
 
 org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:216)[269:org.apache.wicket.core:6.5.0]
  at
 
 org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:240)[269:org.apache.wicket.core:6.5.0]
  at
 
 org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:226)[269:org.apache.wicket.core:6.5.0]
  at
 
 org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:840)[269:org.apache.wicket.core:6.5.0]
  at
 
 org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)[268:org.apache.wicket.request:6.5.0]
  at
 
 org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:254)[269:org.apache.wicket.core:6.5.0]
  at
 
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:211)[269:org.apache.wicket.core:6.5.0]
  at
 
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:282)[269:org.apache.wicket.core:6.5.0]
  at
 
 org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:244)[269:org.apache.wicket.core:6.5.0]
  at
 
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)[269:org.apache.wicket.core:6.5.0]
  at
 
 org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)[269:org.apache.wicket.core:6.5.0]
  at
 
 javax.servlet.http.HttpServlet.service(HttpServlet.java:693)[95:org.apache.geronimo.specs.geronimo-servlet_2.5_spec:1.1.2]
  at
 
 javax.servlet.http.HttpServlet.service(HttpServlet.java:806)[95:org.apache.geronimo.specs.geronimo-servlet_2.5_spec:1.1.2]
  at
 
 org.ops4j.pax.wicket.internal.FilterDelegator$Chain.doFilter(FilterDelegator.java:80)[274:org.ops4j.pax.wicket.service:2.1.0]
  at
 
 org.ops4j.pax.wicket.internal.FilterDelegator.doFilter(FilterDelegator.java:62)[274:org.ops4j.pax.wicket.service:2.1.0]
  at
 
 org.ops4j.pax.wicket.internal.ServletProxy$ServletInvocationHandler.invoke(ServletProxy.java:72)[274:org.ops4j.pax.wicket.service:2.1.0]
  at $Proxy67.service(Unknown
  Source)[274:org.ops4j.pax.wicket.service:2.1.0]
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
  Method)[:1.6.0_37]
  at
 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_37]
  at
 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_37]
  at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_37]
  at
 
 org.ops4j.pax.web.service.internal.HttpServiceStarted$1.invoke(HttpServiceStarted.java:182)[100:org.ops4j.pax.web.pax-web-runtime:1.1.9]
  at org.ops4j.pax.web.service.internal.$Proxy54.service(Unknown
  Source)[100:org.ops4j.pax.web.pax-web-runtime:1.1.9]
  at
 
 org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)[80:org.eclipse.jetty.servlet:7.6.7

AW: AW: AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-24 Thread Christoph.Manig
It is in the same package as the class

src/main/java/smw/console/frontend/protocol/ProtokollierungPage.properties.xml

The classname is ProtokollierungPage.java

Does the ResourceModel load this properties automatically? Why does it show the 
String from the properties at the Tablehead but throw an exception while 
exporting the data?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 – 209
email:  christoph.ma...@t-systems.com


-Ursprüngliche Nachricht-
Von: Martin Grigorov [mailto:mgrigo...@apache.org]
Gesendet: Mittwoch, 24. April 2013 10:33
An: users@wicket.apache.org
Betreff: Re: AW: AW: DefaultDataTable will not render bottomtoolbar for export

What is the full path of your properties.xml ?


On Wed, Apr 24, 2013 at 11:30 AM, christoph.ma...@t-systems.com wrote:

 But I user this columns in my Table:
 columns.add(new PropertyColumnProtocolRecord, String(new
 ResourceModel(protocolRecord.retentionID), retentionId,
 retentionId));

 And in my Browser the property Retention-ID will be loaded from this:
 entry key=protocolRecord.retentionIDRetention-ID/entry

 I can see the right String for this property. This Webpage is used on
 a VM with Red Hat 64 Bit could this be the problem?


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer
 Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 – 209
 email:  christoph.ma...@t-systems.com


 -Ursprüngliche Nachricht-
 Von: Martin Grigorov [mailto:mgrigo...@apache.org]
 Gesendet: Mittwoch, 24. April 2013 10:26
 An: users@wicket.apache.org
 Betreff: Re: AW: AW: DefaultDataTable will not render bottomtoolbar
 for export

 Maybe the file is not used at all. I.e. doesn't load it for some reason.


 On Wed, Apr 24, 2013 at 11:23 AM, christoph.ma...@t-systems.com wrote:

  Hello,
 
  I get this Exception
  2013-04-24 08:18:52,766 | ERROR | tp1448118192-654 |
  DefaultExceptionMapper   | ?   ?
 |
  269 - org.apache.wicket.core - 6.5.0 | Unexpected error occurred
  org.apache.wicket.WicketRuntimeException: Method onResourceRequested
  of interface org.apache.wicket.IResourceListener targeted at
  [ResourceLink [Component id = exportLink]] on component
  [ResourceLink [Component id = exportLink]] threw an exception
  at
 
 org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListe
 nerInterface.java:268)[269:org.apache.wicket.core:6.5.0]
  at
 
 org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInter
 face.java:216)[269:org.apache.wicket.core:6.5.0]
  at
 
 org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler
 .invokeListener(ListenerInterfaceRequestHandler.java:240)[269:org.apac
 he.wicket.core:6.5.0]
  at
 
 org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler
 .respond(ListenerInterfaceRequestHandler.java:226)[269:org.apache.wick
 et.core:6.5.0]
  at
 
 org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(R
 equestCycle.java:840)[269:org.apache.wicket.core:6.5.0]
  at
 
 org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerSt
 ack.java:64)[268:org.apache.wicket.request:6.5.0]
  at
 
 org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java
 :254)[269:org.apache.wicket.core:6.5.0]
  at
 
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCyc
 le.java:211)[269:org.apache.wicket.core:6.5.0]
  at
 
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(R
 equestCycle.java:282)[269:org.apache.wicket.core:6.5.0]
  at
 
 org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(Wicke
 tFilter.java:244)[269:org.apache.wicket.core:6.5.0]
  at
 
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilt
 er.java:188)[269:org.apache.wicket.core:6.5.0]
  at
 
 org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java
 :137)[269:org.apache.wicket.core:6.5.0]
  at
 
 javax.servlet.http.HttpServlet.service(HttpServlet.java:693)[95:org.ap
 ache.geronimo.specs.geronimo-servlet_2.5_spec:1.1.2]
  at
 
 javax.servlet.http.HttpServlet.service(HttpServlet.java:806)[95:org.ap
 ache.geronimo.specs.geronimo-servlet_2.5_spec:1.1.2]
  at
 
 org.ops4j.pax.wicket.internal.FilterDelegator$Chain.doFilter(FilterDel
 egator.java:80)[274:org.ops4j.pax.wicket.service:2.1.0]
  at
 
 org.ops4j.pax.wicket.internal.FilterDelegator.doFilter(FilterDelegator
 .java:62)[274:org.ops4j.pax.wicket.service:2.1.0]
  at
 
 org.ops4j.pax.wicket.internal.ServletProxy$ServletInvocationHandler.in
 voke(ServletProxy.java:72)[274

Re: AW: AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-24 Thread Martin Grigorov
Caused by: java.util.MissingResourceException: Unable to find property:
'protocolRecord.retentionID'. Locale: null, style: null
at org.apache.wicket.Localizer.getString(Localizer.java:237)[
269:org.apache.wicket.core:6.5.0]
at org.apache.wicket.Localizer.getString(Localizer.java:149)[
269:org.apache.wicket.core:6.5.0]
at org.apache.wicket.model.ResourceModel.getObject(
ResourceModel.java:76)[269:org.apache.wicket.core:6.5.0]
at org.apache.wicket.model.ResourceModel.getObject(
ResourceModel.java:33)[269:org.apache.wicket.core:6.5.0]
at org.apache.wicket.extensions.markup.html.repeater.data.
table.export.CSVDataExporter.exportData(CSVDataExporter.
java:198)[271:org.apache.wicket.extensions:6.5.0]
at org.apache.wicket.extensions.markup.html.repeater.data.
table.export.ExportToolbar$DataExportResourceStreamWriter
.exportData(ExportToolbar.java:343)[271:org.apache.wicket.extensions:6.5.0]
at org.apache.wicket.extensions.markup.html.repeater.data.
table.export.ExportToolbar$DataExportResourceStreamWriter
.write(ExportToolbar.java:298)[271:org.apache.wicket.extensions:6.5.0]
at org.apache.wicket.request.resource.ResourceStreamResource$1.
writeData(ResourceStreamResource.java:192)[269:org.apache.wicket.core:6.5.0]
at org.apache.wicket.request.resource.AbstractResource.
respond(AbstractResource.java:528)[269:org.apache.wicket.core:6.5.0]
at org.apache.wicket.markup.html.link.ResourceLink.
onResourceRequested(ResourceLink.java:115)[269:org.apache.wicket.core:6.5.0]
... 54 more

I.e. this is a request to a IResource, not a page.
Wicket doesn't know anything about the page that created the link to the
resource at this point.

Move your i18n stuff in MyApplication.properties.xml and it should work in
all cases.



On Wed, Apr 24, 2013 at 11:49 AM, christoph.ma...@t-systems.com wrote:

 It is in the same package as the class


 src/main/java/smw/console/frontend/protocol/ProtokollierungPage.properties.xml

 The classname is ProtokollierungPage.java

 Does the ResourceModel load this properties automatically? Why does it
 show the String from the properties at the Tablehead but throw an exception
 while exporting the data?


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics
 Hoyerswerdaer Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 – 209
 email:  christoph.ma...@t-systems.com


 -Ursprüngliche Nachricht-
 Von: Martin Grigorov [mailto:mgrigo...@apache.org]
 Gesendet: Mittwoch, 24. April 2013 10:33
 An: users@wicket.apache.org
 Betreff: Re: AW: AW: DefaultDataTable will not render bottomtoolbar for
 export

 What is the full path of your properties.xml ?


 On Wed, Apr 24, 2013 at 11:30 AM, christoph.ma...@t-systems.com wrote:

  But I user this columns in my Table:
  columns.add(new PropertyColumnProtocolRecord, String(new
  ResourceModel(protocolRecord.retentionID), retentionId,
  retentionId));
 
  And in my Browser the property Retention-ID will be loaded from this:
  entry key=protocolRecord.retentionIDRetention-ID/entry
 
  I can see the right String for this property. This Webpage is used on
  a VM with Red Hat 64 Bit could this be the problem?
 
 
  Mit freundlichen Grüßen
  Christoph Manig
  Systems Engineer
 
  T-Systems International GmbH
  Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer
  Str. 18
  01099 Dresden
  tel.:   +49 (0) 351 / 8152 - 188
  fax:+49 (0) 351 / 8152 – 209
  email:  christoph.ma...@t-systems.com
 
 
  -Ursprüngliche Nachricht-
  Von: Martin Grigorov [mailto:mgrigo...@apache.org]
  Gesendet: Mittwoch, 24. April 2013 10:26
  An: users@wicket.apache.org
  Betreff: Re: AW: AW: DefaultDataTable will not render bottomtoolbar
  for export
 
  Maybe the file is not used at all. I.e. doesn't load it for some reason.
 
 
  On Wed, Apr 24, 2013 at 11:23 AM, christoph.ma...@t-systems.com wrote:
 
   Hello,
  
   I get this Exception
   2013-04-24 08:18:52,766 | ERROR | tp1448118192-654 |
   DefaultExceptionMapper   | ?
 ?
  |
   269 - org.apache.wicket.core - 6.5.0 | Unexpected error occurred
   org.apache.wicket.WicketRuntimeException: Method onResourceRequested
   of interface org.apache.wicket.IResourceListener targeted at
   [ResourceLink [Component id = exportLink]] on component
   [ResourceLink [Component id = exportLink]] threw an exception
   at
  
  org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListe
  nerInterface.java:268)[269:org.apache.wicket.core:6.5.0]
   at
  
  org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInter
  face.java:216)[269:org.apache.wicket.core:6.5.0]
   at
  
  org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler
  .invokeListener(ListenerInterfaceRequestHandler.java:240)[269:org.apac
  he.wicket.core:6.5.0

AW: AW: AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-24 Thread Christoph.Manig
Is there another way to get this properties? Because there are properties for 
every page in my project.

In which package should this MyApplication.properties.xml be in?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 – 209
email:  christoph.ma...@t-systems.com


-Ursprüngliche Nachricht-
Von: Martin Grigorov [mailto:mgrigo...@apache.org]
Gesendet: Mittwoch, 24. April 2013 11:16
An: users@wicket.apache.org
Betreff: Re: AW: AW: DefaultDataTable will not render bottomtoolbar for export

Caused by: java.util.MissingResourceException: Unable to find property:
'protocolRecord.retentionID'. Locale: null, style: null
at org.apache.wicket.Localizer.getString(Localizer.java:237)[
269:org.apache.wicket.core:6.5.0]
at org.apache.wicket.Localizer.getString(Localizer.java:149)[
269:org.apache.wicket.core:6.5.0]
at org.apache.wicket.model.ResourceModel.getObject(
ResourceModel.java:76)[269:org.apache.wicket.core:6.5.0]
at org.apache.wicket.model.ResourceModel.getObject(
ResourceModel.java:33)[269:org.apache.wicket.core:6.5.0]
at org.apache.wicket.extensions.markup.html.repeater.data.
table.export.CSVDataExporter.exportData(CSVDataExporter.
java:198)[271:org.apache.wicket.extensions:6.5.0]
at org.apache.wicket.extensions.markup.html.repeater.data.
table.export.ExportToolbar$DataExportResourceStreamWriter
.exportData(ExportToolbar.java:343)[271:org.apache.wicket.extensions:6.5.0]
at org.apache.wicket.extensions.markup.html.repeater.data.
table.export.ExportToolbar$DataExportResourceStreamWriter
.write(ExportToolbar.java:298)[271:org.apache.wicket.extensions:6.5.0]
at org.apache.wicket.request.resource.ResourceStreamResource$1.
writeData(ResourceStreamResource.java:192)[269:org.apache.wicket.core:6.5.0]
at org.apache.wicket.request.resource.AbstractResource.
respond(AbstractResource.java:528)[269:org.apache.wicket.core:6.5.0]
at org.apache.wicket.markup.html.link.ResourceLink.
onResourceRequested(ResourceLink.java:115)[269:org.apache.wicket.core:6.5.0]
... 54 more

I.e. this is a request to a IResource, not a page.
Wicket doesn't know anything about the page that created the link to the 
resource at this point.

Move your i18n stuff in MyApplication.properties.xml and it should work in all 
cases.



On Wed, Apr 24, 2013 at 11:49 AM, christoph.ma...@t-systems.com wrote:

 It is in the same package as the class


 src/main/java/smw/console/frontend/protocol/ProtokollierungPage.proper
 ties.xml

 The classname is ProtokollierungPage.java

 Does the ResourceModel load this properties automatically? Why does it
 show the String from the properties at the Tablehead but throw an
 exception while exporting the data?


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer
 Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 – 209
 email:  christoph.ma...@t-systems.com


 -Ursprüngliche Nachricht-
 Von: Martin Grigorov [mailto:mgrigo...@apache.org]
 Gesendet: Mittwoch, 24. April 2013 10:33
 An: users@wicket.apache.org
 Betreff: Re: AW: AW: DefaultDataTable will not render bottomtoolbar
 for export

 What is the full path of your properties.xml ?


 On Wed, Apr 24, 2013 at 11:30 AM, christoph.ma...@t-systems.com wrote:

  But I user this columns in my Table:
  columns.add(new PropertyColumnProtocolRecord, String(new
  ResourceModel(protocolRecord.retentionID), retentionId,
  retentionId));
 
  And in my Browser the property Retention-ID will be loaded from this:
  entry key=protocolRecord.retentionIDRetention-ID/entry
 
  I can see the right String for this property. This Webpage is used
  on a VM with Red Hat 64 Bit could this be the problem?
 
 
  Mit freundlichen Grüßen
  Christoph Manig
  Systems Engineer
 
  T-Systems International GmbH
  Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer
  Str. 18
  01099 Dresden
  tel.:   +49 (0) 351 / 8152 - 188
  fax:+49 (0) 351 / 8152 – 209
  email:  christoph.ma...@t-systems.com
 
 
  -Ursprüngliche Nachricht-
  Von: Martin Grigorov [mailto:mgrigo...@apache.org]
  Gesendet: Mittwoch, 24. April 2013 10:26
  An: users@wicket.apache.org
  Betreff: Re: AW: AW: DefaultDataTable will not render bottomtoolbar
  for export
 
  Maybe the file is not used at all. I.e. doesn't load it for some reason.
 
 
  On Wed, Apr 24, 2013 at 11:23 AM, christoph.ma...@t-systems.com wrote:
 
   Hello,
  
   I get this Exception
   2013-04-24 08:18:52,766 | ERROR | tp1448118192-654 |
   DefaultExceptionMapper   | ?
 ?
  |
   269 - org.apache.wicket.core - 6.5.0 | Unexpected error occurred
   org.apache.wicket.WicketRuntimeException: Method

AW: AW: AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-24 Thread Christoph.Manig
I resolve the problem.

I use this new 
ResourceModel(protocolRecord.retentionID).wrapOnAssignment(getPage())


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 – 209
email:  christoph.ma...@t-systems.com


-Ursprüngliche Nachricht-
Von: Manig, Christoph
Gesendet: Mittwoch, 24. April 2013 11:22
An: users@wicket.apache.org
Betreff: AW: AW: AW: DefaultDataTable will not render bottomtoolbar for export

Is there another way to get this properties? Because there are properties for 
every page in my project.

In which package should this MyApplication.properties.xml be in?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 – 209
email:  christoph.ma...@t-systems.com


-Ursprüngliche Nachricht-
Von: Martin Grigorov [mailto:mgrigo...@apache.org]
Gesendet: Mittwoch, 24. April 2013 11:16
An: users@wicket.apache.org
Betreff: Re: AW: AW: DefaultDataTable will not render bottomtoolbar for export

Caused by: java.util.MissingResourceException: Unable to find property:
'protocolRecord.retentionID'. Locale: null, style: null
at org.apache.wicket.Localizer.getString(Localizer.java:237)[
269:org.apache.wicket.core:6.5.0]
at org.apache.wicket.Localizer.getString(Localizer.java:149)[
269:org.apache.wicket.core:6.5.0]
at org.apache.wicket.model.ResourceModel.getObject(
ResourceModel.java:76)[269:org.apache.wicket.core:6.5.0]
at org.apache.wicket.model.ResourceModel.getObject(
ResourceModel.java:33)[269:org.apache.wicket.core:6.5.0]
at org.apache.wicket.extensions.markup.html.repeater.data.
table.export.CSVDataExporter.exportData(CSVDataExporter.
java:198)[271:org.apache.wicket.extensions:6.5.0]
at org.apache.wicket.extensions.markup.html.repeater.data.
table.export.ExportToolbar$DataExportResourceStreamWriter
.exportData(ExportToolbar.java:343)[271:org.apache.wicket.extensions:6.5.0]
at org.apache.wicket.extensions.markup.html.repeater.data.
table.export.ExportToolbar$DataExportResourceStreamWriter
.write(ExportToolbar.java:298)[271:org.apache.wicket.extensions:6.5.0]
at org.apache.wicket.request.resource.ResourceStreamResource$1.
writeData(ResourceStreamResource.java:192)[269:org.apache.wicket.core:6.5.0]
at org.apache.wicket.request.resource.AbstractResource.
respond(AbstractResource.java:528)[269:org.apache.wicket.core:6.5.0]
at org.apache.wicket.markup.html.link.ResourceLink.
onResourceRequested(ResourceLink.java:115)[269:org.apache.wicket.core:6.5.0]
... 54 more

I.e. this is a request to a IResource, not a page.
Wicket doesn't know anything about the page that created the link to the 
resource at this point.

Move your i18n stuff in MyApplication.properties.xml and it should work in all 
cases.



On Wed, Apr 24, 2013 at 11:49 AM, christoph.ma...@t-systems.com wrote:

 It is in the same package as the class


 src/main/java/smw/console/frontend/protocol/ProtokollierungPage.proper
 ties.xml

 The classname is ProtokollierungPage.java

 Does the ResourceModel load this properties automatically? Why does it
 show the String from the properties at the Tablehead but throw an
 exception while exporting the data?


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer
 Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 – 209
 email:  christoph.ma...@t-systems.com


 -Ursprüngliche Nachricht-
 Von: Martin Grigorov [mailto:mgrigo...@apache.org]
 Gesendet: Mittwoch, 24. April 2013 10:33
 An: users@wicket.apache.org
 Betreff: Re: AW: AW: DefaultDataTable will not render bottomtoolbar
 for export

 What is the full path of your properties.xml ?


 On Wed, Apr 24, 2013 at 11:30 AM, christoph.ma...@t-systems.com wrote:

  But I user this columns in my Table:
  columns.add(new PropertyColumnProtocolRecord, String(new
  ResourceModel(protocolRecord.retentionID), retentionId,
  retentionId));
 
  And in my Browser the property Retention-ID will be loaded from this:
  entry key=protocolRecord.retentionIDRetention-ID/entry
 
  I can see the right String for this property. This Webpage is used
  on a VM with Red Hat 64 Bit could this be the problem?
 
 
  Mit freundlichen Grüßen
  Christoph Manig
  Systems Engineer
 
  T-Systems International GmbH
  Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer
  Str. 18
  01099 Dresden
  tel.:   +49 (0) 351 / 8152 - 188
  fax:+49 (0) 351 / 8152 – 209
  email:  christoph.ma...@t-systems.com
 
 
  -Ursprüngliche Nachricht-
  Von: Martin Grigorov

Re: AW: AW: AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-24 Thread Jesse Long

Hi Christoph,

Nice solution. Does your CSV export work now? Do you know about the new 
exporters in wicketstuff-poi v6.7.0?


Thanks,
Jesse

On 24/04/2013 11:50, christoph.ma...@t-systems.com wrote:

I resolve the problem.

I use this new 
ResourceModel(protocolRecord.retentionID).wrapOnAssignment(getPage())


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 – 209
email:  christoph.ma...@t-systems.com


-Ursprüngliche Nachricht-
Von: Manig, Christoph
Gesendet: Mittwoch, 24. April 2013 11:22
An: users@wicket.apache.org
Betreff: AW: AW: AW: DefaultDataTable will not render bottomtoolbar for export

Is there another way to get this properties? Because there are properties for 
every page in my project.

In which package should this MyApplication.properties.xml be in?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 – 209
email:  christoph.ma...@t-systems.com


-Ursprüngliche Nachricht-
Von: Martin Grigorov [mailto:mgrigo...@apache.org]
Gesendet: Mittwoch, 24. April 2013 11:16
An: users@wicket.apache.org
Betreff: Re: AW: AW: DefaultDataTable will not render bottomtoolbar for export

Caused by: java.util.MissingResourceException: Unable to find property:
'protocolRecord.retentionID'. Locale: null, style: null
 at org.apache.wicket.Localizer.getString(Localizer.java:237)[
269:org.apache.wicket.core:6.5.0]
 at org.apache.wicket.Localizer.getString(Localizer.java:149)[
269:org.apache.wicket.core:6.5.0]
 at org.apache.wicket.model.ResourceModel.getObject(
ResourceModel.java:76)[269:org.apache.wicket.core:6.5.0]
 at org.apache.wicket.model.ResourceModel.getObject(
ResourceModel.java:33)[269:org.apache.wicket.core:6.5.0]
 at org.apache.wicket.extensions.markup.html.repeater.data.
table.export.CSVDataExporter.exportData(CSVDataExporter.
java:198)[271:org.apache.wicket.extensions:6.5.0]
 at org.apache.wicket.extensions.markup.html.repeater.data.
table.export.ExportToolbar$DataExportResourceStreamWriter
.exportData(ExportToolbar.java:343)[271:org.apache.wicket.extensions:6.5.0]
 at org.apache.wicket.extensions.markup.html.repeater.data.
table.export.ExportToolbar$DataExportResourceStreamWriter
.write(ExportToolbar.java:298)[271:org.apache.wicket.extensions:6.5.0]
 at org.apache.wicket.request.resource.ResourceStreamResource$1.
writeData(ResourceStreamResource.java:192)[269:org.apache.wicket.core:6.5.0]
 at org.apache.wicket.request.resource.AbstractResource.
respond(AbstractResource.java:528)[269:org.apache.wicket.core:6.5.0]
 at org.apache.wicket.markup.html.link.ResourceLink.
onResourceRequested(ResourceLink.java:115)[269:org.apache.wicket.core:6.5.0]
 ... 54 more

I.e. this is a request to a IResource, not a page.
Wicket doesn't know anything about the page that created the link to the 
resource at this point.

Move your i18n stuff in MyApplication.properties.xml and it should work in all 
cases.



On Wed, Apr 24, 2013 at 11:49 AM, christoph.ma...@t-systems.com wrote:


It is in the same package as the class


src/main/java/smw/console/frontend/protocol/ProtokollierungPage.proper
ties.xml

The classname is ProtokollierungPage.java

Does the ResourceModel load this properties automatically? Why does it
show the String from the properties at the Tablehead but throw an
exception while exporting the data?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer
Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 – 209
email:  christoph.ma...@t-systems.com


-Ursprüngliche Nachricht-
Von: Martin Grigorov [mailto:mgrigo...@apache.org]
Gesendet: Mittwoch, 24. April 2013 10:33
An: users@wicket.apache.org
Betreff: Re: AW: AW: DefaultDataTable will not render bottomtoolbar
for export

What is the full path of your properties.xml ?


On Wed, Apr 24, 2013 at 11:30 AM, christoph.ma...@t-systems.com wrote:


But I user this columns in my Table:
columns.add(new PropertyColumnProtocolRecord, String(new
ResourceModel(protocolRecord.retentionID), retentionId,
retentionId));

And in my Browser the property Retention-ID will be loaded from this:
entry key=protocolRecord.retentionIDRetention-ID/entry

I can see the right String for this property. This Webpage is used
on a VM with Red Hat 64 Bit could this be the problem?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer
Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152

AW: AW: AW: AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-24 Thread Christoph.Manig
Hello,

yes the csv-export is working now. No I didn't know about the new exporters. At 
the moment I don't need another exporter. Thank you for your help.


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 – 209
email:  christoph.ma...@t-systems.com


-Ursprüngliche Nachricht-
Von: Jesse Long [mailto:j...@unknown.za.net]
Gesendet: Mittwoch, 24. April 2013 12:37
An: users@wicket.apache.org
Betreff: Re: AW: AW: AW: DefaultDataTable will not render bottomtoolbar for 
export

Hi Christoph,

Nice solution. Does your CSV export work now? Do you know about the new 
exporters in wicketstuff-poi v6.7.0?

Thanks,
Jesse

On 24/04/2013 11:50, christoph.ma...@t-systems.com wrote:
 I resolve the problem.

 I use this new
 ResourceModel(protocolRecord.retentionID).wrapOnAssignment(getPage()
 )


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer
 Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 – 209
 email:  christoph.ma...@t-systems.com


 -Ursprüngliche Nachricht-
 Von: Manig, Christoph
 Gesendet: Mittwoch, 24. April 2013 11:22
 An: users@wicket.apache.org
 Betreff: AW: AW: AW: DefaultDataTable will not render bottomtoolbar
 for export

 Is there another way to get this properties? Because there are properties for 
 every page in my project.

 In which package should this MyApplication.properties.xml be in?


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer
 Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 – 209
 email:  christoph.ma...@t-systems.com


 -Ursprüngliche Nachricht-
 Von: Martin Grigorov [mailto:mgrigo...@apache.org]
 Gesendet: Mittwoch, 24. April 2013 11:16
 An: users@wicket.apache.org
 Betreff: Re: AW: AW: DefaultDataTable will not render bottomtoolbar
 for export

 Caused by: java.util.MissingResourceException: Unable to find property:
 'protocolRecord.retentionID'. Locale: null, style: null
  at org.apache.wicket.Localizer.getString(Localizer.java:237)[
 269:org.apache.wicket.core:6.5.0]
  at org.apache.wicket.Localizer.getString(Localizer.java:149)[
 269:org.apache.wicket.core:6.5.0]
  at org.apache.wicket.model.ResourceModel.getObject(
 ResourceModel.java:76)[269:org.apache.wicket.core:6.5.0]
  at org.apache.wicket.model.ResourceModel.getObject(
 ResourceModel.java:33)[269:org.apache.wicket.core:6.5.0]
  at org.apache.wicket.extensions.markup.html.repeater.data.
 table.export.CSVDataExporter.exportData(CSVDataExporter.
 java:198)[271:org.apache.wicket.extensions:6.5.0]
  at org.apache.wicket.extensions.markup.html.repeater.data.
 table.export.ExportToolbar$DataExportResourceStreamWriter
 .exportData(ExportToolbar.java:343)[271:org.apache.wicket.extensions:6.5.0]
  at org.apache.wicket.extensions.markup.html.repeater.data.
 table.export.ExportToolbar$DataExportResourceStreamWriter
 .write(ExportToolbar.java:298)[271:org.apache.wicket.extensions:6.5.0]
  at org.apache.wicket.request.resource.ResourceStreamResource$1.
 writeData(ResourceStreamResource.java:192)[269:org.apache.wicket.core:6.5.0]
  at org.apache.wicket.request.resource.AbstractResource.
 respond(AbstractResource.java:528)[269:org.apache.wicket.core:6.5.0]
  at org.apache.wicket.markup.html.link.ResourceLink.
 onResourceRequested(ResourceLink.java:115)[269:org.apache.wicket.core:6.5.0]
  ... 54 more

 I.e. this is a request to a IResource, not a page.
 Wicket doesn't know anything about the page that created the link to the 
 resource at this point.

 Move your i18n stuff in MyApplication.properties.xml and it should work in 
 all cases.



 On Wed, Apr 24, 2013 at 11:49 AM, christoph.ma...@t-systems.com wrote:

 It is in the same package as the class


 src/main/java/smw/console/frontend/protocol/ProtokollierungPage.prope
 r
 ties.xml

 The classname is ProtokollierungPage.java

 Does the ResourceModel load this properties automatically? Why does
 it show the String from the properties at the Tablehead but throw an
 exception while exporting the data?


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer
 Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 – 209
 email:  christoph.ma...@t-systems.com


 -Ursprüngliche Nachricht-
 Von: Martin Grigorov [mailto:mgrigo...@apache.org]
 Gesendet: Mittwoch, 24. April 2013 10:33
 An: users@wicket.apache.org
 Betreff: Re: AW: AW: DefaultDataTable will not render

DefaultDataTable will not render bottomtoolbar for export

2013-04-23 Thread Christoph.Manig
Hello,

I have a Problem with the DefaultDataTable and the Export csv. Here is my code:

DefaultDataTableProtocolSearchData,String searchTable = new 
DefaultDataTableProtocolSearchData, String(searchTable,getTableHead(),new 
ProtocolDataSortDataProvider(Collections.EMPTY_LIST),10);
searchTable.addBottomToolbar(new ExportToolbar(searchTable,new 
ModelString(Export to),new ModelString(export)).addDataExporter(new 
CSVDataExporter()));
searchTable.setOutputMarkupId(true);

add(searchTable);

This table will be replaced by submitting an AjaxFallbackButton, so that the 
DataProvider gets an list with some data and not an empty list. My Problem is 
that the bottomtoolbar for exporting a csv ist not rendered. The 
no-records-found toolbar will be rendered.

What is the problem here? Can anyone please help me?



Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com





Re: DefaultDataTable will not render bottomtoolbar for export

2013-04-23 Thread Sven Meier

Show us your #onSubmit(ART) ... formatted please.

Sven

On 04/23/2013 02:54 PM, christoph.ma...@t-systems.com wrote:

Hello,

I have a Problem with the DefaultDataTable and the Export csv. Here is my code:

DefaultDataTableProtocolSearchData,String searchTable = new 
DefaultDataTableProtocolSearchData, String(searchTable,getTableHead(),new 
ProtocolDataSortDataProvider(Collections.EMPTY_LIST),10);
searchTable.addBottomToolbar(new ExportToolbar(searchTable,new ModelString(Export to),new 
ModelString(export)).addDataExporter(new CSVDataExporter()));
searchTable.setOutputMarkupId(true);

add(searchTable);

This table will be replaced by submitting an AjaxFallbackButton, so that the 
DataProvider gets an list with some data and not an empty list. My Problem is 
that the bottomtoolbar for exporting a csv ist not rendered. The 
no-records-found toolbar will be rendered.

What is the problem here? Can anyone please help me?



Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com







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



AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-23 Thread Christoph.Manig
Hello,

here is the code of onSubmit method of the AjaxFallbackButton.

FormFilterCreatorProtocol protocollSearchForm = new 
FormFilterCreatorProtocol(protokollierungSucheForm, new 
CompoundPropertyModelFilterCreatorProtocol(new FilterCreatorProtocol()));
protocollSearchForm.add(new 
AjaxFallbackButton(submit,protocollSearchForm) {

@Override
public void onSubmit(AjaxRequestTarget target, Form form) {
target.add(feedback);
FilterCreatorProtocol filter = 
(FilterCreatorProtocol)form.getModelObject();

if(ConsoleDataHandlerImpl.getInstance().queryProtocolRowsByFilter(filter) = 
MAX_SEARCH_RESULTS){
ListProtocolRecord protocolData = 
ConsoleDataHandlerImpl.getInstance().queryProtocolDataWithSearchFilter(filter);

target.add(ProtokollierungPage.this.get(searchTable).replaceWith(
new 
DefaultDataTableProtocolRecord,String(searchTable,
getTableHead(),
new 
ProtocolDataSortDataProvider(protocolData),
100)));
}else{
error(ErrorMessage);
}


}
}) ;

Do you need some other informations?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden 
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com

-Ursprüngliche Nachricht-
Von: Sven Meier [mailto:s...@meiers.net] 
Gesendet: Dienstag, 23. April 2013 15:16
An: users@wicket.apache.org
Betreff: Re: DefaultDataTable will not render bottomtoolbar for export

Show us your #onSubmit(ART) ... formatted please.

Sven

On 04/23/2013 02:54 PM, christoph.ma...@t-systems.com wrote:
 Hello,

 I have a Problem with the DefaultDataTable and the Export csv. Here is my 
 code:

 DefaultDataTableProtocolSearchData,String searchTable = new 
 DefaultDataTableProtocolSearchData, 
 String(searchTable,getTableHead(),new 
 ProtocolDataSortDataProvider(Collections.EMPTY_LIST),10);
 searchTable.addBottomToolbar(new ExportToolbar(searchTable,new 
 ModelString(Export to),new 
 ModelString(export)).addDataExporter(new CSVDataExporter())); 
 searchTable.setOutputMarkupId(true);

 add(searchTable);

 This table will be replaced by submitting an AjaxFallbackButton, so that the 
 DataProvider gets an list with some data and not an empty list. My Problem is 
 that the bottomtoolbar for exporting a csv ist not rendered. The 
 no-records-found toolbar will be rendered.

 What is the problem here? Can anyone please help me?



 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer 
 Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 - 209
 email:  christoph.ma...@t-systems.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: DefaultDataTable will not render bottomtoolbar for export

2013-04-23 Thread Jesse Long

Hi Christoph,

ExportToolbar#isVisible() is not visible in any of these conditions:

* There are no rows displayed (this is your case)
* There are no data exporters (this is not your case)
* There are no exportable columns (I dont know if this is your case)

If you want the export toolbar to be visible when there are no rows, 
please overload ExportToolbar#isVisible(), or file a Jira issue if you 
want that configurable.


Thanks,
Jesse


On 23/04/2013 14:54, christoph.ma...@t-systems.com wrote:

Hello,

I have a Problem with the DefaultDataTable and the Export csv. Here is my code:

DefaultDataTableProtocolSearchData,String searchTable = new 
DefaultDataTableProtocolSearchData, String(searchTable,getTableHead(),new 
ProtocolDataSortDataProvider(Collections.EMPTY_LIST),10);
searchTable.addBottomToolbar(new ExportToolbar(searchTable,new ModelString(Export to),new 
ModelString(export)).addDataExporter(new CSVDataExporter()));
searchTable.setOutputMarkupId(true);

add(searchTable);

This table will be replaced by submitting an AjaxFallbackButton, so that the 
DataProvider gets an list with some data and not an empty list. My Problem is 
that the bottomtoolbar for exporting a csv ist not rendered. The 
no-records-found toolbar will be rendered.

What is the problem here? Can anyone please help me?



Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com







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



Re: AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-23 Thread Sven Meier

Your replaced DataTable doesn't have a bottomtoolbar:


target.add(ProtokollierungPage.this.get(searchTable).replaceWith(
new 
DefaultDataTableProtocolRecord,String(searchTable,
getTableHead(),
new 
ProtocolDataSortDataProvider(protocolData),
100)));


Sven


On 04/23/2013 03:29 PM, christoph.ma...@t-systems.com wrote:

Hello,

here is the code of onSubmit method of the AjaxFallbackButton.

FormFilterCreatorProtocol protocollSearchForm = new 
FormFilterCreatorProtocol(protokollierungSucheForm, new 
CompoundPropertyModelFilterCreatorProtocol(new FilterCreatorProtocol()));
 protocollSearchForm.add(new 
AjaxFallbackButton(submit,protocollSearchForm) {

 @Override
 public void onSubmit(AjaxRequestTarget target, Form form) {
 target.add(feedback);
 FilterCreatorProtocol filter = 
(FilterCreatorProtocol)form.getModelObject();
 
if(ConsoleDataHandlerImpl.getInstance().queryProtocolRowsByFilter(filter) = 
MAX_SEARCH_RESULTS){
 ListProtocolRecord protocolData = 
ConsoleDataHandlerImpl.getInstance().queryProtocolDataWithSearchFilter(filter);
 
target.add(ProtokollierungPage.this.get(searchTable).replaceWith(
 new 
DefaultDataTableProtocolRecord,String(searchTable,
 getTableHead(),
 new 
ProtocolDataSortDataProvider(protocolData),
 100)));
 }else{
 error(ErrorMessage);
 }


 }
 }) ;

Do you need some other informations?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com

-Ursprüngliche Nachricht-
Von: Sven Meier [mailto:s...@meiers.net]
Gesendet: Dienstag, 23. April 2013 15:16
An: users@wicket.apache.org
Betreff: Re: DefaultDataTable will not render bottomtoolbar for export

Show us your #onSubmit(ART) ... formatted please.

Sven

On 04/23/2013 02:54 PM, christoph.ma...@t-systems.com wrote:

Hello,

I have a Problem with the DefaultDataTable and the Export csv. Here is my code:

DefaultDataTableProtocolSearchData,String searchTable = new
DefaultDataTableProtocolSearchData,
String(searchTable,getTableHead(),new
ProtocolDataSortDataProvider(Collections.EMPTY_LIST),10);
searchTable.addBottomToolbar(new ExportToolbar(searchTable,new
ModelString(Export to),new
ModelString(export)).addDataExporter(new CSVDataExporter()));
searchTable.setOutputMarkupId(true);

add(searchTable);

This table will be replaced by submitting an AjaxFallbackButton, so that the 
DataProvider gets an list with some data and not an empty list. My Problem is 
that the bottomtoolbar for exporting a csv ist not rendered. The 
no-records-found toolbar will be rendered.

What is the problem here? Can anyone please help me?



Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer
Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.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




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



AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-23 Thread Christoph.Manig
Ok. Thanks for your answer.

Here are my columns:
ListIColumnProtocolRecord,String columns = new 
ArrayListIColumnProtocolRecord,String();
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.retentionID), retentionId, retentionId));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.protocolID), protocolId, protocolId){
@Override
public void populateItem(ItemICellPopulatorProtocolRecord 
cellItem, String componentId, IModelProtocolRecord model)
{
cellItem.add(new ActionPanel(componentId, model));
}
});
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.externalID), externalId, externalId));
columns.add(new DatePropertyColumn(new 
ResourceModel(protocolRecord.eventTimestamp),eventTimestamp,eventTimestamp,dd.MM.
 HH:mm:ss));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.integrationService),integrationService,integrationService));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.endpoint),endpoint,endpoint));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.endpointType),endpointType,endpointType));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.messageStatus),messageStatus.description,messageStatus.description));

How can I make them exportable? What are exportable columns in Wicket?

At first the dataTable is empty, so the BottomToolbar shouldn't be rendered. 
That's right. But when it is replaced by an Ajaxbutton and there is some data 
in the dataTable the Bottomtoolbar isn't rendered.Why? Because of the 
non-exportable columns?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden 
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com


-Ursprüngliche Nachricht-
Von: Jesse Long [mailto:j...@unknown.za.net] 
Gesendet: Dienstag, 23. April 2013 15:43
An: users@wicket.apache.org
Betreff: Re: DefaultDataTable will not render bottomtoolbar for export

Hi Christoph,

ExportToolbar#isVisible() is not visible in any of these conditions:

* There are no rows displayed (this is your case)
* There are no data exporters (this is not your case)
* There are no exportable columns (I dont know if this is your case)

If you want the export toolbar to be visible when there are no rows, please 
overload ExportToolbar#isVisible(), or file a Jira issue if you want that 
configurable.

Thanks,
Jesse


On 23/04/2013 14:54, christoph.ma...@t-systems.com wrote:
 Hello,

 I have a Problem with the DefaultDataTable and the Export csv. Here is my 
 code:

 DefaultDataTableProtocolSearchData,String searchTable = new 
 DefaultDataTableProtocolSearchData, 
 String(searchTable,getTableHead(),new 
 ProtocolDataSortDataProvider(Collections.EMPTY_LIST),10);
 searchTable.addBottomToolbar(new ExportToolbar(searchTable,new 
 ModelString(Export to),new 
 ModelString(export)).addDataExporter(new CSVDataExporter())); 
 searchTable.setOutputMarkupId(true);

 add(searchTable);

 This table will be replaced by submitting an AjaxFallbackButton, so that the 
 DataProvider gets an list with some data and not an empty list. My Problem is 
 that the bottomtoolbar for exporting a csv ist not rendered. The 
 no-records-found toolbar will be rendered.

 What is the problem here? Can anyone please help me?



 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer 
 Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 - 209
 email:  christoph.ma...@t-systems.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



AW: AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-23 Thread Christoph.Manig
But I added the Toolbar at the initial call oft he Webpage. Then I can submit 
the AjaxButton and some data is in the table. Why should I add the 
bottomtoolbar again? The no-record-found-toolbar will be rendered after the 
Ajaxcall. Why not the Exporttoolbar?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden 
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com


-Ursprüngliche Nachricht-
Von: Sven Meier [mailto:s...@meiers.net] 
Gesendet: Dienstag, 23. April 2013 15:44
An: users@wicket.apache.org
Betreff: Re: AW: DefaultDataTable will not render bottomtoolbar for export

Your replaced DataTable doesn't have a bottomtoolbar:

 
target.add(ProtokollierungPage.this.get(searchTable).replaceWith(
 new 
DefaultDataTableProtocolRecord,String(searchTable,
 getTableHead(),
 new 
ProtocolDataSortDataProvider(protocolData),
 100)));


Sven


On 04/23/2013 03:29 PM, christoph.ma...@t-systems.com wrote:
 Hello,

 here is the code of onSubmit method of the AjaxFallbackButton.

 FormFilterCreatorProtocol protocollSearchForm = new 
 FormFilterCreatorProtocol(protokollierungSucheForm, new 
 CompoundPropertyModelFilterCreatorProtocol(new FilterCreatorProtocol()));
  protocollSearchForm.add(new 
 AjaxFallbackButton(submit,protocollSearchForm) {

  @Override
  public void onSubmit(AjaxRequestTarget target, Form form) {
  target.add(feedback);
  FilterCreatorProtocol filter = 
 (FilterCreatorProtocol)form.getModelObject();
  
 if(ConsoleDataHandlerImpl.getInstance().queryProtocolRowsByFilter(filter) = 
 MAX_SEARCH_RESULTS){
  ListProtocolRecord protocolData = 
 ConsoleDataHandlerImpl.getInstance().queryProtocolDataWithSearchFilter(filter);
  
 target.add(ProtokollierungPage.this.get(searchTable).replaceWith(
  new 
 DefaultDataTableProtocolRecord,String(searchTable,
  getTableHead(),
  new 
 ProtocolDataSortDataProvider(protocolData),
  100)));
  }else{
  error(ErrorMessage);
  }


  }
  }) ;

 Do you need some other informations?


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer 
 Str. 18
 01099 Dresden
 tel.: +49 (0) 351 / 8152 - 188
 fax:  +49 (0) 351 / 8152 - 209
 email:  christoph.ma...@t-systems.com

 -Ursprüngliche Nachricht-
 Von: Sven Meier [mailto:s...@meiers.net]
 Gesendet: Dienstag, 23. April 2013 15:16
 An: users@wicket.apache.org
 Betreff: Re: DefaultDataTable will not render bottomtoolbar for export

 Show us your #onSubmit(ART) ... formatted please.

 Sven

 On 04/23/2013 02:54 PM, christoph.ma...@t-systems.com wrote:
 Hello,

 I have a Problem with the DefaultDataTable and the Export csv. Here is my 
 code:

 DefaultDataTableProtocolSearchData,String searchTable = new 
 DefaultDataTableProtocolSearchData,
 String(searchTable,getTableHead(),new
 ProtocolDataSortDataProvider(Collections.EMPTY_LIST),10);
 searchTable.addBottomToolbar(new ExportToolbar(searchTable,new 
 ModelString(Export to),new 
 ModelString(export)).addDataExporter(new CSVDataExporter())); 
 searchTable.setOutputMarkupId(true);

 add(searchTable);

 This table will be replaced by submitting an AjaxFallbackButton, so that the 
 DataProvider gets an list with some data and not an empty list. My Problem 
 is that the bottomtoolbar for exporting a csv ist not rendered. The 
 no-records-found toolbar will be rendered.

 What is the problem here? Can anyone please help me?



 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer 
 Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 - 209
 email:  christoph.ma...@t-systems.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



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

Re: AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-23 Thread Jesse Long

Hi Christoph,

PropertyColumns are already exportable. Exportable means implements 
IExportableColumn.


Sven identified that the replaced data table does not have the export 
toolbar added to it. This is why it does not display after being replaced.


Cheers,
Jesse

On 23/04/2013 15:49, christoph.ma...@t-systems.com wrote:

Ok. Thanks for your answer.

Here are my columns:
ListIColumnProtocolRecord,String columns = new 
ArrayListIColumnProtocolRecord,String();
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.retentionID), retentionId, retentionId));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.protocolID), protocolId, protocolId){
 @Override
 public void populateItem(ItemICellPopulatorProtocolRecord cellItem, 
String componentId, IModelProtocolRecord model)
 {
 cellItem.add(new ActionPanel(componentId, model));
 }
 });
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.externalID), externalId, externalId));
columns.add(new DatePropertyColumn(new 
ResourceModel(protocolRecord.eventTimestamp),eventTimestamp,eventTimestamp,dd.MM.
 HH:mm:ss));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.integrationService),integrationService,integrationService));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.endpoint),endpoint,endpoint));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.endpointType),endpointType,endpointType));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.messageStatus),messageStatus.description,messageStatus.description));

How can I make them exportable? What are exportable columns in Wicket?

At first the dataTable is empty, so the BottomToolbar shouldn't be rendered. 
That's right. But when it is replaced by an Ajaxbutton and there is some data 
in the dataTable the Bottomtoolbar isn't rendered.Why? Because of the 
non-exportable columns?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com


-Ursprüngliche Nachricht-
Von: Jesse Long [mailto:j...@unknown.za.net]
Gesendet: Dienstag, 23. April 2013 15:43
An: users@wicket.apache.org
Betreff: Re: DefaultDataTable will not render bottomtoolbar for export

Hi Christoph,

ExportToolbar#isVisible() is not visible in any of these conditions:

* There are no rows displayed (this is your case)
* There are no data exporters (this is not your case)
* There are no exportable columns (I dont know if this is your case)

If you want the export toolbar to be visible when there are no rows, please 
overload ExportToolbar#isVisible(), or file a Jira issue if you want that 
configurable.

Thanks,
Jesse


On 23/04/2013 14:54, christoph.ma...@t-systems.com wrote:

Hello,

I have a Problem with the DefaultDataTable and the Export csv. Here is my code:

DefaultDataTableProtocolSearchData,String searchTable = new
DefaultDataTableProtocolSearchData,
String(searchTable,getTableHead(),new
ProtocolDataSortDataProvider(Collections.EMPTY_LIST),10);
searchTable.addBottomToolbar(new ExportToolbar(searchTable,new
ModelString(Export to),new
ModelString(export)).addDataExporter(new CSVDataExporter()));
searchTable.setOutputMarkupId(true);

add(searchTable);

This table will be replaced by submitting an AjaxFallbackButton, so that the 
DataProvider gets an list with some data and not an empty list. My Problem is 
that the bottomtoolbar for exporting a csv ist not rendered. The 
no-records-found toolbar will be rendered.

What is the problem here? Can anyone please help me?



Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer
Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.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





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



Re: AW: AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-23 Thread Jesse Long
Because you replaced the data table to which the export toolbar was 
added with another data table, which has no export toolbar. A data table 
without an export toolbar will not render an export toolbar. If you want 
the export toolbar to render, you must add it to the data table being 
rendered.


On 23/04/2013 15:52, christoph.ma...@t-systems.com wrote:

But I added the Toolbar at the initial call oft he Webpage. Then I can submit 
the AjaxButton and some data is in the table. Why should I add the 
bottomtoolbar again? The no-record-found-toolbar will be rendered after the 
Ajaxcall. Why not the Exporttoolbar?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com


-Ursprüngliche Nachricht-
Von: Sven Meier [mailto:s...@meiers.net]
Gesendet: Dienstag, 23. April 2013 15:44
An: users@wicket.apache.org
Betreff: Re: AW: DefaultDataTable will not render bottomtoolbar for export

Your replaced DataTable doesn't have a bottomtoolbar:

  
target.add(ProtokollierungPage.this.get(searchTable).replaceWith(
  new 
DefaultDataTableProtocolRecord,String(searchTable,
  getTableHead(),
  new 
ProtocolDataSortDataProvider(protocolData),
  100)));


Sven


On 04/23/2013 03:29 PM, christoph.ma...@t-systems.com wrote:

Hello,

here is the code of onSubmit method of the AjaxFallbackButton.

FormFilterCreatorProtocol protocollSearchForm = new 
FormFilterCreatorProtocol(protokollierungSucheForm, new 
CompoundPropertyModelFilterCreatorProtocol(new FilterCreatorProtocol()));
  protocollSearchForm.add(new
AjaxFallbackButton(submit,protocollSearchForm) {

  @Override
  public void onSubmit(AjaxRequestTarget target, Form form) {
  target.add(feedback);
  FilterCreatorProtocol filter = 
(FilterCreatorProtocol)form.getModelObject();
  
if(ConsoleDataHandlerImpl.getInstance().queryProtocolRowsByFilter(filter) = 
MAX_SEARCH_RESULTS){
  ListProtocolRecord protocolData = 
ConsoleDataHandlerImpl.getInstance().queryProtocolDataWithSearchFilter(filter);
  
target.add(ProtokollierungPage.this.get(searchTable).replaceWith(
  new 
DefaultDataTableProtocolRecord,String(searchTable,
  getTableHead(),
  new 
ProtocolDataSortDataProvider(protocolData),
  100)));
  }else{
  error(ErrorMessage);
  }


  }
  }) ;

Do you need some other informations?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer
Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com

-Ursprüngliche Nachricht-
Von: Sven Meier [mailto:s...@meiers.net]
Gesendet: Dienstag, 23. April 2013 15:16
An: users@wicket.apache.org
Betreff: Re: DefaultDataTable will not render bottomtoolbar for export

Show us your #onSubmit(ART) ... formatted please.

Sven

On 04/23/2013 02:54 PM, christoph.ma...@t-systems.com wrote:

Hello,

I have a Problem with the DefaultDataTable and the Export csv. Here is my code:

DefaultDataTableProtocolSearchData,String searchTable = new
DefaultDataTableProtocolSearchData,
String(searchTable,getTableHead(),new
ProtocolDataSortDataProvider(Collections.EMPTY_LIST),10);
searchTable.addBottomToolbar(new ExportToolbar(searchTable,new
ModelString(Export to),new
ModelString(export)).addDataExporter(new CSVDataExporter()));
searchTable.setOutputMarkupId(true);

add(searchTable);

This table will be replaced by submitting an AjaxFallbackButton, so that the 
DataProvider gets an list with some data and not an empty list. My Problem is 
that the bottomtoolbar for exporting a csv ist not rendered. The 
no-records-found toolbar will be rendered.

What is the problem here? Can anyone please help me?



Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer
Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.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

Re: AW: AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-23 Thread ORACLEADF
Hi Christoph
I also have this problems.
when you solved this problem, please upload an image of your wicket page
contains a data table and has the capability to export its data to a CVS
file.



-
Regards
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DefaultDataTable-will-not-render-bottomtoolbar-for-export-tp4658190p4658203.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



AW: AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-23 Thread Christoph.Manig
Hello,

now I see the Problem. Thank you for your help and sorry for my blindness.


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden 
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com

-Ursprüngliche Nachricht-
Von: Jesse Long [mailto:j...@unknown.za.net] 
Gesendet: Dienstag, 23. April 2013 15:57
An: users@wicket.apache.org
Betreff: Re: AW: DefaultDataTable will not render bottomtoolbar for export

Hi Christoph,

PropertyColumns are already exportable. Exportable means implements 
IExportableColumn.

Sven identified that the replaced data table does not have the export toolbar 
added to it. This is why it does not display after being replaced.

Cheers,
Jesse

On 23/04/2013 15:49, christoph.ma...@t-systems.com wrote:
 Ok. Thanks for your answer.

 Here are my columns:
 ListIColumnProtocolRecord,String columns = new 
 ArrayListIColumnProtocolRecord,String();
 columns.add(new PropertyColumnProtocolRecord, String(new 
 ResourceModel(protocolRecord.retentionID), retentionId, retentionId)); 
 columns.add(new PropertyColumnProtocolRecord, String(new 
 ResourceModel(protocolRecord.protocolID), protocolId, protocolId){
  @Override
  public void populateItem(ItemICellPopulatorProtocolRecord 
 cellItem, String componentId, IModelProtocolRecord model)
  {
  cellItem.add(new ActionPanel(componentId, model));
  }
  });
 columns.add(new PropertyColumnProtocolRecord, String(new 
 ResourceModel(protocolRecord.externalID), externalId, 
 externalId)); columns.add(new DatePropertyColumn(new 
 ResourceModel(protocolRecord.eventTimestamp),eventTimestamp,event
 Timestamp,dd.MM. HH:mm:ss)); columns.add(new 
 PropertyColumnProtocolRecord, String(new 
 ResourceModel(protocolRecord.integrationService),integrationService
 ,integrationService)); columns.add(new 
 PropertyColumnProtocolRecord, String(new 
 ResourceModel(protocolRecord.endpoint),endpoint,endpoint));
 columns.add(new PropertyColumnProtocolRecord, String(new 
 ResourceModel(protocolRecord.endpointType),endpointType,endpointT
 ype)); columns.add(new PropertyColumnProtocolRecord, String(new 
 ResourceModel(protocolRecord.messageStatus),messageStatus.descripti
 on,messageStatus.description));

 How can I make them exportable? What are exportable columns in Wicket?

 At first the dataTable is empty, so the BottomToolbar shouldn't be rendered. 
 That's right. But when it is replaced by an Ajaxbutton and there is some data 
 in the dataTable the Bottomtoolbar isn't rendered.Why? Because of the 
 non-exportable columns?


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer 
 Str. 18
 01099 Dresden
 tel.: +49 (0) 351 / 8152 - 188
 fax:  +49 (0) 351 / 8152 - 209
 email:  christoph.ma...@t-systems.com


 -Ursprüngliche Nachricht-
 Von: Jesse Long [mailto:j...@unknown.za.net]
 Gesendet: Dienstag, 23. April 2013 15:43
 An: users@wicket.apache.org
 Betreff: Re: DefaultDataTable will not render bottomtoolbar for export

 Hi Christoph,

 ExportToolbar#isVisible() is not visible in any of these conditions:

 * There are no rows displayed (this is your case)
 * There are no data exporters (this is not your case)
 * There are no exportable columns (I dont know if this is your case)

 If you want the export toolbar to be visible when there are no rows, please 
 overload ExportToolbar#isVisible(), or file a Jira issue if you want that 
 configurable.

 Thanks,
 Jesse


 On 23/04/2013 14:54, christoph.ma...@t-systems.com wrote:
 Hello,

 I have a Problem with the DefaultDataTable and the Export csv. Here is my 
 code:

 DefaultDataTableProtocolSearchData,String searchTable = new 
 DefaultDataTableProtocolSearchData,
 String(searchTable,getTableHead(),new
 ProtocolDataSortDataProvider(Collections.EMPTY_LIST),10);
 searchTable.addBottomToolbar(new ExportToolbar(searchTable,new 
 ModelString(Export to),new 
 ModelString(export)).addDataExporter(new CSVDataExporter())); 
 searchTable.setOutputMarkupId(true);

 add(searchTable);

 This table will be replaced by submitting an AjaxFallbackButton, so that the 
 DataProvider gets an list with some data and not an empty list. My Problem 
 is that the bottomtoolbar for exporting a csv ist not rendered. The 
 no-records-found toolbar will be rendered.

 What is the problem here? Can anyone please help me?



 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer 
 Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 - 209
 email:  christoph.ma...@t-systems.com

Re: Wicket DefaultDataTable - Refresh it on browser back button

2013-03-27 Thread Jayakrishnan R
Hi Martin,

Thanks for the direction. I finally found the problem. The list of records
( collection ) was assigned to the data provider in the contructor of that
page. So when I press back button, the latest data was not getting
refreshed.

I still need to find a way to push the latest data on to the model.

Thanks
JK


On Mon, Mar 25, 2013 at 4:08 PM, Jayakrishnan R jk.h...@gmail.com wrote:


 Hi,

 Does that mean that the DataProvider returns primary key objects which are
 used in the LoadableDetachableModel to load the real object ?

 I am not sure. But one thing I noticed, the load() method of the
 LoadableDetachableModel is not being called when the back button is hit.

 I am getting exception the populateItem method .of the columns in the data
 table... see below.


 ListIColumnRecord columns = new ArrayListIColumnRecord();

columns.add(new AbstractColumnRecord(
 new StringResourceModel(Record_number, this, null),
 Record_number) {

 @Override
 public void populateItem(Item item, String id, IModel
 rowModel) {
 }};





 On Mon, Mar 25, 2013 at 3:55 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 Hi,

 On Mon, Mar 25, 2013 at 5:50 PM, Jayakrishnan R jk.h...@gmail.com
 wrote:

  Hi All,
 
  In my application I am using *DefaultDataTable *with
  *SortableDataProvider *which
  has *LoadableDetachableModel *as the model.
 

 Does that mean that the DataProvider returns primary key objects which are
 used in the LoadableDetachableModel to load the real object ?

 Check why your DataProvider returns (the ids of) deleted objects when back
 button is used.


 
  I used it to display a set of records ( say RecordList page). When I
 add or
  remove some records and load the page RecordList again, it displays the
  changes. However, if I use the back button of the browser and go the
  RecordList page which was rentered earlier ( before adding/ removing the
  records ). The *DefaultDataTable *still has the old sets of records.
 This
  is a big issue when records are deleted.
 
  For example, If I delete a record and press back button then the page
 fails
  as the record it is trying to show does not exist in the database.
 Adding
  does not create an issue because it simply does not get listed in the
 set
  of records.
 
  In another page, I just have *PageableListView *with *
  LoadableDetachableModel*. It works fine with out an issue.
 
  Can someone advice me on how to refresh the data table on browser back
  button ?
 
  --
  Thanks  Regards
  JK
 



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




 --
 Thanks  Regards
 JK




-- 
Thanks  Regards
JK


Wicket DefaultDataTable - Refresh it on browser back button

2013-03-25 Thread Jayakrishnan R
Hi All,

In my application I am using *DefaultDataTable *with
*SortableDataProvider *which
has *LoadableDetachableModel *as the model.

I used it to display a set of records ( say RecordList page). When I add or
remove some records and load the page RecordList again, it displays the
changes. However, if I use the back button of the browser and go the
RecordList page which was rentered earlier ( before adding/ removing the
records ). The *DefaultDataTable *still has the old sets of records. This
is a big issue when records are deleted.

For example, If I delete a record and press back button then the page fails
as the record it is trying to show does not exist in the database. Adding
does not create an issue because it simply does not get listed in the set
of records.

In another page, I just have *PageableListView *with *
LoadableDetachableModel*. It works fine with out an issue.

Can someone advice me on how to refresh the data table on browser back
button ?

-- 
Thanks  Regards
JK


Re: Wicket DefaultDataTable - Refresh it on browser back button

2013-03-25 Thread Martin Grigorov
Hi,

On Mon, Mar 25, 2013 at 5:50 PM, Jayakrishnan R jk.h...@gmail.com wrote:

 Hi All,

 In my application I am using *DefaultDataTable *with
 *SortableDataProvider *which
 has *LoadableDetachableModel *as the model.


Does that mean that the DataProvider returns primary key objects which are
used in the LoadableDetachableModel to load the real object ?

Check why your DataProvider returns (the ids of) deleted objects when back
button is used.



 I used it to display a set of records ( say RecordList page). When I add or
 remove some records and load the page RecordList again, it displays the
 changes. However, if I use the back button of the browser and go the
 RecordList page which was rentered earlier ( before adding/ removing the
 records ). The *DefaultDataTable *still has the old sets of records. This
 is a big issue when records are deleted.

 For example, If I delete a record and press back button then the page fails
 as the record it is trying to show does not exist in the database. Adding
 does not create an issue because it simply does not get listed in the set
 of records.

 In another page, I just have *PageableListView *with *
 LoadableDetachableModel*. It works fine with out an issue.

 Can someone advice me on how to refresh the data table on browser back
 button ?

 --
 Thanks  Regards
 JK




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


Re: Wicket DefaultDataTable - Refresh it on browser back button

2013-03-25 Thread Jayakrishnan R
Hi,
Does that mean that the DataProvider returns primary key objects which are
used in the LoadableDetachableModel to load the real object ?

I am not sure. But one thing I noticed, the load() method of the
LoadableDetachableModel is not being called when the back button is hit.

I am getting exception the populateItem method .of the columns in the data
table... see below.


ListIColumnRecord columns = new ArrayListIColumnRecord();

   columns.add(new AbstractColumnRecord(
new StringResourceModel(Record_number, this, null),
Record_number) {

@Override
public void populateItem(Item item, String id, IModel rowModel)
{
}};





On Mon, Mar 25, 2013 at 3:55 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 Hi,

 On Mon, Mar 25, 2013 at 5:50 PM, Jayakrishnan R jk.h...@gmail.com wrote:

  Hi All,
 
  In my application I am using *DefaultDataTable *with
  *SortableDataProvider *which
  has *LoadableDetachableModel *as the model.
 

 Does that mean that the DataProvider returns primary key objects which are
 used in the LoadableDetachableModel to load the real object ?

 Check why your DataProvider returns (the ids of) deleted objects when back
 button is used.


 
  I used it to display a set of records ( say RecordList page). When I add
 or
  remove some records and load the page RecordList again, it displays the
  changes. However, if I use the back button of the browser and go the
  RecordList page which was rentered earlier ( before adding/ removing the
  records ). The *DefaultDataTable *still has the old sets of records. This
  is a big issue when records are deleted.
 
  For example, If I delete a record and press back button then the page
 fails
  as the record it is trying to show does not exist in the database. Adding
  does not create an issue because it simply does not get listed in the set
  of records.
 
  In another page, I just have *PageableListView *with *
  LoadableDetachableModel*. It works fine with out an issue.
 
  Can someone advice me on how to refresh the data table on browser back
  button ?
 
  --
  Thanks  Regards
  JK
 



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




-- 
Thanks  Regards
JK


Re: DefaultDataTable column style and orderbylink

2012-01-04 Thread Rain... Is wet!
Maybe You can check the actual class of the columnheaders on the pages loadup
and then add a class to your columns via javascript.
With the use of the jQuery framework this should be a quite easy task.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DefaultDataTable-column-style-and-orderbylink-tp2241495p4260952.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: popup to disapear on defaultdatatable paging

2011-10-28 Thread midikem
Well i got it to work after a while when i realized PagingNavigator not was
the only one i could use. So when i switched to AjaxPagingNavigator i found
this method onAjaxEvent that did what i wanted it to. Have another question
about DataTable though. Is it possible to change the headersToolbar for the
provider that at the moment shows Showing 9 to 9 of 9 would like to change
it to another language. Couldent find a method handling that.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/popup-to-disapear-on-defaultdatatable-paging-tp3943946p3948016.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



popup to disapear on defaultdatatable paging

2011-10-27 Thread midikem
Hi i have a problem. I have a popup that triggers on a page. If it contains
pageparameter popup it should trigger. The problem is that i want it to
disapear on the defaultdatatable paging. Becouse now everytime i press
something in the paging the popup popsup. Is there a way to override the
paging so i could remove the pageparameter?

SortableDataProviderDoc provider = new
SortableDocumentProvider(wrappedDocumentList);
provider.setSort(bla, true);
add(new DefaultDataTableDoc(dataTable, columns, provider,
DEFAULT_PAGE_SIZE));

String onLoadScript = ;
if (parameters.containsKey(popup)) {
LOGGER.debug(Adding popup window script);
onLoadScript = ;
} 
add(new Label(onLoadScript,
onLoadScript).setEscapeModelStrings(false).setOutputMarkupId(true));

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/popup-to-disapear-on-defaultdatatable-paging-tp3943946p3943946.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: popup to disapear on defaultdatatable paging

2011-10-27 Thread Martin Grigorov
On Thu, Oct 27, 2011 at 1:00 PM, midikem anders.nystro...@gmail.com wrote:
 Hi i have a problem. I have a popup that triggers on a page. If it contains
 pageparameter popup it should trigger. The problem is that i want it to
 disapear on the defaultdatatable paging. Becouse now everytime i press
 something in the paging the popup popsup. Is there a way to override the
 paging so i could remove the pageparameter?

 SortableDataProviderDoc provider = new
 SortableDocumentProvider(wrappedDocumentList);
        provider.setSort(bla, true);
        add(new DefaultDataTableDoc(dataTable, columns, provider,
 DEFAULT_PAGE_SIZE));

        String onLoadScript = ;
        if (parameters.containsKey(popup)) {
            LOGGER.debug(Adding popup window script);
            onLoadScript = ;
        }
        add(new Label(onLoadScript,
 onLoadScript).setEscapeModelStrings(false).setOutputMarkupId(true));

Don't use DefaultDataTable but DataTable with explicitly specified
toolbars. This way you can extend the default PagingNavigator with
your own that removes the special parameter.


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/popup-to-disapear-on-defaultdatatable-paging-tp3943946p3943946.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: popup to disapear on defaultdatatable paging

2011-10-27 Thread midikem
I still got a problem. When i override onClick() and just try to logg
something out nothing happends.

@Override
protected PagingNavigationLink? 
newPagingNavigationLink(String id,
IPageable pageable, final int pageNumber) {
return new 
PagingNavigationLink(id, pageable, pageNumber) {
private static final 
long serialVersionUID = 1L;

@Override
public void onClick() {

LOGGER.info(Bla);
if (parameters.containsKey(popup)) {
parameters.remove(popup);
}
}

};
}

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/popup-to-disapear-on-defaultdatatable-paging-tp3943946p3944415.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: How to show / hide individual column of a DefaultDataTable using Ajax?

2011-05-31 Thread Alec Swan
Hello,

I solved a similar problem by wrapping th in wicket:container and
hiding the container using setVisible(false).

wicket:container wicket:id=adminHeader
  thVisible To/th
/wicket:container

Alec

On Thu, Jul 1, 2010 at 7:58 AM, Erich W Schreiner eschrei...@yahoo.com wrote:
 Dear all,

 I'm trying to implement an Ajax button for showing / hiding some columns of a
 DefaultDataTable based on a Boolean associated with a custom session. 
 Currently
 I have implemented an AttributeModifier that sets the style to display:none 
 on
 the hidden columns.

 This is working fine for the table content (data rows) where I am adding this
 AttributeModifier to the cellItem, but not for the column headers. The 
 function
 getHeader() returns a Label that I can hide by adding the same
 AttributeModifier, but I do not know how to get to the TH element itself.
 Effectively, I can hide the headers' label but not the header.

 Any suggestions, please?

 TIA  best regards,
 Erich

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



Re: How to show / hide individual column of a DefaultDataTable using Ajax?

2011-05-30 Thread ramlael
I need som help with how to create an expandable row in a datatable. The 
idea would be to have functionality like an accordion where you click the 
table row and it expands to show more details of the object in the current 
row. 


U have mentioned This is working fine for the table content (data rows) ,
Please can you provide the code?. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-show-hide-individual-column-of-a-DefaultDataTable-using-Ajax-tp2275208p3560116.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



Editable DefaultDataTable

2010-12-26 Thread alex shubert
Hello

Currently I am working on Editable DefaultDatatable. My first attempt
was to override
   protected ItemT newRowItem
with
   final Item item = super.newRowItem(id, index, tiModel);
   item.add(new AjaxFormSubmitBehavior(onclick) {

naively thought that adding rowItem to ajax target will trigger
ICellPopulator#populateItem call for every cell so I have a chance to
read special metaData from parent rowItem and if it exists return
TextField instead Label for every cell iin a row.. It seems I was
wrong - item repopulation does not happens.

I need any advice how may I implement such behaviour, except switching
to Knopp's code. It just impossible right now becouse there are
already implemented filter functionality.

Thank's in advance.

P.S.: I hope I am not alone who works now and does not shopping.
-- 
Best regards
Alex

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



Re: Editable DefaultDataTable

2010-12-26 Thread Alex Shubert
Implementing what? The one reason why we cant move to Knopp's
implementation is huge relaying on IColumn and all that things. So, we
already have enough IColumn implementation. What exactly you suggest
to overload?

On 26 December 2010 20:09, Jeremy Thomerson jer...@wickettraining.com wrote:
 You might have better success implementing it in your IColumn
 implementations since they generate the components for each cell.

 On Sun, Dec 26, 2010 at 4:55 AM, alex shubert alex.shub...@gmail.com wrote:
 Hello

 Currently I am working on Editable DefaultDatatable. My first attempt
 was to override
       protected ItemT newRowItem
 with
       final Item item = super.newRowItem(id, index, tiModel);
       item.add(new AjaxFormSubmitBehavior(onclick) {

 naively thought that adding rowItem to ajax target will trigger
 ICellPopulator#populateItem call for every cell so I have a chance to
 read special metaData from parent rowItem and if it exists return
 TextField instead Label for every cell iin a row.. It seems I was
 wrong - item repopulation does not happens.

 I need any advice how may I implement such behaviour, except switching
 to Knopp's code. It just impossible right now becouse there are
 already implemented filter functionality.

 Thank's in advance.

 P.S.: I hope I am not alone who works now and does not shopping.
 --
 Best regards
 Alex

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





 --
 Jeremy Thomerson
 http://wickettraining.com
 Need a CMS for Wicket?  Use Brix! http://brixcms.org

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





-- 
Best regards
Alex

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



Re: Editable DefaultDataTable

2010-12-26 Thread Jeremy Thomerson
Well, in the IColumn is where it actually creates a label to display
something in the table.  If you want to have it editable, that's where
you need the

if (foo) { rowItem.add(new Label(...)); } else { rowItem.add(new
TextField(...)) }

logic.

On Sun, Dec 26, 2010 at 11:58 AM, Alex Shubert alex.shub...@gmail.com wrote:
 Implementing what? The one reason why we cant move to Knopp's
 implementation is huge relaying on IColumn and all that things. So, we
 already have enough IColumn implementation. What exactly you suggest
 to overload?

 On 26 December 2010 20:09, Jeremy Thomerson jer...@wickettraining.com wrote:
 You might have better success implementing it in your IColumn
 implementations since they generate the components for each cell.

 On Sun, Dec 26, 2010 at 4:55 AM, alex shubert alex.shub...@gmail.com wrote:
 Hello

 Currently I am working on Editable DefaultDatatable. My first attempt
 was to override
       protected ItemT newRowItem
 with
       final Item item = super.newRowItem(id, index, tiModel);
       item.add(new AjaxFormSubmitBehavior(onclick) {

 naively thought that adding rowItem to ajax target will trigger
 ICellPopulator#populateItem call for every cell so I have a chance to
 read special metaData from parent rowItem and if it exists return
 TextField instead Label for every cell iin a row.. It seems I was
 wrong - item repopulation does not happens.

 I need any advice how may I implement such behaviour, except switching
 to Knopp's code. It just impossible right now becouse there are
 already implemented filter functionality.

 Thank's in advance.

 P.S.: I hope I am not alone who works now and does not shopping.
 --
 Best regards
 Alex

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





 --
 Jeremy Thomerson
 http://wickettraining.com
 Need a CMS for Wicket?  Use Brix! http://brixcms.org

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





 --
 Best regards
 Alex

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





-- 
Jeremy Thomerson
http://wickettraining.com
Need a CMS for Wicket?  Use Brix! http://brixcms.org

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



Re: Editable DefaultDataTable

2010-12-26 Thread Alex Shubert
Ummm
 interface IColumn extends ICellPopulator and there are no place to
insert that code. It is possible in ICellPopulator and, as I said
before, the #populateItem is called only once so you just cant read
the state from row.

I'll try to explain: what I need is to trigger row cells repopulation
on user click on any cell in that row. so, it may be described as:
cell clicked - row announced- every cell in that row
repaint/replaces it's content

On 26 December 2010 21:16, Jeremy Thomerson jer...@wickettraining.com wrote:
 Well, in the IColumn is where it actually creates a label to display
 something in the table.  If you want to have it editable, that's where
 you need the

 if (foo) { rowItem.add(new Label(...)); } else { rowItem.add(new
 TextField(...)) }

 logic.

 On Sun, Dec 26, 2010 at 11:58 AM, Alex Shubert alex.shub...@gmail.com wrote:
 Implementing what? The one reason why we cant move to Knopp's
 implementation is huge relaying on IColumn and all that things. So, we
 already have enough IColumn implementation. What exactly you suggest
 to overload?

 On 26 December 2010 20:09, Jeremy Thomerson jer...@wickettraining.com 
 wrote:
 You might have better success implementing it in your IColumn
 implementations since they generate the components for each cell.

 On Sun, Dec 26, 2010 at 4:55 AM, alex shubert alex.shub...@gmail.com 
 wrote:
 Hello

 Currently I am working on Editable DefaultDatatable. My first attempt
 was to override
       protected ItemT newRowItem
 with
       final Item item = super.newRowItem(id, index, tiModel);
       item.add(new AjaxFormSubmitBehavior(onclick) {

 naively thought that adding rowItem to ajax target will trigger
 ICellPopulator#populateItem call for every cell so I have a chance to
 read special metaData from parent rowItem and if it exists return
 TextField instead Label for every cell iin a row.. It seems I was
 wrong - item repopulation does not happens.

 I need any advice how may I implement such behaviour, except switching
 to Knopp's code. It just impossible right now becouse there are
 already implemented filter functionality.

 Thank's in advance.

 P.S.: I hope I am not alone who works now and does not shopping.
 --
 Best regards
 Alex

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





 --
 Jeremy Thomerson
 http://wickettraining.com
 Need a CMS for Wicket?  Use Brix! http://brixcms.org

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





 --
 Best regards
 Alex

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





 --
 Jeremy Thomerson
 http://wickettraining.com
 Need a CMS for Wicket?  Use Brix! http://brixcms.org

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





-- 
Best regards
Alex

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



Re: Editable DefaultDataTable

2010-12-26 Thread Jeremy Thomerson
On Sun, Dec 26, 2010 at 12:25 PM, Alex Shubert alex.shub...@gmail.com wrote:
 Ummm
  interface IColumn extends ICellPopulator and there are no place to
 insert that code. It is possible in ICellPopulator and, as I said
 before, the #populateItem is called only once so you just cant read
 the state from row.

populateItem is called to create the component hierarchy for your
table every time it needs to be recreated.  If you put a break point
in populateItem and it is not getting called after you have clicked a
stateful link on the page, check the item reuse strategy.  That
determines whether the table holds on to its component hierarchy or
not after the page is rendered.  If it does not (which should be the
default), then your populateItem will get called for *every cell* in
that column, for *every row*, on *every render* (including after a
link is clicked).

-- 
Jeremy Thomerson
http://wickettraining.com
Need a CMS for Wicket?  Use Brix! http://brixcms.org

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



Re: Editable DefaultDataTable

2010-12-26 Thread Alex Shubert
Sure. But it doesnt look like a solution for it's resource
consumption. So, again: after any cell click I need to announce the rw
and the row must, in turn, somehow command only it's cells to
repopulate their content. I know, how to do it without any framework,
but wicket way to  do it unclear for me.

 populateItem is called to create the component hierarchy for your
 table every time it needs to be recreated.  If you put a break point



-- 
Best regards
Alex

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



Re: Editable DefaultDataTable

2010-12-26 Thread Jeremy Thomerson
On Sun, Dec 26, 2010 at 12:47 PM, Alex Shubert alex.shub...@gmail.com wrote:
 Sure. But it doesnt look like a solution for it's resource
 consumption.

On this list, we prefer solid facts based on proven theories rather
than uh, I think it will use too many resources.  If you're using a
pagable table, you're probably not rendering hundreds [or thousands]
of rows per render.  Maybe 50, tops.  Recreating the component
hierarchy will take the computer less time (which is what I assume you
really mean by resources) than just about anything else that you are
likely to do in your code.

The alternative is to add the edit and non-edit components to the
hierarchy initially.  In them, override isVisible (or, onConfigure and
use setVisible) and toggle their visibility based on whether that row
is in edit mode.  Then, your link simply needs to store a variable
that says which row is in edit mode.  Perhaps an integer with the row
index.  Whatever.

The problem with the second strategy is that you now have to have
either a panel or a fragment for each column because you are putting
two components into the cell, and the markup only has a placeholder
for one.

 So, again: after any cell click I need to announce the rw
 and the row must, in turn, somehow command only it's cells to
 repopulate their content. I know, how to do it without any framework,
 but wicket way to  do it unclear for me.

I understood what you wanted to do.  You were wanting to do it the old
way.  The way you were accustomed to.  Because you thought you needed
to do it that way.  I was trying to tell you how to do it in Wicket.
:)

-- 
Jeremy Thomerson
http://wickettraining.com
Need a CMS for Wicket?  Use Brix! http://brixcms.org

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



Re: Editable DefaultDataTable

2010-12-26 Thread Jeremy Thomerson
On Sun, Dec 26, 2010 at 12:58 PM, Jeremy Thomerson
jer...@wickettraining.com wrote:
 On Sun, Dec 26, 2010 at 12:47 PM, Alex Shubert alex.shub...@gmail.com wrote:
 Sure. But it doesnt look like a solution for it's resource
 consumption.

 On this list, we prefer solid facts based on proven theories rather
 than uh, I think it will use too many resources.  If you're using a
 pagable table, you're probably not rendering hundreds [or thousands]
 of rows per render.  Maybe 50, tops.  Recreating the component
 hierarchy will take the computer less time (which is what I assume you
 really mean by resources) than just about anything else that you are
 likely to do in your code.

 The alternative is to add the edit and non-edit components to the
 hierarchy initially.  In them, override isVisible (or, onConfigure and
 use setVisible) and toggle their visibility based on whether that row
 is in edit mode.  Then, your link simply needs to store a variable
 that says which row is in edit mode.  Perhaps an integer with the row
 index.  Whatever.

 The problem with the second strategy is that you now have to have
 either a panel or a fragment for each column because you are putting
 two components into the cell, and the markup only has a placeholder
 for one.

One other alternative would involve manually doing the repopulate
yourself.  Presumably your link is in one of the columns in the row.
At that point, it has a reference to the table and the row item.  It
could iterate through the columns of the table and call populateItem
manually for that particular row.

-- 
Jeremy Thomerson
http://wickettraining.com
Need a CMS for Wicket?  Use Brix! http://brixcms.org

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



Re: Editable DefaultDataTable

2010-12-26 Thread Alex Shubert
Jeremy

thanks for your patience. that last thing is what I meaning. But how
to make row call repopulate on it's column. I mean, it is not a
problem to visit every child of rowItem and filter all of IColumn
descendants. But there are no reason to call populateItem on IColumn
as I have no idea what to do with received Components. Is it correct
that you this approach suggest to re-implement all class from
AbstractDataGridView? Or do I miss something?

P.S. : it is strange a bit, but I did not set reusable strategy... and
still no #populateItem calls. I have to look in the sources, I guess.

 One other alternative would involve manually doing the repopulate
 yourself.  Presumably your link is in one of the columns in the row.
 At that point, it has a reference to the table and the row item.  It
 could iterate through the columns of the table and call populateItem
 manually for that particular row.

 --
 Jeremy Thomerson
 http://wickettraining.com
 Need a CMS for Wicket?  Use Brix! http://brixcms.org

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





-- 
Best regards
Alex

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



Re: Editable DefaultDataTable

2010-12-26 Thread Jeremy Thomerson
On Sun, Dec 26, 2010 at 1:20 PM, Alex Shubert alex.shub...@gmail.com wrote:
 Jeremy

 thanks for your patience. that last thing is what I meaning. But how
 to make row call repopulate on it's column. I mean, it is not a
 problem to visit every child of rowItem and filter all of IColumn
 descendants. But there are no reason to call populateItem on IColumn
 as I have no idea what to do with received Components. Is it correct
 that you this approach suggest to re-implement all class from
 AbstractDataGridView? Or do I miss something?

No, absolutely not.  I'd recommend doing it the first way I suggested.
 But, alas, you don't want to because you think that it will use too
many resources.  :)  In the lack of that, you'll have to play around
with iterating through the columns for the row and repopulate them.

 P.S. : it is strange a bit, but I did not set reusable strategy... and
 still no #populateItem calls. I have to look in the sources, I guess.

Breakpoints are your friend.  If you think there's a bug, create a
quickstart and send it in.  You'll likely find your problem while
doing so.

-- 
Jeremy Thomerson
http://wickettraining.com
Need a CMS for Wicket?  Use Brix! http://brixcms.org

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



Re: Editable DefaultDataTable

2010-12-26 Thread Alex Shubert
DefaultDataTable.setItemReuseStrategy(DefaultItemReuseStrategy.getInstance());
doent change anything. ICellPopulator#populateItem is not called.
Something is broken in the Danish Kingdom Or in my Wicket knowledge :)

On 26 December 2010 22:27, Jeremy Thomerson jer...@wickettraining.com wrote:
 On Sun, Dec 26, 2010 at 1:20 PM, Alex Shubert alex.shub...@gmail.com wrote:
 Jeremy

 thanks for your patience. that last thing is what I meaning. But how
 to make row call repopulate on it's column. I mean, it is not a
 problem to visit every child of rowItem and filter all of IColumn
 descendants. But there are no reason to call populateItem on IColumn
 as I have no idea what to do with received Components. Is it correct
 that you this approach suggest to re-implement all class from
 AbstractDataGridView? Or do I miss something?

 No, absolutely not.  I'd recommend doing it the first way I suggested.
  But, alas, you don't want to because you think that it will use too
 many resources.  :)  In the lack of that, you'll have to play around
 with iterating through the columns for the row and repopulate them.

 P.S. : it is strange a bit, but I did not set reusable strategy... and
 still no #populateItem calls. I have to look in the sources, I guess.

 Breakpoints are your friend.  If you think there's a bug, create a
 quickstart and send it in.  You'll likely find your problem while
 doing so.

 --
 Jeremy Thomerson
 http://wickettraining.com
 Need a CMS for Wicket?  Use Brix! http://brixcms.org

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





-- 
Best regards
Alex

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



Format Date for PropertyColumn/DefaultDataTable

2010-10-18 Thread Shelli Orton
Hi,

Is there a way to apply a DateConverter to a PropertyColumn used in a
DefaultDataTable (and AjaxFallbackDefaultDataTable)?

Thanks!

Shelli 

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



Re: Format Date for PropertyColumn/DefaultDataTable

2010-10-18 Thread James Carman
We use this for formatting dates, numbers, etc.:

public class MessageFormatColumnT extends PropertyColumnT
{
private final String pattern;

public MessageFormatColumn(IModelString displayModel, String
propertyExpression, String pattern)
{
super(displayModel, propertyExpression);
this.pattern = pattern;
}

public MessageFormatColumn(IModelString displayModel, String
sortProperty, String propertyExpression, String pattern)
{
super(displayModel, sortProperty, propertyExpression);
this.pattern = pattern;
}

@Override
protected IModel? createLabelModel(IModelT itemModel)
{
IModel? superModel = super.createLabelModel(itemModel);
return new ModelString(MessageFormat.format(pattern,
superModel.getObject()));
}
}


On Mon, Oct 18, 2010 at 1:33 PM, Shelli Orton shelli.or...@sjrb.ca wrote:
 Hi,

 Is there a way to apply a DateConverter to a PropertyColumn used in a
 DefaultDataTable (and AjaxFallbackDefaultDataTable)?

 Thanks!

 Shelli

 -
 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: Format Date for PropertyColumn/DefaultDataTable

2010-10-18 Thread Shelli Orton
Hi,

Thanks for that solution!  After finding the DateLabel in the API, I
extended PropertyColumn to this class:

public class DatePropertyColumnT extends PropertyColumnT
{
private static final long serialVersionUID = 1L;
private DateConverter converter;

public DatePropertyColumn(IModelString displayModel, String
sortProperty,
String propertyExpression, DateConverter converter)
{
super(displayModel, sortProperty, propertyExpression);
this.converter = converter;
}

@SuppressWarnings(unchecked)
@Override
public void populateItem(ItemICellPopulatorT item, String
componentId, IModelT rowModel)
{
item.add(new DateLabel(componentId, (IModelDate)
createLabelModel(rowModel), converter));
}

}

I had to create my own extension of PatternDateConverter to deal with
java.sql.Timestamp values in my model objects:

public class TimestampConverter extends PatternDateConverter
{
private static final long serialVersionUID = 1L;

public TimestampConverter(String datePattern)
{
super(datePattern, false);
}

@Override
public Timestamp convertToObject(String value, Locale locale)
{
Date time = super.convertToObject(value, locale);

return new Timestamp(time.getTime());
}
}

and this is what is passed into the constructur of the
DatePropertyColumn.

Shelli


-Original Message-
From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com]
On Behalf Of James Carman
Sent: Monday, October 18, 2010 1:24 PM
To: users@wicket.apache.org
Subject: Re: Format Date for PropertyColumn/DefaultDataTable

We use this for formatting dates, numbers, etc.:

public class MessageFormatColumnT extends PropertyColumnT
{
private final String pattern;

public MessageFormatColumn(IModelString displayModel, String
propertyExpression, String pattern)
{
super(displayModel, propertyExpression);
this.pattern = pattern;
}

public MessageFormatColumn(IModelString displayModel, String
sortProperty, String propertyExpression, String pattern)
{
super(displayModel, sortProperty, propertyExpression);
this.pattern = pattern;
}

@Override
protected IModel? createLabelModel(IModelT itemModel)
{
IModel? superModel = super.createLabelModel(itemModel);
return new ModelString(MessageFormat.format(pattern,
superModel.getObject()));
}
}


On Mon, Oct 18, 2010 at 1:33 PM, Shelli Orton shelli.or...@sjrb.ca
wrote:
 Hi,

 Is there a way to apply a DateConverter to a PropertyColumn used in a
 DefaultDataTable (and AjaxFallbackDefaultDataTable)?

 Thanks!

 Shelli

 -
 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



How to show / hide individual column of a DefaultDataTable using Ajax?

2010-07-01 Thread Erich W Schreiner
Dear all,

I'm trying to implement an Ajax button for showing / hiding some columns of a 
DefaultDataTable based on a Boolean associated with a custom session. Currently 
I have implemented an AttributeModifier that sets the style to display:none 
on 
the hidden columns.

This is working fine for the table content (data rows) where I am adding this 
AttributeModifier to the cellItem, but not for the column headers. The function 
getHeader() returns a Label that I can hide by adding the same 
AttributeModifier, but I do not know how to get to the TH element itself. 
Effectively, I can hide the headers' label but not the header.

Any suggestions, please?

TIA  best regards,
Erich

Re: Making rows of DefaultDataTable into links

2010-06-17 Thread Ray Weidner
Thanks, Jeremy, I think having a real link outweighs having the whole row
being a pseudo link, so I'm going to just have the ID column value be a
link.  But thanks for the advice; it's still informative.

On Wed, Jun 16, 2010 at 2:20 AM, Jeremy Thomerson jer...@wickettraining.com
 wrote:

 On Wed, Jun 16, 2010 at 1:17 AM, Ray Weidner 
 ray.weidner.develo...@gmail.com wrote:

  Hi all,
 
  Forgive my ignorance if this is too obvious.  I'm using DefaultDataTable
 to
  display search results, and that's working fine.  What I'd like to do is
  make each row of the table a hyperlink to the view/edit page of the
 record
  in question.  How can I do this?
 
  I was able to add links to a column, although they don't show up in the
  browser as actual links.  Rather, they appear as text with associate
  javascript to process an onclick event.  Here's the custom column I
 created
  for this purpose:
 
  private class IncidentLinkPropertyColumn extends PropertyColumn
  IncidentReport {
 
  public IncidentLinkPropertyColumn (IModel String nameModel, String
  propertyName) {
  super (nameModel, propertyName);
  }
   @Override
  public void populateItem (Item ICellPopulator IncidentReport item,
  String componentId,
  IModel IncidentReport model) {
  PageParameters params = new PageParameters ();
  params.put (incidentId, model.getObject ().getRecordId ());
  item.add (new LabelLink (componentId, CreateOrEditIncidentPage.class,
  params));
  }
 
  private class LabelLink extends BookmarkablePageLink Object {
  private static final long serialVersionUID = 3429331456890689136L;
 
  public LabelLink (String componentId, Class ? extends Page pageType,
  PageParameters parameters) {
  super (componentId, pageType, parameters);
  }
   @Override
  protected void onComponentTagBody (MarkupStream markupStream,
 ComponentTag
  openTag) {
  replaceComponentTagBody (markupStream, openTag, click here!);
  }
  }
  }
 
  As I said, I'd like the rows to be links to the IncidentReport, but
 barring
  that, it would be nice if the link column actually appeared as links, so
  users can right-click to open in a separate tab.  If necessary, I can
 draft
  an informational column (like ID) to serve as a link, as long as it is a
  true link (so it will be visually obvious, as well as retaining
 right-click
  functionality).
 
  Any ideas?  Thanks in advance.
 

 to make the rows into links, override newItem (or whatever the name is - it
 starts with new) that creates a new row.  then you could add an onclick to
 the row item, or even an ajaxeventbehavior(onclick) to do some ajax
 behavior

 to make the column into a real link, you'll need to use a fragment since
 the
 default html for a cell is just a span.

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



Making rows of DefaultDataTable into links

2010-06-16 Thread Ray Weidner
Hi all,

Forgive my ignorance if this is too obvious.  I'm using DefaultDataTable to
display search results, and that's working fine.  What I'd like to do is
make each row of the table a hyperlink to the view/edit page of the record
in question.  How can I do this?

I was able to add links to a column, although they don't show up in the
browser as actual links.  Rather, they appear as text with associate
javascript to process an onclick event.  Here's the custom column I created
for this purpose:

private class IncidentLinkPropertyColumn extends PropertyColumn
IncidentReport {

public IncidentLinkPropertyColumn (IModel String nameModel, String
propertyName) {
super (nameModel, propertyName);
}
 @Override
public void populateItem (Item ICellPopulator IncidentReport item,
String componentId,
IModel IncidentReport model) {
PageParameters params = new PageParameters ();
params.put (incidentId, model.getObject ().getRecordId ());
item.add (new LabelLink (componentId, CreateOrEditIncidentPage.class,
params));
}

private class LabelLink extends BookmarkablePageLink Object {
private static final long serialVersionUID = 3429331456890689136L;

public LabelLink (String componentId, Class ? extends Page pageType,
PageParameters parameters) {
super (componentId, pageType, parameters);
}
 @Override
protected void onComponentTagBody (MarkupStream markupStream, ComponentTag
openTag) {
replaceComponentTagBody (markupStream, openTag, click here!);
}
}
}

As I said, I'd like the rows to be links to the IncidentReport, but barring
that, it would be nice if the link column actually appeared as links, so
users can right-click to open in a separate tab.  If necessary, I can draft
an informational column (like ID) to serve as a link, as long as it is a
true link (so it will be visually obvious, as well as retaining right-click
functionality).

Any ideas?  Thanks in advance.


Re: Making rows of DefaultDataTable into links

2010-06-16 Thread Jeremy Thomerson
On Wed, Jun 16, 2010 at 1:17 AM, Ray Weidner 
ray.weidner.develo...@gmail.com wrote:

 Hi all,

 Forgive my ignorance if this is too obvious.  I'm using DefaultDataTable to
 display search results, and that's working fine.  What I'd like to do is
 make each row of the table a hyperlink to the view/edit page of the record
 in question.  How can I do this?

 I was able to add links to a column, although they don't show up in the
 browser as actual links.  Rather, they appear as text with associate
 javascript to process an onclick event.  Here's the custom column I created
 for this purpose:

 private class IncidentLinkPropertyColumn extends PropertyColumn
 IncidentReport {

 public IncidentLinkPropertyColumn (IModel String nameModel, String
 propertyName) {
 super (nameModel, propertyName);
 }
  @Override
 public void populateItem (Item ICellPopulator IncidentReport item,
 String componentId,
 IModel IncidentReport model) {
 PageParameters params = new PageParameters ();
 params.put (incidentId, model.getObject ().getRecordId ());
 item.add (new LabelLink (componentId, CreateOrEditIncidentPage.class,
 params));
 }

 private class LabelLink extends BookmarkablePageLink Object {
 private static final long serialVersionUID = 3429331456890689136L;

 public LabelLink (String componentId, Class ? extends Page pageType,
 PageParameters parameters) {
 super (componentId, pageType, parameters);
 }
  @Override
 protected void onComponentTagBody (MarkupStream markupStream, ComponentTag
 openTag) {
 replaceComponentTagBody (markupStream, openTag, click here!);
 }
 }
 }

 As I said, I'd like the rows to be links to the IncidentReport, but barring
 that, it would be nice if the link column actually appeared as links, so
 users can right-click to open in a separate tab.  If necessary, I can draft
 an informational column (like ID) to serve as a link, as long as it is a
 true link (so it will be visually obvious, as well as retaining right-click
 functionality).

 Any ideas?  Thanks in advance.


to make the rows into links, override newItem (or whatever the name is - it
starts with new) that creates a new row.  then you could add an onclick to
the row item, or even an ajaxeventbehavior(onclick) to do some ajax
behavior

to make the column into a real link, you'll need to use a fragment since the
default html for a cell is just a span.

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


DefaultDataTable column style and orderbylink

2010-06-03 Thread Sam Zilverberg
Hi,

I'm using DefaultDataTable with sortable columns.
When a column header is clicked to be sorted by the header gets a special
class : th.wiccket_orderDown/Up/None.
I'd like this whole column to have some css class so it can be highlighted.

Is there any simple way to achieve this without rolling my own
HeadersToolbar/OrderByBorder/PropertyColumn?

-Sam


Checkboxes and defaultdatatable

2010-04-14 Thread Sigmar Muuga
Hello,
can anybody say, which is the most hazzle-free way to do default datatable
with multiple selectboxes?

I created FilterForm with DefaultDatatable. In that table I have a checkbox
column to select items. I followed the PhoneBook example but now I it is
acting weirdly and I dont understand, what is the problem.

I added submit button and when I click it, the selected items are not added
to the list like in phonebook example.
But when I select something from the filter-row selectbox, the form is
automatically submitted and also items with checked selectboxes are added to
my list...

What may I have missing here?

Sigmar


css in DefaultDataTable

2009-10-18 Thread wicketmonkey
Is there any way that you can apply your own css to datatable. I saw some user 
mentioning inmethod api but that uses its own internal DefaultDataGrid from 
inmethod library . Looks like inmethod implemented everything on it's own. I 
would like to know what would be the easiest way to do it in DefaultDataTable . 
Is there any way i can overide some of the method in PropertyColumn to do that. 
thank you 

Re: css in DefaultDataTable

2009-10-18 Thread Igor Vaynberg
default datatable provides some css classes, you just need to provide
your own rules that match those classes.

-igor

On Sun, Oct 18, 2009 at 1:48 AM,  wicketmon...@comcast.net wrote:
 Is there any way that you can apply your own css to datatable. I saw some 
 user mentioning inmethod api but that uses its own internal DefaultDataGrid 
 from inmethod library . Looks like inmethod implemented everything on it's 
 own. I would like to know what would be the easiest way to do it in 
 DefaultDataTable . Is there any way i can overide some of the method in 
 PropertyColumn to do that.
 thank you

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



DefaultDataTable

2009-09-21 Thread Christoph Hochreiner
Hi

i've found a tutorial for adding own components to the DefaultDataTable:

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

my problem is, that i can't figure out, what class Transaction is exactly.

ore if there is any other way, for adding own components e.g. subtables.

Christoph

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



Re: DefaultDataTable

2009-09-21 Thread Igor Vaynberg
Transaction, in that example, is a domain object that the table lists.

-igor

On Mon, Sep 21, 2009 at 7:03 AM, Christoph Hochreiner
ch.hochrei...@gmail.com wrote:
 Hi

 i've found a tutorial for adding own components to the DefaultDataTable:

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

 my problem is, that i can't figure out, what class Transaction is exactly.

 ore if there is any other way, for adding own components e.g. subtables.

 Christoph

 -
 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: Displaying column totals for a DefaultDataTable

2009-09-16 Thread saahuja

Ok, here is my code for the TotalsToolbar that I am adding as a
BottomTooolbar to my table.

public class TotalsToolbar extends AbstractToolbar
{

public TotalsToolbar(final DataTable table, final IDataProvider
dataProvider)
{
super(table);

RepeatingView totals = new RepeatingView(totals);
add(totals);

final IColumn[] columns = table.getColumns();
for (int i = 0; i  columns.length; i++)
{
final IColumn column = columns[i];

WebMarkupContainer item = new
WebMarkupContainer(totals.newChildId());
totals.add(item);

WebMarkupContainer total = new WebMarkupContainer(total);

item.add(total);
item.setRenderBodyOnly(true);
if (i == 0)
total.add(new Label(value, Grand Total));
else
total.add(new Label(value, $0.00));

}
}

As you can see I am passing in a dataProvider into the constructor, but I do
not know how to use it. How do I replace the hardcoded $0.00 value (look
towards the end of the code) with a value coming from the dataProvider?

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Displaying-column-totals-for-a-DefaultDataTable-tp25402522p25475784.html
Sent from the Wicket - User 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: Displaying column totals for a DefaultDataTable

2009-09-16 Thread saahuja

Sorry, never mind my previous post. I figured it out. I just need to use the
iterator() on the dataProvider to get the values.
Thanks.
-- 
View this message in context: 
http://www.nabble.com/Displaying-column-totals-for-a-DefaultDataTable-tp25402522p25477218.html
Sent from the Wicket - User 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



Displaying column totals for a DefaultDataTable

2009-09-11 Thread Sadhna Ahuja
Hello,

 

I have a DefaultDataTable with several amount colums. I need to display
a Totals row at the bottom of the table to show the column totals.

 

I have searched the forum, and only found suggestions to use
addBottomToolbar.

 

However, I don't know how to do this? Looking at Wicket's HeaderToolbar,
I see that I would need to pass the DataTable and the
SortableDataProvider to my TotalsToolbar.

 

But, how would the toolbar get the data to display?

 

What would the html markup for this toolbar be like?

 

Would greatly appreciate if someone could please provide some sample
code.

 

Thanks in advance.

 

 

 

 



Re: Displaying column totals for a DefaultDataTable

2009-09-11 Thread Michael Mosmann
Hi,

 I have a DefaultDataTable with several amount colums. I need to display
 a Totals row at the bottom of the table to show the column totals.

 I have searched the forum, and only found suggestions to use
 addBottomToolbar.

correct..

 However, I don't know how to do this? Looking at Wicket's HeaderToolbar,
 I see that I would need to pass the DataTable and the
 SortableDataProvider to my TotalsToolbar.

yes.. correct.

 But, how would the toolbar get the data to display?

public class TotalCounter extends AbstractToolbar
{

public TotalCounter(final DataTable dataTable)
{

IModelInteger model=new LoadabledDetachedModelInteger()
{
  public Integer load()
  {
return dataTable.size()
  }
}

WebMarkupContainer span = new WebMarkupContainer(span);
add(span);
span.add(new AttributeModifier(colspan, true, new ModelString(
String.valueOf(table.getColumns().length;

span.add(new Label(count,model));
}

 What would the html markup for this toolbar be like?

wicket:panel
  tr class=navigation
td wicket:id=span
  span wicket:id=counter/counter
/td
  /tr
/wicket:panel
 

 Would greatly appreciate if someone could please provide some sample
 code.

maybe this will work out of the box, but not sure.. 
(have a look into the wicket code.. .. it will help a lot)

mm:)


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



Re: Displaying column totals for a DefaultDataTable

2009-09-11 Thread saahuja

Thanks for your reply, Michael.

Your code does work to display the number of columns in the dataTable, after
I changed dataTable.size() to dataTable.getRowCount(). It did help me in
getting started with writing my own toolbar.

However, my table has several amount columns and I want to display the sum
of the amounts in each column at the bottom of that column.

How should I do that? I am also passing in a SortableDataProvider into the
constructor of my Toolbar.

Thanks.


-- 
View this message in context: 
http://www.nabble.com/Displaying-column-totals-for-a-DefaultDataTable-tp25402522p25406289.html
Sent from the Wicket - User 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: Displaying column totals for a DefaultDataTable

2009-09-11 Thread Michael Mosmann
 Your code does work to display the number of columns in the dataTable, after
 I changed dataTable.size() to dataTable.getRowCount(). It did help me in
 getting started with writing my own toolbar.

Ok.. id did it in this email client, which has very poor development
support:) but it was good enough to show you the way:) ..

 However, my table has several amount columns and I want to display the sum
 of the amounts in each column at the bottom of that column.

for the rows displayed or all rows in this columns?
i think, you mean the second.. so it is not trivial, because you should
not iterate over all entries to build up this numbers..

maybe this is a valid solution:

you have somewhere a function which gives you the list of items.. maybe
ListMyEntity MyEntity.getList(offset,count).. you need a function
which returns on Instance of MyEntity filled whith sum for each property
(select sum(prop1),sum(prop2)... - MyEntity.setProp1(sum1) ..)

than take a DataGridView .. see DataTable.java to get a picture of what
you need.. so you can reuse the List of IColumn.

if you have any further questions.. send some code.

mm:)

there are many good wicket books available .. do you have one? 


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



Re: Footer Toolbar for DefaultDataTable (wicket 1.3.2)

2009-09-04 Thread saahuja

Hi,

Does anyone have an example of a toolbar that would add the amounts in the
table?

Thanks.


swapnil.wadagave wrote:
 
 hi Sanjeev,
 I think you can able to do it using this code,
 
 extend parent class as DataTable,dont use DefaultDataTable :
 code:
 DatatTable datatable=new DataTable(entries,column,provider,3)
 {
 protected Item newRowItem(String id,int index,IModel model)
 {
 return new OddEvenItem(id,indexmmodel);
 }};
 datatable.addTopToolBar(new HeadersToolBar(datatble,provider));
 datatable.addBottomToolBar(new NavigationToolBar(datatble));
 add(datatable);
 
 Regards,
 Swapnil
 
 
 
 standon wrote:
 
 I'm using DefaultDataTable with sortable data provider in my project. All
 the columns are sortable. This  data table has few amount columns, which
 I need to sum up and show as a last row (TotalRow) at the bottom of the
 table. This last row (TotalRow) should not be part of sortable data
 provider. Otherwise, if user clicks on any table column, the table will
 sort it and put in top (1st row, descending order) of the table.
 
 Basically, the way the column headers are displayed on default data
 table, I want similar thing to be displayed at the bottom of the table
 (TotalRow), which I can control it. I don't know how to use
 addBottomToolbar to achieve this.
 
 If there is a way, pls let me know. If you can provide a code snippet
 that would be great.
 
 Thanks
 Sanjeev
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Footer-Toolbar-for-DefaultDataTable-%28wicket-1.3.2%29-tp16995010p25301509.html
Sent from the Wicket - User 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: DefaultDataTable gets no CSS styling

2009-08-17 Thread Kringlan

For anyone who might be interested... for all I know Igor is right and the
DataTable component does not add any CSS itself. This seems very odd to me
as a default styling would be nice to have. Anyway, I managed to find the
styling used in the Wicket-examples page and i just added it to my own CSS.
Here it goes:

table.dataview {
margin-bottom: 10px;
border-bottom: 1px solid #0079d6;
font-size: 1em;
font-family: arial;
width: 100%;
}

table.dataview caption { text-align: left; }
table.dataview tr { padding-top: 2px; padding-bottom: 2px; }
table.dataview tr.even { background-color: #ffebcd; }
table.dataview tr.odd { background-color: #fff; }
table.dataview tr td { padding-left: 8px; padding-right: 30px; }
table.dataview tr th { color: black; padding-top: 3px; padding-bottom: 3px;
padding-left: 8px; padding-right: 30px; background-color: #c1e4ff;
border-bottom: 1px solid #0079d6; border-top: 1px solid #0079d6; text-align:
left; white-space: nowrap; vertical-align: middle;}

table.dataview tr th { background-position: right;
background-repeat:no-repeat; }
table.dataview tr th.wicket_orderDown {
background-color: #87cbff; background-image:
url(displaytag/img/arrow_down.png); }
table.dataview tr th.wicket_orderUp {
background-color: #87cbff; background-image:
url(displaytag/img/arrow_up.png); }
table.dataview tr th.wicket_orderNone {
background-image: url(displaytag/img/arrow_off.png);
}
table.dataview tr th a { font-weight: normal; }
table.dataview #message { padding-left: 3px; }
table.dataview caption { padding-bottom: 2px; }

Just remember to add the .dataview CSS class to your component markup like
this:
table class=dataview wicket:id=myTable/table
-- 
View this message in context: 
http://www.nabble.com/DefaultDataTable-gets-no-CSS-styling-tp24913804p25002913.html
Sent from the Wicket - User 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: DefaultDataTable gets no CSS styling

2009-08-13 Thread Kringlan

Are you sure? Other components, such as ModalWindow, comes with styling
included. You just add the component and it adds the appropriate CSS itself.
I can see in the markup produced for the DefaultDataTable that the table
rows have the classes odd and even, am I supposed to define these
classes in my own CSS?




igor.vaynberg wrote:
 
 you are supposed to provide your own css
 
-igor


On Tue, Aug 11, 2009 at 1:35 AM, Lukas Wilczeklukas.wilc...@gmail.com
wrote:
 Hi,

 I'm trying to use a DefaultDataTable and it shows with correct data
 but it has no styling at all. When I view source in the browser I
 can't see any CSS file that has been added to the markup (apart from
 my own and the one for ModalWindow). I've looked through the source
 folders for Wicket Extensions and I can't see any suitable CSS file
 there either. I've probably missunderstood how this works, please help
 me understand :)

 I'm using wicket 1.4.0

 Thanx

 -
 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




-- 
View this message in context: 
http://www.nabble.com/DefaultDataTable-gets-no-CSS-styling-tp24913804p24950509.html
Sent from the Wicket - User 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



DefaultDataTable gets no CSS styling

2009-08-11 Thread Lukas Wilczek
Hi,

I'm trying to use a DefaultDataTable and it shows with correct data
but it has no styling at all. When I view source in the browser I
can't see any CSS file that has been added to the markup (apart from
my own and the one for ModalWindow). I've looked through the source
folders for Wicket Extensions and I can't see any suitable CSS file
there either. I've probably missunderstood how this works, please help
me understand :)

I'm using wicket 1.4.0

Thanx

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



Re: DefaultDataTable gets no CSS styling

2009-08-11 Thread Igor Vaynberg
you are supposed to provide your own css

-igor


On Tue, Aug 11, 2009 at 1:35 AM, Lukas Wilczeklukas.wilc...@gmail.com wrote:
 Hi,

 I'm trying to use a DefaultDataTable and it shows with correct data
 but it has no styling at all. When I view source in the browser I
 can't see any CSS file that has been added to the markup (apart from
 my own and the one for ModalWindow). I've looked through the source
 folders for Wicket Extensions and I can't see any suitable CSS file
 there either. I've probably missunderstood how this works, please help
 me understand :)

 I'm using wicket 1.4.0

 Thanx

 -
 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: Exporting data in a DefaultDataTable to xls or csv file

2009-08-09 Thread schapey

which had a snippet of code in which the user indicates no longer
outputs the data but a fragment of sql.  

Correction I meant a fragment of html.

sorry.
-- 
View this message in context: 
http://www.nabble.com/Exporting-data-in-a-DefaultDataTable-to-xls-or-csv-file-tp24884267p24886873.html
Sent from the Wicket - User 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



Exporting data in a DefaultDataTable to xls or csv file

2009-08-08 Thread Karen Schaper
Hi,

I am trying to export the contents of DefaultDataTable

to an excel spreadsheet.

I found this post...

http://www.nabble.com/export-excel-file-via-an-OutputStream-td16416239.html#a16416239

which had a snippet of code in which the user indicates no longer
outputs the data but a fragment of sql.  There were responses but I'm
not following on how to get the data from the data table into the output
stream for an excel spreadsheet.

Here's the snippet of code that I was looking at.

Button button = new Button(excelExport)
 { 
public void onSubmit() { 
getRequestCycle().setRequestTarget( 
new ComponentRequestTarget(dataTable) 
); 
WebResponse wr = (WebResponse)getResponse();
wr.setContentType( excel/ms-excel;
name=+getMSExcelFilename() ); 
wr.setHeader( content-disposition,
attachment;filename=+getMSExcelFilename() ); 
} 
};

Any help is greatly appreciated!

Thanks

Karen


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



Onclick method for DefaultDataTable cells

2009-07-30 Thread Elad Katz
Hi, I have a DefaultDataTable with 5 columns, I want to be able to register
to an onclick method that fires when the user will click a specific row\cell
in the table.
In other words, I need to be able to open an edit screen when the user
clicks the row he wants to edit, and for that I need the row to be clickable
(or just the name cell) and I need to be able to be able to hook up to that
event.

My Code:
*Please bear in mind that I've only started developing in wicket a week ago
so if you see anything that doesn't make sense, please let me know so I can
fix it.*
*WebPage.java:*

 locationsEntityFacade =
 LookupHelper.getInstance().lookupLocationsEntityFacade();
 List locations = locationsEntityFacade.findAll();
 int count = locations.size();

 add(new Label(locationsCount, String.valueOf(count)));

 LocationsProvider locationsProvider = new LocationsProvider();

 IColumn[] columns = new IColumn[5];
 columns[0] = new PropertyColumn(new Model(Name), name, name);
 columns[1] = new PropertyColumn(new Model(Address 1),
 streetAddress1, streetAddress1);
 columns[2] = new PropertyColumn(new Model(Address 2),
 streetAddress2, streetAddress2);
 columns[3] = new PropertyColumn(new Model(City), city, city);
 columns[4] = new PropertyColumn(new Model(State), usState,
 usState);

 DefaultDataTable table = new DefaultDataTable(datatable, columns,
 locationsProvider, 10);
 add(table);

* Location Provider:*

public class LocationsProvider extends SortableDataProvider{

 List list = new ArrayList();
 LocationsEntityFacadeLocal locationsEntityFacade;



 public LocationsProvider()  {
 setSort(id, true);
 locationsEntityFacade =
 LookupHelper.getInstance().lookupLocationsEntityFacade();
 list = locationsEntityFacade.findAll();
 }

 public Iterator iterator(int first, int count) {
 List newList = new ArrayList();
 newList.addAll(list.subList(first, first + count));
 final String sortColumn = this.getSort().getProperty();
 final boolean ascending = this.getSort().isAscending();
 Collections.sort(newList, new Comparator() {

 public int compare(Object obj1, Object obj2) {
 PropertyModel model1 = new PropertyModel(obj1, sortColumn);
 PropertyModel model2 = new PropertyModel(obj2, sortColumn);

 Object modelObject1 = model1.getObject();
 Object modelObject2 = model2.getObject();

 int compare = ((Comparable)
 modelObject1).compareTo(modelObject2);

 if (!ascending)
 compare *= -1;

 return compare;
 }
 });

 return newList.iterator();
 }

 public int size() {
 return list.size();

 }

 public IModel model(final Object object) {
return new CompoundPropertyModel((LocationsEntity)object);
 }


*webpage.html:

*

 ...

table wicket:id=datatable/table

...


Thanks,
Elad


Re: Onclick method for DefaultDataTable cells

2009-07-30 Thread Igor Vaynberg
http://wicketstuff.org/wicket/repeater/?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.DataTablePage

-igor

On Thu, Jul 30, 2009 at 11:14 AM, Elad Katze...@xtify.com wrote:
 Hi, I have a DefaultDataTable with 5 columns, I want to be able to register
 to an onclick method that fires when the user will click a specific row\cell
 in the table.
 In other words, I need to be able to open an edit screen when the user
 clicks the row he wants to edit, and for that I need the row to be clickable
 (or just the name cell) and I need to be able to be able to hook up to that
 event.

 My Code:
 *Please bear in mind that I've only started developing in wicket a week ago
 so if you see anything that doesn't make sense, please let me know so I can
 fix it.*
 *WebPage.java:*

 locationsEntityFacade =
 LookupHelper.getInstance().lookupLocationsEntityFacade();
         List locations = locationsEntityFacade.findAll();
         int count = locations.size();

         add(new Label(locationsCount, String.valueOf(count)));

         LocationsProvider locationsProvider = new LocationsProvider();

         IColumn[] columns = new IColumn[5];
         columns[0] = new PropertyColumn(new Model(Name), name, name);
         columns[1] = new PropertyColumn(new Model(Address 1),
 streetAddress1, streetAddress1);
         columns[2] = new PropertyColumn(new Model(Address 2),
 streetAddress2, streetAddress2);
         columns[3] = new PropertyColumn(new Model(City), city, city);
         columns[4] = new PropertyColumn(new Model(State), usState,
 usState);

         DefaultDataTable table = new DefaultDataTable(datatable, columns,
 locationsProvider, 10);
         add(table);

 * Location Provider:*

 public class LocationsProvider extends SortableDataProvider{

     List list = new ArrayList();
     LocationsEntityFacadeLocal locationsEntityFacade;



     public LocationsProvider()  {
         setSort(id, true);
         locationsEntityFacade =
 LookupHelper.getInstance().lookupLocationsEntityFacade();
         list = locationsEntityFacade.findAll();
     }

     public Iterator iterator(int first, int count) {
         List newList = new ArrayList();
         newList.addAll(list.subList(first, first + count));
         final String sortColumn = this.getSort().getProperty();
         final boolean ascending = this.getSort().isAscending();
         Collections.sort(newList, new Comparator() {

             public int compare(Object obj1, Object obj2) {
                 PropertyModel model1 = new PropertyModel(obj1, sortColumn);
                 PropertyModel model2 = new PropertyModel(obj2, sortColumn);

                 Object modelObject1 = model1.getObject();
                 Object modelObject2 = model2.getObject();

                 int compare = ((Comparable)
 modelObject1).compareTo(modelObject2);

                 if (!ascending)
                     compare *= -1;

                 return compare;
             }
         });

         return newList.iterator();
     }

     public int size() {
         return list.size();

     }

     public IModel model(final Object object) {
        return new CompoundPropertyModel((LocationsEntity)object);
     }


 *webpage.html:

 *

 ...

 table wicket:id=datatable/table

 ...


 Thanks,
 Elad


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



Re: Onclick method for DefaultDataTable cells

2009-07-30 Thread Michael O'Cleirigh

Hello,

Another way is to add an onclick listener to each row in the table by 
overriding newRowItem(...) in DefaultDataTable like this:


DefaultDataTable table = new DefaultDataTableLocationsEntity(datatable, 
columns,
   locationsProvider, 10) {


   @Override
   protected ItemLocationsEntity newRowItem(String id, int index,
   IModelLocationsEntity model) {

   ItemLocationsEntity rowItem = super.newRowItem(id, index,
   model);
  
  rowItem.add(new AjaxEventBehavior (onclick) {

 @Override
  protected void onEvent(AjaxRequestTarget target) {
   // pass the model object for the selected row to the
   editor

editOverlay.setModelObject (model.getObject());
   		target.addComponent (editOverlay);
}



   });
  


   return rowItem;
   }
   };


Regards,

Mike


http://wicketstuff.org/wicket/repeater/?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.DataTablePage

-igor

On Thu, Jul 30, 2009 at 11:14 AM, Elad Katze...@xtify.com wrote:
  

Hi, I have a DefaultDataTable with 5 columns, I want to be able to register
to an onclick method that fires when the user will click a specific row\cell
in the table.
In other words, I need to be able to open an edit screen when the user
clicks the row he wants to edit, and for that I need the row to be clickable
(or just the name cell) and I need to be able to be able to hook up to that
event.

My Code:
*Please bear in mind that I've only started developing in wicket a week ago
so if you see anything that doesn't make sense, please let me know so I can
fix it.*
*WebPage.java:*



locationsEntityFacade =
LookupHelper.getInstance().lookupLocationsEntityFacade();
List locations = locationsEntityFacade.findAll();
int count = locations.size();

add(new Label(locationsCount, String.valueOf(count)));

LocationsProvider locationsProvider = new LocationsProvider();

IColumn[] columns = new IColumn[5];
columns[0] = new PropertyColumn(new Model(Name), name, name);
columns[1] = new PropertyColumn(new Model(Address 1),
streetAddress1, streetAddress1);
columns[2] = new PropertyColumn(new Model(Address 2),
streetAddress2, streetAddress2);
columns[3] = new PropertyColumn(new Model(City), city, city);
columns[4] = new PropertyColumn(new Model(State), usState,
usState);

DefaultDataTable table = new DefaultDataTable(datatable, columns,
locationsProvider, 10);
add(table);
  

* Location Provider:*

public class LocationsProvider extends SortableDataProvider{


List list = new ArrayList();
LocationsEntityFacadeLocal locationsEntityFacade;

  


public LocationsProvider()  {
setSort(id, true);
locationsEntityFacade =
LookupHelper.getInstance().lookupLocationsEntityFacade();
list = locationsEntityFacade.findAll();
}

public Iterator iterator(int first, int count) {
List newList = new ArrayList();
newList.addAll(list.subList(first, first + count));
final String sortColumn = this.getSort().getProperty();
final boolean ascending = this.getSort().isAscending();
Collections.sort(newList, new Comparator() {

public int compare(Object obj1, Object obj2) {
PropertyModel model1 = new PropertyModel(obj1, sortColumn);
PropertyModel model2 = new PropertyModel(obj2, sortColumn);

Object modelObject1 = model1.getObject();
Object modelObject2 = model2.getObject();

int compare = ((Comparable)
modelObject1).compareTo(modelObject2);

if (!ascending)
compare *= -1;

return compare;
}
});

return newList.iterator();
}

public int size() {
return list.size();

}

public IModel model(final Object object) {
   return new CompoundPropertyModel((LocationsEntity)object);
}
  

*webpage.html:

*


...
  

table wicket:id=datatable/table

...

Thanks,

Elad




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

  




Localized sorting column in a DefaultDatatable

2009-07-07 Thread Olivier Bourgeois
Hi,

I'm trying to implement a simple sortable datatable with Wicket, and I'm
struggling with an issue I can't find a way to solve : how to build a
sortable column when the data to be sorted is also to be translated and
comes from the property files (not from the model directly) ?

I've done this :
- I build an AjaxDefaultDataTable with a sortable dataprovider containing a
country ZoneCode
- this ZoneCode is a key in the property files that provides the display
ZoneLabel

So I thought this kind of code would do the trick :

ListIColumnCountryDetails columns = new
ArrayListIColumnCountryDetails();
columns.add(new PropertyColumnCountryDetails(new
ModelString(Zone), zoneLabel, zoneCode) {

@Override
public void populateItem(ItemICellPopulatorCountryDetails
item, String componentId, IModelCountryDetails rowModel) {
CountryDetails detail = rowModel.getObject();
StringResourceModel srm = new
StringResourceModel(detail.getZoneCode(), item, rowModel);
item.add(new Label(componentId, srm));
detail.setZoneLabel(srm.getString());
}
});

but all I got is a NullPointerException because a ZoneLabel is empty at some
point in the sort and and a lot of warnings in the logs :

- WARN  org.apache.wicket.Localizer - Tried to retrieve a localized string
for a component that has not yet been added to the page. This can sometimes
lead to an invalid or no localized resource returned. Make sure you are not
calling Component#getString() inside your Component's constructor. Offending
component: [MarkupContainer [Component id = 1]]

Any ideas ?

thanks in advance,
Olivier.


Re: DefaultDataTable with date column

2009-05-11 Thread Edi


Date format is working. But I am not able to sorting that column.

Why?

Please advise.
thanks and regards,
edi


Pablo Sca wrote:
 
 Great!
 this is just what I need
 
 Thanks
 Pablo
 
 
 --
 From: Edgar Merino donvo...@gmail.com
 Sent: Thursday, October 02, 2008 5:19 AM
 To: users@wicket.apache.org
 Subject: Re: DefaultDataTable with date column
 
 Or simply use an AbstractColumn for that, you can even create a reusable 
 DateColumn:

 public class DateColumn extends AbstractColumn {
private String datePattern; //you can have a Pattern instead

//You can overload the constructor, to have default date patterns for 
 example
public DateColumn(IModel columnName, String datePattern) {
   super(columnName);
   this.datePattern = datePattern;
}

public void populateItem(Item cellItem, String componentId, IModel 
 model) {
   Document doc = (Document) model.getModelObject();
  SimpleDateFormat df = (SimpleDateFormat) DateFormat.getInstance();
   df.applyPattern(datePattern);
   cellItem.add(new Label(componentId, 
 df.format(doc.getDeliveryDate(;
}
 }

 Then just use this class as you would with any other column, along with a 
 pattern to apply to the format:

 ListIColumn columns = new ArrayListIColumn();
 columns.add(new DateColumn(new Model(Delivery date), dd MMM  '@' 
 hh:mm a));


 Regards,
 Edgar Merino




 Jeremy Thomerson escribió:
 The default java.util.Date converter within Wicket has varied between
 releases.  I suggest adding this to the init method of your application
 class and controlling the date format yourself if you need a specific
 format:

 ((ConverterLocator) getConverterLocator()).set(Date.class, new
 IConverterDate() {
 private static final long serialVersionUID = 1L;
 private final DateFormat mFormat = new
 SimpleDateFormat(MM/dd/yy hh:mm:ss.SSS);
 public Date convertToObject(String value, Locale locale) {
 try {
 return mFormat.parse(value);
 } catch (ParseException e) {
 e.printStackTrace();
 }
 return null;
 }

 public String convertToString(Date value, Locale locale) {
 return mFormat.format(value);
 }

 });




 -
 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
 
 
 

-- 
View this message in context: 
http://www.nabble.com/RepeatingView%3A-add-new-component-at-specified-index-tp19739732p23478648.html
Sent from the Wicket - User 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: DefaultDataTable loses pagination after filtering

2009-04-28 Thread Jason Rosenberg

Great,

When do we expect 1.4-rc3 to be available (that's the fixed version,
according to the jira listed there)

Thanks,

Jason



Anton Veretennikov wrote:
 
 If I'm true, this was solved.
 https://issues.apache.org/jira/browse/WICKET-2175
 
 On Tue, Apr 28, 2009 at 8:25 AM, Jason Rosenberg jbrosenb...@gmail.com
 wrote:

 If it matters, I forgot to mention, I'm using wicket 1.4-rc2

 Jason



 Jason Rosenberg wrote:

 Hi,

 I have an issue with the DefaultDataTable, and I'm wondering if this is
 something that I should expect to be supported, or not.

 (I've found the same problem with the AjaxFallbackDefaultDataTable)

 I implemented filtering, with the FilterToolbar, and made a few of the
 columns use TextFilteredPropertyColumn

 I set things up roughly similar to the wicket-stuff phone book
 example

 One thing I've noticed, is that if I have enough elements in the table,
 to
 force pagination initially, and then I enter filtered text in the
 toolbar
 to
 reduce the number of data items, such that there's only one page of
 data,
 when I then subsequently clear the filter, the full data gets restored
 to
 the data table, except that the top widgets for navigating the
 pagination
 don't display.

 In other words, the pagination navigation links at top right (e.g.  
 1
 2
 3 ) go away when the filtering removes the need for paginationbut
 then clearing the filter does not restore that top toolbar

 Thoughts?

 Thanks,

 Jason



 --
 View this message in context:
 http://www.nabble.com/DefaultDataTable-loses-pagination-after-filtering-tp23267884p23267903.html
 Sent from the Wicket - User 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
 
 
 

-- 
View this message in context: 
http://www.nabble.com/DefaultDataTable-loses-pagination-after-filtering-tp23267884p23279021.html
Sent from the Wicket - User 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: DefaultDataTable loses pagination after filtering

2009-04-28 Thread Anton Veretennikov
I use 1.4-SNAPSHOT and

repository
  idwicket-snaps/id
  urlhttp://wicketstuff.org/maven/repository/url
  snapshots
  /snapshots
  releases
  /releases
/repository


On Tue, Apr 28, 2009 at 11:06 PM, Jason Rosenberg jbrosenb...@gmail.com wrote:

 Great,

 When do we expect 1.4-rc3 to be available (that's the fixed version,
 according to the jira listed there)

 Thanks,

 Jason



 Anton Veretennikov wrote:

 If I'm true, this was solved.
 https://issues.apache.org/jira/browse/WICKET-2175

 On Tue, Apr 28, 2009 at 8:25 AM, Jason Rosenberg jbrosenb...@gmail.com
 wrote:

 If it matters, I forgot to mention, I'm using wicket 1.4-rc2

 Jason



 Jason Rosenberg wrote:

 Hi,

 I have an issue with the DefaultDataTable, and I'm wondering if this is
 something that I should expect to be supported, or not.

 (I've found the same problem with the AjaxFallbackDefaultDataTable)

 I implemented filtering, with the FilterToolbar, and made a few of the
 columns use TextFilteredPropertyColumn

 I set things up roughly similar to the wicket-stuff phone book
 example

 One thing I've noticed, is that if I have enough elements in the table,
 to
 force pagination initially, and then I enter filtered text in the
 toolbar
 to
 reduce the number of data items, such that there's only one page of
 data,
 when I then subsequently clear the filter, the full data gets restored
 to
 the data table, except that the top widgets for navigating the
 pagination
 don't display.

 In other words, the pagination navigation links at top right (e.g.  
 1
 2
 3 ) go away when the filtering removes the need for paginationbut
 then clearing the filter does not restore that top toolbar

 Thoughts?

 Thanks,

 Jason



 --
 View this message in context:
 http://www.nabble.com/DefaultDataTable-loses-pagination-after-filtering-tp23267884p23267903.html
 Sent from the Wicket - User 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




 --
 View this message in context: 
 http://www.nabble.com/DefaultDataTable-loses-pagination-after-filtering-tp23267884p23279021.html
 Sent from the Wicket - User 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: DefaultDataTable loses pagination after filtering

2009-04-28 Thread Jason Rosenberg

Anton,

Thanks, this works for me, and the bug is indeed fixed

Jason



I use 1.4-SNAPSHOT and

repository
  idwicket-snaps/id
  urlhttp://wicketstuff.org/maven/repository/url
  snapshots
  /snapshots
  releases
  /releases
/repository



-- 
View this message in context: 
http://www.nabble.com/DefaultDataTable-loses-pagination-after-filtering-tp23267884p23279649.html
Sent from the Wicket - User 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



  1   2   >