Re: addying support for upload to resource

2023-03-22 Thread Matt Pavlovich
+1 that’d be great!  Especially w/ ability to have visibility to progress.

> On Mar 15, 2023, at 5:25 AM, Ernesto Reinaldo Barreiro  
> wrote:
> 
> Hi,
> 
> In our application we are heavily using web socket push (repainting web
> wicket components via web-socket push). One problem we found is that in
> some pages we have some uploads and those uploads can be very large, and
> while they are happening the page is "frozen" and no new web socket
> messages are received. Because of that, I have implemented a custom upload
> to a wicket resource. In essence some adaptation of
> 
> https://github.com/martin-g/blogs/blob/master/file-upload/src/main/java/com/mycompany/fileupload/AbstractFileUploadResource.java
> 
> 
> But I also had to adapt the upload progress bar in order to be able to
> report progress upload. Would this be something interesting to have in
> a "generic" way in Wicket itself?
> 
> 
> -- 
> Regards - Ernesto Reinaldo Barreiro


-
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 Matt Pavlovich
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
> <https://wicket.apache.org/news/2021/04/06/wicket-7.18.0-released.html>
> - Apache Wicket 8.12.0
> <https://wicket.apache.org/news/2021/03/31/wicket-8.12.0-released.html>
> - Apache Wicket 9.0.0
> <https://wicket.apache.org/news/2021/03/30/wicket-9.3.0-released.html>
> 
> 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: Pluggable architecture for wicket application

2016-11-17 Thread Matt Pavlovich
I extensively use Wicket+OSGi. Works great! Modular web applications are 
totally doable. Follow Martin's advice and wire in modules using the 
application hooks described.



On 11/14/16 3:47 PM, Martijn Dashorst wrote:

I know a Dutch company (or two) that use OSGi, I'm certain that one
uses Wicket + OSGi: educator.eu. The other, luminis.eu, does a lot of
work with OSGi, but might not use it in combination with Wicket. I
only have second hand knowledge about the combination, and it's
probably outdated.

Maybe someone from those companies is listening here and cares to comment.

Martijn

On Mon, Nov 14, 2016 at 8:13 PM, Martin Grigorov  wrote:

Hi,

On Mon, Nov 14, 2016 at 3:58 AM, Илья Нарыжный  wrote:


Hello,

We really need advise from Apache Wicket experts. Please let me know if you
have any ideas how to realize the following:

We are working on Orienteer (http://orienteer.org) - open source Business
Application Platform for rapid development.
Orienteer already has pluggable architecture which allow to
start/stop/restart modules and etc. Every module can bring different
things: new webpages, REST, wicket components and etc. For example:
https://github.com/OrienteerBAP/Orienteer/tree/master/orienteer-pivottable

But there is plans to allow dynamically upload required new module (without
recompiling whole WAR with new module).  To upload person can literally
upload JAR or enter URL with the module or specify Maven's
groupId:artifactId:version.

There is no problem with downloading of module: there is a problem with
runtime running it.  Questions:

1) Is there good way for substitution of your own ClassLoader for more
dynamic management?


Wicket doesn't manage class loaders. The web container (like Tomcat) deals
with this.
The only hook provided by Wicket is org.apache.wicket.protocol.
http.WicketFilter#getClassLoader(). See org.apache.wicket.protocol.http.
ReloadingWicketFilter#reloadingClassLoader.



2) Is there a way for restarting of wicket app without restarting a
web-container?


You may use WebApplication#initApplication() and #internalDestroy(). Also
see what ReloadingWicketFilter does.



3) Related to p.1: any good experience with using this:
https://github.com/kamranzafar/JCL ?


IMO this should work to load extra jars dynamically. I didn't see anything
about unloading though.



4) Any other suggetions how to make dynamically pluggable modules in
wicket?


Some people use OSGi (with PAX). I don't have much experience to be able to
comment.



Thanks,

Ilya

