Re: Apache Wicket 7.6.0 - filter status: REJECTED

2024-04-09 Thread Mihir Chhaya
Thank you, Emond for sharing this. We had our JBoss Server patched up
recently which broke the system. It was working fine before the server
update.

On Mon, Apr 8, 2024 at 1:11 PM Emond Papegaaij 
wrote:

> Op ma 8 apr 2024 18:16 schreef Mihir Chhaya :
>
> > We have the following configuration for one of the Apache Wicket
> projects.
> >
> > Apache Wicket: 7.6.0
> > OpenJDK Java Version: 1.8.402
> > JBoss Server: 7.4.13
> >
> > *Issue: Caused by: java.io.InvalidClassException: filter status:
> REJECTED*
> >
> > The application works fine when the number of records is around 100, but
> > throws above error when the number is increased.
> > My understanding is some Wicket class is being rejected from the
> > Serialization/Deserialization and this class comes into picture only when
> > the Page has more data.
> >
>
> This is likely not related to a specific class, but rather to the size of
> the page or the number of references in it. We hit the exact same issue
> some time ago after upgrading WildFly. In the recent releases a filter on
> serialization is enabled, that does not interact nicely with Wicket. On
> WildFly you can disable it with DISABLE_JDK_SERIAL_FILTER=true. It probably
> is the same on JBoss EAP. You can also try to tweak the settings if you
> want to keep the filter, but you will have to check with Red Hat for the
> exact settings.
>
> Best regards,
> Emond
>
> >
>


Apache Wicket 7.6.0 - filter status: REJECTED

2024-04-08 Thread Mihir Chhaya
We have the following configuration for one of the Apache Wicket projects.

Apache Wicket: 7.6.0
OpenJDK Java Version: 1.8.402
JBoss Server: 7.4.13

*Issue: Caused by: java.io.InvalidClassException: filter status: REJECTED*

The application works fine when the number of records is around 100, but
throws above error when the number is increased.
My understanding is some Wicket class is being rejected from the
Serialization/Deserialization and this class comes into picture only when
the Page has more data.

I understand the Apache Wicket version is not supported, but can anyone
provide any insight?

Thank you,
-Mihir Chhaya


Re: upgrading Wicket

2024-01-26 Thread Mihir Chhaya
Hi Steven,

I undertook the Wicket Upgrade for a couple of 1.4/1.5 projects to Wicket
7/8 with Bootstrap. I don't have a script for upgrading it, but can share
my experiences and component changes by early next week.

If your 1.4 projects had multiple complex custom components written, then
it might be just easier to either create a new project with the latest
Apache Wicket and Wicket based UI libraries (which can replace some of your
custom components) to retain and reuse Wicket knowledge, or, use React (or
other Javascript framework).

Using React compared to Apache Wicket would be an architectural shift and
would need evaluating the pros/cons like budget, timeline,
ability/requirement to write test cases for UI behavior, Java v/s
JavaScript coding, overall testing, learning curve etc.

Creating a new project with the latest Apache Wicket and UI component
libraries might be easier than using React just with the fact that you
already have 1.4 code to copy/paste many if not most of the codebase.
In both cases, you can try to keep the UI leaner and push business to a
separate web services based project.

Best,
-Mihir


On Fri, Jan 26, 2024 at 8:58 AM Nelligan, Steven M 
wrote:

>
> Help,  I am new to Wicket...and have taken over a project with wicket
> version 1.4.18, which is way out of date.
> According to a consulting firm, this would be a multi-year project to
> update all of our projects to the latest version of Wicket; and they are
> recommending we just rewrite the front end code to React.
>
> Does anyone have a program or script which would help with the updating of
> wicket components to a new Version?
>
> Thanks,
> Steven M Nelligan
> SENIOR SOFTWARE DEVELOPER
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Strange outcome - setRequired with OnChangeBehavior

2021-06-22 Thread Mihir Chhaya
Hello Wicket Wizards,

I am experiencing this strange behavior with the *CompoundPropertyModel
form, a required text field, and the OnChangeBehavior added to the text
field*.

*Apache Wicket Version: 8.12.0 *

Here is the situation:

//Page/Class level variable
int charCount = 0;

//Inside Page constructor
Form criteriaForm = new Form ("searchCriteria",
 new CompoundPropertyModel< CriteriaTO >(criteriaObject));

TextField txtFirstName = new TextField
("firstName");//firstName is bean property
*txtFirstName.setRequired(true); //This seems to be preventing the change
event when removing the last remaining character*
txtFirstName.setOutputMarkupId(true);
txtFirstName.setMarkupId("firstNmId");

//Now, add onChange behavior to capture the change event
txtFirstName .add(new OnChangeAjaxBehavior() {

/**
*
*/
private static final long serialVersionUID = 1L;

@Override
protected void onUpdate(AjaxRequestTarget target) {

System.out.println("Change counter:" + ++counter);

}

});

criteriaForm.add(txtFirstName);

Test: Enter a then b then c then d and then e in first Name. Following is
the output for each change event.
 [stdout] (default task-21) Change counter:1
 [stdout] (default task-22) Change counter:2
 [stdout] (default task-20) Change counter:3
 [stdout] (default task-23) Change counter:4
 [stdout] (default task-24) Change counter:5

When removing each letter at a time, the change event seems to be* not
fired when the last letter is left*. Following is the output when I start
removing one letter at a time from the end.
 [stdout] (default task-25) Change counter:6
 [stdout] (default task-26) Change counter:7
 [stdout] (default task-28) Change counter:8
 [stdout] (default task-27) Change counter:9

Here, Change counter:10 did not get printed when removing 'a' from the
page. Additionally, the bean firstName field had one letter left i.e. 'a'
even though the UI has all letters removed from the screen.

When I remove the txtFirstName.setRequired(true) line the OnChangeBehavior
works just fine, printing the Change Counter:10  and also removing the last
character from the bean property.

Any suggestions?

Thank you,
-Mihir.


Re: CompoundPropertyModel - white space

2021-06-08 Thread Mihir Chhaya
Thank you, Sven. This is working.

As always, The Apache Wicket team ROCKS !!

-Mihir.

On Tue, Jun 8, 2021 at 3:54 PM Sven Meier  wrote:

> Hi,
>
> by default textfields trim their input, so I'd expect the total count
> characters to be correct to the processed input:
>
>"f " + "m" + "l" -> "fml" = 3 characters (also a space was entered
> after the *f*
>
> You might want to override #shouldTrimInput if you want to keep the
> whitespace.
>
> Have fun
> Sven
>
>
> On 08.06.21 21:05, Mihir Chhaya wrote:
> > Hello,
> >
> > Apache Wicket version used: 8.12.0
> >
> > I need to show total characters entered into First, Middle and Last name
> > text fields + one drop down for Suffix. The combined length of these four
> > fields should not exceed the set limit.
> > For this, I have added OnChangeAjaxBehavior to all the three text fields
> +
> > the drop down.
> >
> > These fields are bound to the respective bean properties using
> > CompoundProperyModel. The bean has a generic getter method to calculate
> > combined length without trimming white space from any field.
> >
> > Issue:
> > The CompoundPropertyModel bean setter method is not called when a white
> > space is entered after any letter in the field.
> > For example, entering "f" in the first name will call the setter method,
> > but entering white space after "f" does not call the setter method until
> > the next character is entered.
> > This is messing up the total chars count.
> >
> > Here is how the length looks like without any white space trimming:
> >
> > (1) F + M + L = "f" + "m" + "l" = 3
> > (2) F + M + L = "f " + "m" + "l" = 3 (Please note the white space after
> f)
> > (3) F + M + L = "f n" + "m" + "l" = 5
> >
> > As one can see, the 2nd scenario is what I am trying to solve.
> >
> > The OnChangeAjaxBehavior event is called when entering the white space,
> but
> > the bean setter is not, causing misleading total chars count.
> >
> > Any suggestions?
> >
> > Thank you,
> > -Mihir.
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


CompoundPropertyModel - white space

2021-06-08 Thread Mihir Chhaya
Hello,

Apache Wicket version used: 8.12.0

I need to show total characters entered into First, Middle and Last name
text fields + one drop down for Suffix. The combined length of these four
fields should not exceed the set limit.
For this, I have added OnChangeAjaxBehavior to all the three text fields +
the drop down.

These fields are bound to the respective bean properties using
CompoundProperyModel. The bean has a generic getter method to calculate
combined length without trimming white space from any field.

Issue:
The CompoundPropertyModel bean setter method is not called when a white
space is entered after any letter in the field.
For example, entering "f" in the first name will call the setter method,
but entering white space after "f" does not call the setter method until
the next character is entered.
This is messing up the total chars count.

Here is how the length looks like without any white space trimming:

(1) F + M + L = "f" + "m" + "l" = 3
(2) F + M + L = "f " + "m" + "l" = 3 (Please note the white space after f)
(3) F + M + L = "f n" + "m" + "l" = 5

As one can see, the 2nd scenario is what I am trying to solve.

The OnChangeAjaxBehavior event is called when entering the white space, but
the bean setter is not, causing misleading total chars count.

Any suggestions?

Thank you,
-Mihir.


Re: CVE-2021-23937: Apache Wicket: DNS proxy and possible amplification attack

2021-05-26 Thread Mihir Chhaya
Thank you for the reply.

We have something like below in our code. Will this be enough or still we
need to replace the jar file?

public static String getRemoteAddr(HttpServletRequest request) {


 //If routed behind the Load Balancer, network guys put the original IP in
the header as XForwarded-For

 String remoteAddr = request.getHeader("X-Forwarded-For");

 if (StrUtils.isBlank(remoteAddr)) {

remoteAddr= request.getHeader("x-forwarded-for");

 }

 if (StrUtils.isBlank(remoteAddr)) {

remoteAddr=request.getRemoteAddr();

 }

 return remoteAddr;

}


On Wed, May 26, 2021 at 11:05 AM Matt Pavlovich  wrote:

> Thank you for the notice, and the already fixed releases =)
>
> Is there a JIRA or associated PR with the fix? I’m not seeing a specific
> fix in the changelogs for 9.3.0 and 8.12.0.
>
> Thanks,
> Matt Pavlovich
>
> > On May 25, 2021, at 2:51 AM, Emond Papegaaij 
> wrote:
> >
> > Description:
> >
> > A DNS proxy and possible amplification attack vulnerability in
> > WebClientInfo of Apache Wicket allows an attacker to trigger arbitrary
> > DNS lookups from the server when the X-Forwarded-For header is not
> > properly sanitized. This DNS lookup can be engineered to overload an
> > internal DNS server or to slow down request processing of the Apache
> > Wicket application causing a possible denial of service on either the
> > internal infrastructure or the web application itself.
> >
> > This issue affects Apache Wicket Apache Wicket 9.x version 9.2.0 and
> > prior versions; Apache Wicket 8.x version 8.11.0 and prior versions;
> > Apache Wicket 7.x version 7.17.0 and prior versions and Apache Wicket
> > 6.x version 6.2.0 and later versions.
> >
> > Mitigation:
> >
> > Sanitize the X-Forwarded-For header by running an Apache Wicket
> > application behind a reverse HTTP proxy. This proxy should put the
> > client IP address in the X-Forwarded-For header and not pass through
> > the contents of the header as received by the client.
> >
> > The application developers are recommended to upgrade to:
> > - Apache Wicket 7.18.0
> > 
> > - Apache Wicket 8.12.0
> > 
> > - Apache Wicket 9.0.0
> > 
> >
> > Credit:
> >
> > Apache Wicket would like to thank Jonathan Juursema from
> > Topicus.Healthcare for reporting this issue.
> >
> > Apache Wicket Team
> >
> > -
> > 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: CVE-2021-23937: Apache Wicket: DNS proxy and possible amplification attack

2021-05-26 Thread Mihir Chhaya
Thank you for sharing this information.

Questions:
1. Will there be any upgrades from Wicket-CDI, Wicket-bootstrap etc.
libraries related to this Vulnerability?
2. If yes, then should I wait for those libraries or go ahead and put the
core Apache Wicket libraries first and then upgrade other libraries when
available?

Thank you,
-Mihir.

On Tue, May 25, 2021 at 3:51 AM Emond Papegaaij 
wrote:

> Description:
>
> A DNS proxy and possible amplification attack vulnerability in
> WebClientInfo of Apache Wicket allows an attacker to trigger arbitrary
> DNS lookups from the server when the X-Forwarded-For header is not
> properly sanitized. This DNS lookup can be engineered to overload an
> internal DNS server or to slow down request processing of the Apache
> Wicket application causing a possible denial of service on either the
> internal infrastructure or the web application itself.
>
> This issue affects Apache Wicket Apache Wicket 9.x version 9.2.0 and
> prior versions; Apache Wicket 8.x version 8.11.0 and prior versions;
> Apache Wicket 7.x version 7.17.0 and prior versions and Apache Wicket
> 6.x version 6.2.0 and later versions.
>
> Mitigation:
>
> Sanitize the X-Forwarded-For header by running an Apache Wicket
> application behind a reverse HTTP proxy. This proxy should put the
> client IP address in the X-Forwarded-For header and not pass through
> the contents of the header as received by the client.
>
> The application developers are recommended to upgrade to:
> - Apache Wicket 7.18.0
> 
> - Apache Wicket 8.12.0
> 
> - Apache Wicket 9.0.0
> 
>
> Credit:
>
> Apache Wicket would like to thank Jonathan Juursema from
> Topicus.Healthcare for reporting this issue.
>
> Apache Wicket Team
>
> -
> To unsubscribe, e-mail: announce-unsubscr...@wicket.apache.org
> For additional commands, e-mail: announce-h...@wicket.apache.org
>
>


Re: Apache Wicket - Java Release train

2018-02-24 Thread Mihir Chhaya
Got it. Thanks Sebastien/Andrea.

-Mihir.

On Sat, Feb 24, 2018, 12:59 PM Andrea Del Bene  wrote:

> If this could be of any help, I can tell that in the last year all
> Wicket releases have been built using OpenJDK, version 6 included.
>
>
> On 24/02/2018 18:13, Sebastien Briquet wrote:
> > Hi Mihir,
> >
> > I presume you are talking about java.awt.font library.
> > If it's the case, the only references of "awt.Font" I found are located
> in :
> > - DefaultButtonImageResource.java (wicket-core) to which one can specify
> > the Font object
> > - CaptchaImageResource (wicket-extensions), which could use "Helvetica",
> > "Arial" and/or "Courier" font
> >
> > Hope this helps,
> > Sebastien
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Apache Wicket - Java Release train

2018-02-24 Thread Mihir Chhaya
Thanks,  Martin.

Yes,  with OpenJDK being used as reference for Oracle JDK  version 7
onwards, both should be same.

But, somewhere I read about differences in font libraries and was not sure
if Wicket or Wicket integration with other framework might have any issue
in that area.

Thanks,
-Mihir.


On Sat, Feb 24, 2018, 2:54 AM Martin Grigorov <martin.grigo...@gmail.com>
wrote:

> Hi,
>
> I am not sure that I understand your concern.
> OpenJDK and Oracle JDK are supposed to behave the same way.
> If they don't than there is a bug in either of them.
> I guess your question is whether Wicket will be tested better with only one
> of them ? So far I've never really cared which JDK I use for a project. But
> I'd suggest you to use the same flavor and version everywhere
> (development, staging and production)
>
>
> On Feb 23, 2018 5:42 PM, "Mihir Chhaya" <mihir.chh...@gmail.com> wrote:
>
> Hello,
>
> This question is more for the Apache Wicket core team.
>
> As Oracle has announced the release train approach, could you share Apache
> Wicket's release plan for OpenJDK/Oracle JDK and any concerns with using
> OpenJDK?
>
> We use various frameworks including Apache Wicket 7.x w and w/o
> Spring/Hibernate, and currently looking for various available option (full
> scale OpenJDK or hybrid model with OpenJDK on local and Oracle JDK on
> server etc.).
>
> Thanks,
> -Mihir.
>


Apache Wicket - Java Release train

2018-02-23 Thread Mihir Chhaya
Hello,

This question is more for the Apache Wicket core team.

As Oracle has announced the release train approach, could you share Apache
Wicket's release plan for OpenJDK/Oracle JDK and any concerns with using
OpenJDK?

We use various frameworks including Apache Wicket 7.x w and w/o
Spring/Hibernate, and currently looking for various available option (full
scale OpenJDK or hybrid model with OpenJDK on local and Oracle JDK on
server etc.).

Thanks,
-Mihir.


Wicket Example

2017-10-30 Thread Mihir Chhaya
Hello,

Live Examples link on https://wicket.apache.org/ is throwing 404 error.
Could anybody please direct me to working link?

Thanks,
-Mihir.


Re: Self Notification to users

2017-06-17 Thread Mihir Chhaya
If you don't want to add either of the option on every page then you can
use template with header page having feedback pane as Martin has suggested.

-Mihir.

