wicket-guice and Logger injection

2012-08-09 Thread Lawrence, Sean
Hi,

I'm attempting to use wicket-guice to inject Logger references into my 
application with logging.

So instead of:

Logger logger = LoggerFactory.getLogger(HomePage.class);

I would rather:

@Log
Logger logger;

I've followed the guice documentation closely and have been frustratingly 
unable to get these statements working. Does anyone have any experience with 
this and can provide insight to why it's not (see links below)? All other 
objects I have provided or binded are getting injected, however, all my logger 
statements are throwing NPE.

See the following two links for the documentation I have been using. I also 
have a quick-start wicket application that I have prepared if anyone is curious 
(it's a zipped up eclipse project ... I may have to rename .zippp to get around 
the corporate firewall)

http://code.google.com/p/google-guice/wiki/CustomInjections

http://forkbomb-blog.de/2012/slf4j-logger-injection-with-guice

I have also tried the Sli4j library, but was getting NPEs as well: 
http://sli4j.googlecode.com/svn/site/1.0/index.html Does anyone have experience 
with sli4j?

Finally, does anyone have a maven archetype? My coworker is looking into adding 
logger injection to the 55minutes prototype.

Thank you!


Sean Lawrence


This e-mail and any attachments are intended only for the use of the 
addressee(s) named herein and may contain proprietary information. If you are 
not the intended recipient of this e-mail or believe that you received this 
email in error, please take immediate action to notify the sender of the 
apparent error by reply e-mail; permanently delete the e-mail and any 
attachments from your computer; and do not disseminate, distribute, use, or 
copy this message and any attachments.


RE: Boolean DropDownChoice

2012-08-02 Thread Lawrence, Sean
Hi Paul,

The reason for the dropdown over the checkbox is I'm attempting to enforce a 
selection. I.e. make required or @NotNull

I think I got a bit carried away by attempting to extend DropDownChoice. Thanks 
for the link. The following is what I'm going forward with:


new DropDownChoiceBoolean(active, new PropertyModelBoolean(getModel(), 
active), Arrays.asList(null, new Boolean(true), new Boolean(false)));

I'll will likely add a IRenderer as well so the choices render as Yes, No, or 
---.

Thanks again,

Sean Lawrence



-Original Message-
From: Richard W. Adams [mailto:rwada...@up.com]
Sent: Thursday, August 02, 2012 7:53 AM
To: users@wicket.apache.org
Subject: RE: Boolean DropDownChoice

Even better, why are you using a drop down at all? Check boxes are
normally used for true-false choices.



From:   Paul Bors p...@bors.ws
To: users@wicket.apache.org
Date:   08/01/2012 07:51 PM
Subject:RE: Boolean DropDownChoice



Instead of going to the extent of overriding a class because your model
value is not updated, why not fix the problem?

Take a look at the component reference wicket-example project:
http://www.wicket-library.com/wicket-examples/compref/

More precisely at the DropDownChoice:
http://www.wicket-library.com/wicket-examples/compref/wicket/bookmarkable/or

g.apache.wicket.examples.compref.DropDownChoicePage?0

-Original Message-
From: Lawrence, Sean [mailto:sean.lawre...@mantech.com]
Sent: Wednesday, August 01, 2012 7:19 PM
To: users@wicket.apache.org
Subject: Boolean DropDownChoice

Hi,

I'm trying to create a custom form component that extends a
DropDownChoiceBoolean. The reason I'm doing this is because I need a
form
component that forces a user to select a choice. However, I'm unable to
get
the model to update. What am I not overriding properly? I'm all ears for
suggestions if there is a better way to do this as well.

/**
* A Boolean form component that uses a drop down choice so that
* a user is forced to choose between Yes or No.
*
*/
public class YesNoDropDownChoice extends DropDownChoiceBoolean {

  private static final long serialVersionUID = 1L;

  public YesNoDropDownChoice(String id, IModelBoolean model) {
super(id, model, Arrays.asList(
Choice.YES.getBoolean(),
Choice.NO.getBoolean()));
onModelChanged();
  }

  @Override
  protected void onModelChanged() {
super.onModelChanged();
setModelObject(getModelObject());
  }

  /**
  * {@inheritDoc}
  */
  @Override
  protected void convertInput() {
Boolean b = getModelObject();
setConvertedInput(b);
  }
}

Thanks in advance,

Sean Lawrence



This e-mail and any attachments are intended only for the use of the
addressee(s) named herein and may contain proprietary information. If you
are not the intended recipient of this e-mail or believe that you received
this email in error, please take immediate action to notify the sender of
the apparent error by reply e-mail; permanently delete the e-mail and any
attachments from your computer; and do not disseminate, distribute, use,
or
copy this message and any attachments.


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




**

This email and any attachments may contain information that is confidential 
and/or privileged for the sole use of the intended recipient.  Any use, review, 
disclosure, copying, distribution or reliance by others, and any forwarding of 
this email or its contents, without the express permission of the sender is 
strictly prohibited by law.  If you are not the intended recipient, please 
contact the sender immediately, delete the e-mail and destroy all copies.
**

This e-mail and any attachments are intended only for the use of the 
addressee(s) named herein and may contain proprietary information. If you are 
not the intended recipient of this e-mail or believe that you received this 
email in error, please take immediate action to notify the sender of the 
apparent error by reply e-mail; permanently delete the e-mail and any 
attachments from your computer; and do not disseminate, distribute, use, or 
copy this message and any attachments.

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



PageParameters in 1.5.3 vs 1.5.4

2012-02-15 Thread Lawrence, Sean
Hi,

I'm noticing a difference in the way search parameters are handled in 1.5.4 vs 
1.5.3 after upgrading wicket. Basically, identical parameters are eliminated. 
See example below

Passing the identical list of search parameters to our SearchResultsPage:

URL with 1.5.3:

https://localhost/app/wicket/bookmarkable/pages.SearchResultsPage?41paramsqt1=QUERYmf1=dDocTitlepr=%3Csubstring%3Eop1=%3COR%3Eqt1=QUERYmf1=namepr=%3Csubstring%3Eop1=%3COR%3Eqt1=QUERYmf1=nameCOpr=%3Csubstring%3Eop1=%3COR%3Eqt1=QUERYmf1=nameCSpr=%3Csubstring%3Eop1=%3COR%3Eqt1=QUERYmf1=dddpr=%3Csubstring%3Eop1=%3COR%3Eqt1=QUERYmf1=abNumberpr=%3Csubstring%3Eop1=%3COR%3EsortField=dCreateDatesortOrder=descsortField=dDocTitlesortOrder=ascas=falseqs=true

URL with 1.5.4:

https://localhost/app/wicket/bookmarkable/pages.SearchResultsPage?30paramsqt1=QUERYmf1=dDocTitlemf1=namemf1=nameCOmf1=nameCSmf1=dddmf1=abNumberpr=%3Csubstring%3Eop1=%3COR%3EsortField=dCreateDatesortField=dDocTitlesortOrder=descsortOrder=ascas=falseqs=true

Noticed how the identical op1=OR, pr=substring, and qt=QUERY params were 
all reduced to one entry in 1.5.4.

Because we are dependent on 1.5.3's behavior for our searches the 1.5.4 
behavior is breaking things, as well as eliminating the ability to keep rows 
synced across columns when parameters might be related.

Questions:

(1) Will the way 1.5.4 is handling identical search parameters be the desired 
behavior going forward with Wicket and

(2) if this is the desired behavior is there a better way to handle our 
searches that involve syncing across columns/arrays like this (with variable 
rows) ?

Thanks,

Sean Lawrence