-
Orienteer(http://orienteer.org) - open source Business Application
Platform







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



Re: Component level cache

2016-08-18 Thread Matt Pavlovich
+1 agreed.  Caching the data (models) coming from data providers and/or 
services is the best approach



On 8/17/16 3:50 AM, Martin Grigorov wrote:

Hi,

I am not aware of such component.
Usually the caching is done in the service layer, not in the UI.
But if you prefer to do it with Wicket then do it in a Model that caches
the DB results.

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

On Tue, Aug 16, 2016 at 6:03 PM, Marcel Barbosa Pinto <
marcel.po...@gmail.com> wrote:


Hi,

I was just wondering if there is some component to instead of let the a
given component to render itself, check if there is a cache and display its
rendered markup, thus avoiding unnecessary rendering, this could be useful
for stateless components that need to display some list of categories from
the database etc.

Something like this:

class Header extends Panel{
 add(new ExpensiveCategoryListView());
}

class Home extends Page{
 add(new CachedComponent("headerContainer", Header.class))
}

The CachedComponent would first check if there is an already rendered
Header instance (could check in an in-memory store like, infinispan or
hezelcast)

What do you guys think?




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



Re: Correct way to clear disk cache and session data?

2016-04-06 Thread Matt Pavlovich

Thanks!

On 4/6/16 12:42 AM, Martin Grigorov wrote:

Hi,

On Apr 5, 2016 9:53 PM, "Matt Pavlovich"  wrote:

Ahead of performing an upgrade, we would like to clear all sessions and

disk cache to avoid any serialization issues with new version of code.

Googling around, I find a number of different approaches, but haven't

seen anything consistent or definitive.

Is there an API built into Wicket to perform this task?

No.


Is deleting the files on-disk too heavy-handed?

It should be fine.


Thanks,
Matt

-
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



Correct way to clear disk cache and session data?

2016-04-05 Thread Matt Pavlovich
Ahead of performing an upgrade, we would like to clear all sessions and 
disk cache to avoid any serialization issues with new version of code.


Googling around, I find a number of different approaches, but haven't 
seen anything consistent or definitive.


Is there an API built into Wicket to perform this task?

Is deleting the files on-disk too heavy-handed?

Thanks,
Matt

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



Re: how do I make an iOS-like slide switch using apache wicket?

2015-02-24 Thread Matt Darwin
Hi,

The image can be found here:
http://i.stack.imgur.com/2oS1Z.png

it’s just a screenshot of an iOS slide switch.

Your answer looks good - so I can just write them as checkbox and let the 
clever javascript do the rest?  Brilliant. I will look into it

Matt

On 24 Feb 2015, at 11:03, Martin Grigorov  wrote:

> Hi,
> 
> Your attachment didn't make it to the mailing list. It would be better to
> upload it somewhere.
> 
> You can use any JS/CSS solution and just integrate it with Wicket to send
> the Ajax call when the value changes.
> Here is one such JS solution: http://www.bootstrap-switch.org/
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
> On Tue, Feb 24, 2015 at 12:55 PM, Matt Darwin  wrote:
> 
>> Hi,
>> 
>> I have a wicket webapp and I would like to add a panel with some slide
>> switches to control functionality, like this:
>> 
>> 
>> 
>> I can't find any examples of how this can be done in wicket - can anybody
>> suggest anything? NB I need to use ajax to send API calls to the server
>> when the user changes the value of the switch.
>> 
>> I think I'm using wicket 1.4.22.
>> 
>> 
>> Any ideas?


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



how do I make an iOS-like slide switch using apache wicket?

2015-02-24 Thread Matt Darwin
Hi,

I have a wicket webapp and I would like to add a panel with some slide switches 
to control functionality, like this:



I can't find any examples of how this can be done in wicket - can anybody 
suggest anything? NB I need to use ajax to send API calls to the server when 
the user changes the value of the switch.

I think I'm using wicket 1.4.22.


Any ideas?

Exceptional upgrade experience 6.14.0 -> 6.17.0

2014-10-16 Thread Matt Pavlovich
Hi all-

I wanted to take a minute to thank all the Wicket Project contributors— 
committers, users and the community as whole. We just completed a seamless 
upgrade from 6.14.0 to 6.17.0 and had to make *zero* code changes.  This is 
extremely impressive for any software project, and especially notable due to 
the fact that we use all sorts of complex Wicket features, extend components, 
and implement custom extensions in our Integrated Console product.  

Our Wicket feature list includes, but isn’t limited to:
 * Modules
 * Events
 * Modals
 * Ajax everywhere— Input, Fields, Validation
 * Custom Authorization Strategy
 * Sortable Tables
 * Feedback panels
 * Breadcrumb bar
 * Ajax auto-refreshing components
 * .. many more

AND, we support running in Tomcat and Apache Karaf (OSGi runtime).

Great work and thank you!

Matt Pavlovich

Founding Partner 
Media Driver
https://mediadriver.com


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



"Document mode restart from > IE9 Standards to Quirks" - any ideas?

2013-11-05 Thread Matt Steele
Hi folks - I'm running into a really strange issue on IE9 where an ajax
request from Wicket triggers the browser to render Quirks Mode, which fails
the Ajax request, and renders the page unusable.

The error we see in the F12 console is:
"*HTML1113*: *Document mode restart from IE9 Standards to Quirks*"

This has been discussed a few years ago, but no solution was found:
http://mail-archives.apache.org/mod_mbox/wicket-users/20.mbox/%3ccamomwmrla8pizqfzvtbxxbklp5bpmpygqdh2imhn1cvpzep...@mail.gmail.com%3E

It's unclear why this is happening. We've tried using different DOCTYPES,
have added the X-UA-Compatible  tag and HTTP header, but nothing has
solved the problem. It only seems to affect IE9; I've tested IE8 and IE10
and both seem to work fine.

Has anyone encountered this before? I've found two separate Wicket
applications where we encounter this error, and it's really causing us
problems.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Document-mode-restart-from-IE9-Standards-to-Quirks-any-ideas-tp4662151.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: RadioGroup selections after validation failure problem

2012-04-03 Thread Matt Stevenson

Hi Andrea,

That solved the problem - I should have noticed it was missing the model 
myself!


Thanks so much for the help.
Matt


-Original Message- 
From: Andrea Del Bene

Sent: Monday, April 02, 2012 6:36 PM
To: users@wicket.apache.org
Subject: Re: RadioGroup selections after validation failure problem

HI,

try giving a model to your RadioGroup:

final RadioGroup group = new
RadioGroup("presentationSingleSelectGroup", new
Model());



Hi All,

My company has just started evaluating Wicket on an app that allows users 
to select and merge multiple PowerPoint presentations.


We’ve hit a bit of a problem though, basically at the moment we have one 
long form containing a number of section panels.


The section panels are either ‘multi select’ (a Panel containing a 
CheckGroup that contains Check objects representing the PowerPoint 
presentations in that section) or ‘single select’ (a Panel containing a 
RadioGroup that contains Radio objects).


The problem happens when a validation failure occurs. Basically the 
checkboxes that the user selected prior to the validation failure are 
remembered and repopulated when the user is bounced back to the page but 
the radio buttons that the user selected aren’t remembered.


Any help would be gratefully received, I’ve snipped out what I think are 
the relevant bits of code below...


Thanks
Matt


FORM CODE:
__

public class PresentationSelectionForm extends 
Form  implements Serializable

{
 private static final long serialVersionUID = 5962930827736414107L;

 final DownloadLinkPanel dlPanel = 
DownloadLinkPanel.getEmptyLink("downloadLinkPanel");
 final HiddenField  messageIndicator = new 
HiddenField("messageIndicator", new Model("0"));


 private List  selectors = new 
ArrayList();


 @SpringBean
 private AssetBankService assetBankService;



 public PresentationSelectionForm(String name, List 
sections, final PageParameters parameters)

 {
 super(name, new 
CompoundPropertyModel(new 
PresentationSelectionFormModel()));


 add(new FeedbackPanel("feedback"));
 add(dlPanel);
 add(messageIndicator);

 HiddenField  mandatorySections = new 
HiddenField("requiredSections", new 
Model(getIdListFromMandatorySections(sections)));

 add(mandatorySections);

 ListView  sectionList = new 
ListView("sections", sections)

 {
 private static final long serialVersionUID = 
7480938703389583883L;


 protected void populateItem(ListItem  sectionItem)
 {
 sectionItem.add(new Label("sectionTitle", 
sectionItem.getModelObject().getTitle()));
 PresentationMultiSelectPanel multi = new 
PresentationMultiSelectPanel("presentationMultiSelectPanel", sectionItem);
 PresentationSingleSelectPanel single = new 
PresentationSingleSelectPanel("presentationSingleSelectPanel", 
sectionItem);

 selectors.add(multi);
 selectors.add(single);
 sectionItem.add(multi);
 sectionItem.add(single);
 }
 };

 sectionList.setReuseItems(true);
 add(sectionList);
 }



 @Override
 public void onSubmit()
 {
 //create the list of asset bank ids to merge from the panel 
input...

 List  assetBankAssetIds = new ArrayList();

 for (PresentationSelector selector : selectors)
 {

assetBankAssetIds.addAll(selector.getSelectedAssetBankAssetIds());
 }

 if (assetBankAssetIds.size() == 0)
 {
 error("Unable to complete merge, no presentations were 
selected. Please select from the list then try again");

 }
 else if (!allMandatorySectionsAreCompleted())
 {
 error("Unable to complete merge, not all mandatory sections 
were completed. Please complete all mandatory sections and try again");

 }
 else
 {
 try
 {
 File mergedPresentations = 
assetBankService.getMergedPresentations(assetBankAssetIds);


addOrReplace(DownloadLinkPanel.getLinkToResourceFile("downloadLinkPanel", 
mergedPresentations, "Download your file: 
"+mergedPresentations.getName()));

 }
 catch (IOException e)
 {
 throw new RuntimeException("Error merging presentations", 
e);

 }
 }

 addOrReplace(new HiddenField("messageIndicator", new 
Model("1")));

 }
}



SINGLE SELECT PANEL CODE:




public class PresentationSingleSelectPanel extends Panel implements 
PresentationSelector, Serializable

{
 private static final long serialVersionUID = 7062146893868378278L;

 private Section section;
 final Rad

RadioGroup selections after validation failure problem

2012-04-02 Thread Matt Stevenson
Hi All,

My company has just started evaluating Wicket on an app that allows users to 
select and merge multiple PowerPoint presentations. 

We’ve hit a bit of a problem though, basically at the moment we have one long 
form containing a number of section panels. 

The section panels are either ‘multi select’ (a Panel containing a CheckGroup 
that contains Check objects representing the PowerPoint presentations in that 
section) or ‘single select’ (a Panel containing a RadioGroup that contains 
Radio objects).

The problem happens when a validation failure occurs. Basically the checkboxes 
that the user selected prior to the validation failure are remembered and 
repopulated when the user is bounced back to the page but the radio buttons 
that the user selected aren’t remembered.

Any help would be gratefully received, I’ve snipped out what I think are the 
relevant bits of code below...

Thanks
Matt


FORM CODE:
__

public class PresentationSelectionForm extends 
Form implements Serializable
{
private static final long serialVersionUID = 5962930827736414107L;

final DownloadLinkPanel dlPanel = 
DownloadLinkPanel.getEmptyLink("downloadLinkPanel");
final HiddenField messageIndicator = new 
HiddenField("messageIndicator", new Model("0"));

private List selectors = new 
ArrayList();

@SpringBean
private AssetBankService assetBankService;



public PresentationSelectionForm(String name, List sections, final 
PageParameters parameters)
{
super(name, new 
CompoundPropertyModel(new 
PresentationSelectionFormModel()));

add(new FeedbackPanel("feedback"));
add(dlPanel);
add(messageIndicator);

HiddenField mandatorySections = new 
HiddenField("requiredSections", new 
Model(getIdListFromMandatorySections(sections)));
add(mandatorySections);

ListView sectionList = new ListView("sections", 
sections)
{
private static final long serialVersionUID = 7480938703389583883L;

protected void populateItem(ListItem sectionItem)
{
sectionItem.add(new Label("sectionTitle", 
sectionItem.getModelObject().getTitle()));
PresentationMultiSelectPanel multi = new 
PresentationMultiSelectPanel("presentationMultiSelectPanel", sectionItem);
PresentationSingleSelectPanel single = new 
PresentationSingleSelectPanel("presentationSingleSelectPanel", sectionItem);
selectors.add(multi);
selectors.add(single);
sectionItem.add(multi);
sectionItem.add(single);
}
};

sectionList.setReuseItems(true);
add(sectionList);
}



@Override 
public void onSubmit()
{
//create the list of asset bank ids to merge from the panel input...
List assetBankAssetIds = new ArrayList();

for (PresentationSelector selector : selectors)
{
assetBankAssetIds.addAll(selector.getSelectedAssetBankAssetIds());
}

if (assetBankAssetIds.size() == 0)
{
error("Unable to complete merge, no presentations were selected. 
Please select from the list then try again");
} 
else if (!allMandatorySectionsAreCompleted())
{
error("Unable to complete merge, not all mandatory sections were 
completed. Please complete all mandatory sections and try again");
} 
else
{
try
{
File mergedPresentations = 
assetBankService.getMergedPresentations(assetBankAssetIds);

addOrReplace(DownloadLinkPanel.getLinkToResourceFile("downloadLinkPanel", 
mergedPresentations, "Download your file: "+mergedPresentations.getName()));
}
catch (IOException e)
{
throw new RuntimeException("Error merging presentations", e);
}
}

addOrReplace(new HiddenField("messageIndicator", new 
Model("1")));
}
}



SINGLE SELECT PANEL CODE:




public class PresentationSingleSelectPanel extends Panel implements 
PresentationSelector, Serializable
{
private static final long serialVersionUID = 7062146893868378278L;

private Section section;
final RadioGroup group = new 
RadioGroup("presentationSingleSelectGroup");

public PresentationSingleSelectPanel(String id, ListItem 
sectionItem)
{
super(id);
section = sectionItem.getModelObject();

ListView presentations = new 
ListView("presentations", 
sectionItem.getModelObject().getPresentations()) 
{
private static final long serialVersionUID = -2741478778745

RE: Problem DatePicker, ModalWindow and IE8

2012-02-13 Thread Matt


Mathieu Laurent
Objet Direct consultant for SGCIB ITEC
matthieu.laurent-...@sgcib.com

From: Matt [via Apache Wicket] [mailto:ml-node+s1842946n438318...@n4.nabble.com]
Sent: Monday, February 13, 2012 9:55 AM
To: LAURENT Matthieu (EXT) ItecCttRrc
Subject: RE: Problem DatePicker, ModalWindow and IE8

Any other idea ???

I tried few oher things (manly css customization), but nothing relevent ... .

May be i should not use the datepicker, or use another one ...

If you reply to this email, your message will be added to the discussion below:
http://apache-wicket.1842946.n4.nabble.com/Problem-DatePicker-ModalWindow-and-IE8-tp4372772p4383181.html
To unsubscribe from Problem DatePicker, ModalWindow and IE8, click 
here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4372772&code=bWF0dGhpZXUubGF1cmVudC1leHRAc2djaWIuY29tfDQzNzI3NzJ8MTM4NjUxNzc4OQ==>.
NAML<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
*
This message and any attachments (the "message") are confidential, intended 
solely for the addressee(s), and may contain legally privileged information.
Any unauthorised use or dissemination is prohibited. E-mails are susceptible to 
alteration.   
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be 
liable for the message if altered, changed or
falsified.
  
Ce message et toutes les pieces jointes (ci-apres le "message") sont 
confidentiels et susceptibles de contenir des informations couvertes 
par le secret professionnel. 
Ce message est etabli a l'intention exclusive de ses destinataires. Toute 
utilisation ou diffusion non autorisee est interdite.
Tout message electronique est susceptible d'alteration. 
La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de 
ce message s'il a ete altere, deforme ou falsifie.
*


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-DatePicker-ModalWindow-and-IE8-tp4372772p4383185.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: Problem DatePicker, ModalWindow and IE8

2012-02-13 Thread Matt
Any other idea ???

I tried few oher things (manly css customization), but nothing relevent ...
.

May be i should not use the datepicker, or use another one ...

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-DatePicker-ModalWindow-and-IE8-tp4372772p4383181.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: Problem DatePicker, ModalWindow and IE8

2012-02-10 Thread Matt


Mathieu Laurent
Objet Direct consultant for SGCIB ITEC
matthieu.laurent-...@sgcib.com

From: Matt [via Apache Wicket] 
[mailto:ml-node+s1842946n4375593...@n4.nabble.com]
Sent: Friday, February 10, 2012 9:21 AM
To: LAURENT Matthieu (EXT) ItecCttRrc
Subject: RE: Problem DatePicker, ModalWindow and IE8

Hi Chris,

I have already added a form around my modal window. It resolved some other 
issues i had at the begining, but not the "i can't use the close button nor the 
change month ones".

I'll have a quick look at your framework if it can help me ... .

Thx ^^

If you reply to this email, your message will be added to the discussion below:
http://apache-wicket.1842946.n4.nabble.com/Problem-DatePicker-ModalWindow-and-IE8-tp4372772p4375593.html
To unsubscribe from Problem DatePicker, ModalWindow and IE8, click 
here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4372772&code=bWF0dGhpZXUubGF1cmVudC1leHRAc2djaWIuY29tfDQzNzI3NzJ8MTM4NjUxNzc4OQ==>.
NAML<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
*
This message and any attachments (the "message") are confidential, intended 
solely for the addressee(s), and may contain legally privileged information.
Any unauthorised use or dissemination is prohibited. E-mails are susceptible to 
alteration.   
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be 
liable for the message if altered, changed or
falsified.
  
Ce message et toutes les pieces jointes (ci-apres le "message") sont 
confidentiels et susceptibles de contenir des informations couvertes 
par le secret professionnel. 
Ce message est etabli a l'intention exclusive de ses destinataires. Toute 
utilisation ou diffusion non autorisee est interdite.
Tout message electronique est susceptible d'alteration. 
La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de 
ce message s'il a ete altere, deforme ou falsifie.
*


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-DatePicker-ModalWindow-and-IE8-tp4372772p4375594.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: Problem DatePicker, ModalWindow and IE8

2012-02-10 Thread Matt
Hi Chris,

I have already added a form around my modal window. It resolved some other
issues i had at the begining, but not the "i can't use the close button nor
the change month ones".

I'll have a quick look at your framework if it can help me ... .

Thx ^^

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-DatePicker-ModalWindow-and-IE8-tp4372772p4375593.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: Problem DatePicker, ModalWindow and IE8

2012-02-09 Thread Matt


Mathieu Laurent
Objet Direct consultant for SGCIB ITEC
matthieu.laurent-...@sgcib.com

From: Matt [via Apache Wicket] 
[mailto:ml-node+s1842946n4373065...@n4.nabble.com]
Sent: Thursday, February 09, 2012 3:36 PM
To: LAURENT Matthieu (EXT) ItecCttRrc
Subject: RE: Problem DatePicker, ModalWindow and IE8

Wilhelmsen Tor Iver wrote
You probably need to add a DOCTYPE declaration to the top of your HTML:

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";><http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd%22%3e>
http://www.w3.org/1999/xhtml";<http://www.w3.org/1999/xhtml%22> 
xmlns:wicket="http://wicket.apache.org";><http://wicket.apache.org%22%3e>
...
I already had the DOCTYPE but not the xmlns:wicket ... i just had it but no 
change ...

Thanks anyway Tor ^^

If you reply to this email, your message will be added to the discussion below:
http://apache-wicket.1842946.n4.nabble.com/Problem-DatePicker-ModalWindow-and-IE8-tp4372772p4373065.html
To unsubscribe from Problem DatePicker, ModalWindow and IE8, click 
here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4372772&code=bWF0dGhpZXUubGF1cmVudC1leHRAc2djaWIuY29tfDQzNzI3NzJ8MTM4NjUxNzc4OQ==>.
NAML<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
*
This message and any attachments (the "message") are confidential, intended 
solely for the addressee(s), and may contain legally privileged information.
Any unauthorised use or dissemination is prohibited. E-mails are susceptible to 
alteration.   
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be 
liable for the message if altered, changed or
falsified.
  
Ce message et toutes les pieces jointes (ci-apres le "message") sont 
confidentiels et susceptibles de contenir des informations couvertes 
par le secret professionnel. 
Ce message est etabli a l'intention exclusive de ses destinataires. Toute 
utilisation ou diffusion non autorisee est interdite.
Tout message electronique est susceptible d'alteration. 
La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de 
ce message s'il a ete altere, deforme ou falsifie.
*


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-DatePicker-ModalWindow-and-IE8-tp4372772p4373067.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: Problem DatePicker, ModalWindow and IE8

2012-02-09 Thread Matt

Wilhelmsen Tor Iver wrote
> 
> You probably need to add a DOCTYPE declaration to the top of your HTML:
> 
>  Transitional//EN"
>   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">;
> http://www.w3.org/1999/xhtml";
> xmlns:wicket="http://wicket.apache.org";>
> ...
> 

I already had the DOCTYPE but not the xmlns:wicket ... i just had it but no
change ...

Thanks anyway Tor ^^

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-DatePicker-ModalWindow-and-IE8-tp4372772p4373065.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: Problem DatePicker, ModalWindow and IE8

2012-02-09 Thread Matt
Hi and thanks for the quick response.

I have already read this jira issue but it is not exactly the same as my
problem (though it's about ie8, so a fix woul be not to use it :p) ... i'm
really busy so i donno if can make a quickstart app ... .

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-DatePicker-ModalWindow-and-IE8-tp4372772p4372817.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



Problem DatePicker, ModalWindow and IE8

2012-02-09 Thread Matt
Hi everybody,

I've got some issue about the DatePicker.

I'm using Wicket 1.4.17 with wicket extension 1.4.17 as well.

I'v got a modal window, with a form and inside a datetextfield with a
datepicker. Everything is working fine with firefox but not with IE8.

In fact, i can display the calendar when i click on the calendar icon, i can
select a day (which closes the datepicker), but i can't close it with the
close button nor change the current month displayed ... . 

When i put my mouse over one of those buttons (close or change month), i
don't have the "pointer" cursor and when i click it does nothing.

I don't have any javascript error neither.

I tried the datepicker on IE8 but not in a modal window, and it's working.

The only thing that succeded, is that a changed the css attribute "position"
of the close button (set to "relative"), and then i can click the button but
the style is broken and i the the text "Close" above the image in backround
(tried to fix the style then but it's a pain in the ass).

Here is some of my code : 

/
  
  /

Panel added inside the modal : 

/
  
 ...
..

 Wicket message
  
/

Java code is "classical", may be not useful (as html may be lol).

I try hard to fix this but nothing is really working. Maybe it comes from
the way i'm doing it but i can't figure out where ... .

If somebody has an idea, or had and fixed this issue in the past 

Thanks ^^

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-DatePicker-ModalWindow-and-IE8-tp4372772p4372772.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



Contract opportunity

2011-11-21 Thread Matt Pavlovich
Media Driver has a contract opportunity open for an experienced Wicket 
developer.  This is not a full time position, but we are open to a flexible 
"after hours" type arrangement.  However, this is a customer facing project and 
making deadlines is crucial.

Requirements:
 * Walk us through the design decision when it comes to working with various 
Wicket Models
 * Ability to gauge level of effort, and accurately meet the deadline with 
agreed upon functionality.
 * Experience building unit tests for Wicket applications
 * Experience running Wicket in an OSGI environment
 * Experience integrating Wicket with AJAX
 * Experience with REST is a bonus

If you are interested, please contact me directly.

Thank you!
Matt Pavlovich
Media Driver

E: m...@mediadriver.com


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



Re: Detecting when a session is destroyed

2011-09-20 Thread Matt Schmidt
Alright, thanks!

On Tue, Sep 20, 2011 at 11:28 AM, Martin Grigorov wrote:

> On Tue, Sep 20, 2011 at 6:27 PM, Martin Grigorov 
> wrote:
> > a new session is created
> unless there is "remember me" functionality in place
> >
> > On Tue, Sep 20, 2011 at 6:22 PM, Matt Schmidt 
> wrote:
> >> Ahhh, so what happens if the user closes the browser, launches the
> browser
> >> and logs in again before the first session expires?
> >>
> >> On Tue, Sep 20, 2011 at 11:16 AM, Martin Grigorov  >wrote:
> >>
> >>> The method will be method when the respective session expires.
> >>> So close the browser, wait session-timeout minutes and it will fire.
> >>>
> >>> On Tue, Sep 20, 2011 at 6:12 PM, Matt Schmidt 
> >>> wrote:
> >>> > I am trying to override WebApplication.sessionDestroyed() to perform
> an
> >>> > action any time a user's session is terminated, either by manually
> >>> logging
> >>> > out, session expiring, or closing the browser. But unfortunately
> >>> > sessionDestroyed() doesn't seem to get called when the browser is
> closed.
> >>> Is
> >>> > there any way to do this?
> >>> >
> >>> > Specifically I need to "unlock" all items the user has left "locked"
> when
> >>> > their session is terminated.
> >>> >
> >>> > Thanks!
> >>> >
> >>>
> >>>
> >>>
> >>> --
> >>> Martin Grigorov
> >>> jWeekend
> >>> Training, Consulting, Development
> >>> http://jWeekend.com
> >>>
> >>> -
> >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >>> For additional commands, e-mail: users-h...@wicket.apache.org
> >>>
> >>>
> >>
> >
> >
> >
> > --
> > Martin Grigorov
> > jWeekend
> > Training, Consulting, Development
> > http://jWeekend.com
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Detecting when a session is destroyed

2011-09-20 Thread Matt Schmidt
Ahhh, so what happens if the user closes the browser, launches the browser
and logs in again before the first session expires?

On Tue, Sep 20, 2011 at 11:16 AM, Martin Grigorov wrote:

> The method will be method when the respective session expires.
> So close the browser, wait session-timeout minutes and it will fire.
>
> On Tue, Sep 20, 2011 at 6:12 PM, Matt Schmidt 
> wrote:
> > I am trying to override WebApplication.sessionDestroyed() to perform an
> > action any time a user's session is terminated, either by manually
> logging
> > out, session expiring, or closing the browser. But unfortunately
> > sessionDestroyed() doesn't seem to get called when the browser is closed.
> Is
> > there any way to do this?
> >
> > Specifically I need to "unlock" all items the user has left "locked" when
> > their session is terminated.
> >
> > Thanks!
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Detecting when a session is destroyed

2011-09-20 Thread Matt Schmidt
I am trying to override WebApplication.sessionDestroyed() to perform an
action any time a user's session is terminated, either by manually logging
out, session expiring, or closing the browser. But unfortunately
sessionDestroyed() doesn't seem to get called when the browser is closed. Is
there any way to do this?

Specifically I need to "unlock" all items the user has left "locked" when
their session is terminated.

Thanks!


Re: Manually Rendering a DataGridView

2011-08-01 Thread Matt Schmidt
I already have a WiQuery plugin/behavior that does basically the same thing.
It renders the table's HTML to the page, then jQuery has to parse through it
and put it in the DOM to initialize. It gets awfully slow with a lot of
data. That's why I'm trying to not render the table to the HTML at all, and
initialize with a JavaScript array that puts the data directly in the DOM.

On Mon, Aug 1, 2011 at 10:38 AM, Martin Grigorov wrote:

> See
> https://github.com/wicketstuff/core/tree/master/jdk-1.5-parent/datatables-parent
>
> On Mon, Aug 1, 2011 at 3:54 PM, Matt Schmidt  wrote:
> > Gotcha. Is there a way to do this without adding the DGV to the page? In
> my
> > case, I just want to add an empty  tag and pass the "would-be"
> > rendered HTML of the DGV to a jQuery function that populates the table.
> >
> > Specifically, I am trying to dynamically instantiate a jQuery DataTables
> > using the "JavaScript array" method (
> > http://datatables.net/examples/data_sources/js_array.html).
> >
> > On Sun, Jul 31, 2011 at 10:40 PM, Pedro Santos 
> wrote:
> >
> >> The char sequence is returned by mockResponse.getText()
> >> Sure, there are no public methods and would be a good idea to
> >> refectory the code and move the mock response logic to other place.
> >> You can use an IVisitor to visit cells in you component tree,  create
> >> a mock response to render them and use its text, i.e.
> >> mockResponse.getText(), to fit your needs
> >>
> >> On Sun, Jul 31, 2011 at 10:33 AM, Matt Schmidt 
> >> wrote:
> >> > So after calling tableParser.parse(myDataGridView), how do I get the
> the
> >> > char sequence? Or iterate over each row to get the char sequence for
> each
> >> > cell? I don't see any public methods for that.
> >> >
> >> > On Sunday, July 31, 2011, Pedro Santos  wrote:
> >> >> Hi, I had a similar need and used the code at TableParser[1] to
> render
> >> >> the component tree to a mock response and later get its char
> sequence.
> >> >>
> >> >> 1 -
> >> >
> >>
> https://github.com/wicketstuff/core/blob/master/jdk-1.5-parent/wicket-poi-parent/wicket-poi/src/main/java/org/wicketstuff/poi/excel/TableParser.java
> >> >>
> >> >> On Fri, Jul 29, 2011 at 6:01 PM, Matt Schmidt 
> >> > wrote:
> >> >>> Is there any way to access the HTML of each cell that would be
> rendered
> >> > in a
> >> >>> DataGridView without adding it to the page and actually rendering
> it?
> >> >>>
> >> >>> Ultimately, I am trying to add all of the inner HTML of the cells of
> >> the
> >> >>> DataGridView to a JavaScript array.
> >> >>>
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Pedro Henrique Oliveira dos Santos
> >> >>
> >> >> -
> >> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >> >>
> >> >>
> >> >
> >>
> >>
> >>
> >> --
> >> Pedro Henrique Oliveira dos Santos
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Manually Rendering a DataGridView

2011-08-01 Thread Matt Schmidt
Gotcha. Is there a way to do this without adding the DGV to the page? In my
case, I just want to add an empty  tag and pass the "would-be"
rendered HTML of the DGV to a jQuery function that populates the table.

Specifically, I am trying to dynamically instantiate a jQuery DataTables
using the "JavaScript array" method (
http://datatables.net/examples/data_sources/js_array.html).

On Sun, Jul 31, 2011 at 10:40 PM, Pedro Santos  wrote:

> The char sequence is returned by mockResponse.getText()
> Sure, there are no public methods and would be a good idea to
> refectory the code and move the mock response logic to other place.
> You can use an IVisitor to visit cells in you component tree,  create
> a mock response to render them and use its text, i.e.
> mockResponse.getText(), to fit your needs
>
> On Sun, Jul 31, 2011 at 10:33 AM, Matt Schmidt 
> wrote:
> > So after calling tableParser.parse(myDataGridView), how do I get the the
> > char sequence? Or iterate over each row to get the char sequence for each
> > cell? I don't see any public methods for that.
> >
> > On Sunday, July 31, 2011, Pedro Santos  wrote:
> >> Hi, I had a similar need and used the code at TableParser[1] to render
> >> the component tree to a mock response and later get its char sequence.
> >>
> >> 1 -
> >
> https://github.com/wicketstuff/core/blob/master/jdk-1.5-parent/wicket-poi-parent/wicket-poi/src/main/java/org/wicketstuff/poi/excel/TableParser.java
> >>
> >> On Fri, Jul 29, 2011 at 6:01 PM, Matt Schmidt 
> > wrote:
> >>> Is there any way to access the HTML of each cell that would be rendered
> > in a
> >>> DataGridView without adding it to the page and actually rendering it?
> >>>
> >>> Ultimately, I am trying to add all of the inner HTML of the cells of
> the
> >>> DataGridView to a JavaScript array.
> >>>
> >>
> >>
> >>
> >> --
> >> Pedro Henrique Oliveira dos Santos
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
>
>
>
> --
> Pedro Henrique Oliveira dos Santos
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Manually Rendering a DataGridView

2011-07-31 Thread Matt Schmidt
So after calling tableParser.parse(myDataGridView), how do I get the the
char sequence? Or iterate over each row to get the char sequence for each
cell? I don't see any public methods for that.

On Sunday, July 31, 2011, Pedro Santos  wrote:
> Hi, I had a similar need and used the code at TableParser[1] to render
> the component tree to a mock response and later get its char sequence.
>
> 1 -
https://github.com/wicketstuff/core/blob/master/jdk-1.5-parent/wicket-poi-parent/wicket-poi/src/main/java/org/wicketstuff/poi/excel/TableParser.java
>
> On Fri, Jul 29, 2011 at 6:01 PM, Matt Schmidt 
wrote:
>> Is there any way to access the HTML of each cell that would be rendered
in a
>> DataGridView without adding it to the page and actually rendering it?
>>
>> Ultimately, I am trying to add all of the inner HTML of the cells of the
>> DataGridView to a JavaScript array.
>>
>
>
>
> --
> Pedro Henrique Oliveira dos Santos
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Manually Rendering a DataGridView

2011-07-29 Thread Matt Schmidt
Is there any way to access the HTML of each cell that would be rendered in a
DataGridView without adding it to the page and actually rendering it?

Ultimately, I am trying to add all of the inner HTML of the cells of the
DataGridView to a JavaScript array.


Re: A safer way to build PropertyModels, version 1.2

2011-07-28 Thread Matt Brictson
On Jul 28, 2011, at 3:12 AM, Carl-Eric Menzel wrote:

> IModel userModel = model(fromService(userEJB.loadUser(42)));

Not sure if this is a typo in your example, but wouldn't this mean that (the 
real, non-proxied) userEJB.loadUser is invoked when the model is constructed? 
Perhaps this syntax is correct:

model(fromService(userEJB).loadUser(42));


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



Re: A safer way to build PropertyModels

2011-07-21 Thread Matt Brictson
This looks fantastic. Can you think of an elegant way to use similar syntactic 
sugar to create LoadableDetachableModels as well?

For example:

// This would return a PropertyModel
model(from(myBean).getChild().getName());

// This a LoadableDetachableModel
loadedModel(from(myService).listUsers());

// Which is more concise than
new LoadableDetachableModel> {
  protected List load() {
myService.listUsers();
  }
}

On Jul 21, 2011, at 11:45 AM, Carl-Eric Menzel wrote:

> After seeing the LambdaJ-based model idea at
> https://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-LambdaJ
> I thought I'd try and implement something like that in a ready-to-use
> fashion, and simplify it a little.
> 
> The result is here:
> https://github.com/duesenklipper/wicket-safemodel
> 
> This is a way to refactor-safely and type-safely build models, without
> relying on brittle string literals:
> 
>  SomeBean myBean = ...
>  IModel childNameModel =
>  model(from(myBean).getChild().getName());
> 
> No cast, no string literal, only getters. It works with regular
> JavaBeans, Lists, and with Maps (string keys only though).
> 
> Instead of requiring a compile-time step this does some proxying in the
> background to construct a property expression.
> 
> Anybody interested please give it a try and let me know of any issues.
> 
> Note: If you feel comfortable with configuring an annotation
> processor in your Maven build as well as your IDE build, go ahead and
> try Igor's metagen [https://github.com/42Lines/metagen]. That way you
> don't have any runtime magic.
> 
> Use SafeModel if you don't want an additional compile step and do want
> (very slightly) less keyboard typing.
> 
> Carl-Eric
> www.wicketbuch.de
> 
> -
> 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: Resource auto-reload with the Quickstart project

2011-07-14 Thread Matt Brictson
Hmm. I would expect that your LoginPage would see changes reflected when you 
hit the browser refresh button. Sounds like a bug to me.

Is it related to this one?

https://issues.apache.org/jira/browse/WICKET-3891

On Jul 13, 2011, at 12:10 PM, Andrew Todd wrote:

> On Wed, Jul 13, 2011 at 2:40 PM, Matt Brictson  wrote:
>> FWIW I tried 1.5-SNAPSHOT and the HTML resource reloading seems to work fine.
> I'm seeing reloading working as expected on the basic HomePage.
> 
> However, on a LoginPage that I'm working on, a I do not see changes
> reflected until I go to the URL bar, go to the home page URL, then go
> back to the URL and manually enter the Login Page URL (which I've set
> up with mountPage).
> 
> Is this related to the way that Wicket handles sessions -- I've seen
> the word "version" passed around -- or is this a bug?
> 
> -
> 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: Resource auto-reload with the Quickstart project

2011-07-13 Thread Matt Brictson
FWIW I tried 1.5-SNAPSHOT and the HTML resource reloading seems to work fine. 
Here's what I did:

1. Generated a quickstart[1] using 1.5-SNAPSHOT using the "-U" maven option to 
ensure the very latest snapshot was downloaded.
2. Pasted in the resource polling code into WicketApplication#init[2].
3. Ran mvn jetty:run.
4. While jetty was running, I edited Home.html: I changed "Congratulations" to 
"Testing".
5. Hit refresh in my browser and the change showed up.

[1]: http://wicket.apache.org/start/quickstart.html
[2]: 
http://apache-wicket.1842946.n4.nabble.com/Resource-auto-reload-with-the-Quickstart-project-tp3665329p3665543.html

-- 
Matt

On Jul 13, 2011, at 11:27 AM, Andrew Todd wrote:

> With the latest snapshot, I still wasn't seeing changes propagate. Until --
> 
> On Wed, Jul 13, 2011 at 2:03 PM, Martin Grigorov  wrote:
>> It is possible but you have to extend maven-jetty-plugin's configuration.
>> There was something about Scanner. Ask Google for more info
> 
> Adding the scanIntervalSeconds configuration parameter to the Jetty
> plugin, as per
> 
> http://stackoverflow.com/questions/2369851/hot-deploy-in-embedded-jetty
> 
> suddenly changes in Java and HTML were picked up. Eclipse is set to
> auto-build, so I don't have to explicitly run 'mvn compile' for it to
> redeploy. However Matt's reply, which just came in, is correct that
> JRebel is doing something different.
> 
> The answer seems to be that
> 
> 1) HTML reload may still be broken in SNAPSHOT
> 2) For making changes to Java code, run in Debug mode and connect with
> an IDE, or use JRebel
> 
> 
> Thanks,
> Andrew
> 
> -
> 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: Resource auto-reload with the Quickstart project

2011-07-13 Thread Matt Brictson
Yes, it is possible configure the jetty plugin to completely redeploy the 
webapp when it detects a class file has changed, but this isn't quite the same 
as what the Eclipse IDE and JRebel do. JRebel's site says: "instantly see any 
code change made to an app *without* redeploying."

In my experience jetty's redeploy leads to memory being exhausted after the 4th 
or 5th redeploy. This is not jetty's fault, but simply because it is 
notoriously difficult to completely eliminate classloader leaks when building 
webapps.

YMMV.

-- 
Matt

On Jul 13, 2011, at 11:03 AM, Martin Grigorov wrote:

> It is possible but you have to extend maven-jetty-plugin's configuration.
> There was something about Scanner. Ask Google for more info
> 


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



Re: Resource auto-reload with the Quickstart project

2011-07-13 Thread Matt Brictson
Just to clarify, the resource polling should allow you to see HTML changes (but 
note Martin's comment about this potentially being broken in 1.5RC1). It does 
not affect Java reloading.

For Java changes I believe this is not possible without an IDE or perhaps a 
commercial product like JRebel[1]. For Eclipse, the way I've seen it done is to 
create a class like the Start.java that comes with the quickstart, right click 
on that class, and choose Debug. This will launch a Jetty container inside 
Eclipse's debugger, which gives you auto-reloading of Java files.

[1]: http://www.zeroturnaround.com/jrebel/

-- 
Matt

On Jul 13, 2011, at 10:37 AM, Andrew Todd wrote:

> On Wed, Jul 13, 2011 at 1:04 PM, Matt Brictson  wrote:
>> The way I've always done it (and this works just fine outside of Eclipse as 
>> well), is to enable resource polling in Wicket for the directory that 
>> contains the HTML files.
>> 
>> In the init() method of your WebApplication subclass (in the quickstart this 
>> is called WicketApplication.java) do something like this:
>> 
>> getResourceSettings().setResourcePollFrequency(Duration.ONE_SECOND);
>> String htmlDir = getServletContext().getRealPath("/");
>> if(htmlDir != null && !htmlDir.endsWith("/"))
>> {
>>htmlDir += "/";
>> }
>> getResourceSettings().addResourceFolder(htmlDir + "../java");
>> getResourceSettings().addResourceFolder(htmlDir + "../resources");
> 
> Thanks for the link. I added this code to init() and confirmed that
> the paths being added are the correct ones for my Maven project.
> However, I'm still not seeing HTML changes being updated when I do a
> 'mvn jetty:run.' (Or Java changes, for that matter). Resources in the
> htmlDir that was already set, like CSS, are also not updating.
> 
> -
> 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: Resource auto-reload with the Quickstart project

2011-07-13 Thread Matt Brictson
The way I've always done it (and this works just fine outside of Eclipse as 
well), is to enable resource polling in Wicket for the directory that contains 
the HTML files.

In the init() method of your WebApplication subclass (in the quickstart this is 
called WicketApplication.java) do something like this:

getResourceSettings().setResourcePollFrequency(Duration.ONE_SECOND);
String htmlDir = getServletContext().getRealPath("/");
if(htmlDir != null && !htmlDir.endsWith("/"))
{
htmlDir += "/";
} 
getResourceSettings().addResourceFolder(htmlDir + "../java");
getResourceSettings().addResourceFolder(htmlDir + "../resources");

You can find this code and some other best practices in my company's source 
repo here:

<http://opensource.55minutes.com/svn/java/trunk/fiftyfive-wicket/fiftyfive-wicket-core/src/main/java/fiftyfive/wicket/FoundationApplication.java>

-- 
Matt

On Jul 13, 2011, at 8:32 AM, Andrew Todd wrote:

> Hello,
> 
> I'm investigating writing a new project in Wicket and am playing
> around with a project created from the 1.5-RC5.1 quickstart maven
> archetype.
> 
> Using 'mvn jetty:run' from the command-line, none of the changes I
> make to source files, either Java or HTML, are picked up unless I
> restart the server.
> 
> Using the instructions here:
> https://cwiki.apache.org/WICKET/maven-jetty-plugin.html
> 
> I can attach to the Jetty instance from Eclipse, and changes to Java
> files, but not HTML files, are picked up on the server.
> 
> However, "development mode" promises automatic reloading of source
> files. I need this to work without having to attach to an IDE in debug
> mode, and for HTML as well as Java. What am I missing?
> 
> 
> Thanks,
> Andrew
> 
> -
> 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



wicketstuff.org/maven is down - trying to get wicketstuff-merged-resources

2011-07-03 Thread Matt Brictson
Hello list,

I am trying to download wicketstuff-merged-resources-3.0.jar, which until 
recently was available in the wicketstuff.org maven repository here:

<http://wicketstuff.org/maven/repository/org/wicketstuff/wicketstuff-merged-resources/3.0/wicketstuff-merged-resources-3.0.jar>

Is this a temporary glitch, or has this repository been shut down?

I've also tried maven central and oss.sonatype.org, and while these 
repositories do have other wicketstuff artifacts, they do not have 
wicketstuff-merged-resources-3.0.

Is there a reliable maven repo for wicketstuff-merged-resources?

Thanks.

-- 
Matt


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



Re: RadioGroup nulled out during form submit in IE

2011-06-19 Thread Matt Schmidt
After further investigation, my problem is with the
AjaxFormChoiceComponentUpdatingBehavior. After adding the radio group to the
target in the behavior's onUpdate(), it works.

I have my radio's styled with some fancy jQuery button looks, so I was
unable to see that the actual radio remained unselected after clicking it
when using the Ajax behavior. But adding the group to the target fixes that.

myRadioGroup.add(new AjaxFormChoiceComponentUpdatingBehavior()
{
@Override
protected void onUpdate(AjaxRequestTarget target)
{
target.addComponent(myRadioGroup);
//whatever else
}
});

Is this necessary or is this just working by coincidence?

On a side note, the javadoc for AjaxFormChoiceComponentUpdatingBehavior
says: (wicket 1.4.16)

> In order to be supported by this behavior the group components must output
> children with markup id in format of 'groupId-childId'


Does this just mean this, or something more? It seems to work even if the
structure is not formatted this way


   
   
   


On Sun, Jun 19, 2011 at 7:17 AM, Sven Meier  wrote:

> Hi Matt,
>
> it could be a tag open/close issue which leads IE to put your radio tags
> outside of the form.
> I'd suggest to check your markup, i.e. look out for non-closed tags.
>
> Hope this helps
>
> Sven
>
>
> On 06/18/2011 11:04 PM, Matt Schmidt wrote:
>
>> I have a form that is working correctly in FireFox but not IE. This
>> puzzled
>> is quite puzzling to me since it is server side functionality.
>>
>> Here's a much simplified version of what I've got:
>>
>> 
>> 
>>
>>
>>
>>
>>
>> 
>>
>> 
>> 
>>
>>Radio 1
>>
>>Radio 2
>>
>>Radio 3
>> 
>>
>> The RadioGroup's also have an AjaxFormChoiceComponentUpdatin**gBehavior
>> on it,
>> and the submit button is an IndicatingAjaxButton.
>>
>> When I submit the form in FF, everything works fine. When I submit it in
>> IE,
>> my form's model object has null values for each of the
>> "myRadioGroupComponent" properties. I stepped through the code and found
>> that convertedInput is getting set to null during the form's validate(),
>> because the radio group's value is not in the request
>> (FormComponent.**getInputAsArray()). So it seems to me that IE is not
>> submitting the form correctly, or that I have invalid HTML that I cannot
>> identify.
>>
>> I'm pretty stumped on this one. I can show some of my java if needed, but
>> the problem doesn't seem to be on that end to me. Any help is appreciated!
>>
>> Thanks,
>> Matt
>>
>>
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


RadioGroup nulled out during form submit in IE

2011-06-18 Thread Matt Schmidt
I have a form that is working correctly in FireFox but not IE. This puzzled
is quite puzzling to me since it is server side functionality.

Here's a much simplified version of what I've got:



   
   
   
   
   




   
   Radio 1
   
   Radio 2
   
   Radio 3


The RadioGroup's also have an AjaxFormChoiceComponentUpdatingBehavior on it,
and the submit button is an IndicatingAjaxButton.

When I submit the form in FF, everything works fine. When I submit it in IE,
my form's model object has null values for each of the
"myRadioGroupComponent" properties. I stepped through the code and found
that convertedInput is getting set to null during the form's validate(),
because the radio group's value is not in the request
(FormComponent.getInputAsArray()). So it seems to me that IE is not
submitting the form correctly, or that I have invalid HTML that I cannot
identify.

I'm pretty stumped on this one. I can show some of my java if needed, but
the problem doesn't seem to be on that end to me. Any help is appreciated!

Thanks,
Matt


Re: Fate of CompressedResourceReference in Wicket 1.5?

2011-03-11 Thread Matt Brictson
Opened:

https://issues.apache.org/jira/browse/WICKET-3526

-- 
Matt

On Mar 9, 2011, at 11:02 PM, Martin Grigorov wrote:

> File a ticket please.
> 
> On Thu, Mar 10, 2011 at 3:01 AM, Matt Brictson  wrote:
> 
>> Hi,
>> 
>> CompressedResourceReference in trunk is basically empty and has the comment
>> "TODO NG". A quick search through the source leads me to believe that
>> IResourceSettings#getDisableGZipCompression() is also unused.
>> 
>> In other words, gzipping of resources is not implemented in Wicket 1.5.
>> 
>> Are there plans to do so? Part of me thinks that maybe this feature should
>> be dropped, as compression makes more sense to handle at the servlet
>> container or web server layer (e.g. mod_deflate).
>> 
>> Thoughts?
>> 
>> --
>> Matt
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>


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



Fate of CompressedResourceReference in Wicket 1.5?

2011-03-09 Thread Matt Brictson
Hi,

CompressedResourceReference in trunk is basically empty and has the comment 
"TODO NG". A quick search through the source leads me to believe that 
IResourceSettings#getDisableGZipCompression() is also unused.

In other words, gzipping of resources is not implemented in Wicket 1.5.

Are there plans to do so? Part of me thinks that maybe this feature should be 
dropped, as compression makes more sense to handle at the servlet container or 
web server layer (e.g. mod_deflate).

Thoughts?

-- 
Matt


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



Re: body tag contributions with wicket 1.5 (Dojo needs it)

2011-03-03 Thread Matt Brictson
On Mar 3, 2011, at 2:15 AM, Gonzalo Aguilar Delgado wrote:

> It does not work as I cannot override add method from webmarkupcontainer.

Are you sure? In Wicket 1.5-rc2 and well as in trunk, 
MarkupContainer#add(Component...) is not final. To clarify: in order to mimic 
the transparent resolver feature, you need to override add(Component...) on 
BasePage, not on the body WebMarkupContainer.


> Even if it works I will have to add something to the htlm. Right?

Right. You will need this in your HTML:




If you decide to take Martin's IMarkupFilter approach can you post your share 
your solution with the list? I am curious to try this as well, as overriding 
add(Component...) is a bit of hack.


-- 
Matt


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



Re: body tag contributions with wicket 1.5 (Dojo needs it)

2011-03-02 Thread Matt Brictson
Since isTransparentResolver() is going away in 1.5, the trick that I found is 
to create a normal WebMarkupContainer for the  element, then override 
add(Component...) of the page to mimic the transparent resolver feature.

Your pages can then contribute to the  element by adding 
AttributeModifier, etc. to the WebMarkupContainer.

See:
<https://cwiki.apache.org/WICKET/migration-to-wicket-15.html#MigrationtoWicket1.5-MarkupContainer.isTransparentResolver%2528%2529removed>

Here's an example:

public abstract class BasePage extends WebPage
{
private WebMarkupContainer _body;

public BasePage(PageParameters params)
{
super(params);

// Allow subclasses to register CSS classes on the body tag
WebMarkupContainer body = new WebMarkupContainer("body");
body.setOutputMarkupId(true);
add(body);

// From now on add() will add to _body instead of page
this._body = body;
}

/**
 * Return a component that represents the {@code } of the page.
 * Use this to add CSS classes or set the markup ID for styling purposes.
 */
public WebMarkupContainer getBody()
{
return _body;
}

/**
 * When subclasses of BasePage add components to the page, in reality
 * they need to be added as children of the {@code } container.
 * This implementation ensures the page hierarchy is correctly enforced.
 * 
 * @return {@code this} to allow chaining
 */
@Override
public BasePage add(Component... childs)
{
for(Component c : childs)
{
// Wicket automatically translates  into an
// HtmlHeaderContainer and adds it to the page. Make sure this
// is registered as a direct child of the page itself, not the
// body.
if(null == _body || c instanceof HtmlHeaderContainer)
{
super.add(c);
}
// Everything else goes into the .
else
{
_body.add(c);
}
}
return this;
}
}

-- 
Matt

On Mar 2, 2011, at 11:35 AM, Gonzalo Aguilar Delgado wrote:

> Hello, 
> 
> I'm building a wiJQuery equivalent for Dojo. And it seems to work nice
> with new wicket 1.5. HeaderContributions are really nice... Great work!
> 
> But I ran into problems when trying to setup the themes. 
> 
> I have to put something like this in the body:
> 
> 
> 
> 
> 
> But I rode a lot and discovered that wicket no longer supports
> contributing to body because onLoad handler as well others.
> 
> Reading in forums I found the BodyTagAttributeModifier but you need a
> panel that I wont have.
> 
> And the:
> 
>  
> 
>add(new WebMarkupContainer("body"){
>@Override
>public boolean isTransparentResolver() {
>return true;
>}
>@Override
>protected void onComponentTag(ComponentTag tag) {
>tag.put("class",  "somestyle");
>}
>}); 
> It will not work because wicket:id attribute removed from body in version 1.5.
> 
> 
> So... What's they way to go?
> 
> 
> -
> 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



AjaxLazyLoadPanel question

2011-02-03 Thread Matt Schmidt
I currently have a DataGridView loaded inside of an AjaxLazyLoadPanel,
including the service call to get the data.

myLazyLoadPanel = new AjaxLazyLoadPanel("id", new CollectionModel()) {
public Component getLazyLoadComponent(String markupId) {
if(getDefaultModelObject() == null) {
setDefaultModelObject(myPojoService.readAll());
}
return new MyDataGridView(markupId, getDefaultModel()); //ignoring
casting for simplicity
}
}

That works great for loading the page before the service call is complete.

But now I need to add a DropDownChoice to change the collection in the data
grid via Ajax after the page is loaded. Is there anyway to get the
DataGridView to be replaced with an Ajax indicator (like on page load)
during an Ajax "onchange" event for the DropDownChoice? I've added an Ajax
indicator to the DropDownChoice, but I would like the same behavior I get on
page load for the AjaxLazyLoadPanel.

This is what I have for the drop down for starters:

myDropDownChoice.add(new AjaxFormComponentUpdateBehavior("onchange") {
protected void onUpdate(AjaxRequestTarget target) {
if(myDropDownChoice.getModelObject().equals(foo)) {
myLazyLoadPanel.setDefaultModelObject(myPojoService.readFoo());
}
//check other selections
   target.addComponent(myLazyLoadPanel);
}
}

I may be looking at this entirely wrong... Any suggestions?


Re: Rerender a Page with Ajax from Abstract Page

2011-01-04 Thread Matt Schmidt
so after thinking about it a little, I don't think I need to do this with
Ajax. I *think* this will work for everything I need:

setResponsePage(target.getPage().getClass(),
AbstractPage.this.getPageParameters());
setRedirect(true);

On Tue, Jan 4, 2011 at 3:13 PM, Jeremy Thomerson
wrote:

> On Tue, Jan 4, 2011 at 2:11 PM, Matt Schmidt  wrote:
>
> > I am trying to rerender an entire page via ajax from an abstract page.
> >
> > I have the follow page hierarchy:
> >
> > abstract class AbstractPage extends WebPage
> >* dropdown to change an existing session variable
> > class MyPage1 extends AbstractPage
> >* component that depends on the value of the session variable
> > class MyPage2 extends AbstractPage
> >* another component that depends on the value of the session variable
> >
> > When the dropdown changes, I want the current page to rerender via ajax,
> so
> > I added this in the ajax behavior:
> >
> > target.addComponent(AbstractPage.this); //also tried
> > target.addComponent(target.getPage());
> >
> > But this appears to cause the page to postback and the url changes to use
> > the page map (?wicket:interface=:4). If I change it and add just the
> > dropdown to the target, the Ajax request works as expected, but of course
> > the component in the implementation page (MyPage1) is not rerendered.
> >
> > Any suggestions?
> >
>
> The "entire page" doesn't have a markup ID that can be replaced, so it
> won't
> much work.  You could attach a markup container to your body tag and
> re-render everything in that.
>
> The real question is: why?
>
> --
> Jeremy Thomerson
> http://wickettraining.com
> *Need a CMS for Wicket?  Use Brix! http://brixcms.org*
>


Rerender a Page with Ajax from Abstract Page

2011-01-04 Thread Matt Schmidt
I am trying to rerender an entire page via ajax from an abstract page.

I have the follow page hierarchy:

abstract class AbstractPage extends WebPage
* dropdown to change an existing session variable
class MyPage1 extends AbstractPage
* component that depends on the value of the session variable
class MyPage2 extends AbstractPage
* another component that depends on the value of the session variable

When the dropdown changes, I want the current page to rerender via ajax, so
I added this in the ajax behavior:

target.addComponent(AbstractPage.this); //also tried
target.addComponent(target.getPage());

But this appears to cause the page to postback and the url changes to use
the page map (?wicket:interface=:4). If I change it and add just the
dropdown to the target, the Ajax request works as expected, but of course
the component in the implementation page (MyPage1) is not rerendered.

Any suggestions?


Re: Modify Attribute on DataView HTML Element

2010-12-17 Thread Matt Schmidt
I also got it to work by using a  and a WebMarkupContainer

HTML

   
  
   


JAVA
new DataView("dataview", dataProvider) {
   protected void populateItem(Item item) {
  WebMarkupContainer wmc = new WebMarkupContainer("wmc") {
 protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.put("id", "dynamicValue");
 }
  };
  item.add(wmc);
  wmc.add(new Label("myLabel", item.getModelObject().getValue()));
   }
}


Is one way "better" than the other?


On Thu, Dec 16, 2010 at 6:51 PM, Martijn Dashorst <
martijn.dasho...@gmail.com> wrote:

> item.add(new AttributeModifier("attr", true, "value"));
>
> dataview#oncomponenttag doesn't do anything since the dataview repeats
> its markup with a listitem. the list item#oncomponenttag actually
> receives the markup tag.
>
> Martijn
>
> On Thu, Dec 16, 2010 at 10:04 PM, Matt Schmidt 
> wrote:
> > I'm trying to modify an attribute on the HTML element that goes with my
> > DataView:
> >
> > HTML
> > 
> >   
> > 
> >
> > JAVA
> > new DataView("dataview", dataProvider) {
> >   protected void populateItem(Item item) {
> >  item.add(new Label("myLabel", item.getModelObject().getValue()));
> >   }
> >   protected void onComponentTag(ComponentTag tag) {
> >  super.onComponentTag(tag);
> >  tag.put("id", "dynamicValue");
> >   }
> > }
> >
> > I thought this would do it, but I never even hit
> DataView.onComponentTag().
> > Any other suggestions?
> >
> > -Matt
> >
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Modify Attribute on DataView HTML Element

2010-12-16 Thread Matt Schmidt
I'm trying to modify an attribute on the HTML element that goes with my
DataView:

HTML

   


JAVA
new DataView("dataview", dataProvider) {
   protected void populateItem(Item item) {
  item.add(new Label("myLabel", item.getModelObject().getValue()));
   }
   protected void onComponentTag(ComponentTag tag) {
  super.onComponentTag(tag);
  tag.put("id", "dynamicValue");
   }
}

I thought this would do it, but I never even hit DataView.onComponentTag().
Any other suggestions?

-Matt


Re: Updating model object on AjaxFallbackDefaultDataTable page change

2010-11-09 Thread Matt Schmidt
Are you suggesting to override
AjaxPagingNavigator.newPagingNavigationIncrementLink() and
AjaxPagingNavigator.newPagingNavigationLink() and implement our own
navigation links similar to AjaxPagingNavigationIncrementLink and
AjaxPagingNavigationLink that do the same thing except extends
SubmitLink rather than Link?

Am I making that harder than it needs to be? It may help a lot if you
have a code sample for something like this.

On Tue, Nov 9, 2010 at 4:04 PM, Igor Vaynberg  wrote:
>
> see my last suggestion and replace navigator's links with submitlinks
>
> -igor
>
> On Tue, Nov 9, 2010 at 1:02 PM, Matt Schmidt  wrote:
> > Yes that works for the first page - only on that page are the javascript
> > behaviors rendered.
> >
> > Basically, we are looking for a way to NOT do an ajax request every time we
> > check a box - The model object of the check group should be updated when we
> >
> > a) click the submit button or
> > b) change the page of the datatable.
> >
> > What are we missing here?
> >
> > On Tue, Nov 9, 2010 at 3:32 PM, Igor Vaynberg 
> > wrote:
> >
> >> use AjaxFormChoiceComponentUpdatingBehavior, that one works with Check.
> >>
> >> also you can use CheckBox with the ajax behavior instead of
> >> CheckGroup/Check
> >>
> >> or replace links used by navigator with submit links, there are
> >> factory methods on the navigator.
> >>
> >> -igor
> >>
> >> On Tue, Nov 9, 2010 at 8:41 AM, Matt Schmidt  wrote:
> >> > I have a CheckGroup that contains an AjaxFallbackDefaultDataTable that
> >> has a
> >> > column containing a Check. As long as I click my submit button while on
> >> the
> >> > first page of the DataTable, the model object of the CheckGroup is
> >> updated
> >> > as expected with the items I had checked. However, if I check some
> >> > checkboxes and then go to page 2 of the DataTable, the CheckGroup's model
> >> > object is not updated and I lose everything I checked on page 1.
> >> >
> >> > The DataTable class has an "onPageChanged()" event, but it appears that
> >> it
> >> > is called after the page is actually changed.
> >> >
> >> > My other thought was to add an AjaxFormComponentUpdatingBehavior to the
> >> > Check, but Check is not a FormComponent.
> >> >
> >> > Any thoughts?
> >> >
> >> > Thanks,
> >> > Matt
> >> >
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>

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



Re: Updating model object on AjaxFallbackDefaultDataTable page change

2010-11-09 Thread Matt Schmidt
Yes that works for the first page - only on that page are the javascript
behaviors rendered.

Basically, we are looking for a way to NOT do an ajax request every time we
check a box - The model object of the check group should be updated when we

a) click the submit button or
b) change the page of the datatable.

What are we missing here?

On Tue, Nov 9, 2010 at 3:32 PM, Igor Vaynberg wrote:

> use AjaxFormChoiceComponentUpdatingBehavior, that one works with Check.
>
> also you can use CheckBox with the ajax behavior instead of
> CheckGroup/Check
>
> or replace links used by navigator with submit links, there are
> factory methods on the navigator.
>
> -igor
>
> On Tue, Nov 9, 2010 at 8:41 AM, Matt Schmidt  wrote:
> > I have a CheckGroup that contains an AjaxFallbackDefaultDataTable that
> has a
> > column containing a Check. As long as I click my submit button while on
> the
> > first page of the DataTable, the model object of the CheckGroup is
> updated
> > as expected with the items I had checked. However, if I check some
> > checkboxes and then go to page 2 of the DataTable, the CheckGroup's model
> > object is not updated and I lose everything I checked on page 1.
> >
> > The DataTable class has an "onPageChanged()" event, but it appears that
> it
> > is called after the page is actually changed.
> >
> > My other thought was to add an AjaxFormComponentUpdatingBehavior to the
> > Check, but Check is not a FormComponent.
> >
> > Any thoughts?
> >
> > Thanks,
> > Matt
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Updating model object on AjaxFallbackDefaultDataTable page change

2010-11-09 Thread Matt Schmidt
I have a CheckGroup that contains an AjaxFallbackDefaultDataTable that has a
column containing a Check. As long as I click my submit button while on the
first page of the DataTable, the model object of the CheckGroup is updated
as expected with the items I had checked. However, if I check some
checkboxes and then go to page 2 of the DataTable, the CheckGroup's model
object is not updated and I lose everything I checked on page 1.

The DataTable class has an "onPageChanged()" event, but it appears that it
is called after the page is actually changed.

My other thought was to add an AjaxFormComponentUpdatingBehavior to the
Check, but Check is not a FormComponent.

Any thoughts?

Thanks,
Matt


Re: Lazy load exception with LoadableDetachableModel

2010-09-30 Thread Matt Schmidt
Ok after further review, my problem was because I was getting this model
from a DataProvider where I was feeding the DataProvider a List AFTER
retrieving from the persistence layer, instead of doing it IN the
DataProvider. Thanks for the help!

On Wed, Sep 29, 2010 at 6:02 PM, James Carman wrote:

> Are you detaching your model?  If not, it could be returning a Product
> object that was obtained during a different Hibernate session.
>
> On Wed, Sep 29, 2010 at 5:53 PM, Matt Schmidt 
> wrote:
> > I am using LoadableDetachableModel's to load my persisted objects from
> the
> > database, but I am still getting a lazy load exception when accessing a
> > property that is a Set.
> >
> > For example: take persistent POJO Product that has this property, where
> > ProductType is another persistent POJO:
> >
> > private Set productTypes;
> >
> >
> > I get the lazy load when trying to access this property from the LDM:
> >
> > Collection x = ((Product)
> model.getObject()).getProductTypes();
> >
> > for(ProductType pt : x) { //lazy load here
> >
> > .
> >
> >
> > What am I missing?
> >
> > Thanks,
> > Matt
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Lazy load exception with LoadableDetachableModel

2010-09-29 Thread Matt Schmidt
I am using LoadableDetachableModel's to load my persisted objects from the
database, but I am still getting a lazy load exception when accessing a
property that is a Set.

For example: take persistent POJO Product that has this property, where
ProductType is another persistent POJO:

private Set productTypes;


I get the lazy load when trying to access this property from the LDM:

Collection x = ((Product) model.getObject()).getProductTypes();

for(ProductType pt : x) { //lazy load here

.


What am I missing?

Thanks,
Matt


Re: [OT] where is JPA 2.0 API spec in maven?

2010-09-08 Thread Matt Jensen


Group: org.hibernate.javax.persistence
Artifact: hibernate-jpa-2.0-api
Version: 1.0.0.Final

On 9/8/2010 8:35 AM, nino martinez wael wrote:

Sorry to spam but I am wondering where the JPA 2.0 Spec are cant find
it in maven...

regards Nino

-
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



Senior Java Developer Role, £300-500 a day, Bristol!

2010-04-14 Thread Matt Williams
Hi guys, 

 

Apologies in advance to anyone I have already contacted with regards to this
role or if it has no relevance to you.

 

My client are urgently seeking a Senior Java Developer with excellent Wicket
knowledge to join their team on a 3 month contract in Bristol, UK. They will
pay the required rates to secure the successful candidate if he/she is
found..

 

There are interview slots waiting to be filled, and the start date is ASAP.

 

Please contact me if this role is of interest to you. If you know of anyone
who fits the bill, please forward this e-mail to them- I do pay a referral
fee for successfully placed candidates.

 

Regards,

 

Matthew Williams

Recruitment Consultant

01179227000

matthewwilli...@peoplesource.co.uk

 

 

  cid:image001.jpg@01C9E5C4.98BE7860

2009 Fast Track 100 logo   Buying Solutions suppliers logo colour 72dpi
cid:093515311@23112009-15BA

Approved Buying Solutions Supplier to NHS and Public Sector

One of the UK’s Fastest Growing companies in 2008 and 2009.

People Source Consulting Ltd, 30 Queen Charlotte Street, Bristol, BS1 4HJ.
Telephone 0117 922 7000, Fax 0117 925 9700

  www.peoplesource.co.uk
  Registered in England and Wales 4389799,
Vat registered 793455295

 

 

 

 



Re: Serialization and Form Models

2010-03-01 Thread Matt Welch


RaBe wrote:
> 
> I found Igors post on smart entity models very helpful on that matter:
> 
> http://wicketinaction.com/2008/09/building-a-smart-entitymodel/
> 
> basically, it attaches/detaches only if an Id is set (hence, it can be
> fetched
> from the backend)
> 
I had read that blog entry several times before but the significance of that
last part hadn't stuck with me. I adapted my entity model (using Neo4J not
Hibernate) and it looks like a good solution. Thanks for the pointer!

-- 
View this message in context: 
http://old.nabble.com/Serialization-and-Form-Models-tp27738959p27751745.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: wicketGlobalPreCallHandler

2010-01-31 Thread Matt Zemeck
unsubscribe





From: Douglas Ferguson 
To: Wicket Mailing List List 
Sent: Sun, January 31, 2010 11:10:15 PM
Subject: wicketGlobalPreCallHandler

I just started to use the wicketGlobalPreCallHandler and there is one of my 
pages that calls wicketGlobalPreCallHandler but not the 
wicketGlobalPostCallHandler

Any reason why the post call handler wouldn't get called?

D/



  

Re: Image auto-resize in browser

2010-01-30 Thread Matt Zemeck
Tried the filter, doesn't change





From: Andrew Lombardi 
To: users@wicket.apache.org
Sent: Sat, January 30, 2010 10:12:09 PM
Subject: Re: Image auto-resize in browser

try it with the filter, it could be that because it's passing through the 
servlet Wicket is modifying something on the other end.  The filter should 
leave it alone

On Jan 30, 2010, at 7:08 PM, Matt Zemeck wrote:

> Wicket Servlet.  Its a big image but in the end thats what the use case calls 
> for.
> 
> 
> 
> 
> From: Andrew Lombardi 
> To: "users@wicket.apache.org" 
> Cc: "users@wicket.apache.org" 
> Sent: Sat, January 30, 2010 9:45:19 PM
> Subject: Re: Image auto-resize in browser
> 
> Is wicket somehow inhibiting this functionality?  I would think it's not the 
> best user experience to force a user to download something larger than the 
> viewing image.  Is this being served through wicket filter inside the webapp?
> 
> Sent from my iPhone
> 
> On Jan 30, 2010, at 6:15 PM, Matt Zemeck  wrote:
> 
>> There is a feature of IE that resizes large images automatically. When you 
>> hover over the image you can click to expand it to actual size.  This 
>> feature is not working for my images.
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> From: Andrew Lombardi 
>> To: users@wicket.apache.org
>> Sent: Sat, January 30, 2010 9:04:26 PM
>> Subject: Re: Image auto-resize in browser
>> 
>> Can you be a little more specific?  Are you resizing using a resource?  What 
>> does your img tag look like in HTML?
>> 
>> On Jan 30, 2010, at 4:27 PM, Matt Zemeck wrote:
>> 
>>> The images rendered by my page don't auto-resize (very large image) in the 
>>> browser.  I have the setting enabled in IE and if I manually go to the 
>>> generated src value url they do auto-resize.  The generated  tags 
>>> looks fine.  Any ideas?
>>> 
>>> 
>> 
>> 
>> To our success!
>> 
>> Mystic Coders, LLC | Code Magic | www.mysticcoders.com
>> 
>> "Apache Wicket Training to get your team off on the right start!"
>> 
>> ANDREW LOMBARDI | and...@mysticcoders.com
>> 2321 E 4th St. Ste C-128, Santa Ana CA 92705
>> ofc: 714-816-4488
>> fax: 714-782-6024
>> cell: 714-697-8046
>> linked-in: http://www.linkedin.com/in/andrewlombardi
>> twitter: http://www.twitter.com/kinabalu
>> 
>> Eco-Tip: Printing e-mails is usually a waste.
>> 
>> 
>> This message is for the named person's use only. You must not, directly or 
>> indirectly, use,
>> disclose, distribute, print, or copy any part of this message if you are not 
>> the intended recipient.
>> 
>> 
>> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 


To our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | and...@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 714-816-4488
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.


This message is for the named person's use only. You must not, directly or 
indirectly, use,
disclose, distribute, print, or copy any part of this message if you are not 
the intended recipient.



  

Re: Image auto-resize in browser

2010-01-30 Thread Matt Zemeck
Wicket Servlet.  Its a big image but in the end thats what the use case calls 
for.




From: Andrew Lombardi 
To: "users@wicket.apache.org" 
Cc: "users@wicket.apache.org" 
Sent: Sat, January 30, 2010 9:45:19 PM
Subject: Re: Image auto-resize in browser

Is wicket somehow inhibiting this functionality?  I would think it's not the 
best user experience to force a user to download something larger than the 
viewing image.  Is this being served through wicket filter inside the webapp?

Sent from my iPhone

On Jan 30, 2010, at 6:15 PM, Matt Zemeck  wrote:

> There is a feature of IE that resizes large images automatically. When you 
> hover over the image you can click to expand it to actual size.  This feature 
> is not working for my images.
> 
> 
> 
> 
> 
> 
> 
> 
> From: Andrew Lombardi 
> To: users@wicket.apache.org
> Sent: Sat, January 30, 2010 9:04:26 PM
> Subject: Re: Image auto-resize in browser
> 
> Can you be a little more specific?  Are you resizing using a resource?  What 
> does your img tag look like in HTML?
> 
> On Jan 30, 2010, at 4:27 PM, Matt Zemeck wrote:
> 
>> The images rendered by my page don't auto-resize (very large image) in the 
>> browser.  I have the setting enabled in IE and if I manually go to the 
>> generated src value url they do auto-resize.  The generated  tags looks 
>> fine.  Any ideas?
>> 
>> 
> 
> 
> To our success!
> 
> Mystic Coders, LLC | Code Magic | www.mysticcoders.com
> 
> "Apache Wicket Training to get your team off on the right start!"
> 
> ANDREW LOMBARDI | and...@mysticcoders.com
> 2321 E 4th St. Ste C-128, Santa Ana CA 92705
> ofc: 714-816-4488
> fax: 714-782-6024
> cell: 714-697-8046
> linked-in: http://www.linkedin.com/in/andrewlombardi
> twitter: http://www.twitter.com/kinabalu
> 
> Eco-Tip: Printing e-mails is usually a waste.
> 
> 
> This message is for the named person's use only. You must not, directly or 
> indirectly, use,
> disclose, distribute, print, or copy any part of this message if you are not 
> the intended recipient.
> 
> 
> 

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


  

Re: Image auto-resize in browser

2010-01-30 Thread Matt Zemeck
There is a feature of IE that resizes large images automatically. When you 
hover over the image you can click to expand it to actual size.  This feature 
is not working for my images.
 







From: Andrew Lombardi 
To: users@wicket.apache.org
Sent: Sat, January 30, 2010 9:04:26 PM
Subject: Re: Image auto-resize in browser

Can you be a little more specific?  Are you resizing using a resource?  What 
does your img tag look like in HTML?

On Jan 30, 2010, at 4:27 PM, Matt Zemeck wrote:

> The images rendered by my page don't auto-resize (very large image) in the 
> browser.  I have the setting enabled in IE and if I manually go to the 
> generated src value url they do auto-resize.  The generated  tags looks 
> fine.  Any ideas?
> 
> 


To our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

"Apache Wicket Training to get your team off on the right start!"

ANDREW LOMBARDI | and...@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 714-816-4488
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.


This message is for the named person's use only. You must not, directly or 
indirectly, use,
disclose, distribute, print, or copy any part of this message if you are not 
the intended recipient.



  

Image auto-resize in browser

2010-01-30 Thread Matt Zemeck
The images rendered by my page don't auto-resize (very large image) in 
the browser.  I have the setting enabled in IE and if I manually go to the 
generated src value url they do auto-resize.  The generated  tags looks 
fine.  Any ideas?


  

How to compile a component for both Wicket 1.3 and 1.4?

2009-11-18 Thread Matt Brictson
Hello,

I am writing a Wicket component that I would like to use in two different 
Wicket applications. One application is using Wicket 1.4.3, and the other is a 
legacy application using Wicket 1.3.6. Unfortunately upgrading this legacy app 
to 1.4 is not an option.

I'm using maven for my build process. Right now I am considering the following 
approach:

1. Set up a multi-module maven project.

2. Create a "common" module that contains all the code that will safely execute 
in both Wicket 1.3 and Wicket 1.4.

3. Create a "wicket13" module that contains the 1.3-specific code.

4. Create a "wicket14" module that contains the 1.4-specific code.

That sounds like a lot of trouble. Can anyone think of a simpler solution, 
perhaps using maven build profiles? Or am I approaching this completely wrong?

--
Matt


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



Re: Tree collapse very slow on firefox 3 for nodes with large # of children - Quickstart attached

2009-06-09 Thread Matt Shannon
Just looking at the firebug profiler, the removeNodes method from tree.js is
the function that is taking way too long to complete.  Checking the DOM, it
looks like all nodes in tree regardless of position have their parent node
set as the wicket panel surrounding the tree.

I would have thought ideally that the various branches of the tree have
their parents referring to the true tree node parent rather than a single
common parent. This would allow collapse functions to simply remove all
nodes of the particular element concerned.

I guess it may be worthwhile experimenting with the following function to
see if it can be optimized with limited interference.

Wicket.Tree.removeNodes = function(prefix, nodeList) {
var problem = false;
for (var i = 0; i < nodeList.length; i++) {
var e = document.getElementById(prefix + nodeList[i]);
if (e != null) {
e.parentNode.removeChild(e);
} else {
// while developing alert a warning
problem = true;
Wicket.Log.error("Can't find node with id " + prefix +
nodeList[i] + ". This shouldn't happen - possible bug in tree?");
}
}
if (problem == true) {
Wicket.Tree.askForReload();
}
}

thanks

Matt.


On Wed, Jun 10, 2009 at 10:39 AM, Igor Vaynberg wrote:

> On Tue, Jun 9, 2009 at 3:41 PM, Matt Shannon
> wrote:
> > Hi Igor,
> >
> > One thing I've learned reading these newsgroups is to not irritate you,
> or
> > you don't get a favourable response :)
>
> isnt that how most things in life work? :)
>
> > I've attached a new quickstart that does have the Start class (which I
> > appreciate makes debugging from an IDE much simpler).
>
> i played around with quickstart. it runs fast in IE8, Safari, and
> Chrome. Only Firefox, like you mentioned, is afflicted. I am not sure
> why the dom node removal is so slow in firefox, we may have to roll
> special javascript just for firefox to handle this...i am not,
> however, sure what will work fast because already we are not doing
> anything special to remove the dom node.
>
> -igor
>
> >
> > The maven jetty plugin is also configured with contextpath "/"
> > e.g.
> >
> > mvn jetty:run
> > http://localhost:8080
> >
> > thanks,
> >
> > Matt.
> >
> >
> >
> > On Wed, Jun 10, 2009 at 12:45 AM, Igor Vaynberg  >
> > wrote:
> >>
> >> seems your quickstart is not a quickstart - eg its missing the Start
> >> launcher usually found in src/test/java of the quickstart
> >> archetype/project.
> >>
> >> -igor
> >>
> >> On Tue, Jun 9, 2009 at 2:09 AM, Matt Shannon
> >> wrote:
> >> > Hi,
> >> >
> >> > First time poster, but have been lurking for a few crazy months trying
> >> > to
> >> > learn and develop with this technology.  I'm prototyping a wicket app
> >> > for
> >> > work, and have been extremely impressed with this framework and also
> the
> >> > support and information that can be found on these mailing lists.
> >> >
> >> > The one component in wicket I have found that seems most difficult to
> >> > leverage in an AJAX / dynamic on demand nature seems to be the tree
> >> > component. I've hobbled together a dynamic tree leveraging bits and
> >> > pieces
> >> > of other peoples work (mostly from this mailing list).  The tree seems
> >> > to
> >> > work ok, but I have run in to a strange performance issue on firefox
> >> > when
> >> > attempting to collapse a node.
> >> >
> >> > Firefox has serious performance issues when collapsing nodes with a
> >> > semi-large number of children (e.g. 100+ children).
> >> >
> >> > I've attached a quickstart that demonstrates the issue (Firefox
> 3.0.10).
> >> >
> >> > The collapse performance issue does not appear to affect IE6.
> >> >
> >> > I would be interested to see if anyone can conform this issue (based
> on
> >> > the
> >> > attached quickstart), and suggest a mechanism that may combat this.
> >> >
> >> > In my 'real' application, my nodes have real detachable models
> >> > associated
> >> > with each tree node.
> >> >
> >> > cheers
> >> >
> >> > Matt.
> >> >
> >> >
> >> >
> >> >
> >> > -
> >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> > For additional commands, e-mail: users-h...@wicket.apache.org
> >> >
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Pre-built wicket sample app for a starter to copy?

2009-05-13 Thread Matt Welch



David Brown-48 wrote:
> 
> Hello, please excuse if the wicket-security project is readily visible.
> Otherwise, reply with the link. Much appreciated. Regards, David.
> 
Google is your friend :) 
http://lmgtfy.com/?q=wicket+security
-- 
View this message in context: 
http://www.nabble.com/Pre-built-wicket-sample-app-for-a-starter-to-copy--tp23487461p23534408.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Pre-built wicket sample app for a starter to copy?

2009-05-12 Thread Matt Welch


Maarten Bosteels wrote:
> 
> Are you sure you want to mix Wicket with DisplayTag ?
> I am not saying it's impossible, but when starting a Wicket project from
> scratch, I wouldn't add a JSP tag library to the mix.
> 
Truth. You should really reconsider throwing DisplayTag into this. Without
going into paragraphs ans paragraphs of explanatory detail, Wicket just
doesn't work like that. I'm not saying it couldn't be done if you were
enough of a masochist, but the real question would be why?

While not nearly as bad in terms of integration, you may want to rethink
Acegi as well. Perhaps it has changed since the last project I used it on,
but at the time I hated it. Wicket has some nice hooks for adding your own
authorization/authentication schemes and there's a wicket-security project
if you want a pre-built infrastructure. 

-Matt
-- 
View this message in context: 
http://www.nabble.com/Pre-built-wicket-sample-app-for-a-starter-to-copy--tp23487461p23510113.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Automatically adding a parameter to every link?

2009-05-04 Thread Matt Welch



igor.vaynberg wrote:
> 
> you can provide your own subclass of webresponse and override
> encodeurl the same way. see WebApplication#newWebResponse
> 
> -igor
> 
Thanks. That's exactly the kind of thing I was looking for. I'll look into
it. 

-Matt

-- 
View this message in context: 
http://www.nabble.com/Automatically-adding-a-parameter-to-every-link--tp2338p23380118.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Automatically adding a parameter to every link?

2009-05-04 Thread Matt Welch

I'm not worried about the multiple window thing. FWIW I believe that value is
set to true by default anyway. I'm just wondering if there's a way to add a
parameter to each link on page to ensure that the next page stays in the
same context. 

For instance, when I was trying to solve an unrelated problem, the servlet
filter I was working with tied itself directly into the response.encodeUrl()
method so that each call to that method would also use the filter's specific
instructions as well. 

I was hoping that there might be something similar for links in Wicket where
every link, no matter how it's generated (except manually in HTML, of
course) would be handled by a particular method that I could put a hook into
to make sure my context specific request parameter got added.

-Matt





Martin Funk-3 wrote:
> 
> maybe automatic multi window support might help you
> 
> this can be turned on like this in the init method of your Application.
> 
>   /**
>* @see org.apache.wicket.protocol.http.WebApplication#init()
>*/
>   @Override
>   protected void init()
>   {
>   super.init();
>   getPageSettings().setAutomaticMultiWindowSupport(true);
>   }
> 
> mf
> 
> Am 03.05.2009 um 15:00 schrieb Matthew Welch:
> 
>> The data in the application that I'm working on is divided in any  
>> number of
>> different contexts. The pages displayed for each context are the  
>> same but
>> the data shown on those pages will be different depending on the  
>> specific
>> context. A logged in user might might have multiple pages (browser  
>> windows)
>> open at one time from any one of these contexts, otherwise I would  
>> store the
>> context in their session. As it stands I need to pass the context  
>> around
>> from page to page as a parameter. Is there an easy way to have this
>> parameter automatically appended to all links on page as they are  
>> rendered
>> or generated?
>>
>> I suppose I could build my own set of Link components that look for  
>> the
>> existing context of a page and append that to themselves, and use  
>> those
>> links instead of the built in ones. Any other options?
>>
>> -Matt
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Automatically-adding-a-parameter-to-every-link--tp2338p23376936.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Tools for Managing a Wicket Project

2009-05-01 Thread Matt Welch

Tools that our team is using (after some trial and error):

IDE - Eclipse/IDEA
Source Control - SVN
Build - Maven
Local Network Maven Repo - Nexus (after a year trying different ones)
Build Server  - TeamCity, which absolutely rocks (We actually purchased and
used Bamboo for 9 months. I can't believe it comes from the same company as
JIRA. Bamboo was terrible.)
Story Mgmt/Defects - Rally (hosted commercial app for agile projects; not
bad, but not fantastic either)
Code Review - Code Collaborator (again not bad and I'd rather have it than
nothing at all, but could be better)


Our QA team has used various testing tools from expensive commercial tools
like Mercury (now HP) Quality Center to Selenium. They use Rally for defect
management. 

My highest recommendations are for TeamCity, Nexus, and SVN.

-Matt


-- 
View this message in context: 
http://www.nabble.com/Tools-for-Managing-a-Wicket-Project-tp23299396p23334970.html
Sent from the Wicket - User mailing list archive at Nabble.com.


Re: AjaxLink causing a redirect

2009-04-23 Thread Matt Welch


Jeremy Thomerson-5 wrote:
> 
> Bummer - if you didn't throw in the towel, I'd be interested in seeing
> the result.  All session-relative wicket links are going to have a
> very distinct pattern that should be fairly easy [sic] to get in the
> pattern and not rewrite.
> 
> Mind posting your rewrite code and maybe somebody can help with the
> regex?  I may not be able to help, but I have put together some pretty
> hideous regex in my time.
> 

Here's the link to the quickstart:
http://www.nabble.com/file/p23208312/myproject.zip myproject.zip 

Some notes:
1) This won't work as written in Jetty. Jetty uses an unmodifiable map for
request parameters so to make it work in Jetty, one would need to change the
rewrite rule to set a request attribute instead of a request parameter.

2) I had to include the jar for the 3.2.0 version of the URL Rewrite filter
as it isn't in the central Maven repo yet. 

3) Instead of launching to the start page of the app I would recommend going
straight to "http://localhost:8080/whateveryouwant/testpage1";. Replace 
"whateveryouwant" with anything. That's the value that will be rewritten out
of the URL and set as a request parameter with the name "organization". 