On Sat, Jun 17, 2017, 4:30 AM Martin Grigorov 
wrote:

> Hi,
>
> You have two options:
> 1) polling with AbstractAjaxTimerBehavior
> 2) pushing with WebSocketBehavior
>
> In both cases you need to add the behavior to all pages. And have some kind
> of FeedbackPanel to render the notifications.
>
> On Jun 17, 2017 11:18 AM, "gasper"  wrote:
>
> > Hello wicketers,
> >
> > I need help concerning how to create a notification message to users for
> > every 1 minutes about new messages .
> >
> > If the users is on any page either home or contact page .. The user
> should
> > be able to get the notification messages .
> >
> > Thanks
> >
> > --
> > View this message in context: http://apache-wicket.1842946.
> > n4.nabble.com/Self-Notification-to-users-tp4678062.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: Twitter poll result 2

2016-11-01 Thread Mihir Chhaya
I would like to share my personal experience from developer's perspective.
First and foremost, I personally love Apache Wicket more than any MVC
framework I have worked with so far (Struts/JSF). This is just me.

The place I am currently working adopted Wicket 1.4 around 2012. That time,
the management in general was relying on individual developer's technical
skills and abilities. Everybody was recommended to use Wicket 1.4. I
personally evaluated couple of different options and then picked up Wicket
1.4.

That time, Apache Wicket in general was lacking good documentation, good
third party libraries and community awareness. Not any more.

My other colleagues and developers eventually started working with Wicket.
Many applications got developed using Wicket. Most of the time the code was
'copy and paste' from components point of view. We had working components
developed in-house; but no solid third party components except in-method
grid (which was great, but with some of the issues of it's own).

Developers got used to writing Wicket based application.

Now, agency became more serious on adopting technologies which had sound
community and commercial technical support, and which could be considered
as 'standard'. Also, came the need of responsive design and web
applications for smaller devices.

More than 75% of the colleagues I was working with were not interested in
writing their Junit test cases, nor writing their own css/javascript and
other UI related stuff - I could not find anybody other than 2-3 guys
interested in developing rich, responsive in-house components. They were
looking more for ready-to-use components.

So, the agency started evaluation (close to two years ago) and other
developers were assigned to find and evaluate different options.

We had group of developers who had past experience of Richfaces/Icefaces
etc.

So, the evaluation started keeping following points in mind:

1. Solid technical and commercial support. Larger community support with
detail documentation.
2. Following standards (Java/JEE etc). So if standards changes in future
then it would be minimal impact.
3. Standards supported Out-Of-Box by application servers.
4. Responsive design.
5. Less of presentation layer coding.
6. For CDI/Injections, rely on Java instead of Spring.
7. Finding developers with prior experience in specific technology. (This
is case-by-case and by location. Not necessarily a must - but nice to have
kind of point to consider in evaluation.)

And at the end, agency decided to move forward with using JSF (as it is
'standard'), EJBs and Java EE based technologies for CDI/Injection.
Choosing JSF brought Prime-faces and it's theme to develop responsive
applications for any devices.

Considering the progress Apache Wicket has made in last couple of years, I
do believe Apache Wicket can do all of above and much more then any other
framework. Believe me, I still love Apache Wicket over any other framework.
It just puts so much of control in my hand instead of relying on some
bloated versions of html files. Additionally, I am also able to unit test
and presentation layer - improving my confidence.

But most of the developers I am working don't care to read and understand
framework architecture in detail, nor they care exploring the power of such
frameworks which allows them to build their components the way they want.
They were primarily looking for something which is ready-to-use (which you
can get with Apache Wicket + Kendo UI/ BootStrap or any other JS
framework).

We do have projects in Wicket (latest one I migrated from 1.4 to Wicket
7.1), but all new development is now in JSF.

Apache Wicket team and the whole community has done exceptionally fantastic
job in all aspects to improve the framework and making the project more
appealing.

Additionally, what can be done to (which Francois has already suggested in
his post):
1. Maximize developers' interest in exploring and looking into the
components.
2. How to show case /sample Wicket based web application developed for
smaller devices? How to make developers look at Wicket show cases?
3. Commercial support and marketing it aggressively.

By no mean I am trying to show/share that we have migrated to other
framework. Above is just my sharing, by all mean to help such strong
framework whichever way I can.

Thanks,
-Mihir.

On Tue, Nov 1, 2016 at 11:49 AM, Tobias Soloschenko <
tobiassolosche...@googlemail.com> wrote:

> I think it is also good to tell that there are a lot of new features like
> http/2 support to show that Wicket is not a framework at which developers
> stopped working on new features several years ago.
>
> I wrote an article about that on a blog of Jörn Zaefferer who is
> responsible for jQuery UI Dev Lead | QUnit | Globalize | Infrastructure.
>
> Maybe the page about models can be integrated into the user guide to
> improve it.
>
> kind regards
>
> Tobias
>
> > Am 01.11.2016 um 16:31 schrieb Andrea Del Bene :
> >
> > Hi 

Re: Wicketstuff editable grid - 7.1.0

2016-02-26 Thread Mihir Chhaya
Done as below:
https://github.com/wicketstuff/core/issues/471

-Mihir.

On Wed, Feb 24, 2016 at 12:06 PM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> On Wed, Feb 24, 2016 at 5:59 PM, Mihir Chhaya <mihir.chh...@gmail.com>
> wrote:
>
> > Thanks, Martin for this.
> > Would this be an JIRA entry? As a bug or as an enhancement?
> >
>
> WicketStuff GitHub issue.
> It a problem in EditableGrid, not in Wicket.
>
>
> >
> > For now, It seems separating the editable grids on two different panels
> > would solve the problem.
> > As the newActionsColumn method in the EditableGrid is private, I can't
> > override.
>
>
> > -Mihir.
> >
> > On Wed, Feb 24, 2016 at 11:14 AM, Martin Grigorov <mgrigo...@apache.org>
> > wrote:
> >
> > > Hi,
> > >
> > > The problem is in EditableGrid.
> > > When you click on "Save" button it
> > > executes
> > org.wicketstuff.egrid.column.EditableGridActionsPanel#newEditLink
> > > -> onClick().
> > > Here it does: send(getPage(), Broadcast.BREADTH, rowItem);
> > >
> > > As you can see this broadcasts the event to the whole page instead of
> > just
> > > the grid instance.
> > > Because of that both grid instances in the page receive this event and
> > try
> > > to use rowItem's (the payload) model. It works as desired for one of
> the
> > > grids but fails for the other.
> > >
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Wed, Feb 24, 2016 at 3:42 PM, Martin Grigorov <mgrigo...@apache.org
> >
> > > wrote:
> > >
> > > > No sorry!
> > > > I didn't had a chance yet.
> > > >
> > > > Martin Grigorov
> > > > Wicket Training and Consulting
> > > > https://twitter.com/mtgrigorov
> > > >
> > > > On Wed, Feb 24, 2016 at 3:39 PM, Mihir Chhaya <
> mihir.chh...@gmail.com>
> > > > wrote:
> > > >
> > > >> Martin,
> > > >>
> > > >> Just wanted to check if you got chance to look at the GitHub code
> and
> > if
> > > >> it
> > > >> is enough or any additional information is needed?
> > > >>
> > > >> Thanks,
> > > >> -Mihir.
> > > >>
> > > >> On Mon, Feb 22, 2016 at 10:26 AM, Mihir Chhaya <
> > mihir.chh...@gmail.com>
> > > >> wrote:
> > > >>
> > > >> > Sure thing; I have put the code online at
> > > >> > https://github.com/mihirchhaya/egrid71
> > > >> >
> > > >> > Thanks,
> > > >> > -Mihir.
> > > >> >
> > > >> > On Sat, Feb 20, 2016 at 6:50 AM, Martin Grigorov <
> > > mgrigo...@apache.org>
> > > >> > wrote:
> > > >> >
> > > >> >> Hi,
> > > >> >>
> > > >> >> Please share the mini application somewhere, e.g. GitHub.
> > > >> >>
> > > >> >> Martin Grigorov
> > > >> >> Wicket Training and Consulting
> > > >> >> https://twitter.com/mtgrigorov
> > > >> >>
> > > >> >> On Fri, Feb 19, 2016 at 7:30 PM, Mihir Chhaya <
> > > mihir.chh...@gmail.com>
> > > >> >> wrote:
> > > >> >>
> > > >> >> > Ok, so creating a small project with two panels(Person and
> > > Customer)
> > > >> >> and a
> > > >> >> > page for similar use case resulted in following stacktrace.
> > > >> >> > The panels are added in the order of PersonPanel, CustomerPanel
> > in
> > > >> the
> > > >> >> > parent page.
> > > >> >> >
> > > >> >> > The line# 163 in onSave method of EditableGrid is calling
> > > >> >> > EditableGrid.this.onSave(target, rowModel); I wonder if the
> > > >> reference to
> > > >> >> > this is referring to the first EditableGrid with Person
> records.
> > > >> >> Switching
> > > >> >> > the order of adding grid panels throws the error other way
> > around;
> > > >> >> > complaining for Person can

Re: Wicketstuff editable grid - 7.1.0

2016-02-24 Thread Mihir Chhaya
Thanks, Martin for this.
Would this be an JIRA entry? As a bug or as an enhancement?

For now, It seems separating the editable grids on two different panels
would solve the problem.
As the newActionsColumn method in the EditableGrid is private, I can't
override.

-Mihir.

On Wed, Feb 24, 2016 at 11:14 AM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> Hi,
>
> The problem is in EditableGrid.
> When you click on "Save" button it
> executes org.wicketstuff.egrid.column.EditableGridActionsPanel#newEditLink
> -> onClick().
> Here it does: send(getPage(), Broadcast.BREADTH, rowItem);
>
> As you can see this broadcasts the event to the whole page instead of just
> the grid instance.
> Because of that both grid instances in the page receive this event and try
> to use rowItem's (the payload) model. It works as desired for one of the
> grids but fails for the other.
>
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Feb 24, 2016 at 3:42 PM, Martin Grigorov <mgrigo...@apache.org>
> wrote:
>
> > No sorry!
> > I didn't had a chance yet.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Wed, Feb 24, 2016 at 3:39 PM, Mihir Chhaya <mihir.chh...@gmail.com>
> > wrote:
> >
> >> Martin,
> >>
> >> Just wanted to check if you got chance to look at the GitHub code and if
> >> it
> >> is enough or any additional information is needed?
> >>
> >> Thanks,
> >> -Mihir.
> >>
> >> On Mon, Feb 22, 2016 at 10:26 AM, Mihir Chhaya <mihir.chh...@gmail.com>
> >> wrote:
> >>
> >> > Sure thing; I have put the code online at
> >> > https://github.com/mihirchhaya/egrid71
> >> >
> >> > Thanks,
> >> > -Mihir.
> >> >
> >> > On Sat, Feb 20, 2016 at 6:50 AM, Martin Grigorov <
> mgrigo...@apache.org>
> >> > wrote:
> >> >
> >> >> Hi,
> >> >>
> >> >> Please share the mini application somewhere, e.g. GitHub.
> >> >>
> >> >> Martin Grigorov
> >> >> Wicket Training and Consulting
> >> >> https://twitter.com/mtgrigorov
> >> >>
> >> >> On Fri, Feb 19, 2016 at 7:30 PM, Mihir Chhaya <
> mihir.chh...@gmail.com>
> >> >> wrote:
> >> >>
> >> >> > Ok, so creating a small project with two panels(Person and
> Customer)
> >> >> and a
> >> >> > page for similar use case resulted in following stacktrace.
> >> >> > The panels are added in the order of PersonPanel, CustomerPanel in
> >> the
> >> >> > parent page.
> >> >> >
> >> >> > The line# 163 in onSave method of EditableGrid is calling
> >> >> > EditableGrid.this.onSave(target, rowModel); I wonder if the
> >> reference to
> >> >> > this is referring to the first EditableGrid with Person records.
> >> >> Switching
> >> >> > the order of adding grid panels throws the error other way around;
> >> >> > complaining for Person cannot be cast to Customer.
> >> >> >
> >> >> > *java.lang.ClassCastException: spikes.domain.Customer cannot be
> cast
> >> >> > to spikes.domain.Person*
> >> >> >  at spikes.view.PersonPanel$1.onSave(PersonPanel.java:68)
> >> >> >  at
> >> >> org.wicketstuff.egrid.EditableGrid$3.onSave(EditableGrid.java:163)
> >> >> >  at
> >> >> >
> >> >>
> >>
> org.wicketstuff.egrid.column.EditableGridActionsColumn$1.onSave(EditableGridActionsColumn.java:34)
> >> >> >  at
> >> >> >
> >> >>
> >>
> org.wicketstuff.egrid.column.EditableGridActionsPanel$2.onSuccess(EditableGridActionsPanel.java:71)
> >> >> >  at
> >> >> >
> >> >>
> >>
> org.wicketstuff.egrid.component.EditableGridSubmitLink.onSubmit(EditableGridSubmitLink.java:37)
> >> >> >  at
> >> >> >
> >> >>
> >>
> org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1.onSubmit(AjaxSubmitLink.java:110)
> >> >> >  at
> >> >> >
> >> >>
> >>
> org.apache.wicket.ajax.form.AjaxFormSubmitBehavior$AjaxFormSubmitter.onSubmit(AjaxFor

Re: Wicketstuff editable grid - 7.1.0

2016-02-24 Thread Mihir Chhaya
Martin,

Just wanted to check if you got chance to look at the GitHub code and if it
is enough or any additional information is needed?

Thanks,
-Mihir.

On Mon, Feb 22, 2016 at 10:26 AM, Mihir Chhaya <mihir.chh...@gmail.com>
wrote:

> Sure thing; I have put the code online at
> https://github.com/mihirchhaya/egrid71
>
> Thanks,
> -Mihir.
>
> On Sat, Feb 20, 2016 at 6:50 AM, Martin Grigorov <mgrigo...@apache.org>
> wrote:
>
>> Hi,
>>
>> Please share the mini application somewhere, e.g. GitHub.
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Fri, Feb 19, 2016 at 7:30 PM, Mihir Chhaya <mihir.chh...@gmail.com>
>> wrote:
>>
>> > Ok, so creating a small project with two panels(Person and Customer)
>> and a
>> > page for similar use case resulted in following stacktrace.
>> > The panels are added in the order of PersonPanel, CustomerPanel in the
>> > parent page.
>> >
>> > The line# 163 in onSave method of EditableGrid is calling
>> > EditableGrid.this.onSave(target, rowModel); I wonder if the reference to
>> > this is referring to the first EditableGrid with Person records.
>> Switching
>> > the order of adding grid panels throws the error other way around;
>> > complaining for Person cannot be cast to Customer.
>> >
>> > *java.lang.ClassCastException: spikes.domain.Customer cannot be cast
>> > to spikes.domain.Person*
>> >  at spikes.view.PersonPanel$1.onSave(PersonPanel.java:68)
>> >  at
>> org.wicketstuff.egrid.EditableGrid$3.onSave(EditableGrid.java:163)
>> >  at
>> >
>> org.wicketstuff.egrid.column.EditableGridActionsColumn$1.onSave(EditableGridActionsColumn.java:34)
>> >  at
>> >
>> org.wicketstuff.egrid.column.EditableGridActionsPanel$2.onSuccess(EditableGridActionsPanel.java:71)
>> >  at
>> >
>> org.wicketstuff.egrid.component.EditableGridSubmitLink.onSubmit(EditableGridSubmitLink.java:37)
>> >  at
>> >
>> org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1.onSubmit(AjaxSubmitLink.java:110)
>> >  at
>> >
>> org.apache.wicket.ajax.form.AjaxFormSubmitBehavior$AjaxFormSubmitter.onSubmit(AjaxFormSubmitBehavior.java:215)
>> >  at
>> > org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1307)
>> >  at
>> >
>> org.wicketstuff.egrid.EditableGrid$NonValidatingForm.process(EditableGrid.java:79)
>> >  at
>> > org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:795)
>> >  at
>> >
>> org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:171)
>> >  at
>> >
>> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:155)
>> >  at
>> >
>> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:588)
>> >  at java.lang.reflect.Method.invoke(Method.java:606)
>> >  at
>> >
>> org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258)
>> >  at
>> >
>> org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:241)
>> >  at
>> >
>> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:248)
>> >  at
>> >
>> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:234)
>> >  at
>> >
>> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:865)
>> >  at
>> >
>> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
>> >  at
>> >
>> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265)
>> >  at
>> >
>> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222)
>> >  at
>> >
>> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293)
>> >  at
>> >
>> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261)
>> >  at
>> >
>> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203)
>> >  at
>> >
>> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:284)
&

Re: Wicketstuff editable grid - 7.1.0

2016-02-22 Thread Mihir Chhaya
Sure thing; I have put the code online at
https://github.com/mihirchhaya/egrid71

Thanks,
-Mihir.

