Inmethod Grid: put all rows to edit mode

2018-01-11 Thread Christos Stieglitz
Hi list,

is there a way to programmatically (un)set the edit mode in an inmethod grid?
The issue here is to (un)set the edit mode for _all_ rows of the grid at once.

Currently i use a SubmitCancelColumn which works like a charm.
Overriding SubmitCancelColumn#onSubmitted saves my objects as needed.

But SubmitCancelColumn requires my users to click / save 25 rows one by one.
This is considered tedious. So i try to offer a new button to my users.
Once this button is clicked, all rows in the grid go to edit mode automatically.
Clicked again, all rows save their models automatically. Ideally by calling the
onSubmitted method.
(there is also a cancel-all button).

My code so far is
add(new AjaxLink("quickedit") {
  @Override
  public void onClick(AjaxRequestTarget target) {
WebMarkupContainer rows =
(WebMarkupContainer)getPage().get("form:grid:form:bodyContainer:body:row");
if(rows != null)
  for(Component row : rows) {
IModel rowModel = (IModel)row.getDefaultModel();
            grid.setItemEdit(rowModel, true);
  }
datagrid.update();
target.add(datagrid); // should not be needed
  }
});

The line with setItemEdit(rowModel, true); gets called for all rows in the grid.
But nothing changes. Display remains the same. Could you please tell me what i'm
doing wrong?

Many thanks for your suggestions

C. Stieglitz

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



Re: Best way to track logged in users?

2016-05-13 Thread Christos Stieglitz
This is not a wicket related issue.

There are some frameworks out there, both open source and  commercial,
with this functionality. One of my customers uses Omniture (commercial)
with good results. But perhaps you need a subset of the omniture features,
so another framework may suit you better.

Just google some keywords like "web analytics" etc.

Cheers

Christos

On Fri, May 13, 2016 08:02, Tom Götz wrote:
> Hi there,
>
>
> I=3DE2=3D80=3D99d like to track the currently logged in users with the
> =3D
> corresponding session ids for displaying them on an admin page.
> What=3DE2=3D80=3D
> =3D99s the best way to do that? I was thinking about storing =3D
> sessionId/userId data in the database, but I=3DE2=3D80=3D99m not sure yet
> if =3D that would be the best approach.
>
> What do you think?
>
>
> Cheers,
> Tom
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
>



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



Re: Wicket 7 - OutOfMemory PermGen

2015-11-18 Thread Christos Stieglitz
Just in case:
i recently had exactly the same problem. It turned out that it is not
related to Wicket at all.

Do you use a Java8 JDK? Do you compile for Java7?

The PermGen Exception happens at random times [*], always at the same
line in the code. Hence you assume you have some faulty code there.
But it is a JDK 8 -> 7 compatibility mode issue, not Wicket. 
Before losing lots of hours (like i did) just check the settings of your
IDE.

[*] under Windows 64bit twice as often as under Linux.

HTH

Christos