4) I'm using the HybridUrlCodingStrategy for URLs. You should be able to use
any URL coding stratgy, but since this is what I'm using in my main app,
it's what I've configured the rule for.


-Matt

-- 
View this message in context: 
http://www.nabble.com/AjaxLink-causing-a-redirect-tp23189186p23208312.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: AjaxLink causing a redirect

2009-04-23 Thread Matt Welch



Liam Clarke-Hutchinson-3 wrote:
> 
> What do you mean by processing? Form processing? Normal rendering?
> 
Normal rendering, but as I mentioned later in the thread, even though it was
Wicket issuing the redirect, it was somehow being caused by my attempts at
URL rewriting and the redirects do not occur if the URL manipulation is
disabled. 

-- 
View this message in context: 
http://www.nabble.com/AjaxLink-causing-a-redirect-tp23189186p23196451.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: AjaxLink causing a redirect

2009-04-23 Thread Matt Welch



Jeremy Thomerson-5 wrote:
> 
> Bummer - if you didn't throw in the towel, I'd be interested in seeing
> the result.  All session-relative wicket links are going to have a
> very distinct pattern that should be fairly easy [sic] to get in the
> pattern and not rewrite.
> 
> Mind posting your rewrite code and maybe somebody can help with the
> regex?  I may not be able to help, but I have put together some pretty
> hideous regex in my time.
> 
Sure. When I get home today I'll attach or host a quickstart with my results
so far.