On Sat, Feb 20, 2016 at 6:50 AM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> Hi,
>
> Please share the mini application somewhere, e.g. GitHub.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Feb 19, 2016 at 7:30 PM, Mihir Chhaya <mihir.chh...@gmail.com>
> wrote:
>
> > Ok, so creating a small project with two panels(Person and Customer) and
> a
> > page for similar use case resulted in following stacktrace.
> > The panels are added in the order of PersonPanel, CustomerPanel in the
> > parent page.
> >
> > The line# 163 in onSave method of EditableGrid is calling
> > EditableGrid.this.onSave(target, rowModel); I wonder if the reference to
> > this is referring to the first EditableGrid with Person records.
> Switching
> > the order of adding grid panels throws the error other way around;
> > complaining for Person cannot be cast to Customer.
> >
> > *java.lang.ClassCastException: spikes.domain.Customer cannot be cast
> > to spikes.domain.Person*
> >  at spikes.view.PersonPanel$1.onSave(PersonPanel.java:68)
> >  at
> org.wicketstuff.egrid.EditableGrid$3.onSave(EditableGrid.java:163)
> >  at
> >
> org.wicketstuff.egrid.column.EditableGridActionsColumn$1.onSave(EditableGridActionsColumn.java:34)
> >  at
> >
> org.wicketstuff.egrid.column.EditableGridActionsPanel$2.onSuccess(EditableGridActionsPanel.java:71)
> >  at
> >
> org.wicketstuff.egrid.component.EditableGridSubmitLink.onSubmit(EditableGridSubmitLink.java:37)
> >  at
> >
> org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1.onSubmit(AjaxSubmitLink.java:110)
> >  at
> >
> org.apache.wicket.ajax.form.AjaxFormSubmitBehavior$AjaxFormSubmitter.onSubmit(AjaxFormSubmitBehavior.java:215)
> >  at
> > org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1307)
> >  at
> >
> org.wicketstuff.egrid.EditableGrid$NonValidatingForm.process(EditableGrid.java:79)
> >  at
> > org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:795)
> >  at
> >
> org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:171)
> >  at
> >
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:155)
> >  at
> >
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:588)
> >  at java.lang.reflect.Method.invoke(Method.java:606)
> >  at
> >
> org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258)
> >  at
> >
> org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:241)
> >  at
> >
> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:248)
> >  at
> >
> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:234)
> >  at
> >
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:865)
> >  at
> >
> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
> >  at
> >
> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265)
> >  at
> >
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222)
> >  at
> >
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293)
> >  at
> >
> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261)
> >  at
> >
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203)
> >  at
> >
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:284)
> >  at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >  at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >  at
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> >  at
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> >  at
> >
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> >  at
> >
> org.apache.catalina.core.StandardHostVal

Re: Wicketstuff editable grid - 7.1.0

2016-02-19 Thread Mihir Chhaya
)
 at 
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:241)
 at 
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:248)
 at 
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:234)
 at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:865)
 at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
 at 
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293)
 at 
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261)

java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at 
org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258)
 at 
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:241)
 at 
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:248)
 at 
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:234)
 at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:865)
 at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
 at 
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293)
 at 
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261)


On Fri, Feb 19, 2016 at 12:15 PM, Mihir Chhaya <mihir.chh...@gmail.com>
wrote:

> Just realized that last two lines could be confusing: the decisionCode is
> the property of class PcaCodes in pcapanel, but showing up for exccodepanel
> row item.
>
> On Fri, Feb 19, 2016 at 12:06 PM, Mihir Chhaya <mihir.chh...@gmail.com>
> wrote:
>
>> My mistake about the inmethod grid dependency. I don't know why I saw
>> compilation error in editable grid class when removed inmethod grid jar
>> from classpath.
>>
>> For debugging the respond method as your suggestion, I do see correct
>> class types for each rowItem (as attachment). But it fails with following
>> error:
>>
>> Last cause: No get method defined for class: class
>> packagename.ExceptionalDocCode expression: decisionCode
>> WicketMessage: Exception in rendering component:
>> [EditableTextFieldCellPanel [Component id = cell]]
>>
>>
>> On Thu, Feb 18, 2016 at 5:06 PM, Martin Grigorov <mgrigo...@apache.org>
>> wrote:
>>
>>> On Thu, Feb 18, 2016 at 10:53 PM, Mihir Chhaya <mihir.chh...@gmail.com>
>>> wrote:
>>>
>>> > Thanks, Martin.
>>> >
>>> > By writing dependency on wicket in-method grid I meant editable grid
>>> > inherently referring inmethod grid.
>>> >
>>>
>>>
>>> https://github.com/wicketstuff/core/blob/master/editable-grid-parent/editable-grid/pom.xml
>>>
>>> https://github.com/wicketstuff/core/blob/master/editable-grid-parent/pom.xml
>>> The only dependency is wicket-extensions.
>>> I am not sure what you mean by "inherently referring".
>>>
>>>
>>> >
>>> > I did check the Ajax url earlier and following are the values in
>>> rendered
>>> > html page for the panel.
>>> >
>>> >
>>> >
>>> Wicket.Ajax.ajax({"u":"./appcontext?5-2.IBehaviorListener.0-admincontroltabs-panel-pcapanel-pcacodegridForm-pcaDataTable-form-dataTable-body-rows-16-cells-6-cell-edit","c":"edit104","e":"click"});;
>>> >
>>> >
>>> >
>>> Wicket.Ajax.ajax({"u":"./appcontext?5-2.IBehaviorListener.0-admincontroltabs-panel-exccodepanel-excdoccodegridForm-excDataTable-form-dataTable-body-rows-10-cells-4-cell-edit","c":"edit113","e":"click"});;
>>> >
>>>
>>> Assuming that 'pcapanel' is 'aPanel' and 'exccodepanel' is 'bPanel'
>>> everything looks 

Re: Wicketstuff editable grid - 7.1.0

2016-02-19 Thread Mihir Chhaya
Just realized that last two lines could be confusing: the decisionCode is
the property of class PcaCodes in pcapanel, but showing up for exccodepanel
row item.

On Fri, Feb 19, 2016 at 12:06 PM, Mihir Chhaya <mihir.chh...@gmail.com>
wrote:

> My mistake about the inmethod grid dependency. I don't know why I saw
> compilation error in editable grid class when removed inmethod grid jar
> from classpath.
>
> For debugging the respond method as your suggestion, I do see correct
> class types for each rowItem (as attachment). But it fails with following
> error:
>
> Last cause: No get method defined for class: class
> packagename.ExceptionalDocCode expression: decisionCode
> WicketMessage: Exception in rendering component:
> [EditableTextFieldCellPanel [Component id = cell]]
>
>
> On Thu, Feb 18, 2016 at 5:06 PM, Martin Grigorov <mgrigo...@apache.org>
> wrote:
>
>> On Thu, Feb 18, 2016 at 10:53 PM, Mihir Chhaya <mihir.chh...@gmail.com>
>> wrote:
>>
>> > Thanks, Martin.
>> >
>> > By writing dependency on wicket in-method grid I meant editable grid
>> > inherently referring inmethod grid.
>> >
>>
>>
>> https://github.com/wicketstuff/core/blob/master/editable-grid-parent/editable-grid/pom.xml
>>
>> https://github.com/wicketstuff/core/blob/master/editable-grid-parent/pom.xml
>> The only dependency is wicket-extensions.
>> I am not sure what you mean by "inherently referring".
>>
>>
>> >
>> > I did check the Ajax url earlier and following are the values in
>> rendered
>> > html page for the panel.
>> >
>> >
>> >
>> Wicket.Ajax.ajax({"u":"./appcontext?5-2.IBehaviorListener.0-admincontroltabs-panel-pcapanel-pcacodegridForm-pcaDataTable-form-dataTable-body-rows-16-cells-6-cell-edit","c":"edit104","e":"click"});;
>> >
>> >
>> >
>> Wicket.Ajax.ajax({"u":"./appcontext?5-2.IBehaviorListener.0-admincontroltabs-panel-exccodepanel-excdoccodegridForm-excDataTable-form-dataTable-body-rows-10-cells-4-cell-edit","c":"edit113","e":"click"});;
>> >
>>
>> Assuming that 'pcapanel' is 'aPanel' and 'exccodepanel' is 'bPanel'
>> everything looks OK.
>> Clicking on any of those cells should correctly find the respective grid
>> cell and execute its Ajax behavior.
>> Put a breakpoint in AjaxEventBehavior#respond() and see why it finds
>> ClassB.
>>
>>
>> >
>> > Thanks,
>> > -Mihir.
>> >
>> > On Thu, Feb 18, 2016 at 3:18 PM, Martin Grigorov <mgrigo...@apache.org>
>> > wrote:
>> >
>> > > Hi,
>> > >
>> > > On Wed, Feb 17, 2016 at 5:09 PM, Mihir Chhaya <mihir.chh...@gmail.com
>> >
>> > > wrote:
>> > >
>> > > > Hello,
>> > > >
>> > > > My apologies if this is not the right place to post wicketstuff
>> related
>> > > > issues. If so, then please advice me with right forum/link.
>> > > >
>> > >
>> > > This is the right forum!
>> > >
>> > >
>> > > >
>> > > > I am using Wicketstuff-editable-grid-7.1.0 (with dependency on
>> > > > wicketstuff-inmethod-grid-7.1.0).
>> > > >
>> > >
>> > > Why InMethod-Grid is needed? Or you are migrating from Inmethod to
>> > Editable
>> > > ?
>> > >
>> > >
>> > > >
>> > > > *Problem:*
>> > > > When two editable grids from two separate child panels are rendered
>> > into
>> > > > single container (parent panel), then clicking 'Edit' link in the
>> row
>> > for
>> > > > ClassA related editable grid throws 'No get method defined for the
>> > class'
>> > > > error for ClassB property which is related to another editable grid.
>> > > >
>> > >
>> > > Check what is the url for the Ajax call that is made.
>> > > This should tell you why it finds ClassB instead of ClassA.
>> > >
>> > >
>> > > >
>> > > > *Requirement:*
>> > > > I have a page with 4 different tabs. On one of the tabs, I want to
>> use
>> > a
>> > > > panel with two editable grids for two different static dataset
>> Add/Edit
>> > > > (One grid for tableA, another for tableB).
>> > > >
>

Re: Wicketstuff editable grid - 7.1.0

2016-02-19 Thread Mihir Chhaya
My mistake about the inmethod grid dependency. I don't know why I saw
compilation error in editable grid class when removed inmethod grid jar
from classpath.

For debugging the respond method as your suggestion, I do see correct class
types for each rowItem (as attachment). But it fails with following error:

Last cause: No get method defined for class: class
packagename.ExceptionalDocCode expression: decisionCode
WicketMessage: Exception in rendering component:
[EditableTextFieldCellPanel [Component id = cell]]


On Thu, Feb 18, 2016 at 5:06 PM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> On Thu, Feb 18, 2016 at 10:53 PM, Mihir Chhaya <mihir.chh...@gmail.com>
> wrote:
>
> > Thanks, Martin.
> >
> > By writing dependency on wicket in-method grid I meant editable grid
> > inherently referring inmethod grid.
> >
>
>
> https://github.com/wicketstuff/core/blob/master/editable-grid-parent/editable-grid/pom.xml
>
> https://github.com/wicketstuff/core/blob/master/editable-grid-parent/pom.xml
> The only dependency is wicket-extensions.
> I am not sure what you mean by "inherently referring".
>
>
> >
> > I did check the Ajax url earlier and following are the values in rendered
> > html page for the panel.
> >
> >
> >
> Wicket.Ajax.ajax({"u":"./appcontext?5-2.IBehaviorListener.0-admincontroltabs-panel-pcapanel-pcacodegridForm-pcaDataTable-form-dataTable-body-rows-16-cells-6-cell-edit","c":"edit104","e":"click"});;
> >
> >
> >
> Wicket.Ajax.ajax({"u":"./appcontext?5-2.IBehaviorListener.0-admincontroltabs-panel-exccodepanel-excdoccodegridForm-excDataTable-form-dataTable-body-rows-10-cells-4-cell-edit","c":"edit113","e":"click"});;
> >
>
> Assuming that 'pcapanel' is 'aPanel' and 'exccodepanel' is 'bPanel'
> everything looks OK.
> Clicking on any of those cells should correctly find the respective grid
> cell and execute its Ajax behavior.
> Put a breakpoint in AjaxEventBehavior#respond() and see why it finds
> ClassB.
>
>
> >
> > Thanks,
> > -Mihir.
> >
> > On Thu, Feb 18, 2016 at 3:18 PM, Martin Grigorov <mgrigo...@apache.org>
> > wrote:
> >
> > > Hi,
> > >
> > > On Wed, Feb 17, 2016 at 5:09 PM, Mihir Chhaya <mihir.chh...@gmail.com>
> > > wrote:
> > >
> > > > Hello,
> > > >
> > > > My apologies if this is not the right place to post wicketstuff
> related
> > > > issues. If so, then please advice me with right forum/link.
> > > >
> > >
> > > This is the right forum!
> > >
> > >
> > > >
> > > > I am using Wicketstuff-editable-grid-7.1.0 (with dependency on
> > > > wicketstuff-inmethod-grid-7.1.0).
> > > >
> > >
> > > Why InMethod-Grid is needed? Or you are migrating from Inmethod to
> > Editable
> > > ?
> > >
> > >
> > > >
> > > > *Problem:*
> > > > When two editable grids from two separate child panels are rendered
> > into
> > > > single container (parent panel), then clicking 'Edit' link in the row
> > for
> > > > ClassA related editable grid throws 'No get method defined for the
> > class'
> > > > error for ClassB property which is related to another editable grid.
> > > >
> > >
> > > Check what is the url for the Ajax call that is made.
> > > This should tell you why it finds ClassB instead of ClassA.
> > >
> > >
> > > >
> > > > *Requirement:*
> > > > I have a page with 4 different tabs. On one of the tabs, I want to
> use
> > a
> > > > panel with two editable grids for two different static dataset
> Add/Edit
> > > > (One grid for tableA, another for tableB).
> > > >
> > > > *Efforts:*
> > > > I have created two separate panel classes as below - each with it's
> own
> > > > form and editable grid with it's own editable data provider with
> > > respective
> > > > array list of different types. The columns supplied to EditableGrid
> > class
> > > > contains
> > > > EditableTextFieldPropertyColumn<ClassA, String> and <ClassB, String>
> > > > respectively with own properties. Please note that I have used
> distinct
> > > > markup Ids for each panel and grid components to avoid any
> duplication;
> > > > with setting output markup id to true.
> > > &g

Re: Wicketstuff editable grid - 7.1.0

2016-02-18 Thread Mihir Chhaya
Thanks, Martin.

By writing dependency on wicket in-method grid I meant editable grid
inherently referring inmethod grid.

I did check the Ajax url earlier and following are the values in rendered
html page for the panel.

Wicket.Ajax.ajax({"u":"./appcontext?5-2.IBehaviorListener.0-admincontroltabs-panel-pcapanel-pcacodegridForm-pcaDataTable-form-dataTable-body-rows-16-cells-6-cell-edit","c":"edit104","e":"click"});;

Wicket.Ajax.ajax({"u":"./appcontext?5-2.IBehaviorListener.0-admincontroltabs-panel-exccodepanel-excdoccodegridForm-excDataTable-form-dataTable-body-rows-10-cells-4-cell-edit","c":"edit113","e":"click"});;

Thanks,
-Mihir.

On Thu, Feb 18, 2016 at 3:18 PM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> Hi,
>
> On Wed, Feb 17, 2016 at 5:09 PM, Mihir Chhaya <mihir.chh...@gmail.com>
> wrote:
>
> > Hello,
> >
> > My apologies if this is not the right place to post wicketstuff related
> > issues. If so, then please advice me with right forum/link.
> >
>
> This is the right forum!
>
>
> >
> > I am using Wicketstuff-editable-grid-7.1.0 (with dependency on
> > wicketstuff-inmethod-grid-7.1.0).
> >
>
> Why InMethod-Grid is needed? Or you are migrating from Inmethod to Editable
> ?
>
>
> >
> > *Problem:*
> > When two editable grids from two separate child panels are rendered into
> > single container (parent panel), then clicking 'Edit' link in the row for
> > ClassA related editable grid throws 'No get method defined for the class'
> > error for ClassB property which is related to another editable grid.
> >
>
> Check what is the url for the Ajax call that is made.
> This should tell you why it finds ClassB instead of ClassA.
>
>
> >
> > *Requirement:*
> > I have a page with 4 different tabs. On one of the tabs, I want to use a
> > panel with two editable grids for two different static dataset Add/Edit
> > (One grid for tableA, another for tableB).
> >
> > *Efforts:*
> > I have created two separate panel classes as below - each with it's own
> > form and editable grid with it's own editable data provider with
> respective
> > array list of different types. The columns supplied to EditableGrid class
> > contains
> > EditableTextFieldPropertyColumn<ClassA, String> and <ClassB, String>
> > respectively with own properties. Please note that I have used distinct
> > markup Ids for each panel and grid components to avoid any duplication;
> > with setting output markup id to true.
> >
> > PanelA extends Panel{
> >
> > //Constructor
> > // formA with editableGridA with editableDataProviderForClassA
> > }
> >
> > PanelB extends Panel{
> >
> > //Constructor
> > //formB with editableGridB with editableDataProviderForClassB using
> > }
> >
> > Those two panels are added into parent panel as below:
> >
> > TabbedPanel extends Panel{
> >
> >  //Constructor
> >  // Panel panelA = new PanelA("aPanel");
> >  // Panel panelB = new PanelB("bPanel");
> >  // add(panelA); add(panelB);
> > }
> >
> > As I have mentioned in the problem above; clicking on edit link for
> classA
> > related grid is throwing error for classB property, which is associated
> > with different editable grid.
> >
> > Has anybody experienced similar issue? Any help/suggestions?
> >
>
> Everything looks OK.
> Check whether the url for the Ajax call after clicking on the cell contains
> "aPanel" or "bPanel".
>
>
> >
> > Thanks,
> > -Mihir.
> >
>