Am Wednesday, den 18.11.2015, 11:56 -0500 schrieb Mihir Chhaya: 
> Martin, Yes. I am using Wicket 7.00.
> 
> On Wed, Nov 18, 2015 at 11:55 AM, Mihir Chhaya 
> wrote:
> 
> > First, Thanks Francois for your quick looking into this.
> >
> > The SearchDealerPage is created as below. The link is menu option.
> >
> > BookmarkablePageLink dealerInquiryLink = new
> > BookmarkablePageLink("dealerInquiryLink", SearchDealerPage.class,
> > searchPageParameters);
> >
> >
> > Thanks,
> >
> > -Mihir.
> >
> >
> > On Wed, Nov 18, 2015 at 11:50 AM, Francois Meillet <
> > francois.meil...@gmail.com> wrote:
> >
> >> Sorry, it's seems that there is a problem when you instanciate the
> >> SearchDealerPage instance
> >>
> >> How you instanciate it ?
> >>
> >> François
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> Le 18 nov. 2015 à 17:46, Mihir Chhaya  a écrit :
> >>
> >> > Following are AbcUserSearchTO and AbcUser classes with DomainObject
> >> > implementation.
> >> >
> >> > public interface DomainObject extends Serializable {
> >> >
> >> >Long getId();
> >> > }
> >> >
> >> > public class AbcUserSearchTO implements DomainObject {
> >> >
> >> > /**
> >> > *
> >> > */
> >> > private static final long serialVersionUID = 1L;
> >> >
> >> > /* (non-Javadoc)
> >> > * @see gov.fdle.fpp.domain.DomainObject#getId()
> >> > */
> >> > @Override
> >> > public Long getId() {
> >> > return null;
> >> > }
> >> > private String searchName;
> >> > private String searchDealer;
> >> >
> >> > /**
> >> > * @return the lastName
> >> > */
> >> > public String getSearchName() {
> >> > return searchName;
> >> > }
> >> >
> >> > /**
> >> > * @param name the lastName to set
> >> > */
> >> > public void setSearchName(String name) {
> >> >if (name == null){
> >> >name = FppConstants.EMPTY_STRING;
> >> >}
> >> > this.searchName = name;
> >> > }
> >> >
> >> > /**
> >> > * @return the searchDealer
> >> > */
> >> > public String getSearchDealer() {
> >> > return searchDealer;
> >> > }
> >> >
> >> > /**
> >> > * @param searchDealer the searchDealer to set
> >> > */
> >> > public void setSearchDealer(String searchDealer) {
> >> > this.searchDealer = searchDealer;
> >> > }
> >> > }
> >> >
> >> >
> >> > public class AbcUser implements DomainObject {
> >> >
> >> > private static final long serialVersionUID = 1L;
> >> > public Long getId() {
> >> >return null;
> >> >}
> >> >
> >> > //ASM fields
> >> >private long userNbr;
> >> >private String userName;
> >> >private String password;
> >> >private String firstName;
> >> >private String lastName;
> >> > ...setter
> >> > getter
> >> >
> >> > }
> >> >
> >> > On Wed, Nov 18, 2015 at 11:43 AM, Francois Meillet <
> >> > francois.meil...@gmail.com> wrote:
> >> >
> >> >> and the abcUserSearchTO ?
> >> >>
> >> >>
> >> >> François
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> Le 18 nov. 2015 à 17:40, Mihir Chhaya  a
> >> écrit :
> >> >>
> >> >>> Here is SearchDealerPage.
> >> >>>
> >> >>> package gov.xyz.abc.view.asm;
> >> >>>
> >> >>> import gov.xyz.abc.business.AsmAdminService;
> >> >>> import gov.xyz.abc.common.AppSession;
> >> >>> import gov.xyz.abc.common.AuthenticatedPage;
> >> >>> import gov.xyz.abc.common.DealerDetails;
> >> >>> import gov.xyz.abc.common.abcException;
> >> >>> import gov.xyz.abc.model.abcUser;
> >> >>> import gov.xyz.abc.model.abcUserSearchTO;
> >> >>> import gov.xyz.abc.util.DefaultFocusBehavior;
> >> >>> import gov.xyz.abc.util.abcConstants;
> >> >>> import gov.xyz.abc.util.abcErrConstant;
> >> >>> import gov.xyz.abc.util.abcUtils;
> >> >>> import gov.xyz.wktcommon.components.ErroringTextField;
> >> >>>
> >> >>> import org.apache.commons.lang3.StringUtils;
> >> >>> import org.apache.wicket.ajax.AjaxRequestTarget;
> >> >>> import org.apache.wicket.ajax.markup.html.form.AjaxButton;
> >> >>> import org.apache.wicket.markup.html.basic.Label;
> >> >>> import org.apache.wicket.markup.html.form.Form;
> >> >>> import org.apache.wicket.model.CompoundPropertyModel;
> >> >>> import org.apache.wicket.model.Model;
> >> >>> import org.apache.wicket.request.mapper.parameter.PageParameters;
> >> >>> import org.apache.wicket.spring.injection.annot.SpringBean;
> >> >>> import org.apache.wicket.validation.validator.StringValidator;
> >> >>>
> >> >>>
> >> >>> /**
> >> >>> * Search Dealer Page.
> >> >>> *
> >> >>> * @author Pavankumar Appana
> >> >>> *