-Matt

-- 
View this message in context: 
http://www.nabble.com/AjaxLink-causing-a-redirect-tp23189186p23196413.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: AjaxLink causing a redirect

2009-04-22 Thread Matt Welch

Hmmm perhaps it was a byproduct of the URL rewriting. As it turns out,
even with normal PageLinks this redirect occurs. BookmarkablePageLinks do
not cause the redirect. What's odd is that the redirect doesn't actually
change anything. 

With the URL rewriting disabled, there are no redirects. 

Anyway it's no big deal. I think I'm going to have to give up on this URL
rewriting stuff anyway. I was trying out URL Rewrite Filter
(http://tuckey.org/urlrewrite/) and I was getting pretty close to what I
needed (see my original thread on this topic:
http://www.nabble.com/Custom-URL-Handling-to23130367.html which you actually
responded too. You're a busy fellow!). It rewrites both incoming and
outgoing URLs. The incoming rewrites are fairly obvious, but the outbound
ones are done by embedding itself as part of the response.encodeURL() call. 

I managed to get the incoming URL rewrites working perfectly but some of the
outbound URLs refuse to cooperate. Things like Wicket ajax calls and these
redirects were popping up as obstacles. Maybe if I were a little more of a
regex expert I could get this to work, but I'm close to throwing in the
towel at this point.

-Matt





Jeremy Thomerson-5 wrote:
> 
> Do you mean while loading a page that has an ajax link you are
> redirected to another?  Please provide example (URLs and code).
> 
> --
> Jeremy Thomerson
> http://www.wickettraining.com
> 
> 
> 
> 
> On Wed, Apr 22, 2009 at 9:25 PM, Matthew Welch 
> wrote:
>> I've been playing around with URL rewriting a bit and have run across
>> some
>> promising techniques. While testing these techniques, I've been slowly
>> loading up my pages with a number of different kinds of actions and
>> links.
>> Everything was working pretty smoothly until I got put my first AjaxLink
>> on
>> the page. For some reason, just the presence of an AjaxLink causes a
>> redirect during the processing of the page. Remove the AjaxLink; no
>> redirect.
>>
>> I'm not questioning the necessity of this as I'm sure there's a good
>> reason.
>> I am curious though. Why does this happen?
>>
>> Matt
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/AjaxLink-causing-a-redirect-tp23189186p23189693.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Custom URL Handling

2009-04-20 Thread Matt Welch


Jeremy Thomerson-5 wrote:
> 
> In the past, I've accomplished something similar in a hack-ish sort of way
> that may work for you.  Basically, I extended the WicketFilter and
> stripped
> the first argument off, storing it in the request before Wicket used the
> URL
> to determine the requested page.  Maybe you can go down a similar route?
> 
Thanks. That's something to consider. How did you get wicket to write out
the correct URL's for links though?

-- 
View this message in context: 
http://www.nabble.com/Custom-URL-Handling-tp23130367p23145343.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Custom URL Handling

2009-04-20 Thread Matt Welch


David Leangen-8 wrote:
> 
> What version are you using?
> 
I'm using 1.4. 

It wouldn't have occurred to me that it would be so difficult. I know it may
seem odd, but URL control is actually very important here because
organization identity is vital in the domain that the app will serve.

Hmmm

Matt

-- 
View this message in context: 
http://www.nabble.com/Custom-URL-Handling-tp23130367p23143850.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Google App Engine and Wicket

2009-04-11 Thread Matt Welch

Both articles avoid the DiskPageStore problem by using the HttpSessionStore,
however if you do a search through the mailing list archives for
HttpSessionStore you'll find numerous references to problems in using it in
the long term and especially in a real, production application, so I don't
think that's a good long term solution, so my original question still
stands. Is there an alternative or is Wicket perhaps not well suited for use
in the App Engine.

Matt




ptrthomas wrote:
> 
> Here's another article about Wicket and GAE on DZone:
> 
> http://www.dzone.com/links/rss/wicket_on_google_app_engine.html
> 
> On Sat, Apr 11, 2009 at 8:22 AM, Sergey Podatelev <
> brightnesslev...@gmail.com> wrote:
> 
>> Here are a couple of pointers regarding Wicket on GAE:
>>
>>
>> http://www.danwalmsley.com/2009/04/08/apache-wicket-on-google-app-engine-for-java/
>>
>> On Sat, Apr 11, 2009 at 6:15 PM, Matthew Welch 
>> wrote:
>> > I've been experimenting a bit with Google App Engine and Wicket and
>> things
>> > seemed to work fairly well once I turned off the ModificationWatcher.
>> > However, I realized that my simple tests were all stateless and that
>> once
>> > stateful, Wicket would use the DiskPageStore to write some files, which
>> is
>> > not allowed in the App Engine sandbox. Sure enough, once I added some
>> > stateful pages, I started seeing exceptions related to the
>> DiskPageStore.
>> >
>> > I'm a neophyte when it comes to the deep down Wicket internals so I'm
>> not
>> > sure what my other options might be. In a post Matej  Knopp said, ""*
>> > DiskPageStore*'s purpose is to store serialized pages on disk in order
>> to
>> > allow access to previous page versions and also to conserve session
>> memory
>> > usage." This leads me to believe that using the sassion for storing
>> this
>> > information isn't a preferred approach. What about the App Engine's
>> > datastore (an abstration on BigTable)? That seems like it might be too
>> slow
>> > to adequately serve this need, but I'm not sure. A thread on
>> > Wicket/Terracotta integration ended up with an alternative
>> > "SecondLevelCacheSessionStore" but I'm not sure if that is only usable
>> with
>> > Terracotta or if it might might sense in other situations. Any other
>> > options?
>> >
>> > Also, looking forward, with the knoledge that writing giles and
>> spawning
>> new
>> > threads are not allowed in the App Engine sandbox, are there any other
>> items
>> > I should be onl the lookout for in Wicket that might make it a poor
>> choice
>> > for this situation?
>> >
>> > Matt
>> >
>>
>>
>>
>> --
>> sp
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Google-App-Engine-and-Wicket-tp23001592p23007684.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Turning off ModificationWatcher

2009-04-09 Thread Matt Welch

Thanks.

Matt


Ryan Crumley wrote:
> 
> Matt,
> 
> Add this to your WebApplication.init() method:
> 
> getResourceSettings().setResourcePollFrequency(null);
> 
> Ryan
> 
> On Wed, Apr 8, 2009 at 9:33 PM, Matthew Welch 
> wrote:
>> I'm experimenting with Wicket inside Google's new Java support for its
>> App
>> Engine. My simple apps run fine if the configuration is set to
>> DEPLOYMENT,
>> however in development mode, I get an exception related to
>> ModificationWatcher. Looking at the exception I think this
>> ModificationWatcher is being used as part of a new thread which is a
>> no-no
>> inside the App Engine sandbox. Is there way way to just disbable this
>> modification watcher without putting the entire app in deployment mode?
>> There are a number of items I like about development mode but this one
>> glitch is preventing me from using it.
>>
>> Matt
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Turning-off-ModificationWatcher-tp22963478p22973975.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Turning off ModificationWatcher

2009-04-09 Thread Matt Welch

I have no intention of actually deploying it in development mode. 

I'm talking about the development sandbox provided by the Google App Engine
Java SDK.

Matt



Martijn Dashorst wrote:
> 
> Never *EVER* deploy your application in development mode. Use
> deployment mode and turn those features you want on.
> 
> Martijn
> 
> On Thu, Apr 9, 2009 at 4:33 AM, Matthew Welch 
> wrote:
>> I'm experimenting with Wicket inside Google's new Java support for its
>> App
>> Engine. My simple apps run fine if the configuration is set to
>> DEPLOYMENT,
>> however in development mode, I get an exception related to
>> ModificationWatcher. Looking at the exception I think this
>> ModificationWatcher is being used as part of a new thread which is a
>> no-no
>> inside the App Engine sandbox. Is there way way to just disbable this
>> modification watcher without putting the entire app in deployment mode?
>> There are a number of items I like about development mode but this one
>> glitch is preventing me from using it.
>>
>> Matt
>>
> 
> 
> 
> -- 
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.3.5 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Turning-off-ModificationWatcher-tp22963478p22973951.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: setResponsePage() and mounted URLs

2009-04-05 Thread Matt Welch


jcompagner-2 wrote:
> 
> what happens if you try this:
> 
> add(new StatelessLink("statelessPage1"
>>
>> ) {
>>public void onClick() {
>>setResponsePage(StatelessPage1.class);
> 
> RequestCycle.get().setRedirect(true)
> 
>>
>>}
> 
While the link on the original page is still the long version, once it is
clicked I do end up on page with the nicely mounted URL. Thanks!

Are there any gotchas I need to look out for when using this approach?

Matt
-- 
View this message in context: 
http://www.nabble.com/setResponsePage%28%29-and-mounted-URLs-tp22890145p22901802.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Trying to stay stateless but having some issues

2009-03-04 Thread Matt Welch


Jeremy Thomerson-5 wrote:
> 
> The continuation URL looks to only be stored if you arrived at the page by
> a
> call to PageMap#redirectToInterceptPage, which is called by
> RestartResponseAtInterceptPage exception.  It's also stored in the session
> (or rather, the PageMap, which is stored in the session).  So, yes, you
> would need a session to store that info into.
> 
> A suggestion might be to add the return URL to the sign in form as a
> hidden
> field, which you could redirect to in your onSubmit by throwing new
> RedirectException(urlFromForm).  That doesn't sound like the cleanest
> solution.  I'd have to think more to come up with something else.
> 
Thank you for the reply. I guess I'm a little surprised to run into this as
it seems like this would be a pretty common scenario for an application. I'm
certain willing to consider any approach. If forced, I can probably live
with the long, non-bookmarkable url after this login operation if I have to.

-- 
View this message in context: 
http://www.nabble.com/Trying-to-stay-stateless-but-having-some-issues-tp22323101p22344092.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Trying to stay stateless but having some issues

2009-03-03 Thread Matt Welch

I'm trying to keep my app stateless wherever possible, especially on the
pages that serve merely as an introduction to the app but have no heavy
dynamic functionality.

On many of these pages I have a sing-in panel. This sign-in panel contains a
stateless username/password form. The onSubmit of the stateless form looks
like this:


@Override
protected void onSubmit() {
if (GVWebSession.get().authenticate(username, password)) {
if (!continueToOriginalDestination()){
setResponsePage(getPage().getPageClass());
}
} else {
error(getLocalizer().getString("signin.failed", this));
}
}


This doesn't seem to work. The behavior I want pretty common. I want the
same page displayed, but now with the user logged in and the sign-in form
replaced with a "welcome " message or something like that. What actually
occurs is (from the users' point of view) nothing. The page is redisplayed
and the form comes back up. I can debug the form submission and I see that
the users is being properly authenticated. I assume I'm doing something
wrong with my setResponsePage() call. If I comment out that setResponsPage()
call, the login works and the page is displayed correctly but I then have a
long, ugly URL. 

I happen to go to a non-stateless page and a session is created, and then
come back to a stateless page, this login procedure works correctly, so I
assume that my problem has something to do with their not being a session
created yet. That seems odd though, because one wouldn't think my situation
would be that unusual. 

Any suggestions?
-- 
View this message in context: 
http://www.nabble.com/Trying-to-stay-stateless-but-having-some-issues-tp22323101p22323101.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: LDM with Generics for DropDownChoice

2009-02-23 Thread Matt Welch


Martijn Dashorst wrote:
> 
>> Just to make sure I'm understanding this; yuo're saying I have to create
>> a
>> variable and then assign the variable instead of just being able to pass
>> "new AllUsersModel()" to the DropDownChoice constructor?
> 
> Nope, just change your model supertype from List to List Foo>
> 
>> That just seems odd.
> 
> Welcome to Java generics...
> 
Thanks. It's working now. 


private class AllUsersModel extends LoadableDetachableModel>{
protected List load() {
return userService.findAllUsers();
}
}

-- 
View this message in context: 
http://www.nabble.com/LDM-with-Generics-for-DropDownChoice-tp22155211p22164005.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: LDM with Generics for DropDownChoice

2009-02-23 Thread Matt Welch

Just to make sure I'm understanding this; yuo're saying I have to create a
variable and then assign the variable instead of just being able to pass
"new AllUsersModel()" to the DropDownChoice constructor?

That just seems odd.





Jeremy Thomerson-5 wrote:
> 
> IIRC, DropDownChoice requires a declaration like such:
> 
> IModel>
> 
> So, this should work:
> 
> IModel> choices = new AllUserModel();
> 
> I've been meaning to ask on the dev list why that is.  Being forced to
> declare the "? extends User" for a model like yours seems to add
> complexity,
> and force a local variable.  I haven't looked at it that much, but I know
> that every time I've had to declare one, I always think "that's weird".
> 
> On Sun, Feb 22, 2009 at 10:55 PM, Matt Welch  wrote:
> 
>>
>> I'm sure I should know this but I can't seem to get it right. I have a
>> LoadableDetachableModel as follows:
>>
>>
>>private class AllUserModel extends
>> LoadableDetachableModel>{
>>protected List load() {
>>return userService().findAllUsers();
>>}
>>}
>>
>>
>> I'm trying to use this as the Choices model in a DropDownChoice, but no
>> luck. I'm sure I'm missing an  or a  or a somewhere but I at a
>> lost
>> as to what the exact problem is. I've been a consumer of generics
>> forever,
>> but actually being on the creation side is a bit new to me.
>>
>> --
>> View this message in context:
>> http://www.nabble.com/LDM-with-Generics-for-DropDownChoice-tp22155211p22155211.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> 
> 
> -- 
> Jeremy Thomerson
> http://www.wickettraining.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/LDM-with-Generics-for-DropDownChoice-tp22155211p22161940.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



LDM with Generics for DropDownChoice

2009-02-22 Thread Matt Welch

I'm sure I should know this but I can't seem to get it right. I have a
LoadableDetachableModel as follows:


private class AllUserModel extends LoadableDetachableModel>{
protected List load() {
return userService().findAllUsers();
}
}


I'm trying to use this as the Choices model in a DropDownChoice, but no
luck. I'm sure I'm missing an  or a  or a somewhere but I at a lost
as to what the exact problem is. I've been a consumer of generics forever,
but actually being on the creation side is a bit new to me. 

-- 
View this message in context: 
http://www.nabble.com/LDM-with-Generics-for-DropDownChoice-tp22155211p22155211.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: form - ajax submit and validation

2009-02-19 Thread Matt Welch

I think more information is needed before someone can provide a useful
response:


Are you initializing the AjaxButton with the form (in the the constructor of
the AjaxButton or with setter)?
Is the form data being submitted? If not, this would indicate a problem
somewhere other than in the validation itself.
Can you show your actual code?




Vitek.Tajzich wrote:
> 
> Hi guys,
> 
> I have form and AjaxButton as submit button for the form. If I use non
> ajax
> button validation is called and input fields are validated. But If I use
> AjaxButton then validation are passedWhat should I do to get form
> validated even If I use ajax button?
> 
> thank you,
> 
> Vitek
> 
> 

-- 
View this message in context: 
http://www.nabble.com/form---ajax-submit-and-validation-tp22102523p22104799.html
Sent from the Wicket - User mailing list archive at Nabble.com.


Re: Making an invisible panel visible via AjaxLink

2009-02-19 Thread Matt Welch

The key, as others have alluded to and you discovered yourself, is that
setting a component's visibility to false will cause that component to not
be rendered. I know in the back of some people minds (mine included) we
think "invisible means it's there, we just can't see it). Well, in this case
invisible means it's not rendered at all. This is all just semantics until
you try to change that visibility on the client side (i.e. AJAX). Since it's
not there to being with, you can't really do client side modifications of
it. 

So, as Michael pointed out, you can instead put what you want to make
invisible inside a container and then use the Ajax functionality to update
that container and not the invisible item itself. The container will be
re-rendered and now that the internal item is set to "visible" it will be
rendered right along with its parent container.

Matt
--


Michael Sparer wrote:
> 
> put the panel in an additional container and add this container
> 
> WebmarkupContainer div = new WebmarkupContainer("cont");
> div.setOutputMarkupId(true);
> div.add(registeredUserPanel.setVisible(false));
> 
> then in the onclick stuff
> registeredUserPanel.setVisible(true);
> target.addComponent(div);
> 
> that should do the trick
> 
> hth,
> michael
> 
> 
> rjilani wrote:
>> 
>> Hi: Gurus I am trying to make an invisible panel visible via Ajax link,
>> but got stuck at a point where I don't know how to proceed further.
>> Please see the code snipet below
>> 
>> final RegisteredUserPanel registeredUserPanel = new
>> RegisteredUserPanel("registrationPanel");
>> 
>> add(registeredUserPanel);
>> registeredUserPanel.setOutputMarkupId(true);
>> registeredUserPanel.setVisible(false);
>> 
>> add(new AjaxLink("registerLink") {
>> 
>> @Override
>> public void onClick(AjaxRequestTarget target) {
>> registeredUserPanel.setVisible(true);
>> target.addComponent(registeredUserPanel);
>> }
>> });
>> 
>> the problem is that when I call registeredUserPanel.setVisible(false),
>> becuase by defualt I don't want this pannel to be visible; the wicket
>> don't render the html markup for the pannel at all and hence the ajax
>> calls fails becuase it don't find the markup to render the panel. Any
>> suggestions how to tackle a situation like this.
>> 
>> Regards,
>> RJ
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Making-an-invisible-panel-visible-via-AjaxLink-tp22103906p22104664.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Some SignInPanel Questions

2009-02-18 Thread Matt Welch

I don't know if these are actually SignInPanel (from wicket-auth-roles)
questions or if they're in fact more general "wicket" questions; probably
the latter, but the SignInPanel class is where I noticed these things.

1) In the SignInPanel I notice that instead of having a couple of private
String variables to represent the username and password, a ValueMap is used
instead. I'm curious as to why.  Is there some benefit to using a ValueMap? 

2) When the values that are typed in the username and password fields are
needed to pass to the signIn() method, they are retrieved in ways that I
would not have normally considered. The username value is retrieved with the
getDefaultModelObjectAsString() method of the username's TextField component
and the password is retrieved with the getInput() method of the password's
PasswordTextField component. Why are the values retrieved this way? I assume
there's a good reason, but because I don't understand it, I'm a bit unsure
as to where in my own application I should be using the same techniques.

My first instinct for a panel like this would have been to add two String
variables to the class to act as the model for the username and password
TextFields and then to access those values with normal getter methods. I'd
would find it quite instructive to know why these other approaches were used
instead so that I can take similar actions in my own application.

Thanks!

I'll include some snippets from the SignInPanel class below so that it
doesn't have to be looked up:


-
private final ValueMap properties = new ValueMap();
-
add(username = new TextField("username", new
PropertyModel(properties,
"username")));
add(password = new PasswordTextField("password", new
PropertyModel(properties,
"password")));
-
public String getPassword()
{
return password.getInput();
}
-
public String getUsername()
{
return username.getDefaultModelObjectAsString();
}
-



-- 
View this message in context: 
http://www.nabble.com/Some-SignInPanel-Questions-tp22094376p22094376.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: AjaxSubmitLink submitting twice

2009-02-18 Thread Matt Welch

I finally did find the root of this problem and wanted to report back to
other Wicket users in case they ever had a similar issue and found this
thread in a search. It turns out that the problem is somehow related to the
Firebug add-on for Firefox. Doing some searching, I can see that Firebug has
had similar issue in the past, however they are supposed all fixed, but the
issue was definitely related, at least in some way, to Firebug. 

Firebug has a feature that allows you put logging statements into your
javascript code with console.log() statements. If that feature was turned on
(i.e. the "Console" option was checked in the "Net" tab of Firebug) then I
would get the behavior I described. Turned off? Everything was fine.

I was using Firebug 1.3.2 with Firefox 3.0. For some reason Firefox had
never prompted me for an update as it had on my other computers. When I
updated to Firefox 3.0.6 I could not longer reproduce the issue. 

The moral, I guess, is to keep your browser up-to-date.

Matt


Matt Welch wrote:
> 
> The Nabble posting process correctly escaped all of the HTML tags except
> the   which it rendered as HTML. I only just now figured out I needed to
> use a "raw" tag. The raw HTML is below.
> 
> As expected though, this same code works fine in a quickstart. I never
> suspected that it was a bug, which is why I didn't post a JIRA issue. I
> knew something this simple wouldn't have been missed. It's clearly a
> problem with our configuration, but I don't know where to start looking. 
> 
> Using this simple test page, the final rendered page contains no extra
> javascript beyond the wicket stuff to support the button submission which
> I know works. This test page isn't going through our security framework
> because I extended WebPage instead of our application's SecureWebPage
> (using wicket-security). That leaves servlet filters (Spring's
> OpenSessionInView and the normal WicketFilter), our session implementation
> or the WebApplication itself. 
> 
> Does anyone have any suggestions about where I might plop down a
> breakpoint in an attempt to debug this issue?
> 
> -Matt
> 
> 
>PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
> 
>   
> 
>  # Search 
>   
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/AjaxSubmitLink-submitting-twice-tp21934491p22087057.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: WicketForge 0.5.0 Available for IDEA 8

2009-02-11 Thread Matt Welch

Perhaps I'm missing it, but I can't seem to get the intentions to work. So if
I have:


public class MyPage extends WebPage {
}

and the cursor is somewhere on "MyPage" I should be able to activate these
intentions? The only intentions I'm seeing now are the built in Idea ones.
Everything else, though, is working beautifully. No more exceptions when
idea loads and having a shortcut key to toggle between the components and
HTML and back is awesome. 

-Matt




Nick Heudecker wrote:
> 
> I've published WicketForge 0.5.1 to the IDEA plugins site.
> 
>- Toggling between HTML and Java is fixed.  Let me know if you're still
>having problems with the cursor ending up at the correct location. 
> It's
>work correctly here but your results may vary.
>- The intentions are also fixed.  Nobody mentioned the intentions not
>working, so I'm guessing no one knew about them.  There are intentions
> to
>create a markup page/panel/properties file if you alt-enter while the
> cursor
>is on the class name.
> 
> 
> 
> On Fri, Jan 16, 2009 at 10:05 AM, Don Hass  wrote:
> 
>>
>> Here is what I see in Diana #9647 build on Windows XP.
>>
>>
>> Class/HTML Switching (WORKS)
>> Alt + Shift + W switch between class and markup/html.
>>
>>
>> Inspections (PARTLY WORKS)
>> It seems to work in markup/html files, but not in source files for
>> missing
>> Wicket IDs.
>>
>>
>> Goto (DOES NOT APPEAR TO WORK AT ALL)
>> Control+Clicking on a Wicket ID in the Java or markup takes you to the
>> corresponding Wicket ID in the accompanying file.  Jumps between files,
>> but
>> not to correct locations.
>>
>>
>> Completion (WORKS)
>> When editing an HTML file, popup completion data provides Wicket IDs in
>> the
>> corresponding Java source file.
>>
>>
>> Progress and thank you Nick.
>>
>>
>> /Don
>>
>>
>>
>> Nick Heudecker wrote:
>> >
>> > Thanks for the feedback Maarten.  I'm going to publish the plugin today
>> to
>> > the IDEA site then work on fixing that bug as soon as I can.
>> >
>> > On Fri, Jan 16, 2009 at 8:46 AM, Maarten Bosteels
>> > wrote:
>> >
>> >> Hello Nick,
>> >>
>> >> The new plugin installs fine.  This is what works on my systems:
>> >>
>> >> (a) ALT + SHIFT + W => switching between java and html files
>> >> (b) in the html file clicking on a wicket:id value => jumps to
>> >> corresponding
>> >> Java code
>> >> (c) CTRL + SPACEBAR when inside a wicket:id value in the html file =>
>> >> dropdown box for completion
>> >> (d) in html file: warning "Wicket ID missing in Java source" when
>> using
>> >> an
>> >> invalid wicket:id value
>> >>
>> >> not working:
>> >> (e) clicking on a wicket:id in the Java code,  expected to jump to
>> >> correspondig wicket:id in html file, but nothing happens
>> >>
>> >> I saw same results on these two machines:
>> >>
>> >> Fedora 8
>> >> IDEA 8.0.1 EAP build 9164
>> >> JDK 1.6.0_11
>> >>
>> >> Fedora 9
>> >> IDEA 8.0 build #9572
>> >> JDK 1.6.0_11
>> >>
>> >> If I remember correctly, (e) used to work on IDEA 7.
>> >>
>> >> Nothing interesting in ~/.IntelliJIdea80/system/log/idea.log
>> >> Except maybe this:
>> >> 2009-01-16 17:10:33,433 [   3126]   INFO -
>> api.vfs.impl.local.FileWatcher
>> >> -
>> >> Native file watcher failed to startup.
>> >>
>> >> Let me know what I can do to help you fix this because your plugin
>> >> totally
>> >> rocks !
>> >>
>> >> Thanks,
>> >> Maarten
>> >>
>> >> On Wed, Jan 14, 2009 at 5:28 PM, Nick Heudecker > >> >wrote:
>> >>
>> >> > That's what I get for trying to rush things.  You can download it
>> from
>> >> > here:
>> >> >
>> >> >
>> >> > http://www.systemmobile.com/code/WicketForge-0.5.0.zip
>> >> >
>> >> > And rename the zip to a jar.  I'll update the instructions page
>> next.
>> >> >
>> >> > On Wed, Jan 14, 2009 at 7:40 AM, Don Hass  wrote:
>> >> >
>> >> > >
>> >> > > Ditto.
>&

Re: Intellij Idea Plugin Bounty

2009-02-11 Thread Matt Welch

I hope I didn't give the wrong impression. I really appreciate the work
you've done and looking at the code, it's a heck of a lot of work. If I
hadn't tried wicketforge and saw the potential there I never would have been
so motivated to start this process. I just didn't want to be that guy who
just said "I want this" and "I want that" to someone who had already donated
so much of their time. That's why I'm proposing the bounty. That way I can
not feel like such a leech when I ask for specific things. 

-Matt



Nick Heudecker wrote:
> 
> Hi Matt,
> 
> I'm sorry the IDEA plugin doesn't meet your needs.  I've wanted to
> implement
> several of the features you mention, but like everyone else my time is
> severely limited.
> 
> That said, WicketForge is open source.  I'm happy to accept patches or
> even
> turn the project over to someone else.
> 
> On Wed, Feb 11, 2009 at 9:41 AM, Matt Welch  wrote:
> 
>>
>> I use Intellij Idea for my Java development. In fact, that IDE is one of
>> the
>> main reasons I so often come back to using Java for many of my projects.
>> I
>> also use Wicket and am starting to work with it a lot more than I have in
>> the past. While Wicket and Idea get along reasonably well, there's a lot
>> of
>> room for improvement in their relationship. That means a Wicket plugin
>> for
>> Idea.
>>
>> Nick Heudecker has done an admirable job with WicketForge
>> (http://code.google.com/p/wicketforge/), however 1) when I try to use
>> that
>> plugin, I constantly get exceptions and 2) it doesn't do some of the the
>> things I'm really interested in. This is no criticism of Nick. If I
>> recall
>> one of his messages correctly, he developed this plugin for his own use
>> and
>> it was extremely generous of him to publish the code as open source. He's
>> even made pretty regular improvements to it, but at least for me
>> personally,
>> it doesn't meet my needs for a Wicket plugin.
>>
>> Now, I can't, in good conscience just pop on to this mailing list and ask
>> someone out of the goodness of their heart to "get to it!", so I'm
>> willing
>> to start the ball rolling on an incentive in the form of a bounty; one
>> that
>> I hope other Wicket and Idea users will contribute to as well.  First,
>> though, I'd like to come to some kind of agreement about a feature set
>> for
>> such a plugin so that when I post the bounty I can be as specific as
>> possible in its criteria.
>>
>> Here is a list of my most desired features in the order of priority:
>>
>> 1) Navigation between template and code - I would like the ability to
>> move
>> in both directions between a template and it's Java code. This means in
>> an
>> overall sense (e.g. moving back and forth between a top level page class
>> and
>> the HTML file) and in a more granular sense (e.g. moving back and forth
>> between an HTML element with a wicket:id and the Wicket Java Component
>> with
>> the same id). I should be able to bind a keystroke to this action. It
>> should
>> preferably be the same keystroke in both directions.
>>
>> 2) Code completion for wicket:message keys - I would like code completion
>> for the  "key" attribute. It should work something like
>> the
>> XML code completion when there isn't a DTD or schema available. It would
>> be
>> based on other keys already available on the page. So for instance if I
>> had
>> already created a  with a key of
>> "userform.detailfieldset.username.label" I would expect that when I
>> created
>> another  and started typing "us" in the key attribute,
>> code
>> completion would allow me to expand what I typed similar to what happens
>> when typing package names.
>>
>> 3) Properties file intention - I would like an Idea intention that would
>> allow me to automatically add  keys to a resource
>> properties
>> file. By default this would add it to a properties file with the same
>> name
>> as the template (even creating the properties file if necessary), however
>> it
>> should be configurable to use an application-wide properties file if
>> that's
>> what the user prefers. When adding the key to the properties file it
>> should
>> be placed in a logical manner according to it's period separated name so
>> the
>> key "userform.detailfieldset.username.label" would be placed just after
>> other ke