Re: Wicketstuff editable grid - 7.1.0

2016-02-18 Thread Mihir Chhaya
Any suggestion, friends?

On Wed, Feb 17, 2016 at 11:09 AM, Mihir Chhaya <mihir.chh...@gmail.com>
wrote:

> Hello,
>
> My apologies if this is not the right place to post wicketstuff related
> issues. If so, then please advice me with right forum/link.
>
> I am using Wicketstuff-editable-grid-7.1.0 (with dependency on
> wicketstuff-inmethod-grid-7.1.0).
>
> *Problem:*
> When two editable grids from two separate child panels are rendered into
> single container (parent panel), then clicking 'Edit' link in the row for
> ClassA related editable grid throws 'No get method defined for the class'
> error for ClassB property which is related to another editable grid.
>
> *Requirement:*
> I have a page with 4 different tabs. On one of the tabs, I want to use a
> panel with two editable grids for two different static dataset Add/Edit
> (One grid for tableA, another for tableB).
>
> *Efforts:*
> I have created two separate panel classes as below - each with it's own
> form and editable grid with it's own editable data provider with respective
> array list of different types. The columns supplied to EditableGrid class
> contains
> EditableTextFieldPropertyColumn<ClassA, String> and <ClassB, String>
> respectively with own properties. Please note that I have used distinct
> markup Ids for each panel and grid components to avoid any duplication;
> with setting output markup id to true.
>
> PanelA extends Panel{
>
> //Constructor
> // formA with editableGridA with editableDataProviderForClassA
> }
>
> PanelB extends Panel{
>
> //Constructor
> //formB with editableGridB with editableDataProviderForClassB using
> }
>
> Those two panels are added into parent panel as below:
>
> TabbedPanel extends Panel{
>
>  //Constructor
>  // Panel panelA = new PanelA("aPanel");
>  // Panel panelB = new PanelB("bPanel");
>  // add(panelA); add(panelB);
> }
>
> As I have mentioned in the problem above; clicking on edit link for classA
> related grid is throwing error for classB property, which is associated
> with different editable grid.
>
> Has anybody experienced similar issue? Any help/suggestions?
>
> Thanks,
> -Mihir.
>
>
>


Wicketstuff editable grid - 7.1.0

2016-02-17 Thread Mihir Chhaya
Hello,

My apologies if this is not the right place to post wicketstuff related
issues. If so, then please advice me with right forum/link.

I am using Wicketstuff-editable-grid-7.1.0 (with dependency on
wicketstuff-inmethod-grid-7.1.0).

*Problem:*
When two editable grids from two separate child panels are rendered into
single container (parent panel), then clicking 'Edit' link in the row for
ClassA related editable grid throws 'No get method defined for the class'
error for ClassB property which is related to another editable grid.

*Requirement:*
I have a page with 4 different tabs. On one of the tabs, I want to use a
panel with two editable grids for two different static dataset Add/Edit
(One grid for tableA, another for tableB).

*Efforts:*
I have created two separate panel classes as below - each with it's own
form and editable grid with it's own editable data provider with respective
array list of different types. The columns supplied to EditableGrid class
contains
EditableTextFieldPropertyColumn and 
respectively with own properties. Please note that I have used distinct
markup Ids for each panel and grid components to avoid any duplication;
with setting output markup id to true.

PanelA extends Panel{

//Constructor
// formA with editableGridA with editableDataProviderForClassA
}

PanelB extends Panel{

//Constructor
//formB with editableGridB with editableDataProviderForClassB using
}

Those two panels are added into parent panel as below:

TabbedPanel extends Panel{

 //Constructor
 // Panel panelA = new PanelA("aPanel");
 // Panel panelB = new PanelB("bPanel");
 // add(panelA); add(panelB);
}

As I have mentioned in the problem above; clicking on edit link for classA
related grid is throwing error for classB property, which is associated
with different editable grid.

Has anybody experienced similar issue? Any help/suggestions?

Thanks,
-Mihir.


Wicket - Java Script Library

2016-01-14 Thread Mihir Chhaya
Hello Wicket Leads,

You might be already aware of this; but there is javascript library project
called 'Wicket'. Here is the link: http://arthur-e.github.io/Wicket/
Github link: https://github.com/arthur-e/Wicket

It is not Apache Wicket, but it is strange someone would use name so close.


-Mihir.


Re: Send model to another Page

2015-12-15 Thread Mihir Chhaya
I am not expert; but following are some of the possible options (not
necessarily best approach):

1. Create POJO model and pass that as constructor parameter to the target
(quick search) page.
2. Or, set the model into session (customer session model) and then get
that into target page.
3. Set POJO model into current page as default model. Get current page's
reference into quick search and get the default model object.
4. Assuming your quick search is not exact replica of full search, create
linear Page Parameters and get into the target page.

Thanks,
-Mihir.


On Tue, Dec 15, 2015 at 12:19 PM, Marcel Barbosa Pinto <
marcel.po...@gmail.com> wrote:

> Hello,
>
> Question for the experts:
>
> I have a search page that has a POJO as a model. It uses this model to
> filter a search through a form component.
> Now I have another page (let's say quick search) that needs to send (post)
> this POJO model to this search page, in order to do the search filtering.
> As PageParameters can't(?) be used to send this "complex model", how the
> search page can receive it from another page? May I have to use Events?
>
> Thank you guys.
>


Re: AjaxIndicatingButton

2015-12-04 Thread Mihir Chhaya
Hi,

As you have mentioned target.addComponent(comp), it seems you are using
Wicket 1.4. Just so that it might be helpful to you; Wicket 1.4 is no
longer supported - does not mean that you won't get answers from forum but
there won't be any release for 1.4 version (I am writing this based upon
online Wicket version status - so please take it as suggestion).

If I am understanding it correctly, all you want is disable two other
buttons on submit of 'this' button. And as by design; Wicket needs the
component to be added for ajax change via target.addComponent. Which should
take effect immediately.

I might be wrong in my suggestion as your scenario needs more details for
better understanding.

-Mihir.

On Fri, Dec 4, 2015 at 3:28 PM, sorinev  wrote:

> I have a dialog with 3 AjaxIndicatingButtons on it. When I override
> onSubmit(), I can disable the 'this' component in real time
> (this.setEnabled(false)), but traditionally, any other component that gets
> modified has to do target.addComponent(comp) and then wait for the
> onSubmit() to return in order for it to take effect.
>
> However, I really need to have all three buttons be disabled immediately if
> *any* button is actively inside it's onSubmit() function (being re-enabled
> when the function returns is ok). Is this possible?
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/AjaxIndicatingButton-tp4672874.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: AjaxIndicatingButton

2015-12-04 Thread Mihir Chhaya
You could something like below:

   final AjaxButton testButton1 = new AjaxButton("test1"){

/**
*
*/
   private static final long serialVersionUID = 1L;

   @Override
protected void onSubmit(AjaxRequestTarget target, Form form)
{

 target.appendJavascript("document.getElementById('tb2').disabled=true;");

 target.appendJavascript("document.getElementById('tb3').disabled=true;");
}
};

testButton1.setMarkupId("tb1");
testButton1.setOutputMarkupId(true);

final Button testButton2 = new Button("test2");
testButton2.setMarkupId("tb2");
testButton2.setOutputMarkupId(true);

final Button testButton3 = new Button("test3");
testButton3.setMarkupId("tb3");
testButton3.setOutputMarkupId(true);

Thanks,
-Mihir.

On Fri, Dec 4, 2015 at 4:32 PM, sorinev  wrote:

> Yes, it's Wicket 1.4.17. I've thought about migrating it to one of the more
> recent versions. But with 41k lines of java across 225 files just in the
> Wicket portion of our enterprise application, it'll be a major pain to
> migrate considering there were several enormous changes to certain
> components/functionality that we use a lot. Believe me, it does kill me
> that
> we are on a version that is so old.
>
> As for the disabling thing, more specifically I wanted to be able to do
> something like this:
>
> protected void onSubmit(AjaxRequestTarget target, Form form){
> this.setEnabled(false);
> //disable button 2 here
> //disable button 3 here
>
> //do a bunch of stuff here
>
> //enable button 3 here
> //enable button 2 here
> this.setEnabled(true);
> }
>
> Meaning, I'd like the effect to happen immediately, without having to do
> target.addComponent() and without having to wait for onSubmit() to return
> (since it would be pointless to disable and re-enable after I've already
> finished the work). Basically, the user needs to not be able to use any
> other buttons while some other button's code is busy in onSubmit().
> mihir wrote
> > Hi,
> >
> > As you have mentioned target.addComponent(comp), it seems you are using
> > Wicket 1.4. Just so that it might be helpful to you; Wicket 1.4 is no
> > longer supported - does not mean that you won't get answers from forum
> but
> > there won't be any release for 1.4 version (I am writing this based upon
> > online Wicket version status - so please take it as suggestion).
> >
> > If I am understanding it correctly, all you want is disable two other
> > buttons on submit of 'this' button. And as by design; Wicket needs the
> > component to be added for ajax change via target.addComponent. Which
> > should
> > take effect immediately.
> >
> > I might be wrong in my suggestion as your scenario needs more details for
> > better understanding.
> >
> > -Mihir.
> >
> > On Fri, Dec 4, 2015 at 3:28 PM, sorinev 
>
> > sorinev@
>
> >  wrote:
> >
> >> I have a dialog with 3 AjaxIndicatingButtons on it. When I override
> >> onSubmit(), I can disable the 'this' component in real time
> >> (this.setEnabled(false)), but traditionally, any other component that
> >> gets
> >> modified has to do target.addComponent(comp) and then wait for the
> >> onSubmit() to return in order for it to take effect.
> >>
> >> However, I really need to have all three buttons be disabled immediately
> >> if
> >> *any* button is actively inside it's onSubmit() function (being
> >> re-enabled
> >> when the function returns is ok). Is this possible?
> >>
> >> --
> >> View this message in context:
> >>
> http://apache-wicket.1842946.n4.nabble.com/AjaxIndicatingButton-tp4672874.html
> >> Sent from the Users forum mailing list archive at Nabble.com.
> >>
> >> -
> >> To unsubscribe, e-mail:
>
> > users-unsubscribe@.apache
>
> >> For additional commands, e-mail:
>
> > users-help@.apache
>
> >>
> >>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/AjaxIndicatingButton-tp4672874p4672877.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: Difficulty with related, mutually updating fields

2015-12-03 Thread Mihir Chhaya
Hi,

It seems having custom validator along with Ajax Events (change/update)
applied on both fields might be helpful to achieve your goal.

Again, as Tobias has mentioned, your scenario could be possibly simplified
by just allowing either Duration or End Date and have that controlled by
some type of radio button selection. You could then have your custom
validator to check if the value entered is valid number, and if it is in
date format then it is valid date.

The calculated value in this case would be then simply a label with
whatever you want to show (as duration or date).

-Mihir.



On Thu, Dec 3, 2015 at 8:48 AM, Tobias Gierke 
wrote:

> Hi,
>
>> Hello,
>>
>> I have a form with the following fields : start date, duration (in days) &
>> end date. I want the user to be able to enter EITHER a duration OR an end
>> date and the other field will be automatically calculated according to
>> this
>> and the start date. Each field has an associated feedback label. However,
>> simple as this seems, I’m having trouble pulling it off. Here’s what I’m
>> going for in terms of behaviour:
>>
>> + If the start date is missing, the others are blanked and disabled.
>>
>> + Changing either field results in an ajax update of both and the other
>> field is calculated.
>>
>> + When the form is submitted, the “calculated” field must be null (even
>> though it displays the calculated value). The underlying domain object
>> should have either a duration or an end date but not both.
>>
> Just curious... why does your domain object need to have both end date and
> duration (either of which can be derived from the other assuming the start
> date is set) ? IMHO this makes things more complicated/error prone than
> necessary (since you have to make sure duration & end date fields stay in
> sync while deriving one from the other would take care of this
> automagically).
>
> Cheers,
> Tobias
>
>
>
>
> -
> 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 Mihir Chhaya
rDetails);

setResponsePage(new ManageDealerPage(abcUser));

} else if
(abcConstants.SEARCH_SCREEN.equals(callingFromWhichScreen)) {
setResponsePage(new
DealerInformationPage(abcUser));
}
}

} catch (abcException abcException) {
if
(abcException.getMessage().contains(abcErrConstant.INVALID_INPUT) ||
abcException.getMessage().contains(abcErrConstant.NONNUMERIC_INPUT)) {
sbpanel.saveError(this, new abcException("Invalid
Dealer ID entered. Only numbers are allowed."));
} else {
sbpanel.saveError(this, new abcException("Error
when searching Dealer. Make sure you have entered valid dealer Id."));
}
}
}

@Override
protected void onError(AjaxRequestTarget target, Form form) {
super.onError(target, form);
target.add(searchForm);
target.add(sbpanel);
}

};
searchSubmitButton.setMarkupId("searchBtn");
searchForm.setDefaultButton(searchSubmitButton);
searchForm.add(searchSubmitButton);

//Reset Button
searchForm.add(new AjaxButton("searchClear") {
private static final long serialVersionUID = 1L;

@Override
protected void onSubmit(AjaxRequestTarget target, Form form)
{
sbpanel.saveState();

PageParameters pageParameters = new PageParameters();
pageParameters.set(abcConstants.PARAM_CALLING_SCREEN,
callingFromWhichScreen);

AbcUserSearchTO AbcUserSearchTO =
searchForm.getModelObject();
AbcUserSearchTO.setSearchName("");

setResponsePage(new SearchDealerPage(pageParameters));
}
}.setDefaultFormProcessing(false).setMarkupId("srchClearBtn"));
}
}

On Wed, Nov 18, 2015 at 11:28 AM, Francois Meillet <
francois.meil...@gmail.com> wrote:

> Could you show us the SearchDealerPage code
>
> François
>
>
>
>
>
>
>
>
> Le 18 nov. 2015 à 17:25, Mihir Chhaya <mihir.chh...@gmail.com> a écrit :
>
> > Hello,
> >
> > I am using Wicket 7 + Spring 4.x + Hibernate 4.x (recently migrated from
> > Wicket 1.4).
> >
> > Since deployment of the app on JBOSS, the application is crashing with
> > OutOfMemory error for PermGen. We are at the point of rolling back to 1.4
> > as application was working fine without such issue; doesn't necessarily
> > mean Wicket 7 is an issue. There is OutOfMemory error reported with
> > Wicket+Spring for Wicket 6.20, but the issue status shows fixed.
> >
> > JBOSS application server PermGen is 512MB, so doesn't seem that be an
> issue.
> >
> > Here is the stacktrace (First and Second). Second seems to be the result
> of
> > First one.
> >
> > Could anybody shade some light? I ran with some load on my local (tomcat
> as
> > well as on JBOSS) and monitored using VisualVM. PermGen is remaining
> > between 20 and 100 MB.
> >
> >
> > First
> > =
> > 16:29:19,808 ERROR
> >
> [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/fes].[default]]
> > (http-/162.143.93.98:8543-34) JBWEB000236: Servlet.service() for servlet
> > default threw exception: java.lang.OutOfMemoryError: PermGen space
> > at sun.misc.Unsafe.defineClass(Native Method) [rt.jar:1.7.0_75]
> > at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:63)
> > [rt.jar:1.7.0_75]
> > at
> >
> sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:399)
> > [rt.jar:1.7.0_75]
> > at
> >
> sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:396)
> > [rt.jar:1.7.0_75]
> > at java.security.AccessController.doPrivileged(Native Method)
> > [rt.jar:1.7.0_75]
> > at
> >
> sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:395)
> > [rt.jar:1.7.0_75]
> > at
> >
> sun.reflect.MethodAccessorGenerator.generateSerializationConstructor(MethodAccessorGenerator.java:113)
> > [rt.jar:1.7.0_75]
> > at
> >
> sun.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:331)
> > [rt.jar:1.7.0_75]
> > at
> >
> java.io.ObjectStreamClass.getSerializableConstructor(ObjectStreamClass.java:1376)
> > [rt.jar:1.7.0_75]
> > at java.io.ObjectStreamClass.access$1500(ObjectStreamClass.java:72)
> > [rt.jar:1.7.0_75]
> > at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:493)
> > [rt.jar:

Re: Wicket 7 - OutOfMemory PermGen

2015-11-18 Thread Mihir Chhaya
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 <mihir.chh...@gmail.com> 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
> > * @since 08/05/2011
> > */
> > public class SearchDealerPage extends AuthenticatedPage {
> >
> >/**
> > *
> > */
> >private static final long serialVersionUID = 1L;
> >@SpringBean
> >private AsmAdminService adminService;
> >private AbcUserSearchTO abcUserSearch;
> >private AbcUser abcUser = null;
> >
> >//callingFromWhichScreen flag is to indicate whether this screen is
> > called for dealer information or dealer update.
> >//Set callingFromWhichScreen to "update" for dealer update, "search"
> > for dealer information while calling.
> >public SearchDealerPage(PageParameters pageParameters) {
> >final String callingFromWhichScreen =
> > pageParameters.get(abcConstants.PARAM_CALLING_SCREEN).toString();
> >
> >abcUserSearch = new abcUserSearchTO();
> >
> >//Search Form
> >final Form searchForm =
> >new Form("searchForm", new
> > CompoundPropertyModel(abcUserSearch));
> >searchForm.setOutputMarkupId(true);
> >searchForm.setMarkupId("searchFormId");
> >add(searchForm);
> >final Label pagetitle = new Label("pageTitle", new
> Model());
> >
> >if (abcConstants.UPDATE_SCREEN.equals(callingFromWhichScreen)) {
> >pagetitle.setDefaultModelObject("Search Dealer");
> >
> >} else if
> > (abcConstants.SEARCH_SCREEN.equals(callingFromWhichScreen)) {
> >pagetitle.setDefaultModelObject("Dealer Inquiry");
> >}
> >
> >add(pagetitle);
> >
> >final ErroringTextField dealerIDFld = new
> > ErroringTextField("searchDealer&qu

Re: Wicket 7 - OutOfMemory PermGen

2015-11-18 Thread Mihir Chhaya
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 <mihir.chh...@gmail.com> 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 <mihir.chh...@gmail.com> 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
> >>> * @since 08/05/2011
> >>> */
> >>> public class SearchDealerPage extends Authen

Re: Wicket 7 - OutOfMemory PermGen

2015-11-18 Thread Mihir Chhaya
Martin, Yes. I am using Wicket 7.00.

On Wed, Nov 18, 2015 at 11:55 AM, Mihir Chhaya <mihir.chh...@gmail.com>
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 <mihir.chh...@gmail.com> 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 <mihir.chh...@gmail.com> 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.b

Wicket 7 - OutOfMemory PermGen

2015-11-18 Thread Mihir Chhaya
Hello,

I am using Wicket 7 + Spring 4.x + Hibernate 4.x (recently migrated from
Wicket 1.4).

Since deployment of the app on JBOSS, the application is crashing with
OutOfMemory error for PermGen. We are at the point of rolling back to 1.4
as application was working fine without such issue; doesn't necessarily
mean Wicket 7 is an issue. There is OutOfMemory error reported with
Wicket+Spring for Wicket 6.20, but the issue status shows fixed.

JBOSS application server PermGen is 512MB, so doesn't seem that be an issue.

Here is the stacktrace (First and Second). Second seems to be the result of
First one.

Could anybody shade some light? I ran with some load on my local (tomcat as
well as on JBOSS) and monitored using VisualVM. PermGen is remaining
between 20 and 100 MB.


First
=
16:29:19,808 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/fes].[default]]
(http-/162.143.93.98:8543-34) JBWEB000236: Servlet.service() for servlet
default threw exception: java.lang.OutOfMemoryError: PermGen space
at sun.misc.Unsafe.defineClass(Native Method) [rt.jar:1.7.0_75]
at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:63)
[rt.jar:1.7.0_75]
at
sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:399)
[rt.jar:1.7.0_75]
at
sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:396)
[rt.jar:1.7.0_75]
at java.security.AccessController.doPrivileged(Native Method)
[rt.jar:1.7.0_75]
at
sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:395)
[rt.jar:1.7.0_75]
at
sun.reflect.MethodAccessorGenerator.generateSerializationConstructor(MethodAccessorGenerator.java:113)
[rt.jar:1.7.0_75]
at
sun.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:331)
[rt.jar:1.7.0_75]
at
java.io.ObjectStreamClass.getSerializableConstructor(ObjectStreamClass.java:1376)
[rt.jar:1.7.0_75]
at java.io.ObjectStreamClass.access$1500(ObjectStreamClass.java:72)
[rt.jar:1.7.0_75]
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:493)
[rt.jar:1.7.0_75]
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:468)
[rt.jar:1.7.0_75]
at java.security.AccessController.doPrivileged(Native Method)
[rt.jar:1.7.0_75]
at java.io.ObjectStreamClass.(ObjectStreamClass.java:468)
[rt.jar:1.7.0_75]
at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:365)
[rt.jar:1.7.0_75]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1133)
[rt.jar:1.7.0_75]
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
[rt.jar:1.7.0_75]
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
[rt.jar:1.7.0_75]
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
[rt.jar:1.7.0_75]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
[rt.jar:1.7.0_75]
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1377)
[rt.jar:1.7.0_75]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1173)
[rt.jar:1.7.0_75]
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
[rt.jar:1.7.0_75]
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
[rt.jar:1.7.0_75]
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
[rt.jar:1.7.0_75]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
[rt.jar:1.7.0_75]
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
[rt.jar:1.7.0_75]
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
[rt.jar:1.7.0_75]
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
[rt.jar:1.7.0_75]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
[rt.jar:1.7.0_75]
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347)
[rt.jar:1.7.0_75]
at
org.apache.wicket.serialize.java.JavaSerializer$SerializationCheckerObjectOutputStream.writeObjectOverride(JavaSerializer.java:260)
[wicket-core-7.0.0.jar:7.0.0]


Second:
===
16:24:22,674 ERROR [org.apache.wicket.DefaultExceptionMapper]
(http-/162.143.93.97:8543-14) Unexpected error occurred:
org.apache.wicket.WicketRuntimeException: Can't instantiate page using
constructor 'public
gov.xyz.abc.view.asm.SearchDealerPage(org.apache.wicket.request.mapper.parameter.PageParameters)'
and argument 'callingFromWhichScreen=[search]'. An exception has been
thrown during construction!
at
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:194)
[wicket-core-7.0.0.jar:7.0.0]
at
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:99)
[wicket-core-7.0.0.jar:7.0.0]
at
org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:106)
[wicket-core-7.0.0.jar:7.0.0]
at
org.apache.wicket.core.request.handler.PageProvider.resolvePageInstance(PageProvider.java:271)
[wicket-core-7.0.0.jar:7.0.0]
at

Re: Wicket 7 - OutOfMemory PermGen

2015-11-18 Thread Mihir Chhaya
Thanks, Christos. That is not the case though; we have Java 7 JDE from IDE
to Application server.

On Wed, Nov 18, 2015 at 12:43 PM, Christos Stieglitz <chris...@gnosys.de>
wrote:

> 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 <mihir.chh...@gmail.com>
> > 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 <mihir.chh...@gmail.com> 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 

Re: Page Versioning - F5 load balancer Monitoring

2015-10-30 Thread Mihir Chhaya
Thanks, Christoph. For now, I have created HealthCheck Stateless page in
place of jsp, and mounted as /health.

On Fri, Oct 30, 2015 at 3:59 AM, Christoph Läubrich <lae...@googlemail.com>
wrote:

> You could check if you can configure F5 to accept 302 code as a valid life
> sign (maybe something like "don't follow redirects or such")
> If you just want to check that the webserver is there an wicket is running
> I would create a special CheckPage that is stateless and mounted unter a
> static path. You could even embedd some kind of statistic information in
> this page or return an error page if you detect some kind of problem in
> your app (e.g. DB down...).
>
>
> Am 30.10.2015 06:00, schrieb Mihir Chhaya:
>
>> Hello,
>>
>> I have recently migrated my wicket app from 1.4 to 7.
>>
>> Problem:
>> Page versioning is generating redirect loop for F5 load balancer
>> monitoring.
>>
>> Background:
>> We have F5 load balancer monitor running every few seconds to check 200 OK
>> from host/app/login for application availability monitoring. This worked
>> fine with 1.4 but, it is going into redirect loop after migration to
>> Wicket
>> 7 as 7 uses page versioning and host/app/login request from application
>> comes back with 302 Moved temporarily header since Wicket 7 is appending
>> page Id '?#' after login. 1.4 was also using page versioning but page Id
>> was not appended, and so F5 monitor was getting 200 OK from wicket.
>>
>> In 1.4 I was using mountBookmarkablePage("login", Login.class).
>> In 7, I am using mountPage("/login", Login.class).
>>
>> I understand that page versioning is due to the fact that the page is
>> stateful. But as we have modal window(password management - expired, will
>> expire soon type of functionality) and some Ajax links on the login page,
>> I
>> can't make it stateless at this moment to avoid page versioning.
>>
>> For now, I am using static jsp page (index.jsp) under WebContent without
>> any redirect to bring 200 OK to F5 load balancer monitor. I don't want 302
>> to be treated like '200 OK' as it could be returned for different reasons.
>>
>> I tried setVersioned(false) but not luck; I assume this is due to the fact
>> that my page containing stateful components (ajax link, modal etc).
>>
>> Knowing that I 'cannot' convert my login page to stateless at this moment,
>> is there any way I could still make F5 monitor work with login page? Has
>> anybody experienced similar situation before?
>>
>> Thanks in advance,
>> -Mihir.
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Wicket CSRF

2015-10-30 Thread Mihir Chhaya
Hello,

I have read Wicket CSRF related posts on wicket forum before posting this
question.
I could not find one with detail I am looking for. If I have missed any,
please redirect me to the link.

I am looking into CSRF and Wicket 7 default settings. Everything seems fine
with use of CryptoMapper (which by default uses
KeyInSessionSunJceCryptFactory) to handle CSRF attack.

But I am not sure if Wicket still prevents against CSRF if CryptoMapper is
not used. Does default mapper inherently uses
KeyInSessionSunJceCryptFactory? The documentation says
KeyInSessionSunJceCryptFactory is default only for ICrypt implementation
objects. If not, then should one use CsrfPreventionRequestCycleListener?

If default anti-CSRF is already set like CryptoMapper, which Wicket source
class I can look into for
better understanding?

Thanks in advance,
-Mihir.


Page Versioning - F5 load balancer Monitoring

2015-10-29 Thread Mihir Chhaya
Hello,

I have recently migrated my wicket app from 1.4 to 7.

Problem:
Page versioning is generating redirect loop for F5 load balancer monitoring.

Background:
We have F5 load balancer monitor running every few seconds to check 200 OK
from host/app/login for application availability monitoring. This worked
fine with 1.4 but, it is going into redirect loop after migration to Wicket
7 as 7 uses page versioning and host/app/login request from application
comes back with 302 Moved temporarily header since Wicket 7 is appending
page Id '?#' after login. 1.4 was also using page versioning but page Id
was not appended, and so F5 monitor was getting 200 OK from wicket.

In 1.4 I was using mountBookmarkablePage("login", Login.class).
In 7, I am using mountPage("/login", Login.class).

I understand that page versioning is due to the fact that the page is
stateful. But as we have modal window(password management - expired, will
expire soon type of functionality) and some Ajax links on the login page, I
can't make it stateless at this moment to avoid page versioning.

For now, I am using static jsp page (index.jsp) under WebContent without
any redirect to bring 200 OK to F5 load balancer monitor. I don't want 302
to be treated like '200 OK' as it could be returned for different reasons.

I tried setVersioned(false) but not luck; I assume this is due to the fact
that my page containing stateful components (ajax link, modal etc).

Knowing that I 'cannot' convert my login page to stateless at this moment,
is there any way I could still make F5 monitor work with login page? Has
anybody experienced similar situation before?

Thanks in advance,
-Mihir.


Re: Wicket 8

2015-10-24 Thread Mihir Chhaya
Thanks for the reply.

-Mihir.

On Sat, Oct 24, 2015, 8:18 AM Martijn Dashorst <martijn.dasho...@gmail.com>
wrote:

> No. I don't think it will be in 6 months. We might do some milestones.
>
> We'll be sure to get Java 8 features right.
>
> Martijn
>
> On Saturday, 24 October 2015, Mihir Chhaya <mihir.chh...@gmail.com> wrote:
>
> > Hello,
> >
> > On apache wicket website download section, there is link for wicket 8
> > snapshot. Just curious; is there planned or projected date decided for
> the
> > final release?
> >
> > Thanks,
> > -Mihir.
> >
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
>


Wicket 8

2015-10-24 Thread Mihir Chhaya
Hello,

On apache wicket website download section, there is link for wicket 8
snapshot. Just curious; is there planned or projected date decided for the
final release?

Thanks,
-Mihir.


Re: 2 different context paths using one single war file