Intellij Idea Plugin Bounty

2009-02-11 Thread Matt Welch

I use Intellij Idea for my Java development. In fact, that IDE is one of the
main reasons I so often come back to using Java for many of my projects. I
also use Wicket and am starting to work with it a lot more than I have in
the past. While Wicket and Idea get along reasonably well, there's a lot of
room for improvement in their relationship. That means a Wicket plugin for
Idea. 

Nick Heudecker has done an admirable job with WicketForge
(http://code.google.com/p/wicketforge/), however 1) when I try to use that
plugin, I constantly get exceptions and 2) it doesn't do some of the the
things I'm really interested in. This is no criticism of Nick. If I recall
one of his messages correctly, he developed this plugin for his own use and
it was extremely generous of him to publish the code as open source. He's
even made pretty regular improvements to it, but at least for me personally,
it doesn't meet my needs for a Wicket plugin.

Now, I can't, in good conscience just pop on to this mailing list and ask
someone out of the goodness of their heart to "get to it!", so I'm willing
to start the ball rolling on an incentive in the form of a bounty; one that
I hope other Wicket and Idea users will contribute to as well.  First,
though, I'd like to come to some kind of agreement about a feature set for
such a plugin so that when I post the bounty I can be as specific as
possible in its criteria.

Here is a list of my most desired features in the order of priority:

1) Navigation between template and code - I would like the ability to move
in both directions between a template and it's Java code. This means in an
overall sense (e.g. moving back and forth between a top level page class and
the HTML file) and in a more granular sense (e.g. moving back and forth
between an HTML element with a wicket:id and the Wicket Java Component with
the same id). I should be able to bind a keystroke to this action. It should
preferably be the same keystroke in both directions.

2) Code completion for wicket:message keys - I would like code completion
for the  "key" attribute. It should work something like the
XML code completion when there isn't a DTD or schema available. It would be
based on other keys already available on the page. So for instance if I had
already created a  with a key of
"userform.detailfieldset.username.label" I would expect that when I created
another  and started typing "us" in the key attribute, code
completion would allow me to expand what I typed similar to what happens
when typing package names. 

3) Properties file intention - I would like an Idea intention that would
allow me to automatically add  keys to a resource properties
file. By default this would add it to a properties file with the same name
as the template (even creating the properties file if necessary), however it
should be configurable to use an application-wide properties file if that's
what the user prefers. When adding the key to the properties file it should
be placed in a logical manner according to it's period separated name so the
key "userform.detailfieldset.username.label" would be placed just after
other keys with the name "userform.detailfieldset.username" or
"userform.detailfieldset.username". The intention should leave the cursor
after the "=" in the properties file. 