2015-10-09 Thread Mihir Chhaya
Just my opinion; to me this looks more like a matter of virtual name (
https://commonname/contextroot
and then redirect/restrict based upon roles/permission.

-Mihir.

On Fri, Oct 9, 2015 at 12:29 PM, trlt  wrote:

> >> why do you want that? What is the benefit of having the same application
> under two different path?
>
> Maybe I didn't explain this well - Another department in my company wants
> one of the applications in my Wicket *.war file.  I'm trying to make it
> available for them under a different URL (so theirs users do not have to
> see
> our department's hostname etc).
>
> This is something new to me and I don't think if I'm taking the right
> approach.  I don't want to maintain multiple copies of the source code or
> multiple war files, and I'm open to other suggestions though.
>
> Lucie
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/2-different-URLs-using-one-single-war-file-tp4672189p4672202.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
>
>


Wicket Markup side-by-side

2015-09-25 Thread Mihir Chhaya
Hello,

I recently started digging little deeper into how Wicket 7
converts/generates markup when adding JS or CSS resources at the
page/component level.
And that gave me an idea of contributing to the wicket community by showing
code snippet (side-by-side) with pure JQuery and then how to achieve same
with Wicket 7 (and resulting markup).

I am not sure if there is already a place available for such or if anybody
is working and I could join the efforts.

Any suggestions/recommendations?

Thanks,
-Mihir.


Re: Wicket Markup side-by-side

2015-09-25 Thread Mihir Chhaya
I agree; Wicket and JQuery cannot substitute each other. My apologies if I
was not clear enough.

Here is little history: Actually I was going through JQuery Ajax events and
other basic tutorial and wanted to understand Wicket7's Ajax Event handling
and HeaderItems - just to compare and learn how Wicket changes the final
markup against the final markup using plain JQuery. At one point I was
stuck as I was using wrong HeaderItem in Wicket to achieve same what I was
doing with JQuery function in plain html to hide the link on click. Using
one particular HeaderItem was not resulting in similar JavaScript function
after markup which I had using plain JQuery function.

That made me curious to know and compare final HTML markup side by side by
using straight forward JQuery/JavaScript and then doing same thing with
Wicket by setting different HeaderItems; to understand how setting
different header effects the final Markup and know internals of Wicket
HeaderItem from there. For example, what markup looks like when using
JavaScriptContentHeaderItem (and when to use it), or how it would look when
using OnLoadHeaderItem? And then comparing the final markup against plain
HTML written with JQuery/Javascript function.

Not much of use may be; but just wanted to get more insight of how Wicket
HeaderItem and Ajax Events works; with comparing those against vanilla
JQuery/JavaScript usage.

I hope this explanation would help in understanding my original question.

Thanks,
-Mihir.

On Fri, Sep 25, 2015 at 3:39 PM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> Hi,
>
> What kind of examples/snippets do you have in mind?
> Wicket cannot substitute jQuery, and vise versa. For better user experience
> I'd recommend to use JavaScript (jQuery) when possible.
> E.g. using AjaxLink when you can use plain JS for some interaction is
> actually bad practice.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Sep 25, 2015 at 5:51 PM, Mihir Chhaya <mihir.chh...@gmail.com>
> wrote:
>
> > Hello,
> >
> > I recently started digging little deeper into how Wicket 7
> > converts/generates markup when adding JS or CSS resources at the
> > page/component level.
> > And that gave me an idea of contributing to the wicket community by
> showing
> > code snippet (side-by-side) with pure JQuery and then how to achieve same
> > with Wicket 7 (and resulting markup).
> >
> > I am not sure if there is already a place available for such or if
> anybody
> > is working and I could join the efforts.
> >
> > Any suggestions/recommendations?
> >
> > Thanks,
> > -Mihir.
> >
>


Re: Wicket+Spring 4 integration

2015-09-24 Thread Mihir Chhaya
Just sharing my experience;  I recently migrated medium scale web
application (40+ screens) from wicket 1.4 + Spring 3.x + Hibernate 3.x to
Wicket 7+ Spring 4.2 +Hibernate 4.2 without any integration issue.

-Mihir.

On Thu, Sep 24, 2015, 1:15 PM Sandor Feher  wrote:

> So this means if I want to use Spring 4 then I must upgrade to Wicket 7.
> (Currently I use 6.20.0)
>
> Can I do it safely ? Is 7.0 stable enough ?
>
> TIA,Sandor
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-4-integration-tp4672031p4672033.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: iFrame - Focus and auto scroll of the page

2015-09-22 Thread Mihir Chhaya
Oops !! Instead of version 7 I have mentioned Wicket 1.7.

Ok, I think I have "solved" the issue. The response coming from database
has  which I am replacing with "\n". Now if that "\n" is at the
beginning of the text in text area then wicket focus does not scroll page
to bring that component to the view(like focus is jumping somewhere else
out of Text Area box).
I had to convert  to \n since when leaving as is was converting
&->

On setting setEscapeModelStrings(false)  for the text area did the trick
and now the focus is set with component visible with scroll. I assume that
since the value from database is already escaped, keeping as is taken care.

On side note, I compared TextArea between Wicket 1.4 and 7.

The onComponentTagBody in Wicket 7 is checking for "\n", "\r\n", and "\r"
at the beginning of the value. Any idea what and where it helps? Also, is
my approach to setEscapeModelStrings(false) correct or there is another,
better approach?

Thanks,
-Mihir.

On Tue, Sep 22, 2015 at 10:35 AM, Mihir Chhaya <mihir.chh...@gmail.com>
wrote:

> Hello,
>
> I have migrated my application from Wicket 1.4 to 1.7. Everything is
> working fine except default focus behavior for
> page with dynamic number of text area. The behavior is working fine with
> 1.4.
>
> Here is my requirement:
> On clicking row from the grid, application opens modal window with left
> and right frame. Left frame has tabs with different
> panels associated with each tab. Right side frame shows page with list of
> (radio choice + text area). The number of items in
> this list is dynamic; based upon number of responses from database.
>
> Now when the modal is displayed, I want the default focus set to the first
> text area component on right side whose radio choice
> is not yet selected. Once user makes the choice and update the result, the
> focus should then go to the next unchecked text area
> component (allowing user to mark the radio choice without manual scroll).
>
> The focus is working fine, but issue is that half of the time the page is
> not scrolled up to that text area, so user needs to manually scroll
> to that component. This was not the case with 1.4. The focus was set as
> well as the page was auto scrolled(every time)
> to the component; making that component visible.
>
> Following is the code snippet for reference. The CustomerDetailsModalPage
> has left and right frame. Right frame contains the
> CustomerDetailsResponsePage.
> CustomerDetailsResponsePage has ListView which has radio and
> text area panel (CustomerDetailsResponsePanel inside CollapsiblePanel).
> CustomerDetailsResponsePanel has TextArea with DefaultFocusBehavior
> (Behavior class at the bottom).
>
> Could anybody please help or guide me here? My apologies if
> description/code is confusing.
>
>
> Class CustomerDetailsModalPage
> 
> public CustomerDetailsModalPage() {
> super();
>
> CustomerDetailsRequestPage leftFramePage = new
> CustomerDetailsRequestPage();
> getSession().getPageManager().touchPage(leftFramePage);
>
> // get the url to that page
> IRequestHandler leftFrameHandler = new
> RenderPageRequestHandler(new PageProvider(leftFramePage));
>
> FramePage leftPage = new FramePage("leftFrame", leftFrameHandler);
> add(leftPage);
>
>
> CustomerDetailsResponsePage rightFramePage = new
> CustomerDetailsResponsePage();
> getSession().getPageManager().touchPage(rightFramePage);
>
> // get the url to that page
> IRequestHandler rightFrameHandler = new
> RenderPageRequestHandler(new PageProvider(rightFramePage));
>
> FramePage rightPage = new FramePage("rightFrame",
> rightFrameHandler);
> add(rightPage);
>
> }
>
>
> Class CustomerDetailsResponsePage:
> 
>
>  ListView responseList = new ListView("object.list")
> {
>
> .
> //Generate TextArea and radio button panel component for each response
> from the list.
> @Override
> protected void populateItem(final ListItem item) {
> final Responses response = item.getModelObject();
> //Add Radio choice for Y/N radio buttons
> RadioChoice matchFlag = new RadioChoice("matchFlag",
> yesNoList).setSuffix("");
>
> matchFlag.setMarkupId("matchFlagId".concat(String.valueOf(item.getIndex(.setOutputMarkupId(true);
> item.add(matchFlag);
> //Add Accordion style panel to show Text Area with response text
> CollapsiblePanel collapsiblePanel = new CollapsiblePanel("collPanel",
> new Model("Matching Criteria "

iFrame - Focus and auto scroll of the page

2015-09-22 Thread Mihir Chhaya
Hello,

I have migrated my application from Wicket 1.4 to 1.7. Everything is
working fine except default focus behavior for
page with dynamic number of text area. The behavior is working fine with
1.4.

Here is my requirement:
On clicking row from the grid, application opens modal window with left and
right frame. Left frame has tabs with different
panels associated with each tab. Right side frame shows page with list of
(radio choice + text area). The number of items in
this list is dynamic; based upon number of responses from database.

Now when the modal is displayed, I want the default focus set to the first
text area component on right side whose radio choice
is not yet selected. Once user makes the choice and update the result, the
focus should then go to the next unchecked text area
component (allowing user to mark the radio choice without manual scroll).

The focus is working fine, but issue is that half of the time the page is
not scrolled up to that text area, so user needs to manually scroll
to that component. This was not the case with 1.4. The focus was set as
well as the page was auto scrolled(every time)
to the component; making that component visible.

Following is the code snippet for reference. The CustomerDetailsModalPage
has left and right frame. Right frame contains the
CustomerDetailsResponsePage.
CustomerDetailsResponsePage has ListView which has radio and
text area panel (CustomerDetailsResponsePanel inside CollapsiblePanel).
CustomerDetailsResponsePanel has TextArea with DefaultFocusBehavior
(Behavior class at the bottom).

Could anybody please help or guide me here? My apologies if
description/code is confusing.


Class CustomerDetailsModalPage

public CustomerDetailsModalPage() {
super();

CustomerDetailsRequestPage leftFramePage = new
CustomerDetailsRequestPage();
getSession().getPageManager().touchPage(leftFramePage);

// get the url to that page
IRequestHandler leftFrameHandler = new RenderPageRequestHandler(new
PageProvider(leftFramePage));

FramePage leftPage = new FramePage("leftFrame", leftFrameHandler);
add(leftPage);


CustomerDetailsResponsePage rightFramePage = new
CustomerDetailsResponsePage();
getSession().getPageManager().touchPage(rightFramePage);

// get the url to that page
IRequestHandler rightFrameHandler = new
RenderPageRequestHandler(new PageProvider(rightFramePage));

FramePage rightPage = new FramePage("rightFrame",
rightFrameHandler);
add(rightPage);

}


Class CustomerDetailsResponsePage:


 ListView responseList = new ListView("object.list") {

.
//Generate TextArea and radio button panel component for each response from
the list.
@Override
protected void populateItem(final ListItem item) {
final Responses response = item.getModelObject();
//Add Radio choice for Y/N radio buttons
RadioChoice matchFlag = new RadioChoice("matchFlag",
yesNoList).setSuffix("");
matchFlag.setMarkupId("matchFlagId".concat(String.valueOf(item.getIndex(.setOutputMarkupId(true);
item.add(matchFlag);
//Add Accordion style panel to show Text Area with response text
CollapsiblePanel collapsiblePanel = new CollapsiblePanel("collPanel",
new Model("Matching Criteria " +
matchingContent), true) {
@Override
protected Panel getInnerPanel(String markupId) {
//Set Page focus if needed by checking if response already marked match Y
or N.
//If nothing selected then set the focus to the associated text area
component
if (response.getMatchFlag() == null){
response.setMatchFlagIndicator(AppConstants.SET_FOCUS);// SET_FOCUS = 1
}
//Reusable Panel with Text Area
return new CustomerDetailsResponsePanel(markupId, response.getContent(),
response.getMatchFlagIndicator());
}
}
collapsiblePanel.setOutputMarkupId(true);
item.add(collapsiblePanel);
}
 }

Class CustomerDetailsResponsePanel
===
public CustomerDetailsResponsePanel(String id, String responseContent,
final int setFocus) {
super(id);

if (responseContent != null) {
responseContent = responseContent.replaceAll("()", "");
responseContent = responseContent.replaceAll(";{2,}", ";");
responseContent = responseContent.replaceAll(";", "\n");
}

TextArea response = new TextArea("response", new
Model(responseContent));
response.setOutputMarkupId(true);
if (setFocus == AppConstants.SET_FOCUS) {
response.add(new DefaultFocusBehavior());
}
add(response);
}


Class DefaultFocusBehavior
===
public class DefaultFocusBehavior extends Behavior {
private static final long serialVersionUID = -4891399118136854774L;

private Component component;
String markupId;

public DefaultFocusBehavior() {
}

@Override
public void bind(Component component) {
if (!(component instanceof FormComponent)) {
throw new IllegalArgumentException("DefaultFocusBehavior:
component 

Re: Form submit - button click

2015-09-04 Thread Mihir Chhaya
Such an obvious thing :) yes, it is working now with having panel added to
form and to ART. Thanks for your help.

-Mihir.

On Fri, Sep 4, 2015, 2:53 AM Tobias Soloschenko <
tobiassolosche...@googlemail.com> wrote:

> First ;-)
>
> kind regards
>
> Tobias
>
> > Am 04.09.2015 um 08:50 schrieb Bernard <bht...@gmail.com>:
> >
> > Your feedback component is not contained in any AJAX target. You add the
> > feedback component to the page which does not get refreshed after the
> form
> > submit.
> >
> > AJAX is preferably used to avoid what you are expecting (page refresh).
> >
> >
> >> On Fri, Sep 4, 2015 at 5:45 PM, Mihir Chhaya <mihir.chh...@gmail.com>
> wrote:
> >>
> >> Hello,
> >>
> >> I am finding problem while submitting form on button click.
> >>
> >> I have simple login form with login button. User name and password
> fields
> >> are required. The button type is submit in html. But when I click the
> >> button the page does not show feedback messages. On clicking browser
> page
> >> refresh/reload (F5) only I see the feedback message. Could anybody
> suggest
> >> me what I am missing?
> >>
> >> Here is the page:
> >>
> >> public class Login extends WebPage {
> >>
> >>NotificationPanel feedbackPanel;
> >>
> >>public Login() {
> >>
> >>feedbackPanel = new NotificationPanel("statusbar");
> >>feedbackPanel.setOutputMarkupId(true);
> >>feedbackPanel.setMarkupId("statusbarId");
> >>add(feedbackPanel);
> >>
> >>Form form = new Form("login-form"){
> >>@Override
> >>protected void onSubmit() {
> >>super.onSubmit();
> >>System.out.println("Form onSubmit called...");
> >>}
> >>};
> >>form.setOutputMarkupId(true);
> >>add(form);
> >>form.add(userNameField("username", form));
> >>form.add(passwordField("password", form));
> >>AjaxFallbackButton submitButton = addLoginButton("login-button",
> >> form);
> >>form.add(submitButton);
> >>form.setDefaultButton(submitButton);
> >>form.setOutputMarkupId(true);
> >>}
> >>
> >>private PasswordTextField passwordField(String property, Form
> >> form) {
> >>PasswordTextField passwordTextField = new
> >> PasswordTextField(property);
> >>passwordTextField.setOutputMarkupId(true);
> >>passwordTextField.setRequired(true);
> >>passwordTextField.setMarkupId(property.concat("Id"));
> >>
> >>return passwordTextField;
> >>}
> >>
> >>private RequiredTextField userNameField(String property,
> >> Form form) {
> >>RequiredTextField userNameFld = new
> >> RequiredTextField(property) {
> >>@Override
> >>protected void onComponentTag(ComponentTag tag) {
> >>super.onComponentTag(tag);
> >>if (!isValid()) {
> >>tag.put("style", "background-color:red");
> >>}
> >>}
> >>};
> >>userNameFld.setOutputMarkupId(true);
> >>userNameFld.setMarkupId(property.concat("Id"));
> >>
> >>return userNameFld;
> >>}
> >>
> >>private AjaxFallbackButton addLoginButton(String property, Form
> >> form) {
> >>AjaxFallbackButton submitBtn = new AjaxFallbackButton(property,
> >> form) {
> >>@Override
> >>protected void onSubmit(AjaxRequestTarget target, Form
> form)
> >> {
> >>super.onSubmit(target, form);
> >>target.add(form);
> >>}
> >>};
> >>
> >>submitBtn.setDefaultFormProcessing(true);
> >>
> >>return submitBtn;
> >>}
> >> }
> >>
> >>
> >> Here is Mark up:
> >>
> >> 
> >>
> >>
> >>
> >>
> >>User Name:
> >>
> >>
> >> >> placeholder="User Name" style="width:250px; text-align:left;">
> >>
> >>
> >>
> >>
> >>Password:
> >>
> >>
> >> >> placeholder="Password" style="width:250px; text-align:left;">
> >>
> >>
> >>
> >>
> >> >> wicket:id="login-button"/>
> >>
> >>
> >>
> >>
> >>
> >> Thanks,
> >> -Mihir.
> >>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Frameset - Frames

2015-09-03 Thread Mihir Chhaya
This is working now as I used the IRequestHandler and PageProvider
combination as below (Reference Wicket 7 frames example):

LeftSidePage leftFramePage = new LeftSidePage();
getSession().getPageManager().touchPage(leftFramePage);

// get the url to that page
IRequestHandler leftFrameHandler = new RenderPageRequestHandler(new
PageProvider(leftFramePage));

FramePage leftPage = new FramePage("leftFrame", leftFrameHandler);
add(leftPage);
RightSidePage rightFramePage = new RightSidePage();
getSession().getPageManager().touchPage(rightFramePage);

// get the url to that page
IRequestHandler rightFrameHandler = new
RenderPageRequestHandler(new PageProvider(rightFramePage));

FramePage rightPage = new FramePage("rightFrame",
rightFrameHandler);
add(rightPage);



On Wed, Sep 2, 2015 at 2:24 PM, Mihir Chhaya <mihir.chh...@gmail.com> wrote:

> Hello,
>
>
> I am migrating my application from Wicket 1.4 to Wicket 7.
>
> In my app, I have data table with 'Open' link to open modal window from
> each row. The modal window consists a frameset -> frame to show a page with
> some tabs on left frame and another page on the right frame.
>
> Following is markup for frameset.
>
> 
>  src="?wicket:bookmarkablePage=leftframe:PageWithTabPanels"/>
>  src="?wicket:bookmarkablePage=rightFrame:RightSidePage"/>
> 
>
> It is working fine in 1.4. But after migration, I see the modal window is
> called repeatedly, and so the frameset is being nested with same left side
> and right side pages.
>
> Could anybody provide any suggestion/help?
>
> Thanks,
> -Mihir.
>
>
>
>


Form submit - button click

2015-09-03 Thread Mihir Chhaya
Hello,

I am finding problem while submitting form on button click.

I have simple login form with login button. User name and password fields
are required. The button type is submit in html. But when I click the
button the page does not show feedback messages. On clicking browser page
refresh/reload (F5) only I see the feedback message. Could anybody suggest
me what I am missing?

Here is the page:

public class Login extends WebPage {

NotificationPanel feedbackPanel;

public Login() {

feedbackPanel = new NotificationPanel("statusbar");
feedbackPanel.setOutputMarkupId(true);
feedbackPanel.setMarkupId("statusbarId");
add(feedbackPanel);

Form form = new Form("login-form"){
@Override
protected void onSubmit() {
super.onSubmit();
System.out.println("Form onSubmit called...");
}
};
form.setOutputMarkupId(true);
add(form);
form.add(userNameField("username", form));
form.add(passwordField("password", form));
AjaxFallbackButton submitButton = addLoginButton("login-button",
form);
form.add(submitButton);
form.setDefaultButton(submitButton);
form.setOutputMarkupId(true);
}

private PasswordTextField passwordField(String property, Form
form) {
PasswordTextField passwordTextField = new
PasswordTextField(property);
passwordTextField.setOutputMarkupId(true);
passwordTextField.setRequired(true);
passwordTextField.setMarkupId(property.concat("Id"));

return passwordTextField;
}

private RequiredTextField userNameField(String property,
Form form) {
RequiredTextField userNameFld = new
RequiredTextField(property) {
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
if (!isValid()) {
tag.put("style", "background-color:red");
}
}
};
userNameFld.setOutputMarkupId(true);
userNameFld.setMarkupId(property.concat("Id"));

return userNameFld;
}

private AjaxFallbackButton addLoginButton(String property, Form
form) {
AjaxFallbackButton submitBtn = new AjaxFallbackButton(property,
form) {
@Override
protected void onSubmit(AjaxRequestTarget target, Form form)
{
super.onSubmit(target, form);
target.add(form);
}
};

submitBtn.setDefaultFormProcessing(true);

return submitBtn;
}
}


Here is Mark up:






User Name:







Password:













Thanks,
-Mihir.


Frameset - Frames

2015-09-02 Thread Mihir Chhaya
Hello,


I am migrating my application from Wicket 1.4 to Wicket 7.

In my app, I have data table with 'Open' link to open modal window from
each row. The modal window consists a frameset -> frame to show a page with
some tabs on left frame and another page on the right frame.

Following is markup for frameset.






It is working fine in 1.4. But after migration, I see the modal window is
called repeatedly, and so the frameset is being nested with same left side
and right side pages.

Could anybody provide any suggestion/help?

Thanks,
-Mihir.


Re: New Community page

2015-08-24 Thread Mihir Chhaya
Thanks,  Andrea. Very helpful links for developers like me and, everybody
else looking into Wicket site for any other reason.

My humble observation though; there is 'CONTRIBUTE' link before
'COMMUNITY'. Would it be helpful in 'linking' those two or having reference
of COMMUNITY on the other one?  Or, Contribute section mentioning other
projects (WicketStuff and Wicket-Bootstrap - with reference to COMMUNITY
page)

I hope I have not confused with mention of my observation above.

Thanks again to you and the wicket team,

-Mihir.





On Mon, Aug 24, 2015, 5:25 AM Andrea Del Bene an.delb...@gmail.com wrote:

 Hi folks,

 I've uploaded a new page on our site called 'Community' where anyone can
 find the different community-driven resources for Wicket.

 https://wicket.apache.org/community/

 I hope you will like it!

 Andrea



SelectableFolderContent - File Download on click

2015-07-16 Thread Mihir Chhaya
Hello,

Could anybody guide me on following?

I am using SelectableFolderContent from Wicket Advanced Tabular Tree
structure example (TableTreePage).

Here is what I am trying:

1. Using JCraft - JSch, establish connection to the host, traverse the
folder structure, prepare list of file path-name, file size, file type etc.
- This is working.
2. Display the list on the tabular tree structure - This is working.
3. On click of the link of each folder, expand and collapse the folder
structure - Working.
4. On click of the file, zip the file and create into default temp folder
of the running server- Working.

5. At the same time when clicked, open download file dialog box to download
the zip file from the server to local machine - Not working.

Here is my SelectableFolderContent class. 'downloadFile(...)' method call
in from select(...) is where I am trying to download using IResourceStream.

public class SelectableFolderContent extends Content {

private static final long serialVersionUID = 1L;

private ITreeProviderSomeFileBean provider;

private IModelSomeFileBean selected;

public SelectableFolderContent(ITreeProviderSomeFileBean provider) {
this.provider = provider;
}

@Override
public void detach() {
if (selected != null) {
selected.detach();
}
}

protected boolean isSelected(SomeFileBean someFile) {
IModelSomeFileBean model = provider.model(someFile);

try {
return selected != null  selected.equals(model);
} finally {
model.detach();
}
}

protected void select(SomeFileBean someFile, AbstractTreeSomeFileBean
tree, final AjaxRequestTarget target) {

if (!someFile.isFolder()) {
//SFTP to host, get file, create zip in temp folder. Once done, download to
local machine.
downloadFile(tree.getPage(), someFile, target);
} else {

if (selected != null) {
tree.updateNode(selected.getObject(), target);

selected.detach();
selected = null;
}

selected = provider.model(someFile);

if (tree.getState(selected.getObject()) ==
AbstractTree.State.COLLAPSED) {
tree.expand(selected.getObject());
} else {
tree.collapse(selected.getObject());
}
tree.updateNode(someFile, target);

tree.getPage().setResponsePage(SomeTableTreePage.class);
}
}


@Override
public Component newContentComponent(final String id, final
AbstractTreeSomeFileBean tree, final IModelSomeFileBean model) {

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

@Override
protected IModel? newLabelModel(IModelSomeFileBean model) {
return new PropertyModelString(model, id);
}

/**
 * Always clickable.
 */
@Override
protected boolean isClickable() {
return true;
}

@Override
protected void onClick(AjaxRequestTarget target) {
SelectableFolderContent.this.select(modelObject, tree,
target);
}

@Override
protected boolean isSelected() {
return
SelectableFolderContent.this.isSelected(getModelObject());
}

};

return components;
}
 protected void downloadFile(final Page page, SomeFileBean someFile,
AjaxRequestTarget target) {
IModelFile fileModel = getDownloadFileModel(someFile);
file = fileModel.getObject();
IResourceStream resourceStream = new FileResourceStream(new
org.apache.wicket.util.file.File(file));
String fileName = serverlog.zip;

ResourceStreamRequestHandler resourceStreamRequestHandler = new
ResourceStreamRequestHandler(
resourceStream, fileName);

page.getRequestCycle().scheduleRequestHandlerAfterCurrent(resourceStreamRequestHandler);


try {
resourceStream.close();
} catch (IOException e) {
AppLogger.logMessage(AppLogger.LEVEL.ERROR, File I/O Error:,
e);
} catch (Exception e) {
AppLogger.logMessage(AppLogger.LEVEL.ERROR, Error:, e);
}
}
}


There are two issues I am experiencing:
1. Dialog box not opening to save the file on local machine.
2. When debugging, the Ajax Debug window showing 'Wicket.Ajax.Call.failure:
Error while parsing response: Error: Invalid XML' error.

Thanks in advance,
-Mihir.


Re: New Wicket Website

2015-07-11 Thread Mihir Chhaya
Excellent website. Much awaited !!!
As a wicket user, thanks a lot to the whole wicket team and the community
for keeping this fantastic framework alive and active.

-Mihir.

On Sat, Jul 11, 2015, 4:27 PM Francois Meillet francois.meil...@gmail.com
wrote:

 Thanks for this superb website !!!

 François




 Le 11 juil. 2015 à 20:01, Tobias Soloschenko 
 tobiassolosche...@googlemail.com a écrit :

  Hi,
 
  just want to thank all for the great work! The new site is awesome!
 
  https://wicket.apache.org
 
  kind regards
 
  Tobias
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 




Wicket Version Support

2015-06-22 Thread Mihir Chhaya
Hello,

This is regarding technical support for various Wicket Versions.
I am aware of community and commercial support information available on
Wicket website at
https://wicket.apache.org/help/

But, I am looking for additional information on following:
1) Is there any strategy/rules for technical support available only from
certain version and beyond? One might get support from community for any
historical version, but Apache Wicket might no longer be releasing patch
for those.

2) One of the developers from another team at my work location mentioned
that only last two or three versions are supported at any given time. Could
anybody please shed light on this?

3) Is there any link/documentation available which could be referred for
managers to look at the Wicket website itself for the list of officially
supported versions? This might sound weird to ask though, but it is just
one of those 'Is it officially mentioned anywhere?' kind of question.

Thanks,
-Mihir.


Re: Wicket Version Support

2015-06-22 Thread Mihir Chhaya
Thanks, Martin for your guidance.

On Mon, Jun 22, 2015 at 10:13 AM, Martijn Dashorst 
martijn.dasho...@gmail.com wrote:

 On Mon, Jun 22, 2015 at 3:59 PM, Mihir Chhaya mihir.chh...@gmail.com
 wrote:
  Hello,
 
  This is regarding technical support for various Wicket Versions.
  I am aware of community and commercial support information available on
  Wicket website at
  https://wicket.apache.org/help/
 
  But, I am looking for additional information on following:
  1) Is there any strategy/rules for technical support available only from
  certain version and beyond? One might get support from community for any
  historical version, but Apache Wicket might no longer be releasing patch
  for those.

 There is no official support from us, since we are all volunteers :-).
 Your manager
 might become happy from a document on the wicket site claiming anything
 about
 our releases, but what actually matters is:

 - is anyone willing to fix an issue in any version at all
 - is it possible to craft a release for that version (for example 1.3
 can't be built
 anymore within the team because of missing Java 1.4 JDKs for their
 platforms)

  2) One of the developers from another team at my work location mentioned
  that only last two or three versions are supported at any given time.
 Could
  anybody please shed light on this?

  The current major release and the major release prior to that are actively
 supported. So currently that is 6.x and 1.5.x. Older releases might get
 security
 fixes.

 Which is not too bad, considering 1.5.x was crafted a long time ago, and
 most
 projects have migrated to 6.x.

  3) Is there any link/documentation available which could be referred for
  managers to look at the Wicket website itself for the list of officially
  supported versions? This might sound weird to ask though, but it is just
  one of those 'Is it officially mentioned anywhere?' kind of question.

 This page provides some insight into which releases are supported.

 https://wicket.apache.org/start/download.html

 Martijn

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




Re: Graphing Framework for Wicket

2015-06-01 Thread Mihir Chhaya
One correction; it is called Wicked Charts (
http://wicked-charts.appspot.com/)



On Mon, Jun 1, 2015 at 11:46 AM, Mihir Chhaya mihir.chh...@gmail.com
wrote:

 Hi Lois,

 Not aware of current status but, you might want to look at wicket charts.

 Thanks,
 -Mihir.

 On Mon, Jun 1, 2015 at 11:08 AM, Sebastien seb...@gmail.com wrote:

 Hi Lois,

 I am not aware of this... But I'm interested to the answer :)
 I was looking for a nice js graph, based on jQuery possibly and found that
 best matches my requirement: vis.js, arbor.js  cytoscape.js

 arbor.js is highly deprecated,
 cytoscape.js is good and jQuery oriented, but requires additional
 libraries
 depending on what type of graph we want to display,
 so I'll probably go for vis.js (ASFv2 licensed) because it is really
 simple
 to use and it just works! :)

 I am already busy with some other wicket integrations so I don't know
 (now)
 if I will make it a public project... But if someone would like to dig
 into
 a wicket-vis project, and maintain it, I will be glad to help... In the
 meantime, will I try to publish a showcase in a week or two...

 Best regards,
 Sebastien


 On Mon, Jun 1, 2015 at 4:29 PM, Lois GreeneHernandez 
 lgreenehernan...@knoa.com wrote:

  Hi Martin,
 
  I looking for a framework or a set of classes that will allow me to
 create
  graphs.
 
  Thanks
 
  Lois
 
  -Original Message-
  From: Martin Grigorov [mailto:mgrigo...@apache.org]
  Sent: Monday, June 01, 2015 9:40 AM
  To: users@wicket.apache.org
  Subject: Re: Graphing Framework for Wicket
 
  Hi,
 
  Please give us more details.
  Do you mean graphics or graphs?
 
  Martin Grigorov
  Wicket Training and Consulting
  https://twitter.com/mtgrigorov
 
  On Mon, Jun 1, 2015 at 4:27 PM, Lois GreeneHernandez 
  lgreenehernan...@knoa.com wrote:
 
   Hi All,
  
   I need some recommendations on a graphing framework for wicket.
  
   Thanks
  
   Lois
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 





Re: Graphing Framework for Wicket

2015-06-01 Thread Mihir Chhaya
Hi Lois,

Not aware of current status but, you might want to look at wicket charts.

Thanks,
-Mihir.

On Mon, Jun 1, 2015 at 11:08 AM, Sebastien seb...@gmail.com wrote:

 Hi Lois,

 I am not aware of this... But I'm interested to the answer :)
 I was looking for a nice js graph, based on jQuery possibly and found that
 best matches my requirement: vis.js, arbor.js  cytoscape.js

 arbor.js is highly deprecated,
 cytoscape.js is good and jQuery oriented, but requires additional libraries
 depending on what type of graph we want to display,
 so I'll probably go for vis.js (ASFv2 licensed) because it is really simple
 to use and it just works! :)

 I am already busy with some other wicket integrations so I don't know (now)
 if I will make it a public project... But if someone would like to dig into
 a wicket-vis project, and maintain it, I will be glad to help... In the
 meantime, will I try to publish a showcase in a week or two...

 Best regards,
 Sebastien


 On Mon, Jun 1, 2015 at 4:29 PM, Lois GreeneHernandez 
 lgreenehernan...@knoa.com wrote:

  Hi Martin,
 
  I looking for a framework or a set of classes that will allow me to
 create
  graphs.
 
  Thanks
 
  Lois
 
  -Original Message-
  From: Martin Grigorov [mailto:mgrigo...@apache.org]
  Sent: Monday, June 01, 2015 9:40 AM
  To: users@wicket.apache.org
  Subject: Re: Graphing Framework for Wicket
 
  Hi,
 
  Please give us more details.
  Do you mean graphics or graphs?
 
  Martin Grigorov
  Wicket Training and Consulting
  https://twitter.com/mtgrigorov
 
  On Mon, Jun 1, 2015 at 4:27 PM, Lois GreeneHernandez 
  lgreenehernan...@knoa.com wrote:
 
   Hi All,
  
   I need some recommendations on a graphing framework for wicket.
  
   Thanks
  
   Lois
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 



Re: Table Tree expand node

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

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

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

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

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

Thanks again for your time,
-Mihir.

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

 Hi,

 can you reproduce the same problem here?

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

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

 Regards
 Sven




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

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

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

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

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

  p
  wicket:child/
  /p

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

 And here is for from wicket:child/ page:

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

 Thanks,
 -Mihir.

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

  Hi,

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

 menu option.

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

 Sven


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

  Hello,

 Could anybody please help me on following?

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


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


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


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


 Thanks,
 -Mihir.


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




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




Table Tree expand node

2014-10-16 Thread Mihir Chhaya
Hello,

Could anybody please help me on following?

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


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


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


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


Thanks,
-Mihir.


Re: Table Tree expand node

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

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

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

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

p
wicket:child/
/p

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

And here is for from wicket:child/ page:

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

Thanks,
-Mihir.

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

 Hi,

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

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

 Sven


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

 Hello,

 Could anybody please help me on following?

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


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


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


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


 Thanks,
 -Mihir.



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




Re: WiQuery: positioning a dialog when reusing it

2014-08-20 Thread Mihir Chhaya
, No);

setBtnTitles(btnTitles);
}

@Override
public void onConfirmation(AjaxRequestTarget target) {

if (null != grid  null != grid.getSelectedItems() 
grid.getSelectedItems().size()  0) {

//Take confirmation action
//info(Selected record(s) deleted successfully...);
confirmationDialog.close(target);
setResponsePage(new AnotherPage(somename));

} else {
error(No records to delete...);
confirmationDialog.close(target);
}
}
};

confirmationDialog.setMarkupId(confirmationDialogId); //If you
are using multiple dialog boxes in same page hierarchy, then this value
should be different for //each dialog

add(confirmationDialog);
}


Hope this helps,

-Mihir.



On Wed, Aug 20, 2014 at 4:31 AM, Martin Dietze mdie...@gmail.com wrote:

 I have looked into that issue a bit further.

 On 17 August 2014 17:23, Mihir Chhaya mihir.chh...@gmail.com wrote:
  I have used WQuery Dialog for Wicket 1.4 and could make it work in center
  using setMinimumHeight and setMinimumWidth methods when adding dialog.

 That's true, but this is part of the problem. Since this only takes
 effect when adding the dialog, it will not change after the page  (and
 therefore the generated Javascript code containing the settings) has
 been rendered.

 Since the dialog is shown using Javascript, Wicket will normally not
 even know about this. One can probably add some Javascript code to the
 links that open the dialog, but that does not seem very robust as
 there does not seem to be any official API for manipulations like this
 (one would have to read the generated Javascript code and write some
 stuff that changes the settings).

 I now ended up with two global dialogs, one for a small dialog that
 is shown in the center of the page and one for large dialogs that is
 positioned at the top. Not elegant, but it does the job.

 I actually doubt that using WiQuery for the dialogs actually leads to
 any benefit at all. I inherited the code I am working with, and not
 using Wicket's standard dialog API seems to make code harder to
 understand, less maintainable why not leading to obvious optimization.

 Cheers,

 Martin

 --
 -- mdie...@gmail.com --/-- mar...@the-little-red-haired-girl.org
 
 - / http://herbert.the-little-red-haired-girl.org /
 -

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




Re: WiQuery: positioning a dialog when reusing it

2014-08-17 Thread Mihir Chhaya
Martin,

I have used WQuery Dialog for Wicket 1.4 and could make it work in center
using setMinimumHeight and setMinimumWidth methods when adding dialog. Have
you tried those? You could pass different values for height and width from
the source when creating to match your requirements.

For position, I have not tried though.

-Mihir.


On Fri, Aug 15, 2014 at 8:01 AM, Martin Dietze mdie...@gmail.com wrote:

 In my application I am using WiQuery's 'Dialog' for a global page
 dialog that gets constructed in my page base class. Each time I want
 to show a dialog I embed a different panel in it and then show it.

 Usually I would like to display smaller dialogs that fit on the screen
 using WindowPosition.CENTER while for larger (i.e. longer) dialogs
 WindowPosition.TOP would be more appropriate.

 Now I see that setting the window position on the already constructed
 Dialog object does not have any effect, the only way I can actually
 set the position is by setting the position after construction, i.e.
 before the dialog gets rendered for the first time. I actually found
 this by trial-and-error, and the (rather terse) WiQuery documentation
 does not give me much more of a hint.

 Thus asking you - is there a way to reposition a reused dialog? If
 yes, how? It seems so weird I did not find anything on this because
 this requirement seems fairly typical to me...

 Cheers,

 Martin

 --
 -- mdie...@gmail.com --/-- mar...@the-little-red-haired-girl.org
 
 - / http://herbert.the-little-red-haired-girl.org /
 -

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




Re: Testing Wicket app with JMeter

2014-07-18 Thread Mihir Chhaya
Sandor,

I have successfully used JMeter on wicket application with proxy server
recording  as well as regex pattern on input for next post/get.

The first thing I would suggest is to trace your request/response. You can
get this info from your browser.
Then record your testing and verify you get similar request/response
content.

Thanks,
-Mihir.


On Fri, Jul 18, 2014 at 9:34 AM, Sandor Feher sfe...@bluesystem.hu wrote:

 Hi,

 I must perform some load test for our application and just found JMeter
 which seems suit our needs.
 My problem is that the first step is logging in to the app and can not get
 JMeter to manage it.
 I ran a recording script process and everything looked fine but wicket
 changes a hidden field name (which points to the current form's name) in my
 login form so the another session gets another name of it.
 I suspect this is why the login process does not work.
 There is nothing magical in the login form. Username, pass and lang fields.
 So I'm wondering if anybody used successfuly JMeter for this kind of
 testing!


 TIA., Sandor

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Testing-Wicket-app-with-JMeter-tp480.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




inmethod grid - Ajaxically update child grid from Master grid

2014-07-16 Thread Mihir Chhaya
Hello,

I am using inMethod data grid with Wicket 1.5.

I have a page to show master grid (MasterPanel). MasterPanel has child grid
(ChildPanel) to display child records. ChildPanel accepts MasterBean as one
of the arguments of the Constructor to retrieve child records using Master
PK id.

Now, on selection of row in Master grid, I want to ajaxically refresh child
panel.
I don't want to use Modal Window.

Following is code snippet:

public class MasterPanel extends Panel{

public MasterPanel(String id, IModelSomeBean) {
 MasterBean masterBean = get Master Bean from service method;
 //form
FormMasterBean form = new FormMasterBean (form, new
CompoundPropertyModelMasterBean(masterBean));
form.setOutputMarkupId(true);
 //Child Panel added into MasterPanel
ChildPanel childPanel = new ChildPanel(child, form.getModel());
childPanel.setOutputMarkupId(true);

form.add(childPanel);
 DataGridGridListMasterBean, MasterBean grid = masterGrid(grid,
childPanel);
grid.setOutputMarkupId(true);
form.add(grid);
}

private DataGridGridListMasterBean, MasterBean masterGrid(String
property, final ChildPanel childPanel) {



//OnRowClicked in Databgrid
@Override
protected void onRowClicked(AjaxRequestTarget target, IModelMasterBean
rowModel) {
getForm().setDefaultModel(rowModel);
target.add(childPanel);
}
}
}


Above code is not refreshing the child as the ChildPanel is already created
at the time of adding into MasterPanel. I want ChildPanel to be re-rendered
using selected MasterBean from Master grid.

Any help/suggestions?

Thanks,
-Mihir.


Re: how to handle null pointer exception while submit button

2014-06-28 Thread Mihir Chhaya
Hmmm...then that leaves a question open on my side that why I didn't get
NPE with that code?
One more thing I observed and you might have already taken care of in your
actual code, but any reason not writing generics type
TextFieldType/ModelType etc in your component?

-Mihir.


On Fri, Jun 27, 2014 at 10:51 PM, kumar ramanathan kumarramana...@gmail.com
 wrote:

 Thanks for reviewing the issue.I have actually fixed my problem.I have used
 setconvertemptyinputstrngtonull method.

 TextField memberIdField = new
 TextField(memberId,memberIdModel);
 *memberIdField.setConvertEmptyInputStringToNull(false);*
 TextField lossIdField = new
 TextField(lossId,lossIdModel);
 lossIdField.setConvertEmptyInputStringToNull(false);


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/how-to-handle-null-pointer-exception-while-submit-button-tp4666392p4666404.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 handle null pointer exception while submit button

2014-06-27 Thread Mihir Chhaya
Can you share your code snippet? Which type of model are you using?


On Fri, Jun 27, 2014 at 1:17 AM, Sven Meier s...@meiers.net wrote:

 #setConvertEmptyInputStringToNull(false) could help, but with a
 stacktrace we can give you a better advice.

 Sven


 On 06/27/2014 06:33 AM, kumar ramanathan wrote:

 Hi Friends,
 I have a text box and a submit button , If i pressed submit button without
 entering anything in textbox , am getting null pointer exception . Can you
 please help us on it ?


 Thanks,
 Kumar

 --
 View this message in context: http://apache-wicket.1842946.
 n4.nabble.com/how-to-handle-null-pointer-exception-while-
 submit-button-tp4666392.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 handle null pointer exception while submit button

2014-06-27 Thread Mihir Chhaya
Kumar,

I ran following (copied from your code) and it is showing me the value for
memberNumber. No NPE. Since you have String as memberID, I have assigned
String type to the models and property variable.


PropertyModelString memberIdModel=new
PropertyModelString(this,memberNumber);
TextFieldString memberIdField = new
TextFieldString(memberId,memberIdModel);


Form? form = new FormVoid(form){
 /**
 *
 */
private static final long serialVersionUID = 1L;

/* (non-Javadoc)
 * @see org.apache.wicket.markup.html.form.Form#onSubmit()
 */
@Override
protected void onSubmit() {
 System.out.println(memberNumber.equals(5566));
}
};
add(form);

As Sven has mentioned, stacktrace might be more helpful.




On Fri, Jun 27, 2014 at 6:16 AM, kumar ramanathan kumarramana...@gmail.com
wrote:


 PropertyModel memberIdModel=new PropertyModel(this,memberNumber);
 PropertyModel lossIdModel=new PropertyModel(this,lossNumber);
 TextField memberIdField = new TextField(memberId,memberIdModel);
 TextField lossIdField = new TextField(lossId,lossIdModel);

 Form form=new Form(form1){
 public void onSubmit(){


 flag=0;
 assignments.clear();
 estimates.clear();
 assignments.add(new
 AssignmentDB(MemberId,LossId,AssignemntId,DOL));
 assignments.add(new
 AssignmentDB(1234,001,1357,10/12/1067));
 assignments.add(new
 AssignmentDB(1234,001,1358,10/12/1067));
 assignments.add(new
 AssignmentDB(1234,003,1357,10/12/1067));

 for(int i=1;iassignments.size();){

 if(memberNumber.equals(assignments.get(i).getMemberId())){
 System.out.println(inside2);

 if(lossNumber.equals(assignments.get(i).getLossId())){
 System.out.println(inside3);
 i=i+1;
 }
 else{
 assignments.remove(i);
 i=1;
 }

 }
 else{
 assignments.remove(i);
 i=1;
 }

 }
 if(assignments.size()=1){

 setAsssignmentLabel(Assignments Output);
 assignments.clear();
 setAsssignmentResult(No Assignments for the given
 member number and loss number);
 setEstimateResult();
 setEstimateLabel();
 }
 else{
 setAsssignmentLabel(Assignments Ouput);

 setAsssignmentResult();
 setEstimateResult();
 }
   }//form submit


  };//form

 form.add(memberIdField);
 form.add(lossIdField);
 add(form);


 This is my code snippet . Kindly help me.

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/how-to-handle-null-pointer-exception-while-submit-button-tp4666392p4666396.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: Link in repeaters

2014-06-10 Thread Mihir Chhaya
Would simple String concatenation not work here for you?

-Mihir.


On Tue, Jun 10, 2014 at 12:02 PM, kumar ramanathan kumarramana...@gmail.com
 wrote:

 Hi Friends ,
 I have successfully generated the view using repeaters using the following
 code.

 HTML:
 body


 NameId





 /body

 HelloWorld.java
 public HelloWorld(){
 ListPersons list = new  ArrayListPersons();
 list.add(new Persons(sam,one));
 list.add(new Persons(ram,two));
 ListDataProviderPersons listDataProvider = new
 ListDataProviderPersons(list);
 DataViewPersons dataView = new DataViewPersons(rows,
 listDataProvider) {
 @Override protected void populateItem(ItemPersons item)
 {
   Persons person = item.getModelObject();
   RepeatingView repeatingView = new
 RepeatingView(dataRow);
   repeatingView.add(new Label(repeatingView.newChildId(),
 person.getName()));
   repeatingView.add(new Label(
 repeatingView.newChildId(),person.getId()));
   item.add(repeatingView);
  }
 };
 add(dataView);
  }
 Ouput I got :

 Name Id
 sam one(not link)
 ram  two(not link)

 Now I have tried to display the above ouput as below with link

 Name Id
 sam one(link)
 ram  two(link)


 For this ouput i have altered the code in helloword.java as below


 DataViewPersons dataView = new DataViewPersons(rows,
 listDataProvider){
  protected void populateItem(ItemPersons item){
   Persons person = item.getModelObject();
   RepeatingView repeatingView = new RepeatingView(dataRow);
   repeatingView.add(new Label(repeatingView.newChildId(),
 person.getName()));
   repeatingView.add(new Link(person.getId()){
  public void onClick(){
  setResponsePage(Output.class);
  }
   });
   item.add(repeatingView);
   }
 }; add(dataView);}}

 Output I got for the above code change is

 Name Id
 sam
 ram

 No Id value is displayed.

 I need your help on making code changes to display the id as link. Kindly
 help me what are the things i need to update.
 Thanks,
 Kumar


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Link-in-repeaters-tp4666176.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: Newbie question : How do I display a tabbed list vertically rather than horizontally?

2014-06-09 Thread Mihir Chhaya
Tim,

Do you need to show only titles in vertical or tabs in vertical with title
displayed horizontally? You can do that with CSS itself as below.

div.tabpanel div.tab-row {
float: left;
background: #F2F9FC url(../images/tabs/bg.gif) repeat-x bottom;
line-height: normal;
/*-webkit-transform:rotate(270deg);*/ /* Use different element and values
for IE, Firefox etc...*/
}

div.tabpanel div.tab-row ul {
margin: 0;
padding: 10px 10px 0;
list-style: none;
}

div.tabpanel div.tab-row li {
background: url(../images/tabs/left.gif) no-repeat left top;
margin: 0;
padding: 0 0 0 9px;
}

Un-commenting transform part in first will yield vertical titles with
horizontal tabs.

-Mihir.





On Mon, Jun 9, 2014 at 10:34 AM, Tim Collins tcoll...@greatergood.com
wrote:

 I am rather new to wicket and am trying to do something that ought to be
 rather easy... I want to make the tabs I display show up vertically rather
 than horizontally.

 I am currently building a arraylist of tabs and then passing them to
 AjaxTabbedPanel, but as far as I can see there is no way to make the
 resulting tabs on a page show up down the left side of a page rather than
 across the top... Is there an easy way to do that?

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




Re: Newbie question : How do I display a tabbed list vertically rather than horizontally?

2014-06-09 Thread Mihir Chhaya
With CSS I provided, were you able to view your tab controls position
changing any bit?

Though you don't need any kind of animation here; Translate might be
helpful. Something like below in 'div.tabpanel div.tab-row' (in CSS)?

Here is one for chrome: -webkit-transform: translate(Xpx,Ypx); You will
have to make sure the div element has display:block set.








On Mon, Jun 9, 2014 at 1:51 PM, Tim Collins tcoll...@greatergood.com
wrote:

 Hmmm That did not work.

 To be clear, this is what the code looks like :

 package com.charityusa.janus.page.home;

 import com.charityusa.config.AppConfig;
 import com.charityusa.janus.panel.footer.Footer;
 import com.charityusa.janus.panel.vendor.CoolibarUpload;
 import com.charityusa.janus.panel.vendor.KettlerUpload;
 import com.charityusa.janus.panel.vendor.OWPUpload;
 import com.charityusa.janus.panel.vendor.PetEdgeUpload;
 import com.charityusa.janus.panel.vendor.StriderUpload;
 import com.charityusa.janus.panel.vendor.TimTestUpload;
 import org.apache.wicket.extensions.ajax.markup.html.tabs.AjaxTabbedPanel;
 import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
 import org.apache.wicket.extensions.markup.html.tabs.ITab;
 import org.apache.wicket.markup.head.CssUrlReferenceHeaderItem;
 import org.apache.wicket.markup.head.IHeaderResponse;
 import org.apache.wicket.markup.html.WebPage;
 import org.apache.wicket.markup.html.panel.Panel;
 import org.apache.wicket.model.Model;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
 import org.apache.wicket.spring.injection.annot.SpringBean;

 import java.util.ArrayList;
 import java.util.List;

 /**
  * The home page class.
  */
 public class HomePage extends WebPage {

 // For serialization.
 private static final long serialVersionUID = 1L;
 @SpringBean
 private AppConfig appConfig;

 /**
  * Constructor with page parameters.
  *
  * @param pageParameters PageParameters
  */
 public HomePage(final PageParameters pageParameters) {

 super(pageParameters);
 final ListITab tabs = new ArrayList();

 tabs.add(new AbstractTab(new Model(Coolibar)) {
 @Override
 public Panel getPanel(final String panelId) {
 return new CoolibarUpload(panelId);
 }
 });

 tabs.add(new AbstractTab(new Model(Kettler)) {
 @Override
 public Panel getPanel(final String panelId) {
 return new KettlerUpload(panelId);
 }
 });
 add(new AjaxTabbedPanel(tabs, tabs));
 add(new Footer(footer));
 }

 public void renderHead(final IHeaderResponse response) {
 if (development.equals(this.appConfig.getType())) {
 // dev watermark added into the header via a css include
 response.render(new CssUrlReferenceHeaderItem(css/dev.css,
 null, null));
 }
 response.render(new CssUrlReferenceHeaderItem(css/janus.css,
 null, null));
 }

 }

 !DOCTYPE html
 html xmlns:wicket=http://www.w3.org/1999/xhtml;
 head
 titleJanus Inventory File Upload Service/title
 link rel=shortcut icon href=images/favicon.ico
 type=image/vnd.microsoft.icon /
 /head

 body

 div class=content
 div class=pageTitleimg src=images/janus.png height=120
 width=120/br/Janus Inventory File Upload
 Service
 /div
 ul style=list-style-type: none
 lia href=network_auth_logoutSign Out/a/li
 /ul

 hr/
 div wicket:id=tabs class=tabpanel[tabbed panel will be
 here]/div
 br/
 /div

 div style=clear:both;/div

 div class=footer
 div wicket:id=footerOur Footer Here/div
 /div
 /body

 /html

 (I removed a couple tabs from the Java code since they are just linear
 additions to the code and two ought to be enough to get the pattern).

 What that would show is a tab structure like this :
 CoolibarKettler
 [Stuff in tab that changes based on which tab is shown]

 And I want a tab structure like this :
 Coolibar   [Stuff in tab that changes based on which tab is shown]
 Kettler



 On 6/9/14, 8:47 AM, Mihir Chhaya wrote:

 Tim,

 Do you need to show only titles in vertical or tabs in vertical with title
 displayed horizontally? You can do that with CSS itself as below.

 div.tabpanel div.tab-row {
 float: left;
 background: #F2F9FC url(../images/tabs/bg.gif) repeat-x bottom;
 line-height: normal;
 /*-webkit-transform:rotate(270deg);*/ /* Use different element and values
 for IE, Firefox etc...*/
 }

 div.tabpanel div.tab-row ul {
 margin: 0;
 padding: 10px 10px 0;
 list-style: none;
 }

 div.tabpanel div.tab-row li {
 background: url(../images/tabs/left.gif) no-repeat left top;
 margin: 0;
 padding: 0 0 0 9px;
 }

 Un-commenting transform part in first will yield vertical titles with
 horizontal tabs.

 -Mihir.





 On Mon, Jun 9, 2014 at 10:34 AM, Tim Collins tcoll...@greatergood.com
 wrote:

  I am rather new to wicket and am trying to do something that ought