4) Code completion on wicket tags and attributes - I would like code
completion for all wicket tags (e.g. , ,
etc.) in HTML templates. This is something of a lower priority as Idea's
"Live Template" functionality takes much of the pain out of not having code
completion for items in the wicket namespace. This doesn't help with the
error/warning issue, though.

5) Validation for wicket namespace and attributes in hTML template - In a
similar vein, I would like wicket attributes like "wicket:id" and wicket
tags like  to not show up as either errors or warnings in my
HTML templates. 

This is just off the top of my head. I'm sure there are more and perhaps
even some that should be higher on the priority list. Once some kind of
feature set is agreed by Idea users here in the mailing list, I'll kick off
the bounty on one of the software bounty sites and contribute $200. I know
it's not much but I'll try to get my company to pony up a few dollars as
well. That along with whatever contributions anyone else would like to make
will hopefully be an incentive for someone. Maybe there's someone out there
who's been wanting to do this for a while and the bounty will simply be the
motivation to finally do it. I don't know, but I don't figure there's any
harm in trying. 

Please post your own ideas and list your preferred priority for the
features.

-Matt
-- 
View this message in context: 
http://www.nabble.com/Intellij-Idea-Plugin-Bounty-tp21958284p21958284.html
Sent

Re: AjaxSubmitLink submitting twice

2009-02-10 Thread Matt Welch

The Nabble posting process correctly escaped all of the HTML tags except the  
which it rendered as HTML. I only just now figured out I needed to use a
"raw" tag. The raw HTML is below.

As expected though, this same code works fine in a quickstart. I never
suspected that it was a bug, which is why I didn't post a JIRA issue. I knew
something this simple wouldn't have been missed. It's clearly a problem with
our configuration, but I don't know where to start looking. 

Using this simple test page, the final rendered page contains no extra
javascript beyond the wicket stuff to support the button submission which I
know works. This test page isn't going through our security framework
because I extended WebPage instead of our application's SecureWebPage (using
wicket-security). That leaves servlet filters (Spring's OpenSessionInView
and the normal WicketFilter), our session implementation or the
WebApplication itself. 

Does anyone have any suggestions about where I might plop down a breakpoint
in an attempt to debug this issue?

-Matt


http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">



 # Search 









igor.vaynberg wrote:
> 
> your example markup does not contain "search" component. it is much
> better to open a jira issue and attach a quickstart that reproduces
> the problem.
> 
> -igor
> 
> On Tue, Feb 10, 2009 at 6:12 AM, Matt Welch  wrote:
>>
>> I'm stumped. We have an AjaxSubmitLink and when clicked, the onSubmit of
>> the
>> link is being executed twice. This is causing havok in our app. I've
>> winnowed it down to just the simplest example but I still see this taking
>> place. I'm not sure how to proceed. Here's the example code:
>> -
>> >PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>>"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
>> 
>>
>>
>> # Search
>>
>> 
>> 
>> -
>> public class TestAjaxSubmitLink extends WebPage {
>>private String fieldValue;
>>
>>public TestAjaxSubmitLink() {
>>
>>Form form = new Form("testForm");
>>add(form);
>>final TextField search = new TextField("keyword", new
>> PropertyModel(this,
>> "fieldValue"));
>>
>>form.add(search);
>>form.add(new AjaxSubmitLink("search"){
>>protected void onSubmit(AjaxRequestTarget target,
>> Form form) {
>>    System.out.println("Clicked Submit");
>>}
>>});
>>}
>> }
>> -
>>
>> We're using an older version of Wicket, but I tested this in 1.3.5 also
>> and
>> got the same behavior. I find it hard to believe that we would be the
>> first
>> to experience this behavior so I assume we're doing something wrong, but
>> I'm
>> just not sure what it is. Any advice?
>>
>> -Matt
>> --
>> View this message in context:
>> http://www.nabble.com/AjaxSubmitLink-submitting-twice-tp21934491p21934491.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/AjaxSubmitLink-submitting-twice-tp21934491p21944134.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



AjaxSubmitLink submitting twice

2009-02-10 Thread Matt Welch

I'm stumped. We have an AjaxSubmitLink and when clicked, the onSubmit of the
link is being executed twice. This is causing havok in our app. I've
winnowed it down to just the simplest example but I still see this taking
place. I'm not sure how to proceed. Here's the example code:
-
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">



 # Search 



-
public class TestAjaxSubmitLink extends WebPage {
private String fieldValue;

public TestAjaxSubmitLink() {

Form form = new Form("testForm");
add(form);
final TextField search = new TextField("keyword", new 
PropertyModel(this,
"fieldValue"));

form.add(search);
form.add(new AjaxSubmitLink("search"){
protected void onSubmit(AjaxRequestTarget target, Form 
form) {
System.out.println("Clicked Submit");
}
});
}
}
-

We're using an older version of Wicket, but I tested this in 1.3.5 also and
got the same behavior. I find it hard to believe that we would be the first
to experience this behavior so I assume we're doing something wrong, but I'm
just not sure what it is. Any advice? 

-Matt
-- 
View this message in context: 
http://www.nabble.com/AjaxSubmitLink-submitting-twice-tp21934491p21934491.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Checkbox filtering a dataview

2009-02-05 Thread Matt Welch

Thanks. That makes a lot of sense. Sometimes the simplest approaches are the
ones I forget.

Matt


igor.vaynberg wrote:
> 
> public mypage extends webpage {
>  private boolean filter;
> 
>   public mypage() {
>   add(new dataview("dataview", new dataprovider()) {});
>   }
> 
>  private class dataprovider extends mydataprovider {
>protected boolean getfilter() { return filter; }
>  }
> }
> 
> On Wed, Feb 4, 2009 at 1:51 PM, Matt Welch  wrote:
>>
>> Thank you for your reply. Unfortunately (for this situation, anyway), we
>> frequently reuse our dataproviders in more than one place in the
>> application, so they are are always in their own class files. In any
>> case,
>> what we have will work for now. I'll look around through the examples for
>> other use cases.
>>
>> Matt
>>
>>
>>
>> igor.vaynberg wrote:
>>>
>>> public mypage extends webpage {
>>>   private boolean filter;
>>>
>>>public mypage() {
>>>add(new dataview("dataview", new dataprovider()) {});
>>>}
>>>
>>>   private class dataprovider implements idataprovider() {
>>>   public int size() { return new query(filter).size(); }
>>>   public iterator iterator() { return new query(filter).iterator();
>>> }
>>>   }
>>> }
>>>
>>> -igor
>>>
>>>
>>> On Wed, Feb 4, 2009 at 12:55 PM, Matt Welch 
>>> wrote:
>>>>
>>>> I'm probably thinking about his all wrong, but for some reason I can't
>>>> get my
>>>> mind in the right frame here. I have a page with a dataview that is
>>>> showing
>>>> data in a table. That dataview needs to be filtered by a checkbox in a
>>>> different place on same page. The model for that checkbox is an
>>>> attribute
>>>> of
>>>> the page (using PropertyModel). When I click the checkbox the page
>>>> needs
>>>> to
>>>> refresh and show filtered data. Obviously the dataview need to know the
>>>> current value of that checkbox. The only way I can think to do that is
>>>> to
>>>> pass the page itself to the dataview so that it can call the getter for
>>>> that
>>>> property. This seems convoluted, however. Am I missing something?
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Checkbox-filtering-a-dataview-tp21839427p21839427.html
>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> -
>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>
>>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Checkbox-filtering-a-dataview-tp21839427p21840403.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Checkbox-filtering-a-dataview-tp21839427p21851525.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Checkbox filtering a dataview

2009-02-04 Thread Matt Welch

Thank you for your reply. Unfortunately (for this situation, anyway), we
frequently reuse our dataproviders in more than one place in the
application, so they are are always in their own class files. In any case,
what we have will work for now. I'll look around through the examples for
other use cases. 

Matt



igor.vaynberg wrote:
> 
> public mypage extends webpage {
>   private boolean filter;
> 
>public mypage() {
>add(new dataview("dataview", new dataprovider()) {});
>}
> 
>   private class dataprovider implements idataprovider() {
>   public int size() { return new query(filter).size(); }
>   public iterator iterator() { return new query(filter).iterator(); }
>   }
> }
> 
> -igor
> 
> 
> On Wed, Feb 4, 2009 at 12:55 PM, Matt Welch  wrote:
>>
>> I'm probably thinking about his all wrong, but for some reason I can't
>> get my
>> mind in the right frame here. I have a page with a dataview that is
>> showing
>> data in a table. That dataview needs to be filtered by a checkbox in a
>> different place on same page. The model for that checkbox is an attribute
>> of
>> the page (using PropertyModel). When I click the checkbox the page needs
>> to
>> refresh and show filtered data. Obviously the dataview need to know the
>> current value of that checkbox. The only way I can think to do that is to
>> pass the page itself to the dataview so that it can call the getter for
>> that
>> property. This seems convoluted, however. Am I missing something?
>> --
>> View this message in context:
>> http://www.nabble.com/Checkbox-filtering-a-dataview-tp21839427p21839427.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Checkbox-filtering-a-dataview-tp21839427p21840403.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Checkbox filtering a dataview

2009-02-04 Thread Matt Welch

I'm probably thinking about his all wrong, but for some reason I can't get my
mind in the right frame here. I have a page with a dataview that is showing
data in a table. That dataview needs to be filtered by a checkbox in a
different place on same page. The model for that checkbox is an attribute of
the page (using PropertyModel). When I click the checkbox the page needs to
refresh and show filtered data. Obviously the dataview need to know the
current value of that checkbox. The only way I can think to do that is to
pass the page itself to the dataview so that it can call the getter for that
property. This seems convoluted, however. Am I missing something?
-- 
View this message in context: 
http://www.nabble.com/Checkbox-filtering-a-dataview-tp21839427p21839427.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Another Ajax back button question

2008-12-04 Thread Matt Welch



Scott Swank wrote:
> 
> If the ajax changes are reflected in the relevant model(s) then you
> will see them when you go back to the page.
> 
Hmmm... perhaps I shouldn't have abstracted my issue and instead discussed
exactly what is happening. Let me change some steps.

1) On a page with a form I enter information and submit the form

2) The page refreshes (normal submit; not ajax) and a panel that was
previously invisible is displayed as the form submission is processed in the
background. This processing is  background task because it can take a very
long time (anywhere between 5 seconds to half an hour). There is an
AjaxSelfUpdatingTimerBehavior with a 5 seconds time attached to the now
visible panel.

3) The AjaxSelfUpdatingTimerBehavior checks the background process in it's
onPostProcessTarget() method and when the background processing is done, the
panel is made invisible again and new panel is made visible with a link to
report on the processing that just took place.

4) Clicking that link takes one to the report and then clicking that browser
back button brings one back to the form page, however, it apparently brings
one back to the form page in the state it was just after the original submit
was clicked. The actual background processing doesn't get kicked off again,
but the "in progress" panel is visible and remains visible until one cycle
of the AjaxSelfUpdatingTimerBehavior goes by and then the page returns to
the expected state. 

I'd like to figure out a way keep that "in progress" panel from showing up
when the back button is pressed. 

-Matt

 

-- 
View this message in context: 
http://www.nabble.com/Another-Ajax-back-button-question-tp20843893p20844322.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Another Ajax back button question

2008-12-04 Thread Matt Welch

I'm sure this has been asked and answered but after searching the list, I'm
still not sure if there is something I can do to fix my situation. 

The general gist is this:

1) I make some changes to a page with ajax calls (i.e. replace panel
contents)
2) Click a link to take me away from that page
3) Use browser back button to return to previous page
4) Original page is in the state that it was BEFORE the changes made with
the ajax calls.

Maybe this is a, "Well, duh.. of course it is. That's just the way it works"
moment, but I could have sworn I've seen this work differently in other
wicket examples and apps I've worked on. 

Any tips?

-Matt

-- 
View this message in context: 
http://www.nabble.com/Another-Ajax-back-button-question-tp20843893p20843893.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: @SpringBean vs @Configurable

2008-07-21 Thread Matt Welch

Thank you. That makes sense to me now. It was a slow brain day day for me I
guess. :)

Matt



igor.vaynberg wrote:
> 
> class usersdataprovider implements dataprovider {
>   final userservice svc;
>   public int size() { return svc.size(); }
> }
> 
> @configurable class userspage extends webpage {
>   private userservce svc;
>public userspage() {
>  add(new dataview("users", new dataprovider(svc)));
> }
> 
> this takes a reference of injected userservice svc and passes it to
> the dataprovider. now dataprovider has a hard reference to the service
> and is no longer serializable.
> 
> if you use a @springbean generated proxy, this would still work fine.
> 
> -igor
> 
> On Mon, Jul 21, 2008 at 1:50 PM, Matt Welch <[EMAIL PROTECTED]> wrote:
>>
>>
>> igor.vaynberg wrote:
>>>
>>> you have to be careful not to pass references to injected beans to
>>> other objects. other than that i think you should be fine.
>>>
>> I know I should understand that, but my brain doesn't want to parse that
>> sentence for some reason.
>>
>> references to injected beans - What does that mean? The domain object is
>> an
>> injected bean (if it was annotated with @Configurable) and a reference to
>> it
>> would presumably be passed to the Wicket component so that the that
>> component could process it. Are you saying that this should be avoided?
>>
>> other objects - Can you maybe give an example of the "other objects" you
>> have in mind?
>>
>> Matt
>>
>> --
>> View this message in context:
>> http://www.nabble.com/%40SpringBean-vs-%40Configurable-tp18572291p18577287.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/%40SpringBean-vs-%40Configurable-tp18572291p18579719.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: @SpringBean vs @Configurable

2008-07-21 Thread Matt Welch


igor.vaynberg wrote:
> 
> you have to be careful not to pass references to injected beans to
> other objects. other than that i think you should be fine.
> 
I know I should understand that, but my brain doesn't want to parse that
sentence for some reason. 

references to injected beans - What does that mean? The domain object is an
injected bean (if it was annotated with @Configurable) and a reference to it
would presumably be passed to the Wicket component so that the that
component could process it. Are you saying that this should be avoided?

other objects - Can you maybe give an example of the "other objects" you
have in mind?

Matt

-- 
View this message in context: 
http://www.nabble.com/%40SpringBean-vs-%40Configurable-tp18572291p18577287.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Converting tag names in a Panel

2008-03-11 Thread Matt Jensen


Oops, looks like Wicket might not be the culprit...

Matt Jensen wrote:


Hopefully this is an easy one.  Why does Wicket convert this:



...into this:



...and how do I make it stop doing that?  The key part here is the 
conversion of "fb:tab-item" into "fb:tab_item".


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





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



Converting tag names in a Panel

2008-03-11 Thread Matt Jensen


Hopefully this is an easy one.  Why does Wicket convert this:



...into this:



...and how do I make it stop doing that?  The key part here is the 
conversion of "fb:tab-item" into "fb:tab_item".


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



  1   2   >