Re: log4j MDC IRequestLogger

2016-02-18 Thread Francois Meillet
I ended up with a custom RequestCycle

@Override
public boolean processRequestAndDetach() {

boolean result;
try {
result = processRequest();
} finally {
detach();
}

popMDC();

return result;
}

@Override
protected void onBeginRequest()
{
pushMDC();
}


François 








Le 18 févr. 2016 à 08:17, Martin Grigorov <mgrigo...@apache.org> a écrit :

> Hi Francois,
> 
> You can create a custom RequestLogger that just calls
> super.performLogging() and pops the context.
> Setup it with org.apache.wicket.Application#newRequestLogger()
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
> On Wed, Feb 17, 2016 at 2:34 PM, Francois Meillet <
> francois.meil...@gmail.com> wrote:
> 
>> Dear All,
>> 
>> I use the Mapped Diagnostic Context concept
>> https://logging.apache.org/log4j/2.x/manual/thread-context.html).
>> 
>> Using log4j 2.x and a specific AbstractRequestCycleListener,
>> I overrided onBeginRequest() to perform a ThreadContext.push(id)
>> and onDetach(RequestCycle cycle) to perform a ThreadContext.pop();.
>> 
>> So far so good for all the logs but the IRequestLogger's logs.
>> 
>> I notice that the IRequestLogger # performLogging() is called after the
>> RequestCycle # onDetach() has been called.
>> 
>> I would like it to happen before !
>> Is that possible ?
>> 
>> 
>> François
>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 



Re: log4j MDC IRequestLogger

2016-02-17 Thread Francois Meillet
Thanks Marios and Martin,

François 








Le 18 févr. 2016 à 08:17, Martin Grigorov <mgrigo...@apache.org> a écrit :

> Hi Francois,
> 
> You can create a custom RequestLogger that just calls
> super.performLogging() and pops the context.
> Setup it with org.apache.wicket.Application#newRequestLogger()
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
> On Wed, Feb 17, 2016 at 2:34 PM, Francois Meillet <
> francois.meil...@gmail.com> wrote:
> 
>> Dear All,
>> 
>> I use the Mapped Diagnostic Context concept
>> https://logging.apache.org/log4j/2.x/manual/thread-context.html).
>> 
>> Using log4j 2.x and a specific AbstractRequestCycleListener,
>> I overrided onBeginRequest() to perform a ThreadContext.push(id)
>> and onDetach(RequestCycle cycle) to perform a ThreadContext.pop();.
>> 
>> So far so good for all the logs but the IRequestLogger's logs.
>> 
>> I notice that the IRequestLogger # performLogging() is called after the
>> RequestCycle # onDetach() has been called.
>> 
>> I would like it to happen before !
>> Is that possible ?
>> 
>> 
>> François
>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 



log4j MDC IRequestLogger

2016-02-17 Thread Francois Meillet
Dear All,

I use the Mapped Diagnostic Context concept 
https://logging.apache.org/log4j/2.x/manual/thread-context.html).

Using log4j 2.x and a specific AbstractRequestCycleListener, 
I overrided onBeginRequest() to perform a ThreadContext.push(id) 
and onDetach(RequestCycle cycle) to perform a ThreadContext.pop();.

So far so good for all the logs but the IRequestLogger's logs.

I notice that the IRequestLogger # performLogging() is called after the 
RequestCycle # onDetach() has been called.

I would like it to happen before !
Is that possible ? 


François 



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



Re: Wicket need Votes! :-)

2016-02-16 Thread Francois Meillet
+1

François









Le 16 févr. 2016 à 14:06, andrea del bene  a écrit :

> 
> 
> No need to say it :)
>> Done too!
>> 
>> On Tue, Feb 16, 2016 at 1:25 PM, Thomas Jarnot  wrote:
>> 
>>> Am 16.02.2016 10:10, schrieb Tobias Soloschenko:
>>> 
 Hi all,
 
 take some minutes and vote for Apache Wicket! :-)
 
 (German)
 
 
 https://jaxenter.de/jaxenter-umfrage-diese-web-frameworks-liegen-2016-im-fokus-34892
 
 (English)
 
 https://jaxenter.de/survey-32999
 
 The survey is in english.
 
>>> done ;-)
>>> 
>>> 
>>> 
>>> -
>>> 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



https://twitter.com/apache_wicket after 10 months

2016-02-05 Thread Francois Meillet
Dear All,

https://twitter.com/apache_wicket after 10 months :

50 tweets posted about technical articles
50 tweets posted about src example lib 
500 tweets posted about websites based on Apache Wicket

Stay tuned, follow @apache_wicket on Twitter ! 
https://twitter.com/apache_wicket 


François





Re: WicketStuff status and future; awesome-wicket project

2016-02-04 Thread Francois Meillet
Hi Ilya,

I just use google ! 

François 








Le 4 févr. 2016 à 01:28, Илья Нарыжный <phan...@ydn.ru> a écrit :

> François,
> 
> Thanks for the list! Just few questions/comments:
> 
> 1) How did you collect that lists? Probably I can dig more by that way.
> 2) Regarding solutions: I don't want to have in the list sites - under
> solutions I assume just software which can be installed standalone.
> 
> Regards,
> Ilya
> 
> -
> Orienteer(http://orienteer.org) - Modern Data Warehouse for your business.
> 
> 2016-02-02 23:43 GMT-08:00 Francois Meillet <francois.meil...@gmail.com>:
>> Hi Ilya,
>> 
>> 
>> You can add theses products :
>> 
>> 
>> Under Web Frameworks
>> 
>> Apache OODT http://oodt.apache.org
>> Data grid framework for transparent search and discovery of disparate 
>> science resources
>> 
>> Apache Openmeetings http://openmeetings.apache.org
>> Apache Openmeetings provides video conferencing, instant messaging, white 
>> board, collaborative document editing and other groupware tools
>> 
>> Apache Nutch https://nutch.apache.org
>> Apache Nutch is a highly extensible and scalable open source web crawler 
>> software project
>> 
>> Apache Syncope https://syncope.apache.org
>> Apache Syncope is an Open Source system for managing digital identities in 
>> enterprise environments
>> 
>> Dcm4che http://www.dcm4che.org
>> Open Source Clinical Image and Object Management Dcm4che
>> 
>> WebAnno https://webanno.github.io/webanno/
>> WebAnno, general purpose web-based annotation tool for a wide range of 
>> linguistic annotations
>> 
>> 
>> 
>> 
>> Under Solutions
>> 
>> CA http://www.ca.com
>> Identity Governance products
>> 
>> Callfire https://www.callfire.com
>> Phone Numbers, Voice Broadcasting & Auto Dialer Software
>> 
>> Cqrollcall http://cqrollcall.com/products-services/cqrc-engage/
>> All-in-one tool to execute advocacy campaigns
>> 
>> Flowzone http://www.flowzone.com
>> The planet's most adaptable project management
>> 
>> GeoServer http://geoserver.org
>> GeoServer is an open source server for sharing geospatial data
>> 
>> Jfrog http://www.jfrog.com
>> Managing Binaries for Maven Repository, Docker, .Net, Ruby and More
>> 
>> Jumio https://www.jumio.com
>> Scan and Validate Credit Cards and IDs
>> 
>> Multicom http://multicom.co.uk
>> Online travel, booking, agent, management software multicom
>> 
>> OpenCRS 
>> http://www.openroadsconsulting.com/intelligent-transportation-systems/products/opencrs/
>> Data Fusion and Condition Reporting Tool OpenCRS
>> 
>> Servoy https://www.servoy.com
>> Business Application Platform for ISVs
>> 
>> Soweroasis http://www.poweroasis.com
>> Energy management solutions
>> 
>> Tentelemed http://www.tentelemed.com
>> Trusted Information systems for health professionals
>> 
>> 
>> 
>> François
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> Le 2 févr. 2016 à 08:26, Tobias Soloschenko 
>> <tobiassolosche...@googlemail.com> a écrit :
>> 
>>> Hi Ilya,
>>> 
>>> In your list the nashorn project is missing - it is a way to allow users to 
>>> execute javascript on server side. I am going to add it to the list of 
>>> submodules, now.
>>> 
>>> Anyway it is up to the community to update the wiki or to bring projects up 
>>> to date and this would be a lot harder if it would not be at a central 
>>> place.
>>> 
>>> kind regards
>>> 
>>> Tobias
>>> 
>>>> Am 31.01.2016 um 23:41 schrieb Илья Нарыжный <phan...@ydn.ru>:
>>>> 
>>>> Thank you, Martin!
>>>> After you reply I understand that significant part of my concerns
>>>> actually related to moving everything under single repository (Core).
>>>> I mean, that migration of a project just to community group will help
>>>> pretty much the same benefits: ability to take over some project after
>>>> loosing of interest from author.
>>>> Btw, I also recommend to establish one more "condition" for moving
>>>> project to wicketstuff: delete source repository or mention that
>>>> project has been moved. I know a couple of projects for which it's
>>>> hard to understand that they were moved and newer versi

Re: WicketStuff status and future; awesome-wicket project

2016-02-02 Thread Francois Meillet
Hi Ilya,


You can add theses products :


Under Web Frameworks

Apache OODT http://oodt.apache.org
Data grid framework for transparent search and discovery of disparate science 
resources

Apache Openmeetings http://openmeetings.apache.org
Apache Openmeetings provides video conferencing, instant messaging, white 
board, collaborative document editing and other groupware tools

Apache Nutch https://nutch.apache.org
Apache Nutch is a highly extensible and scalable open source web crawler 
software project

Apache Syncope https://syncope.apache.org
Apache Syncope is an Open Source system for managing digital identities in 
enterprise environments

Dcm4che http://www.dcm4che.org
Open Source Clinical Image and Object Management Dcm4che

WebAnno https://webanno.github.io/webanno/
WebAnno, general purpose web-based annotation tool for a wide range of 
linguistic annotations




Under Solutions

CA http://www.ca.com
Identity Governance products

Callfire https://www.callfire.com
Phone Numbers, Voice Broadcasting & Auto Dialer Software

Cqrollcall http://cqrollcall.com/products-services/cqrc-engage/
All-in-one tool to execute advocacy campaigns

Flowzone http://www.flowzone.com
The planet's most adaptable project management

GeoServer http://geoserver.org
GeoServer is an open source server for sharing geospatial data

Jfrog http://www.jfrog.com
Managing Binaries for Maven Repository, Docker, .Net, Ruby and More

Jumio https://www.jumio.com
Scan and Validate Credit Cards and IDs

Multicom http://multicom.co.uk
Online travel, booking, agent, management software multicom

OpenCRS 
http://www.openroadsconsulting.com/intelligent-transportation-systems/products/opencrs/
Data Fusion and Condition Reporting Tool OpenCRS

Servoy https://www.servoy.com
Business Application Platform for ISVs

Soweroasis http://www.poweroasis.com
Energy management solutions

Tentelemed http://www.tentelemed.com
Trusted Information systems for health professionals



François











Le 2 févr. 2016 à 08:26, Tobias Soloschenko  
a écrit :

> Hi Ilya,
> 
> In your list the nashorn project is missing - it is a way to allow users to 
> execute javascript on server side. I am going to add it to the list of 
> submodules, now.
> 
> Anyway it is up to the community to update the wiki or to bring projects up 
> to date and this would be a lot harder if it would not be at a central place.
> 
> kind regards
> 
> Tobias
> 
>> Am 31.01.2016 um 23:41 schrieb Илья Нарыжный :
>> 
>> Thank you, Martin!
>> After you reply I understand that significant part of my concerns
>> actually related to moving everything under single repository (Core).
>> I mean, that migration of a project just to community group will help
>> pretty much the same benefits: ability to take over some project after
>> loosing of interest from author.
>> Btw, I also recommend to establish one more "condition" for moving
>> project to wicketstuff: delete source repository or mention that
>> project has been moved. I know a couple of projects for which it's
>> hard to understand that they were moved and newer version can be found
>> in wicketstuff.
>> Also, as I can see, not all good projects have wiki page or README.md
>> well prepared...
>> 
>> Regards,
>> 
>> Ilya
>> -
>> Orienteer(http://orienteer.org) - Modern Data Warehouse for your business.
>> 
>> 2016-01-31 12:45 GMT-08:00 Martin Grigorov :
>>> Hi,
>>> 
>>> 
 On Sun, Jan 31, 2016 at 1:38 AM, Илья Нарыжный  wrote:
 
 Guys,
 
 Please help me understand what's status of wicketstuff project and
 what's a roadmap for the future?
 
 I'm asking, because from community stand point I don't see so much pros.
 
 Pros:
 
 1) It's easy to have all wicket related projects in place and observe at
 once.
 
 But this pros can be easily done by creating a library of links to all
 wicket related project. What else do you have in mind?
>>> 
>>> The biggest pros is that WicketStuff is already known to the community.
>>> Whenever someone needs some Wicket integration I guess Google's first
>>> recommendation would be WicketStuff.
>>> 
>>> 
 
 List of cons is longer:
 
 1) It's hard to manage issues baceuse there are multiple projects and
 multiple authors.
>>> 
>>> By "donating" a project to WicketStuff authors hope that other people will
>>> also use it and improve it,
>>> i.e. implement new features and fix bugs.
>>> Every author of a WicketStuff module is a member of the Collaborators team
>>> and thus is notified whenever
>>> there is a issue report for any project. I personally have fixed several
>>> issues for projects which I either use or I care about.
>>> There are other people doing this too.
>>> 
>>> 
 2) It's expected that versions of wicketstuff projects are in sync
 with wicket version. But in reality, as I can see, 

Re: model does not get updated when radio is clicked - radiogroup with AjaxFormChoiceComponentUpdatingBehavior

2016-01-14 Thread Francois Meillet
Hi Martin it's work.

Thanks

François 








Le 14 janv. 2016 à 23:30, Martin Grigorov <mgrigo...@apache.org> a écrit :

> @Francois: Please try with latest 7.2.0-SNAPSHOT
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
> On Thu, Jan 14, 2016 at 10:59 PM, Francois Meillet <
> francois.meil...@gmail.com> wrote:
> 
>> Thnaks I override updateAjaxAttributes for the time being
>> François
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> Le 14 janv. 2016 à 22:16, Martin Grigorov <mgrigo...@apache.org> a écrit :
>> 
>>> On Thu, Jan 14, 2016 at 9:54 PM, Sven Meier <s...@meiers.net> wrote:
>>> 
>>>> Hi Francois,
>>>> 
>>>> you'll have to add the following to the
>>>> AjaxFormChoiceComponentUpdatingBehavior:
>>>> 
>>>>   @Override
>>>>   protected void updateAjaxAttributes(AjaxRequestAttributes
>>>> attributes)
>>>>   {
>>>>   super.updateAjaxAttributes(attributes);
>>>> 
>>>>   attributes.setSerializeRecursively(true);
>>>>   }
>>>> 
>>>> This may be a problem leftover from WICKET-6050.
>>>> 
>>>> @Marting: Shouldn't this be set automatically by
>>>> AjaxFormChoiceComponentUpdatingBehavior?
>>>> 
>>> 
>>> Yes!
>>> I've forgot it :-/
>>> 
>>> I've found an issue with the traversing of children components in
>>> 7.2.0-SNAPSHOT.
>>> Both issues look like a blocker to me.
>>> 
>>> 
>>>> 
>>>> Best regards
>>>> Sven
>>>> 
>>>> 
>>>> 
>>>> 
>>>> On 14.01.2016 17:18, Francois Meillet wrote:
>>>> 
>>>>> Hi ,
>>>>> 
>>>>> I have a form with a radiogroup containing some radios buttons.
>>>>> The radiogroup has an AjaxFormChoiceComponentUpdatingBehavior.
>>>>> 
>>>>> When any radio button is clicked, the model does not get updated.
>>>>> 
>>>>> In the FormComponent # getInputAsArray()
>>>>> getRequest().getRequestParameters().getParameterValues(getInputName())
>>>>> return null
>>>>> 
>>>>> So the FormComponent convertedInput is null
>>>>> 
>>>>> Do I miss something ?
>>>>> 
>>>>> 
>>>>> François
>> 
>> 



Re: model does not get updated when radio is clicked - radiogroup with AjaxFormChoiceComponentUpdatingBehavior

2016-01-14 Thread Francois Meillet
Thnaks I override updateAjaxAttributes for the time being
François 








Le 14 janv. 2016 à 22:16, Martin Grigorov <mgrigo...@apache.org> a écrit :

> On Thu, Jan 14, 2016 at 9:54 PM, Sven Meier <s...@meiers.net> wrote:
> 
>> Hi Francois,
>> 
>> you'll have to add the following to the
>> AjaxFormChoiceComponentUpdatingBehavior:
>> 
>>@Override
>>protected void updateAjaxAttributes(AjaxRequestAttributes
>> attributes)
>>{
>>super.updateAjaxAttributes(attributes);
>> 
>>attributes.setSerializeRecursively(true);
>>}
>> 
>> This may be a problem leftover from WICKET-6050.
>> 
>> @Marting: Shouldn't this be set automatically by
>> AjaxFormChoiceComponentUpdatingBehavior?
>> 
> 
> Yes!
> I've forgot it :-/
> 
> I've found an issue with the traversing of children components in
> 7.2.0-SNAPSHOT.
> Both issues look like a blocker to me.
> 
> 
>> 
>> Best regards
>> Sven
>> 
>> 
>> 
>> 
>> On 14.01.2016 17:18, Francois Meillet wrote:
>> 
>>> Hi ,
>>> 
>>> I have a form with a radiogroup containing some radios buttons.
>>> The radiogroup has an AjaxFormChoiceComponentUpdatingBehavior.
>>> 
>>> When any radio button is clicked, the model does not get updated.
>>> 
>>> In the FormComponent # getInputAsArray()
>>> getRequest().getRequestParameters().getParameterValues(getInputName())
>>> return null
>>> 
>>> So the FormComponent convertedInput is null
>>> 
>>> Do I miss something ?
>>> 
>>> 
>>> François



Re: Wicket 7 - OutOfMemory PermGen

2015-11-18 Thread Francois Meillet
t with entered
> FFL#, please search again with different FFL#.");
>target.add(form);
>} else {
>if
> (abcConstants.UPDATE_SCREEN.equals(callingFromWhichScreen)) {
>PageParameters pageParameters = new
> PageParameters();
> 
>pageParameters.set("abcUser", abcUser);
> 
>DealerDetails dealerDetails = new
> DealerDetails();
> 
> dealerDetails.setFflNumber(abcUser.getFflNumber());
> 
> dealerDetails.setDealerNumber(abcUser.getDealerNumber());
>((AppSession)
> getSession()).setDealerDetails(dealerDetails);
> 
>setResponsePage(new ManageDealerPage(abcUser));
> 
>} else if
> (abcConstants.SEARCH_SCREEN.equals(callingFromWhichScreen)) {
>setResponsePage(new
> DealerInformationPage(abcUser));
>}
>}
> 
>} catch (abcException abcException) {
>if
> (abcException.getMessage().contains(abcErrConstant.INVALID_INPUT) ||
> abcException.getMessage().contains(abcErrConstant.NONNUMERIC_INPUT)) {
>sbpanel.saveError(this, new abcException("Invalid
> Dealer ID entered. Only numbers are allowed."));
>} else {
>sbpanel.saveError(this, new abcException("Error
> when searching Dealer. Make sure you have entered valid dealer Id."));
>}
>}
>}
> 
>@Override
>protected void onError(AjaxRequestTarget target, Form form) {
>super.onError(target, form);
>target.add(searchForm);
>target.add(sbpanel);
>}
> 
>};
>searchSubmitButton.setMarkupId("searchBtn");
>searchForm.setDefaultButton(searchSubmitButton);
>searchForm.add(searchSubmitButton);
> 
>//Reset Button
>searchForm.add(new AjaxButton("searchClear") {
>    private static final long serialVersionUID = 1L;
> 
>@Override
>protected void onSubmit(AjaxRequestTarget target, Form form)
> {
>sbpanel.saveState();
> 
>PageParameters pageParameters = new PageParameters();
>pageParameters.set(abcConstants.PARAM_CALLING_SCREEN,
> callingFromWhichScreen);
> 
>AbcUserSearchTO AbcUserSearchTO =
> searchForm.getModelObject();
>AbcUserSearchTO.setSearchName("");
> 
>setResponsePage(new SearchDealerPage(pageParameters));
>}
>}.setDefaultFormProcessing(false).setMarkupId("srchClearBtn"));
>}
> }
> 
> On Wed, Nov 18, 2015 at 11:28 AM, Francois Meillet <
> francois.meil...@gmail.com> wrote:
> 
>> Could you show us the SearchDealerPage code
>> 
>> François
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> Le 18 nov. 2015 à 17:25, Mihir Chhaya <mihir.chh...@gmail.com> a écrit :
>> 
>>> Hello,
>>> 
>>> I am using Wicket 7 + Spring 4.x + Hibernate 4.x (recently migrated from
>>> Wicket 1.4).
>>> 
>>> Since deployment of the app on JBOSS, the application is crashing with
>>> OutOfMemory error for PermGen. We are at the point of rolling back to 1.4
>>> as application was working fine without such issue; doesn't necessarily
>>> mean Wicket 7 is an issue. There is OutOfMemory error reported with
>>> Wicket+Spring for Wicket 6.20, but the issue status shows fixed.
>>> 
>>> JBOSS application server PermGen is 512MB, so doesn't seem that be an
>> issue.
>>> 
>>> Here is the stacktrace (First and Second). Second seems to be the result
>> of
>>> First one.
>>> 
>>> Could anybody shade some light? I ran with some load on my local (tomcat
>> as
>>> well as on JBOSS) and monitored using VisualVM. PermGen is remaining
>>> between 20 and 100 MB.
>>> 
>>> 
>>> First
>>> =
>>> 16:29:19,808 ERROR
>>> 
>> [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/fes].[default]]
>>> (http-/162.143.93.98:8543-34) JBWEB000236: Servlet.service() for servlet
>>> default threw exception: java.lang.OutOfMemoryError: PermGen space
>>> at sun.misc.Unsafe.defineClass(Native Method) [rt.jar:1.7.0_75]
>>> at sun.reflect.ClassDefiner.defineCl

Re: Wicket 7 - OutOfMemory PermGen

2015-11-18 Thread Francois Meillet
Sorry, it's seems that there is a problem when you instanciate the 
SearchDealerPage instance

How you instanciate it ?

François  








Le 18 nov. 2015 à 17:46, Mihir Chhaya <mihir.chh...@gmail.com> a écrit :

> Following are AbcUserSearchTO and AbcUser classes with DomainObject
> implementation.
> 
> public interface DomainObject extends Serializable {
> 
>Long getId();
> }
> 
> public class AbcUserSearchTO implements DomainObject {
> 
> /**
> *
> */
> private static final long serialVersionUID = 1L;
> 
> /* (non-Javadoc)
> * @see gov.fdle.fpp.domain.DomainObject#getId()
> */
> @Override
> public Long getId() {
> return null;
> }
> private String searchName;
> private String searchDealer;
> 
> /**
> * @return the lastName
> */
> public String getSearchName() {
> return searchName;
> }
> 
> /**
> * @param name the lastName to set
> */
> public void setSearchName(String name) {
>if (name == null){
>name = FppConstants.EMPTY_STRING;
>}
> this.searchName = name;
> }
> 
> /**
> * @return the searchDealer
> */
> public String getSearchDealer() {
> return searchDealer;
> }
> 
> /**
> * @param searchDealer the searchDealer to set
> */
> public void setSearchDealer(String searchDealer) {
> this.searchDealer = searchDealer;
> }
> }
> 
> 
> public class AbcUser implements DomainObject {
> 
> private static final long serialVersionUID = 1L;
> public Long getId() {
>return null;
>}
> 
> //ASM fields
>private long userNbr;
>private String userName;
>private String password;
>private String firstName;
>private String lastName;
> ...setter
> getter
> 
> }
> 
> On Wed, Nov 18, 2015 at 11:43 AM, Francois Meillet <
> francois.meil...@gmail.com> wrote:
> 
>> and the abcUserSearchTO ?
>> 
>> 
>> François
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> Le 18 nov. 2015 à 17:40, Mihir Chhaya <mihir.chh...@gmail.com> a écrit :
>> 
>>> Here is SearchDealerPage.
>>> 
>>> package gov.xyz.abc.view.asm;
>>> 
>>> import gov.xyz.abc.business.AsmAdminService;
>>> import gov.xyz.abc.common.AppSession;
>>> import gov.xyz.abc.common.AuthenticatedPage;
>>> import gov.xyz.abc.common.DealerDetails;
>>> import gov.xyz.abc.common.abcException;
>>> import gov.xyz.abc.model.abcUser;
>>> import gov.xyz.abc.model.abcUserSearchTO;
>>> import gov.xyz.abc.util.DefaultFocusBehavior;
>>> import gov.xyz.abc.util.abcConstants;
>>> import gov.xyz.abc.util.abcErrConstant;
>>> import gov.xyz.abc.util.abcUtils;
>>> import gov.xyz.wktcommon.components.ErroringTextField;
>>> 
>>> import org.apache.commons.lang3.StringUtils;
>>> import org.apache.wicket.ajax.AjaxRequestTarget;
>>> import org.apache.wicket.ajax.markup.html.form.AjaxButton;
>>> import org.apache.wicket.markup.html.basic.Label;
>>> import org.apache.wicket.markup.html.form.Form;
>>> import org.apache.wicket.model.CompoundPropertyModel;
>>> import org.apache.wicket.model.Model;
>>> import org.apache.wicket.request.mapper.parameter.PageParameters;
>>> import org.apache.wicket.spring.injection.annot.SpringBean;
>>> import org.apache.wicket.validation.validator.StringValidator;
>>> 
>>> 
>>> /**
>>> * Search Dealer Page.
>>> *
>>> * @author Pavankumar Appana
>>> * @since 08/05/2011
>>> */
>>> public class SearchDealerPage extends AuthenticatedPage {
>>> 
>>>   /**
>>>*
>>>*/
>>>   private static final long serialVersionUID = 1L;
>>>   @SpringBean
>>>   private AsmAdminService adminService;
>>>   private AbcUserSearchTO abcUserSearch;
>>>   private AbcUser abcUser = null;
>>> 
>>>   //callingFromWhichScreen flag is to indicate whether this screen is
>>> called for dealer information or dealer update.
>>>   //Set callingFromWhichScreen to "update" for dealer update, "search"
>>> for dealer information while calling.
>>>   public SearchDealerPage(PageParameters pageParameters) {
>>>   final String callingFromWhichScreen =
>>> pageParameters.get(abcConstants.PARAM_CALLING_SCREEN).toString();
>>> 
>>>   abcUserSearch = new abcUserSearchTO();
>>> 
>>>   //Search Form
>>>   final Form searchForm =
>>>   new Form(&qu

Re: Wicket 7 - OutOfMemory PermGen

2015-11-18 Thread Francois Meillet
Could you show us the SearchDealerPage code

François 








Le 18 nov. 2015 à 17:25, Mihir Chhaya  a écrit :

> Hello,
> 
> I am using Wicket 7 + Spring 4.x + Hibernate 4.x (recently migrated from
> Wicket 1.4).
> 
> Since deployment of the app on JBOSS, the application is crashing with
> OutOfMemory error for PermGen. We are at the point of rolling back to 1.4
> as application was working fine without such issue; doesn't necessarily
> mean Wicket 7 is an issue. There is OutOfMemory error reported with
> Wicket+Spring for Wicket 6.20, but the issue status shows fixed.
> 
> JBOSS application server PermGen is 512MB, so doesn't seem that be an issue.
> 
> Here is the stacktrace (First and Second). Second seems to be the result of
> First one.
> 
> Could anybody shade some light? I ran with some load on my local (tomcat as
> well as on JBOSS) and monitored using VisualVM. PermGen is remaining
> between 20 and 100 MB.
> 
> 
> First
> =
> 16:29:19,808 ERROR
> [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/fes].[default]]
> (http-/162.143.93.98:8543-34) JBWEB000236: Servlet.service() for servlet
> default threw exception: java.lang.OutOfMemoryError: PermGen space
> at sun.misc.Unsafe.defineClass(Native Method) [rt.jar:1.7.0_75]
> at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:63)
> [rt.jar:1.7.0_75]
> at
> sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:399)
> [rt.jar:1.7.0_75]
> at
> sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:396)
> [rt.jar:1.7.0_75]
> at java.security.AccessController.doPrivileged(Native Method)
> [rt.jar:1.7.0_75]
> at
> sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:395)
> [rt.jar:1.7.0_75]
> at
> sun.reflect.MethodAccessorGenerator.generateSerializationConstructor(MethodAccessorGenerator.java:113)
> [rt.jar:1.7.0_75]
> at
> sun.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:331)
> [rt.jar:1.7.0_75]
> at
> java.io.ObjectStreamClass.getSerializableConstructor(ObjectStreamClass.java:1376)
> [rt.jar:1.7.0_75]
> at java.io.ObjectStreamClass.access$1500(ObjectStreamClass.java:72)
> [rt.jar:1.7.0_75]
> at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:493)
> [rt.jar:1.7.0_75]
> at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:468)
> [rt.jar:1.7.0_75]
> at java.security.AccessController.doPrivileged(Native Method)
> [rt.jar:1.7.0_75]
> at java.io.ObjectStreamClass.(ObjectStreamClass.java:468)
> [rt.jar:1.7.0_75]
> at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:365)
> [rt.jar:1.7.0_75]
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1133)
> [rt.jar:1.7.0_75]
> at
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
> [rt.jar:1.7.0_75]
> at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
> [rt.jar:1.7.0_75]
> at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
> [rt.jar:1.7.0_75]
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
> [rt.jar:1.7.0_75]
> at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1377)
> [rt.jar:1.7.0_75]
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1173)
> [rt.jar:1.7.0_75]
> at
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
> [rt.jar:1.7.0_75]
> at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
> [rt.jar:1.7.0_75]
> at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
> [rt.jar:1.7.0_75]
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
> [rt.jar:1.7.0_75]
> at
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
> [rt.jar:1.7.0_75]
> at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
> [rt.jar:1.7.0_75]
> at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
> [rt.jar:1.7.0_75]
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
> [rt.jar:1.7.0_75]
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347)
> [rt.jar:1.7.0_75]
> at
> org.apache.wicket.serialize.java.JavaSerializer$SerializationCheckerObjectOutputStream.writeObjectOverride(JavaSerializer.java:260)
> [wicket-core-7.0.0.jar:7.0.0]
> 
> 
> Second:
> ===
> 16:24:22,674 ERROR [org.apache.wicket.DefaultExceptionMapper]
> (http-/162.143.93.97:8543-14) Unexpected error occurred:
> org.apache.wicket.WicketRuntimeException: Can't instantiate page using
> constructor 'public
> gov.xyz.abc.view.asm.SearchDealerPage(org.apache.wicket.request.mapper.parameter.PageParameters)'
> and argument 'callingFromWhichScreen=[search]'. An exception has been
> thrown during construction!
> at
> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:194)
> [wicket-core-7.0.0.jar:7.0.0]
> at
> 

Re: Adding css from my webapp directory

2015-09-17 Thread Francois Meillet
PriorityHeaderItem renders at the beginning of the header
response.render(new PriorityHeaderItem(CssHeaderItem.forReference(CSS)));

François 





Le 17 sept. 2015 à 21:47, Ephraim Rosenfeld  a écrit :

> Hello Team Wicket:
> 
> I have the following situation:
> 
> I have a web application with its own .css files that I add to the markup of 
> my Base page:
> 
>
> 
>
> //etc.
> 
> 
> I one particular page I am using the Wicket framework to dynamically add .css:
> public class MyTheme extend Behavior {
>private static final ResourceReference CSS = new 
> CssResourceReference(MyTheme.class, "themes/mytheme.css");
> 
>@Override
>public void renderHead(Component component, IHeaderResponse 
> response) {
>
> response.render(CssHeaderItem.forReference(CSS));
>}
> 
> }
> 
> The problem is that this dynamic css is overriding my static .css. When I 
> load the page the dynamic .css is referenced lower down in  tag than my 
> static .css  tag.
> 
> To get around this issue I would like to use the same  CssHeaderItem 
> functionality to add the .css file from my 'webapp' directory to override the 
> dynamic .css that I am adding via Java.
> 
> How can I reference a .css file within my 'webapp' directory to add it 
> dynamically via Java to my page?
> 
> Thank you in advance,
> 
> - Ephraim
> 



Re: BeanValidation --> wrong maxlength value in TextField

2015-09-16 Thread Francois Meillet
Hi Martin,

Sorry for the  .
I miss it.

Thanks for your insights.

In the ConstraintIterator's constructor, the set returned by the Hibernate 
validation implementation (Set<ConstraintDescriptor> constraints)
is unordered.

Either by calling
Set<ConstraintDescriptor> constraints = propDesc.findConstraints()
.unorderedAndMatchingGroups(groups)
.getConstraintDescriptors();

or  
BeanDescriptor beanDescriptor = 
validator.getConstraintsForClass(IdentityRegistrationModel.class);
PropertyDescriptor propertyDescriptor = 
beanDescriptor.getConstraintsForProperty(property);
Set<ConstraintDescriptor> constraintDescriptors = 
propertyDescriptor.getConstraintDescriptors();

As there are 2 annotations with the same type (Size) per property, 
@Size.List({
@Size(min=4, message = "{firstName.sizeToSmall}"),
@Size(max=50, message = "{firstName.sizeToBig}")
})
the last call to SizeTagModifier # tag.put() wins and maxlength may be wrong 
(Integer.MAX_VALUE).

The validation itself, when form is submitted, is OK.
Only the maxlenght may be wrong.   
   

One way to fix this problem :

In the ConstraintIterator's constructor, before populating the stack,
an iteration could be made over the 'Set<ConstraintDescriptor> constraints' 
to find ConstraintDescriptor with Annotation's type = Size,
and if there is more than one, the biggest (=Integer.MAX_VALUE) max value 
should be removed.

The other way is to add an AttributeModifier to the textfield, new 
AttributeModifier("maxlength", new Model<>(50))). 
Which I do.

François








Le 15 sept. 2015 à 21:47, Martin Grigorov <mgrigo...@apache.org> a écrit :

> Hi Francois,
> 
> A miracle happened after adding  &  HTML elements to
> PageWithForm.html ;-)
> Without  Wicket logs an ERROR.
> 
> About Integer.MAX_VALUE - a breakpoint
> at org.apache.wicket.bean.validation.SizeTagModifier#modify shows that this
> method is called twice per property. Once with annotation.max() returning
> MAX_VALUE and second time with the set value(50). Maybe there is a bug at
> Hibernate-Validator
> or org.apache.wicket.bean.validation.ConstraintIterator#ConstraintIterator.
> 
> Enjoy!
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
> On Tue, Sep 15, 2015 at 11:00 AM, Francois Meillet <
> francois.meil...@gmail.com> wrote:
> 
>> Hi,
>> 
>> I have a very strange problem !!!
>> 
>> 
>> A form is created using a model object containing validation annotation
>> constraints.
>> 
>> The model object contains 3 properties (a, firstName, lastName) with
>> annotations like this
>> 
>> @Size.List({
>> @Size(min=2, message = "{xxx.sizeToSmall}"),
>> @Size(max=50, message = "{xxx.sizeToBig}")
>> })
>> 
>> xxx.sizeToSmall and xxx.sizeToBig key/value are present in the
>> WicketApplication.utf8.properties file
>> 
>> When the form is rendered, the maxlength value may be wrong.
>> 
>> 
>> Actually the maxlength value is only wrong with the property 'firstName'
>> 
>> with the following html
>> 
>> 
>> 
>> but with
>> 
>> the value will be ok
>> 
>> This only happens with this 'firstName' property !!!
>> 
>> 
>> Environment:
>> ---
>> Wicket 7.0.0
>> validation implementation : hibernate-validator
>> OSX & jdk 1.8
>> 
>> 
>> here is the quickstart
>> 
>> Thanks for yours suggestions
>> 
>> François
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 



Re: error from WebPage # reportMissingHead

2015-07-23 Thread Francois Meillet
Thanks Sven

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


François 








Le 23 juil. 2015 à 22:44, Sven Meier s...@meiers.net a écrit :

 Hi,
 
 you're SkeletonPage is interrupting its normal page rendering 
 (#onInitialize() being triggered late from WebPageRenderer).
 Thus in WebPage#validateHeaders() the page doesn't find its 
 HtmlHeaderContainer, which it expects to exists already if rendering 
 succeeded successfully.
 
 So a) the error message is misleading and b) we may be able to improve this 
 (e.g. checking #hasBeenRendered() before validating the headers).
 Please create a Jira issue for this.
 
 For now you could just override #onConfigure() instead of #onInitialize().
 
 Have fun
 Sven
 
 
 On 23.07.2015 18:45, Francois Meillet wrote:
 Hi Wicketers,
 
 Use case :
 ---
 on 'PageWithForm', after having filled the form, the user press a submit 
 button.
 A cookie has to be updated.
 To trigger the update, a session attribute is set to false.
 
 Then the user is redirected to a page : setResponsePage( new ResultPage() )
 ResultPage extends Skeleton
 
 In the Skeleton page, if the session attribute is set to false, the cookie 
 is updated.
 Then a NonResettingRestartException is thrown.
 
 
 Problem:
 ---
 When I throw a NonResettingRestartException() in a page where I also 
 override renderHead()
 I get an error from WebPage # reportMissingHead
 
 You probably forgot to add a body or head tag to your markup since no 
 Header Container was
 found but components were found which want to write to the head section.
 script type=text/javascript 
 src=./resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-1.11.3-ver-1435772778000.js/script
 link rel=canonical 
 href=https://localhost:8443/wicket/bookmarkable/com.quickstart.PageWithForm;
  /
 
 but body and head tags are presents.
 
 Environment:
 ---
 WIcket 7.0.0-M6
 
 
 Do you have any idea why ?
 Thanks
 
 
 François
 
 
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



Re: New Wicket Website

2015-07-11 Thread Francois Meillet
Thanks for this superb website !!!

François 




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

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



Re: problem submitting a form twice - quickstart joined

2015-07-03 Thread Francois Meillet
1000 thanks !

François 








Le 3 juil. 2015 à 09:47, Sven Meier s...@meiers.net a écrit :

 Hi,
 
 forms are not allowed to be direct children of tr:
 
tr
form wicket:id=form
 td
 
http://stackoverflow.com/questions/5967564/form-inside-a-table
 
 After the first ajax request the browser will reshuffle the dom elements, so 
 that the form is no longer the parent of the input field:
 
tr
form 
 action=./?9-1.IFormSubmitListener-AddItemPanelEdit-form method=post 
 id=form25 wicket:id=form/form
 
td
input type=checkbox id=onOff28 name=onOff 
 checked=checked wicket:id=onOff
 
/td
/tr
 
 Have fun
 Sven
 
 
 On 03.07.2015 00:23, Francois Meillet wrote:
 Wicket version is 7.0.M6
 
 
 Le 2 juil. 2015 à 23:47, Francois Meillet francois.meil...@gmail.com a 
 écrit :
 
 Description
 -
 In the quickstart, the HomePage contains a form.
 
 The form's model is a CompoundPropertyModel(new 
 QuestionUnit(Boolean.TRUE));
 The QuestionUnit class has 2 properties, one is mandatory (string 
 'question').
 Properties use validation annotations.
 
 The validation is done with javax.validation.Validator,
 so a call to BeanValidationConfiguration().configure(this) is done in the 
 application init.
 
 The form contains 2 formcomponents (1 TextField 'question' mandatory and 1 
 CheckBox 'onoff' ) + 1 FeedbackLabel (extends Label).
 If an error occurs when the form is submitted, a call from within the 
 AjaxButton's onError method
 to the FormFieldEnlighter helper class is done.
 
 The FormFieldEnlighter updates the FeedbackLabel's model's value,
 and add an AttributeModifier to the TextField to modify the 'title' 
 attribute.
 Then the textfield and the feedbackLabel are resent via ajax.
 
 When this form is submitted, for the first time, with nothing typed, an 
 error occurs.
 Which is normal.
 The FeedbackLabel displays an error message.
 
 If some characters are typed in the textfield and the form submitted again,
 the textfield is still invalid.
 Which is the problem.
 
 But if, at the first submit with the error, the helper class 
 FormFieldEnlighter does not resent the invalid textfield,
 the second submit works correctly, the form is valid and the ResultPage is 
 displayed.
 
 
 
 What I have found
 -
 Looking at FormComponent - line 755
 ListStringValue list = 
 getRequest().getRequestParameters().getParameterValues(getInputName());
 list is null
 The textfield id is not in the parameters name.
 
 
 
 environnement
 -
 mac osx / jdk 8 / safari  firefox
 
 
 Thanks for your help
 François
 
 
 quickstart.zip
 
 -
 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: problem submitting a form twice - quickstart joined

2015-07-02 Thread Francois Meillet
Wicket version is 7.0.M6


Le 2 juil. 2015 à 23:47, Francois Meillet francois.meil...@gmail.com a écrit :

 Description
 -
 In the quickstart, the HomePage contains a form.
 
 The form's model is a CompoundPropertyModel(new QuestionUnit(Boolean.TRUE));
 The QuestionUnit class has 2 properties, one is mandatory (string 'question').
 Properties use validation annotations.
 
 The validation is done with javax.validation.Validator, 
 so a call to BeanValidationConfiguration().configure(this) is done in the 
 application init.
 
 The form contains 2 formcomponents (1 TextField 'question' mandatory and 1 
 CheckBox 'onoff' ) + 1 FeedbackLabel (extends Label).
 If an error occurs when the form is submitted, a call from within the 
 AjaxButton's onError method 
 to the FormFieldEnlighter helper class is done.
 
 The FormFieldEnlighter updates the FeedbackLabel's model's value,
 and add an AttributeModifier to the TextField to modify the 'title' attribute.
 Then the textfield and the feedbackLabel are resent via ajax.
 
 When this form is submitted, for the first time, with nothing typed, an error 
 occurs.
 Which is normal.
 The FeedbackLabel displays an error message.
 
 If some characters are typed in the textfield and the form submitted again,
 the textfield is still invalid.
 Which is the problem.
 
 But if, at the first submit with the error, the helper class 
 FormFieldEnlighter does not resent the invalid textfield, 
 the second submit works correctly, the form is valid and the ResultPage is 
 displayed.
 
 
 
 What I have found
 -
 Looking at FormComponent - line 755 
 ListStringValue list = 
 getRequest().getRequestParameters().getParameterValues(getInputName());
 list is null
 The textfield id is not in the parameters name.
 
 
 
 environnement
 -
 mac osx / jdk 8 / safari  firefox
 
 
 Thanks for your help
 François
 
 
 quickstart.zip


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



Re: Wicket page serialization what causes delay?

2015-07-01 Thread Francois Meillet
There is very little chance that the problem come from the serialization.

Do you use the Open Session in View pattern ? with some OpensessionInViewFilter 
filter ?
I guess when the page is serialized, some requests are done against the 
database 
to load collections or initialize proxies that have been touched. (look at your 
lazy entities relations)

If not you should use the famous LoadableDetachableModel
see http://ci.apache.org/projects/wicket/guide/7.x/guide/modelsforms.html

François






Le 1 juil. 2015 à 11:51, Jagan Josyula jagan.josy...@infotech-enterprises.com 
a écrit :

 Dear All,
 I have a wicket page in which I have master-detail table on click of master 
 table row the child table displays the information. I have a lot of delay to 
 display the child information, when I check the log I found that the reason 
 for this is page serialization, if I remove the page serialization then the 
 display was very fast.
 Could you please let me know what will cause delay during serialization of 
 the page?
 [Page.java : 871] - ending request for page [Page class = XX, id 
 = 2, render count = 1], request 
 org.apache.wicket.protocol.http.servlet.ServletWebRequest@d91ac0mailto:org.apache.wicket.protocol.http.servlet.ServletWebRequest@d91ac0
 [Wicket-PageSavingThread] DEBUG AsynchronousDataStore$PageSavingRunnable 
 [AsynchronousDataStore.java : 354] - Saving asynchronously: Entry 
 [sessionId=29CC3779D18B34D21704ED659326E51F, pageId=2]...
 [Wicket-PageSavingThread] DEBUG DiskDataStore [DiskDataStore.java : 186] - 
 Storing data for page with id '2' in session with id 
 '29CC3779D18B34D21704ED659326E51F'
 [http-bio-8080-exec-1] DEBUG PageAccessSynchronizer 
 [PageAccessSynchronizer.java : 195] - 'http-bio-8080-exec-1' released lock 
 to page with id '2'
 [http-bio-8080-exec-1] DEBUG PageAccessSynchronizer 
 [PageAccessSynchronizer.java : 346] - 'http-bio-8080-exec-1' notifying 
 blocked threads
 
 Thanks  Regards
 
 Jagan
 
 
 From: Martin Grigorov 
 Sent: Wednesday, July 01, 2015 2:42 PM
 To: Jagan Josyula
 Cc: priv...@wicket.apache.org
 Subject: Re: Wicket page serialization what causes delay?
 
 Hi,
 
 Please use users@ mailing list.
 There is no sensitive information in your email.
 
 Martin Grigorov
 Freelancer. Available for hire!
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov
 
 On Wed, Jul 1, 2015 at 11:57 AM, Jagan Josyula 
 jagan.josy...@infotech-enterprises.commailto:jagan.josy...@infotech-enterprises.com
  wrote:
 Dear Martin,
 
 I have a wicket page in which I have master-detail table on click of master 
 table row the child table displays the information. I have a lot of delay to 
 display the child information, when I check the log I found that the reason 
 for this is page serialization, if I remove the page serialization then the 
 display was very fast.
 Could you please let me know what will cause delay in order to serialize the 
 page?
 
 [Page.java : 871] - ending request for page [Page class = XX, id 
 = 2, render count = 1], request 
 org.apache.wicket.protocol.http.servlet.ServletWebRequest@d91ac0mailto:org.apache.wicket.protocol.http.servlet.ServletWebRequest@d91ac0
 [Wicket-PageSavingThread] DEBUG AsynchronousDataStore$PageSavingRunnable 
 [AsynchronousDataStore.java : 354] - Saving asynchronously: Entry 
 [sessionId=29CC3779D18B34D21704ED659326E51F, pageId=2]...
 [Wicket-PageSavingThread] DEBUG DiskDataStore [DiskDataStore.java : 186] - 
 Storing data for page with id '2' in session with id 
 '29CC3779D18B34D21704ED659326E51F'
 [http-bio-8080-exec-1] DEBUG PageAccessSynchronizer 
 [PageAccessSynchronizer.java : 195] - 'http-bio-8080-exec-1' released lock 
 to page with id '2'
 [http-bio-8080-exec-1] DEBUG PageAccessSynchronizer 
 [PageAccessSynchronizer.java : 346] - 'http-bio-8080-exec-1' notifying 
 blocked threads
 
 
 Thanks  Regards
 
 Jagan
 
 
 
 DISCLAIMER:
 
 This email may contain confidential information and is intended only for the 
 use of the specific individual(s) to which it is addressed. If you are not 
 the intended recipient of this email, you are hereby notified that any 
 unauthorized use, dissemination or copying of this email or the information 
 contained in it or attached to it is strictly prohibited. If you received 
 this message in error, please immediately notify the sender at Cyient and 
 delete the original message.
 



Re: Graphing Framework for Wicket

2015-06-02 Thread Francois Meillet
You have also Wicket-chartjs that combines Apache Wicket and Chart.js
free for all private AND commercial projects (Apache Licence v2).

https://twitter.com/apache_wicket/status/591569565760561153


François Meillet








Le 2 juin 2015 à 10:38, Johannes Renoth johannes.ren...@gmx.de a écrit :

 Please be aware that wicked-charts uses highcharts to do the actual
 plotting. Highcharts is not free for commercial use and requires a
 license (see http://shop.highsoft.com/highcharts.html).
 
 
 On 06/01/2015 05:47 PM, Mihir Chhaya wrote:
 One correction; it is called Wicked Charts (
 http://wicked-charts.appspot.com/)
 
 
 
 On Mon, Jun 1, 2015 at 11:46 AM, Mihir Chhaya mihir.chh...@gmail.com
 wrote:
 
 Hi Lois,
 
 Not aware of current status but, you might want to look at wicket charts.
 
 Thanks,
 -Mihir.
 
 On Mon, Jun 1, 2015 at 11:08 AM, Sebastien seb...@gmail.com wrote:
 
 Hi Lois,
 
 I am not aware of this... But I'm interested to the answer :)
 I was looking for a nice js graph, based on jQuery possibly and found that
 best matches my requirement: vis.js, arbor.js  cytoscape.js
 
 arbor.js is highly deprecated,
 cytoscape.js is good and jQuery oriented, but requires additional
 libraries
 depending on what type of graph we want to display,
 so I'll probably go for vis.js (ASFv2 licensed) because it is really
 simple
 to use and it just works! :)
 
 I am already busy with some other wicket integrations so I don't know
 (now)
 if I will make it a public project... But if someone would like to dig
 into
 a wicket-vis project, and maintain it, I will be glad to help... In the
 meantime, will I try to publish a showcase in a week or two...
 
 Best regards,
 Sebastien
 
 
 On Mon, Jun 1, 2015 at 4:29 PM, Lois GreeneHernandez 
 lgreenehernan...@knoa.com wrote:
 
 Hi Martin,
 
 I looking for a framework or a set of classes that will allow me to
 create
 graphs.
 
 Thanks
 
 Lois
 
 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Monday, June 01, 2015 9:40 AM
 To: users@wicket.apache.org
 Subject: Re: Graphing Framework for Wicket
 
 Hi,
 
 Please give us more details.
 Do you mean graphics or graphs?
 
 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov
 
 On Mon, Jun 1, 2015 at 4:27 PM, Lois GreeneHernandez 
 lgreenehernan...@knoa.com wrote:
 
 Hi All,
 
 I need some recommendations on a graphing framework for wicket.
 
 Thanks
 
 Lois
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



Re: Stateful panel.

2015-05-26 Thread Francois Meillet
One way of doing this : 


1) go to your detail page
add( new LinkVoid(detail) {

@Override
public void onClick() {
setResponsePage(new YourPage(getPage().getPageReference()));
}
});

public YourPage(PageReference pageReference) {
this.pageReference = pageReference;
}

2) back to the list
add( new LinkVoid(list) {

@Override
public void onClick() {
setResponsePage(pageReference.getPage());
}
});


François Meillet



Le 26 mai 2015 à 09:46, Vignesh Palanisamy vign...@mcruncher.com a écrit :

 Hi,
 
  I need some help/ideas on list and search state in panel. I have two 
 panels in a page, one for searching, i.e., which produces a list of items in 
 a datatable which has paging. All this works well. Now, if I change 
 pagination links and then select one of the items in the list, it'll take me 
 to a details panel of that item. How can I remember (store) the state of the 
 previous list, so when I click a back link/button in the details panel, I 
 return to the list panel where the list will have the same state as when 
 I left it?
 
 Note: I am using the event for replacing the panel in the page.
 
 I had attached a quickstart project with it.
 
 
 Thanks
 Vicky
 
 backNavigation.zip
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket Listmodel (attach objects to model but not to list)

2015-04-17 Thread Francois Meillet
It's not possible.

Look at the ListModel's consructor.

public ListModel(ListT list)
{
setObject(list);
}

And the setObject() method implementation, which is in the superclass, is

@Override
public void setObject(T object)
{
if (!(object instanceof Serializable))
{
object = createSerializableVersionOf(object);
}
this.object = object;
}



François Meillet





Le 17 avr. 2015 à 01:50, Chris chris...@gmx.at a écrit :

 Hi all,
 
 I have a listmodel:
 
  IModelListA listModel = new 
 ListModelListA(method.retrieveAlist());
 
 Is it possible to feed the model from the original list but add additional 
 elements of type A to the model only, without being mapped back to the list?
 
 thanks a lot,
 Chris
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



Re: retrieve public ip adress

2015-04-13 Thread Francois Meillet
Look at the getRemoteAddr(RequestCycle requestCycle) method from 
org.apache.wicket.protocol.http.request.WebClientInfo

François Meillet








Le 13 avr. 2015 à 01:20, Chris chris...@gmx.at a écrit :

 Hi all,
 
 I have deployed the Wicket app on a PAAS provider and would like to save the 
 IP address of the users accessing the application.
 
 With following code, the ip address retrieved is always the internal one 
 (192.168.0.1) when I access the application - I would like to retrieve the 
 public ip address assigned by the internet provider.
 
 How is this possible?
 
 HttpServletRequest httpReq = (HttpServletRequest) req.getContainerRequest();
 String clientAddress = httpReq.getRemoteAddr();
 
 Thanks, Chris
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



Re: Download serves empty files with correct number of pages !?!

2015-03-31 Thread Francois Meillet
org.apache.wicket.request.resource.ContentDisposition
ContentDisposition.INLINE
ContentDisposition.ATTACHMENT

resourceResponse.setContentDisposition(contentDisposition);

François 








Le 31 mars 2015 à 13:35, ChambreNoire a...@tentelemed.com a écrit :

 OK so the empty PDFs where due to some strangeness with the build config
 which is fixed. The filename and extensions are added by
 item.getModelObject().getFile(). So it works fine now however using
 DownloadLink the file still downloads rather than is opened in a new tab. 
 
 Any ideas?
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Download-serves-empty-files-with-correct-number-of-pages-tp4670117p4670125.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: Download serves empty files with correct number of pages !?!

2015-03-30 Thread Francois Meillet
path = new ClassPathResource(descriptors/hc).getFile(); 
the path isn't null ?


François 








Le 30 mars 2015 à 18:03, ChambreNoire a...@tentelemed.com a écrit :

 Sure but no exception is thrown!
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Download-serves-empty-files-with-correct-number-of-pages-tp4670117p4670119.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: Download serves empty files with correct number of pages !?!

2015-03-30 Thread Francois Meillet
printing the exception could help

} catch (IOException exception) {
return null;   
-- print stack
}


François 








Le 30 mars 2015 à 17:44, ChambreNoire a...@tentelemed.com a écrit :

 Hello,
 
 I have a strange problem. Ever since I have moved the files I'm linking to
 in the following code to the classpath, they are downloading as empty files
 but *with the correct number of pages*!
 
 Any ideas?
 
 Thanks
 
 class AlarmLink extends LinkAlarm implements IResourceListener {
 
private IResource resource;
 
AlarmLink(String id, final IModelAlarm model) {
super(id, model);
 
resource = new ResourceStreamResource(null) {
 
@Override
protected IResourceStream getResourceStream() {
 
File path;
try {
path = new
 ClassPathResource(descriptors/hc).getFile();
} catch (IOException exception) {
return null;
}
return new FileResourceStream(new File(path,
 getModelObject().getFile()));
}
};
}
 
public final void onResourceRequested() {
 
Attributes a = new Attributes(RequestCycle.get().getRequest(),
 RequestCycle.get().getResponse(), null);
resource.respond(a);
onLinkClicked();
}
 
@Override
protected final CharSequence getURL() {
return urlFor(IResourceListener.INTERFACE, null);
}
 
@Override
public void onClick() {}
 
@Override
public IModel? getBody() {
return PropertyModel.of(getModel(), label);
}
 
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.getAttributes().put(target, _blank);
}
 }
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Download-serves-empty-files-with-correct-number-of-pages-tp4670117.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: Wicket roadmap

2015-03-15 Thread Francois Meillet
Thanks you all

servlet 4.0 / yes it's too early

monitoring / metrics / ok

server-sent events / didn't see it / :-) 

http://bitstorm.github.io/wicket-site/ is superb
May we add a why Wicket link in the header

I agree with Tobias's ideas on mobile


François Meillet





Le 8 mars 2015 à 16:56, Andrea Del Bene an.delb...@gmail.com a écrit :

 The most up-to-date version of the site is the one from Martijn who is 
 leading the development. I think there are few things left to do to complete 
 this task. I've opened a PR to solve a couple of small layout issues in two 
 pages. Apart from this there are some TODO in the documentation page to ' 
 integrate media objects' for book pictures and videos, but honestly I don't 
 know exactly what this is about. IMHO we should also add a new header link 
 for 'community' pages like friends projects and WicketStuff.
 
 
 new web design for https://wicket.apache.org
 
 I hope this will be ready for Wicket 7.0.0 (
 https://github.com/dashorst/wicket-site,
 http://bitstorm.github.io/wicket-site/)
 @Martijn, @Andrea ?
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



Re: Wicket roadmap

2015-03-08 Thread Francois Meillet
Here are simple thoughts,

modularity
servlet 4.0 / http 2.0
monitoring
server-sent events

new web design for https://wicket.apache.org 
new wicket-examples
better highlighting of WicketStuff modules on https://wicket.apache.org 

Using an online survey tool could be useful

see https://java.net/downloads/javaee-spec/JavaEE8_Community_Survey_Results.pdf

François Meillet






Le 7 mars 2015 à 22:23, Martin Grigorov mgrigo...@apache.org a écrit :

 Hi,
 
 Once 7.0.0 is released I think we should create a branch for Wicket 8 and
 see what we could benefit of Java 8.
 Having less verbose Wicket would be great! But not on any price! Lambdas
 are both harder to debug and produce bigger stack, so we should decide
 carefully.
 Other things to consider:
 - whether to use Optional for AjaxFallback** components. I don't remember
 the exact reason why Igor's Optional didn't make it, but we may reevaluate
 - use the new DateTime APIs for wicket-datetime (new Converters, etc.)
 - ???
 
 We should also ask the community what they don't like in Wicket and what
 they would like to be added to make it better.
 
 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov
 
 On Sat, Mar 7, 2015 at 11:05 AM, Francois Meillet 
 francois.meil...@gmail.com wrote:
 
 Hi All,
 
 
 Is there any Wicket roadmap for the future (after version 7) ?
 
 What is your point of view about the Wicket's future  ?
 
 
 Thanks
 François Meillet
 
 
 
 
 
 
 



Re: Wicket roadmap

2015-03-07 Thread Francois Meillet
Thanks Tobias, yes I read this document last year, it's one year old 


François Meillet






Le 7 mars 2015 à 10:16, Tobias Soloschenko tobiassolosche...@googlemail.com a 
écrit :

 Hi,
 
 here are some hints about Wicket after version 7 (see last pages):
 
 http://wicketinaction.com/2014/01/the-state-of-wicket-2014/
 
 kind regards
 
 Tobias
 
 Am 07.03.15 um 10:05 schrieb Francois Meillet:
 Hi All,
 
 
 Is there any Wicket roadmap for the future (after version 7) ?
 
 What is your point of view about the Wicket's future  ?
 
 
 Thanks
 François Meillet
 
 
 
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



Wicket roadmap

2015-03-07 Thread Francois Meillet
Hi All,


Is there any Wicket roadmap for the future (after version 7) ?

What is your point of view about the Wicket's future  ?


Thanks
François Meillet








Apache Wicket with Lambda Expressions

2015-02-27 Thread Francois Meillet
From Rodrigo Uchôa's blog

https://rodrigouchoa.wordpress.com/2015/02/26/apache-wicket-with-lambda-expressions/


François Meillet







form AjaxFormComponentUpdatingBehavior validation

2015-02-18 Thread Francois Meillet
Hi All,


1) I have a Form with a Textfield which has a AjaxFormComponentUpdatingBehavior 
(blur)

When the entire form is submitted (via an AjaxButton) 
the ajaxFormComponentUpdatingBehavior.onEvent() is called
then the formComponent.validate() is called
and then when the form.validate() is called
formComponent.validate() is called again.

Could it possible to avoid this double validation ?
Do I have to override AjaxFormComponentUpdatingBehavior.onEvent()  ? ... or 
there is a simple way to do this ?



2) is it possible to remove a formComponent's validator just after the 
button.submit() and before the form.onFormSubmitted() is called



3) When the I leave a page (without submitting) with a formComponent which has 
a AjaxFormComponentUpdatingBehavior (blur),
the ajaxFormComponentUpdatingBehavior.onEvent() is called and then the 
validation.
Can I avoid the ajaxFormComponentUpdatingBehavior.onEvent()  ?


Best regards
François Meillet








Re: form AjaxFormComponentUpdatingBehavior validation

2015-02-18 Thread Francois Meillet
OnDomReadyHeaderItem.forScript('Thanks Sven')

I also added OnEventHeaderItem.forScript(window, onunload, 
mousedownHappened = true)
to the button.


Everything work nicely except when an onunload event is fired and the textfield 
is empty.
In this case the ajaxFormComponentUpdatingBehavior.onEvent() is called
and the formComponent.validate();


François Meillet






Le 18 févr. 2015 à 16:36, Sven Meier s...@meiers.net a écrit :

 I didn't try it, but this would be the rough equivalent of 
 http://stackoverflow.com/a/13729993/1041336 in Wicket:
 
 textField.add(new AjaxFormComponentUpdatingBehavior(blur) {
  updateAjaxAttributes(ara) {
ara.getAjaxCallListeners().add(new AjaxCallListener() {
  getPrecondition() {
return return |mousedownHappened| === false; ;
  }
});
  }
 });
 
 button.add(new Behavior() {
  renderHead(c, r) {
r.render(OnDomReaderHeaderItem.forScript($( + c.getMarkupId() + 
 ).on('mousedown', function() { mousedownHappened = true }););
  }
 });
 
 Regards
 Sven
 
 
 On 18.02.2015 15:59, Francois Meillet wrote:
 Thanks Sven,
 
 yes this is a javascript issue.
 
 I look for a nice way (a la Wicket) to disable the blur event when onunload 
 and onclick are fired.
 
 François Meillet
 
 
 
 
 
 Le 18 févr. 2015 à 12:40, Sven Meier s...@meiers.net a écrit :
 
 Hi,
 
 this is rather a JavaScript issue:
 
 http://stackoverflow.com/questions/13729837/jquery-stop-blur-event-when-clicking-submit-button
 
 Regards
 Sven
 
 On 18.02.2015 11:35, Francois Meillet wrote:
 Hi All,
 
 
 1) I have a Form with a Textfield which has a 
 AjaxFormComponentUpdatingBehavior (blur)
 
 When the entire form is submitted (via an AjaxButton)
 the ajaxFormComponentUpdatingBehavior.onEvent() is called
 then the formComponent.validate() is called
 and then when the form.validate() is called
 formComponent.validate() is called again.
 
 Could it possible to avoid this double validation ?
 Do I have to override AjaxFormComponentUpdatingBehavior.onEvent()  ? ... 
 or there is a simple way to do this ?
 
 
 
 2) is it possible to remove a formComponent's validator just after the 
 button.submit() and before the form.onFormSubmitted() is called
 
 
 
 3) When the I leave a page (without submitting) with a formComponent which 
 has a AjaxFormComponentUpdatingBehavior (blur),
 the ajaxFormComponentUpdatingBehavior.onEvent() is called and then the 
 validation.
 Can I avoid the ajaxFormComponentUpdatingBehavior.onEvent()  ?
 
 
 Best regards
 François Meillet
 
 
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 



Re: form AjaxFormComponentUpdatingBehavior validation

2015-02-18 Thread Francois Meillet
Thanks Sven,

yes this is a javascript issue.

I look for a nice way (a la Wicket) to disable the blur event when onunload and 
onclick are fired.

François Meillet





Le 18 févr. 2015 à 12:40, Sven Meier s...@meiers.net a écrit :

 Hi,
 
 this is rather a JavaScript issue:
 
 http://stackoverflow.com/questions/13729837/jquery-stop-blur-event-when-clicking-submit-button
 
 Regards
 Sven
 
 On 18.02.2015 11:35, Francois Meillet wrote:
 Hi All,
 
 
 1) I have a Form with a Textfield which has a 
 AjaxFormComponentUpdatingBehavior (blur)
 
 When the entire form is submitted (via an AjaxButton)
 the ajaxFormComponentUpdatingBehavior.onEvent() is called
 then the formComponent.validate() is called
 and then when the form.validate() is called
 formComponent.validate() is called again.
 
 Could it possible to avoid this double validation ?
 Do I have to override AjaxFormComponentUpdatingBehavior.onEvent()  ? ... or 
 there is a simple way to do this ?
 
 
 
 2) is it possible to remove a formComponent's validator just after the 
 button.submit() and before the form.onFormSubmitted() is called
 
 
 
 3) When the I leave a page (without submitting) with a formComponent which 
 has a AjaxFormComponentUpdatingBehavior (blur),
 the ajaxFormComponentUpdatingBehavior.onEvent() is called and then the 
 validation.
 Can I avoid the ajaxFormComponentUpdatingBehavior.onEvent()  ?
 
 
 Best regards
 François Meillet
 
 
 
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



Re: ListPanel - update model

2015-02-15 Thread Francois Meillet
Hi Chris,

The ListModel keeps a reference on the model created at the first occurence of 
that line
pModel = new ListModelP(someService.caculate());

The simplest thing you could do is to reset the listpanel's model,
but this is not a good practice.

listPanel.setDefaultModel(model);

add(new AjaxFallbackLink(link) { 
@Override 
public void onClick(AjaxRequestTarget target) { 
pModel = new ListModelP(someService.caculate()); 
listPanel.setDefaultModel(pModel);
target.add(listPanel); 
} 
}); 


Using a specific model is much better
For example, using the int property flag we can do 

pModel = new ModelString() {
@Override
public String getObject() {
return flag_ + flag ;
}
};

final Panel listPanel = new ListPanel(itemList, pModel); 
add(listPanel); 

add(new AjaxFallbackLink(link) { 
@Override 
public void onClick(AjaxRequestTarget target) { 
flag++;
target.add(listPanel); 
} 
}); 


Have a look at https://wicket.apache.org/guide/guide/single.html#modelsforms


François Meillet





Le 14 févr. 2015 à 22:23, Chris chris...@gmx.at a écrit :

 Hi all,
 
 I would like to update a list model when the user clicks on a certain link. 
 However, when the listPanel is rendered after clicking on the link, the model 
 seems not to be updated and still contains the old values.
 
 How to fix this?
 
 PAGE:
 
 IModelListP pModel;
 
 public SomePage() {
 
   pModel = new ListModelP(someService.caculate());
 
   final Panel listPanel = new ListPanel(itemList, pModel);
   add(listPanel);
 
add(new AjaxFallbackLink(link) {
@Override
public void onClick(AjaxRequestTarget target) {
pModel = new ListModelP(someService.caculate());
target.add(listPanel);
}
});
 }
 
 Thanks!
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



Re: New committer - Sebastien Briquet

2015-02-13 Thread Francois Meillet
Welcome Sébastien
Thanks for your commitment !

François 





Le 13 févr. 2015 à 22:55, Tobias Soloschenko tobiassolosche...@googlemail.com 
a écrit :

 Congratulations!!! 
 
 kind regards
 
 Tobias
 
 Am 13.02.2015 um 22:05 schrieb Zala Pierre GOUPIL goupilpie...@gmail.com:
 
 \o/
 
 Bienvenue Sébastien ! Bravo et continue comme ça !
 
 On Fri, Feb 13, 2015 at 10:02 PM, Martin Grigorov mgrigo...@apache.org
 wrote:
 
 The Project Management Committee (PMC) for Apache Wicket
 has asked Sebastien Briquet to become a committer and we are pleased
 to announce that he has accepted.
 
 Sebastien has been involved with Wicket for several years now by developing
 one of the most successful integrations with JavaScript libraries,
 namely Wicket
 jQuery UI https://github.com/sebfz1/wicket-jquery-ui, reporting bugs,
 contributing fixes and participating in discussions.
 
 Being a committer will enable him to help us even easier in the future.
 
 Please welcome Sebastien Briquet to our team!
 
 Bienvenue Sebastien!
 
 
 
 -- 
 Si le sang ne coule pas assez chaud dans tes veines, je le répandrai sur le
 sable pour qu'il bouille au soleil.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



NoClassDefFoundError: org/objectweb/asm/Type

2015-01-21 Thread Francois Meillet
Hi Martin,

with version 7.0.4 and using JMX (wicket-jmx.jar)

I get
 java.lang.NoClassDefFoundError: org/objectweb/asm/Type
at net.sf.cglib.core.TypeUtils.parseType(TypeUtils.java:184)
at net.sf.cglib.core.KeyFactory.clinit(KeyFactory.java:66)
at net.sf.cglib.proxy.Enhancer.clinit(Enhancer.java:69)
at org.apache.wicket.jmx.Initializer.createProxy(Initializer.java:256)


François Meillet








Re: NoClassDefFoundError: org/objectweb/asm/Type

2015-01-21 Thread Francois Meillet
Thanks Martin


François Meillet





Le 21 janv. 2015 à 21:35, Martin Grigorov mgrigo...@apache.org a écrit :

 https://issues.apache.org/jira/browse/WICKET-5817
 
 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov
 
 On Wed, Jan 21, 2015 at 9:18 PM, Martin Grigorov mgrigo...@apache.org
 wrote:
 
 Please create a ticket!
 Thanks!
 
 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov
 
 On Wed, Jan 21, 2015 at 8:50 PM, Francois Meillet 
 francois.meil...@gmail.com wrote:
 
 Hi Martin,
 
 with version 7.0.4 and using JMX (wicket-jmx.jar)
 
 I get
 java.lang.NoClassDefFoundError: org/objectweb/asm/Type
at net.sf.cglib.core.TypeUtils.parseType(TypeUtils.java:184)
at net.sf.cglib.core.KeyFactory.clinit(KeyFactory.java:66)
at net.sf.cglib.proxy.Enhancer.clinit(Enhancer.java:69)
at
 org.apache.wicket.jmx.Initializer.createProxy(Initializer.java:256)
 
 
 François Meillet
 
 
 
 
 
 
 
 



Re: What is the proper way to start a secondary process in Wicket 6

2015-01-05 Thread Francois Meillet
Thanks Ernesto !

François Meillet




Le 5 janv. 2015 à 10:38, Ernesto Reinaldo Barreiro reier...@gmail.com a écrit 
:

 Martin



Re: Possible memory leak in Wicket 1.5.12

2014-12-21 Thread Francois Meillet
Hi Satrix,

Make sure you remove the second constructor. (the one wih the inputstream 
argument)
And the stream could be a local property (in the getImageData method) and not 
an instance property.

François Meillet
Formation Wicket - Développement Wicket





Le 20 déc. 2014 à 14:26, Satrix satrix...@gmail.com a écrit :

 Looks like it's working now :)
 
 Thank you Francois for your help :)
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Possible-memory-leak-in-Wicket-1-5-12-tp4668856p4668874.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: Possible memory leak in Wicket 1.5.12

2014-12-20 Thread Francois Meillet
Can you show up the entire class ?


François Meillet
Formation Wicket - Développement Wicket





Le 20 déc. 2014 à 09:56, Satrix satrix...@gmail.com a écrit :

 Hi,
 
 It would be quite hard to reproduce the problem in quickstart application.
 Here is the code of DynamicImageResource:
 
 @Override
protected byte[] getImageData(IResource.Attributes attributes) {
try {
return IOUtils.toByteArray(stream);
} catch (IOException ex) {
LOG.error(Could not return byte[] from  + stream, ex);
 
return null;
} finally {
if(stream != null){
try {  
stream.close();
} catch (IOException ex) {
LOG.error(Could not close stream, ex);
}
}
}
}
 
 And then I use the NonCachingImage in conjunction with my
 DynamicImageResource implementation class.
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Possible-memory-leak-in-Wicket-1-5-12-tp4668856p4668863.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: Switching between wicket tabs

2014-12-20 Thread Francois Meillet
use parameters

PageParameters parameters = new PageParameters();
parameters.set(TAB_NUM, 3);
parameters.set(USERNAME_ID, username);

setResponsePage(YourCLaasContainingTheTabbedPanel.class, pageParameters);

and in your YourCLaasContainingTheTabbedPanel.class
extract the parameters

int tabindex = pageParameters.get(TAB_NUM).toInt();

and set tabbedPanel # setSelectedTab accordingly



François Meillet
Formation Wicket - Développement Wicket





Le 20 déc. 2014 à 08:44, K kondetiudayki...@gmail.com a écrit :

 Hi 
 
 I have a similar issue. i am trying to navigate to tab i intend to but issue
 is i have  parameters i need to forward to that tab. can anyone suggest how
 to handle it.
 
 Scenario: i have list of items displaying in tab1 and when i click on the
 item it has to be redirected to tab3 with the item details (lets say
 username and password).
 
 Thanks in advance
 K
 
 -
 K
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Switching-between-wicket-tabs-tp3044579p4668862.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: Possible memory leak in Wicket 1.5.12

2014-12-20 Thread Francois Meillet
Hi Satrix,

When the second constructor is used, with the inputsream argument,
the stream is open.

When this inputsream is opened ?


François Meillet





Le 20 déc. 2014 à 10:03, Satrix satrix...@gmail.com a écrit :

 Yeah, sure. Here is the code:
 
 public class LocalFileResource extends DynamicImageResource {
private final Logger LOG = Logger.getLogger(LocalFileResource.class);
 
private String filePath;
private InputStream stream;
 
public LocalFileResource(String filePath) throws FileNotFoundException {
this.filePath = filePath;
 
File file = new File(filePath);
if(!file.exists()){
throw new FileNotFoundException(Could not load file  +
 filePath);
}
 
try {
stream = new FileInputStream(file);
} catch (FileNotFoundException ex) {
throw new FileNotFoundException(Could not obtain stream from 
 + filePath);
}
}
 
public LocalFileResource(InputStream stream) {
if(stream == null){
throw new IllegalArgumentException(Stream cannot be null);
}
 
this.stream = stream;
}
 
@Override
protected byte[] getImageData(IResource.Attributes attributes) {
try {
return IOUtils.toByteArray(stream);
} catch (IOException ex) {
LOG.error(Could not return byte[] from  + stream);
 
return null;
} finally {
if(stream != null){
try {  
stream.close();
} catch (IOException ex) {
LOG.error(Could not close stream:  + ex.getMessage());
}
}
}
}
 }
 
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Possible-memory-leak-in-Wicket-1-5-12-tp4668856p4668865.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: Possible memory leak in Wicket 1.5.12

2014-12-20 Thread Francois Meillet
Can you show me the class when you open the stream ?

Did you moved the stream creation to the getImageData this morning ?

François Meillet
Formation Wicket - Développement Wicket





Le 20 déc. 2014 à 10:58, Satrix satrix...@gmail.com a écrit :

 Hi,
 
 It's used very rarely so it should not be a problem. However I've moved the
 stream creation from the constructor to getImageData method. 
 
 The important point here - it only happens when the crawler visits my
 website. When normal users visit my website the file descriptors are closed
 successfully.
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Possible-memory-leak-in-Wicket-1-5-12-tp4668856p4668868.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: Possible memory leak in Wicket 1.5.12

2014-12-20 Thread Francois Meillet
Moving the stream creation, opening and closing it in getImageData is a good 
thing.
You should also remove the second constructor (with the inputstream argument).

Now with your tests classes with the WicketTester, (you do have tests ;-)  ), 
you can play yours pages with a debugger and see what happens.

François Meillet
Formation Wicket - Développement Wicket





Le 20 déc. 2014 à 11:40, Satrix satrix...@gmail.com a écrit :

 Actually I've checked the code in the second constructor and the stream is
 the ByteArrayInputStream instance. But I've moved the stream creation from
 the first constructor to the getImageData because that's the constructor I
 use to create the 99% of the images in my website.
 
 And yes I've changed it today.
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Possible-memory-leak-in-Wicket-1-5-12-tp4668856p4668870.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: Possible memory leak in Wicket 1.5.12

2014-12-19 Thread Francois Meillet
Could you show us the code you use to serve these images ?

François Meillet





Le 19 déc. 2014 à 17:02, Satrix satrix...@gmail.com a écrit :

 Hello,
 
 I've developed an Wicket website in Wicket 1.5.12. It's hosted on Glassfish
 server 3.1.2.2 and lately I've run into the following problem:
 
 The problem only occurs when a crawler (for example googlebot) visits my
 website and then when it's crawling, Glassfish opens a lot of file
 descriptors (for images) and doesn't close it. This leads to Too many open
 files exception and right after that my server crashes. Those file
 descriptors are open all the time - I've to restart the server to delete the
 file descriptors.
 
 So I wanted to ask if it's possible that it's a wicket related problem or
 it's just Glassfish problem ?
 
 Thank you for any help.
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Possible-memory-leak-in-Wicket-1-5-12-tp4668856.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: Session management on timeout

2014-12-17 Thread Francois Meillet
Look at application#sessionUnbound(String sessionId) 

François Meillet
Formation Wicket - Développement Wicket





Le 17 déc. 2014 à 10:23, Rodrigo Heffner rodrigo.heff...@gmail.com a écrit :

 Hello,
 
 I'm implementing session management on my application, adding each
 authenticated session to a list. When users logout (session#invalidate), I
 remove their session from my list. My problem lies with session timeout -
 it doesn't call session#invalidate, I can only see the
 AuthenticatedWebApplication#onUnauthorizedInstantiation be called, but I
 can't get a hold of the expired session there. Any suggestions?
 
 Thank you,
 
 -- 
 Rodrigo H M Bezerra
 http://www.rodrigobezerra.com



Re: Session management on timeout

2014-12-17 Thread Francois Meillet
application#sessionUnbound(String sessionId) is called by Wicket

You should use a mapsessionid, yourSession 


in your application class

@Override
public void sessionUnbound(String sessionId) {

Yoursession  yoursession = yourmap.get(sessionId);
//
process( yoursession )
//
super.sessionUnbound(sessionId);
 
}



François Meillet
Formation Wicket - Développement Wicket





Le 17 déc. 2014 à 10:45, Rodrigo Heffner rodrigo.heff...@gmail.com a écrit :

 Thanks for your quick replies.
 
 Martin, I'm using wicket 6.0.0 and couldn't see
 org.apache.Session#onInvalidate() .
 
 François, I've been researching how to get the instance of my custom
 session class (extends AuthenticatedWebSession) by session id, but couldn't
 find much - any suggestions?
 
 On 17 December 2014 at 09:31, Martin Grigorov mgrigo...@apache.org wrote:
 
 Also check Session#onInvalidate()
 
 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov
 
 On Wed, Dec 17, 2014 at 11:25 AM, Francois Meillet 
 francois.meil...@gmail.com wrote:
 
 Look at application#sessionUnbound(String sessionId)
 
 François Meillet
 Formation Wicket - Développement Wicket
 
 
 
 
 
 Le 17 déc. 2014 à 10:23, Rodrigo Heffner rodrigo.heff...@gmail.com a
 écrit :
 
 Hello,
 
 I'm implementing session management on my application, adding each
 authenticated session to a list. When users logout
 (session#invalidate),
 I
 remove their session from my list. My problem lies with session
 timeout -
 it doesn't call session#invalidate, I can only see the
 AuthenticatedWebApplication#onUnauthorizedInstantiation be called, but
 I
 can't get a hold of the expired session there. Any suggestions?
 
 Thank you,
 
 --
 Rodrigo H M Bezerra
 http://www.rodrigobezerra.com
 
 
 
 
 
 -- 
 Rodrigo H M Bezerra
 http://www.rodrigobezerra.com



Re: submenu in NavbarDropDownButton

2014-12-17 Thread Francois Meillet
What is the error, any stacktrace ?

François Meillet
Formation Wicket - Développement Wicket





Le 17 déc. 2014 à 11:55, Hasan Çelik hsnclk1...@gmail.com a écrit :

 Thanks Martin,
 
 I am newbie for wicket... It may be easy error for you but I didn't 
 understand...Why am I getting this error? Which dependencies should I add in 
 pom.xml ? 
 
 
 
 If I change the codes like that, I am getting error,
 ​
 
 
 
 
 
 
 
 Web Sitesi : www.ab-hibe.com
 E-mail: hasance...@berkadem.com
 E-mail: i...@ab-hibe.com
 Gsm1: 0 544 640 96 25 
 Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
 
 On 17 December 2014 at 10:13, Martin Grigorov mgrigo...@apache.org wrote:
 I guess his code just uses Wicket's CookieUtils class.
 See
 https://github.com/apache/isis/blob/master/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/themepicker/ThemeChooser.java#L94-L105
 for example.
 
 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov
 
 On Wed, Dec 17, 2014 at 10:05 AM, Hasan Çelik hsnclk1...@gmail.com wrote:
 
  Thanks for reply,
 
  Can you give detail about getCookieUtils() and CCA_LANGUAGE_COOKIE_NAME in
  your CcaWebApplication class
 
  Regards,
 
 
 
  On 17 December 2014 at 09:06, Richter, Marvin 
  marvin.rich...@freenetdigital.com wrote:
  
   Hey, I have something like that implemented in the following way:
  
   @Override
   protected ListAbstractLink newSubMenuButtons(String
   buttonMarkupId) {
   ListAbstractLink languages = new
   ArrayListAbstractLink();
   languages.add(newLanguageOption(buttonMarkupId,
  de));
   languages.add(newLanguageOption(buttonMarkupId,
  en));
   return languages;
   }
  
   And the newLanguageOption method looks like this:
  
   private LinkVoid newLanguageOption(final String buttonMarkupId, final
   String localeString) {
   LinkVoid languageOptionLink = new LinkVoid(buttonMarkupId) {
  
   private static final long serialVersionUID =
   -1704794810431937803L;
  
   @Override
   public void onClick() {
   Locale locale = new Locale(localeString);
  
  
  CcaWebApplication.get().getCookieUtils().save(CcaWebApplication.CCA_LANGUAGE_COOKIE_NAME,
   locale.toString());
   getSession().setLocale(locale);
   }
  
   @Override
   public void onComponentTagBody(MarkupStream markupStream,
   ComponentTag openTag) {
   replaceComponentTagBody(markupStream, openTag,
   getString(localeString));
   }
   };
   return languageOptionLink;
   }
  
   Hope that helps.
  
   Best,
   Marvin
  
   -Original Message-
   From: Hasan Çelik [mailto:hsnclk1...@gmail.com]
   Sent: Wednesday, December 17, 2014 7:46 AM
   To: users@wicket.apache.org
   Subject: submenu in NavbarDropDownButton
  
   Hi,
  
   I have a question about usage of navbar components.. I tried to make
   Multilingual website, actually I did... when I put language buttons in a
   wicket panel, It works...In this example I try to put these language
   buttons into dropdown submenu.. First I did one Multilanguage class and
   this class was taking a parameter...This parameter was about Locale
   String(like en)..In this way I didn't succeed to take parameter in the
   submenu declaration,like that
  
   subMenu.add(new MenuBookmarkablePageLinkVoid(new
   MultiLanguage(en),
   Model.of(Turkish)).setIconType(GlyphIconType.refresh));
  
   I know that declaration (new MultiLanguage(en)) is wrong but I wanted
  to
   do like that...Anyway After that I have changed the method construction
  as
   the following.. But in this way I have to create different  Multilanguage
   class for every diffent language. My question is, Is there a way to
  create
   construction for submenu declaration like that..(*subMenu.add(new
   MenuBookmarkablePageLinkVoid(new
   MultiLanguage(en),
   Model.of(Turkish)).setIconType(GlyphIconType.refresh));*)
  
  
   DropDownButton dropdown = new NavbarDropDownButton(Model.of(Choose
   Language)) {
   @Override
   public boolean isActive(Component item) {
   return false;
   }
  
   @Override
   protected ListAbstractLink newSubMenuButtons(final String
   buttonMarkupId) {
   final ListAbstractLink subMenu = new ArrayListAbstractLink();
   subMenu.add(new
   MenuBookmarkablePageLinkVoid(MultiLanguage.class,
   Model.of(Turkish)).setIconType(GlyphIconType.*flag*));
   subMenu.add(new
   MenuBookmarkablePageLinkVoid(MultiLanguage2.class,
   Model.of(English)).setIconType(GlyphIconType.*flag*));
  
   return subMenu;
}
}.setIconType(GlyphIconType.book);
  
navbar.addComponents(new 

Re: submenu in NavbarDropDownButton

2014-12-17 Thread Francois Meillet
which is ?

François Meillet
Formation Wicket - Développement Wicket





Le 17 déc. 2014 à 12:11, Hasan Çelik hsnclk1...@gmail.com a écrit :

 there is a compile error on the first image..
 
 
 
 Web Sitesi : www.ab-hibe.com
 E-mail: hasance...@berkadem.com
 E-mail: i...@ab-hibe.com
 Gsm1: 0 544 640 96 25
 Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
 
 On 17 December 2014 at 13:03, Francois Meillet francois.meil...@gmail.com
 wrote:
 
 What is the error, any stacktrace ?
 
 François Meillet
 Formation Wicket - Développement Wicket
 
 
 
 
 
 Le 17 déc. 2014 à 11:55, Hasan Çelik hsnclk1...@gmail.com a écrit :
 
 Thanks Martin,
 
 I am newbie for wicket... It may be easy error for you but I didn't
 understand...Why am I getting this error? Which dependencies should I add
 in pom.xml ?
 
 
 
 If I change the codes like that, I am getting error,
 ​
 
 
 
 
 
 
 
 Web Sitesi : www.ab-hibe.com
 E-mail: hasance...@berkadem.com
 E-mail: i...@ab-hibe.com
 Gsm1: 0 544 640 96 25
 Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
 
 On 17 December 2014 at 10:13, Martin Grigorov mgrigo...@apache.org
 wrote:
 I guess his code just uses Wicket's CookieUtils class.
 See
 
 https://github.com/apache/isis/blob/master/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/themepicker/ThemeChooser.java#L94-L105
 for example.
 
 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov
 
 On Wed, Dec 17, 2014 at 10:05 AM, Hasan Çelik hsnclk1...@gmail.com
 wrote:
 
 Thanks for reply,
 
 Can you give detail about getCookieUtils() and
 CCA_LANGUAGE_COOKIE_NAME in
 your CcaWebApplication class
 
 Regards,
 
 
 
 On 17 December 2014 at 09:06, Richter, Marvin 
 marvin.rich...@freenetdigital.com wrote:
 
 Hey, I have something like that implemented in the following way:
 
@Override
protected ListAbstractLink newSubMenuButtons(String
 buttonMarkupId) {
ListAbstractLink languages = new
 ArrayListAbstractLink();
languages.add(newLanguageOption(buttonMarkupId,
 de));
languages.add(newLanguageOption(buttonMarkupId,
 en));
return languages;
}
 
 And the newLanguageOption method looks like this:
 
 private LinkVoid newLanguageOption(final String buttonMarkupId,
 final
 String localeString) {
LinkVoid languageOptionLink = new
 LinkVoid(buttonMarkupId) {
 
private static final long serialVersionUID =
 -1704794810431937803L;
 
@Override
public void onClick() {
Locale locale = new Locale(localeString);
 
 
 
 CcaWebApplication.get().getCookieUtils().save(CcaWebApplication.CCA_LANGUAGE_COOKIE_NAME,
locale.toString());
getSession().setLocale(locale);
}
 
@Override
public void onComponentTagBody(MarkupStream
 markupStream,
 ComponentTag openTag) {
replaceComponentTagBody(markupStream, openTag,
 getString(localeString));
}
};
return languageOptionLink;
}
 
 Hope that helps.
 
 Best,
 Marvin
 
 -Original Message-
 From: Hasan Çelik [mailto:hsnclk1...@gmail.com]
 Sent: Wednesday, December 17, 2014 7:46 AM
 To: users@wicket.apache.org
 Subject: submenu in NavbarDropDownButton
 
 Hi,
 
 I have a question about usage of navbar components.. I tried to make
 Multilingual website, actually I did... when I put language buttons
 in a
 wicket panel, It works...In this example I try to put these language
 buttons into dropdown submenu.. First I did one Multilanguage class
 and
 this class was taking a parameter...This parameter was about Locale
 String(like en)..In this way I didn't succeed to take parameter in
 the
 submenu declaration,like that
 
 subMenu.add(new MenuBookmarkablePageLinkVoid(new
 MultiLanguage(en),
 Model.of(Turkish)).setIconType(GlyphIconType.refresh));
 
 I know that declaration (new MultiLanguage(en)) is wrong but I
 wanted
 to
 do like that...Anyway After that I have changed the method
 construction
 as
 the following.. But in this way I have to create different
 Multilanguage
 class for every diffent language. My question is, Is there a way to
 create
 construction for submenu declaration like that..(*subMenu.add(new
 MenuBookmarkablePageLinkVoid(new
 MultiLanguage(en),
 Model.of(Turkish)).setIconType(GlyphIconType.refresh));*)
 
 
 DropDownButton dropdown = new NavbarDropDownButton(Model.of(Choose
 Language)) {
@Override
public boolean isActive(Component item) {
return false;
}
 
@Override
protected ListAbstractLink newSubMenuButtons(final String
 buttonMarkupId) {
final ListAbstractLink subMenu = new
 ArrayListAbstractLink();
subMenu.add(new
 MenuBookmarkablePageLinkVoid(MultiLanguage.class,
 Model.of(Turkish)).setIconType(GlyphIconType.*flag

session invalidateNow vs invalidate

2014-12-15 Thread Francois Meillet
just a reminder 

session invalidateNow vs invalidate


if session#invalidateNow is called before a setResponsepage
then the application#sessionUnbound is called twice. 
as invalidateNow is invoked in session#detach.

ko
getSession().invalidateNow();
setResponsePage(Logout.class);

ok
# Invalidates this session at the end of the current request
getSession().invalidate();
setResponsePage(Logout.class);


François Meillet



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



Re: Form delegateSubmit migration question

2014-11-09 Thread Francois Meillet
String inputName = ((FormComponent) submittingButton).getInputName();


François Meillet
Formation Wicket - Développement Wicket





Le 9 nov. 2014 à 13:08, Maxim Solodovnik solomax...@gmail.com a écrit :

 Hello All,
 
 I'm trying to migrate project from Wicket 1.4 to Wicket 6.
 
 previously Form.delegateSubmit was Form.delegateSubmit(
 IFormSubmittingComponent
 http://ci.apache.org/projects/wicket/apidocs/1.4.x/org/apache/wicket/markup/html/form/IFormSubmittingComponent.html
 submittingComponent) and the code:
 submittingComponent.getInputName() worked as expected
 right now it is: Form.delegateSubmit(IFormSubmitter submittingButton) and
 it is impossible to get inputName anymore :(
 
 I tried to cast submittingComponent to IFormSubmittingComponent but it is
 not working due to submittingComponent is of type
 org.apache.wicket.ajax.form.AjaxFormSubmitBehavior$1@33b88671 and I'm
 unable to cast it to something useful :(
 
 Thanks in advance!
 
 -- 
 WBR
 Maxim aka solomax



Re: Form delegateSubmit migration question

2014-11-09 Thread Francois Meillet
What instanceof is this submittingButton  ?

François Meillet
Formation Wicket - Développement Wicket





Le 9 nov. 2014 à 13:42, Maxim Solodovnik solomax...@gmail.com a écrit :

 Thanks for the quick response!
 
 Unfortunately this solution is not working due to:
 submittingButton instanceof
 org.apache.wicket.markup.html.form.FormComponent == false
 submittingButton instanceof org.apache.wicket.Component == false
 submittingButton instanceof submittingButton instanceof
 org.apache.wicket.behavior.Behavior == false
 
 
 On 9 November 2014 18:37, Francois Meillet francois.meil...@gmail.com
 wrote:
 
 String inputName = ((FormComponent) submittingButton).getInputName();
 
 
 François Meillet
 Formation Wicket - Développement Wicket
 
 
 
 
 
 Le 9 nov. 2014 à 13:08, Maxim Solodovnik solomax...@gmail.com a écrit :
 
 Hello All,
 
 I'm trying to migrate project from Wicket 1.4 to Wicket 6.
 
 previously Form.delegateSubmit was Form.delegateSubmit(
 IFormSubmittingComponent
 
 http://ci.apache.org/projects/wicket/apidocs/1.4.x/org/apache/wicket/markup/html/form/IFormSubmittingComponent.html
 
 submittingComponent) and the code:
 submittingComponent.getInputName() worked as expected
 right now it is: Form.delegateSubmit(IFormSubmitter submittingButton) and
 it is impossible to get inputName anymore :(
 
 I tried to cast submittingComponent to IFormSubmittingComponent but it is
 not working due to submittingComponent is of type
 org.apache.wicket.ajax.form.AjaxFormSubmitBehavior$1@33b88671 and I'm
 unable to cast it to something useful :(
 
 Thanks in advance!
 
 --
 WBR
 Maxim aka solomax
 
 
 
 
 -- 
 WBR
 Maxim aka solomax



Re: How to use CSVDataExporter

2014-11-06 Thread Francois Meillet
Hi Suvojit,

I don't know CSVDataExporter but I noticed that the second bounded type 
parameter was a 
wildcard and not a defined type.

I use Wicket 7 where there are only 2 parameters.

See some examples:
http://www.7thweb.net/wicket-jquery-ui/kendo/datatable/CommandsDataTablePage;jsessionid=2926A68F12DAE4CAC910C18699676209?0
https://doc.codelutin.com/cantharella/xref/nc/ird/cantharella/web/utils/data/TableExportToolbar.html


François


François Meillet
Formation Wicket - Développement Wicket





Le 6 nov. 2014 à 13:07, suvojit168 suvojit...@gmail.com a écrit :

 Francois Meillet wrote
 try
 Listlt;IExportableColumnlt;AffiliateModel, ?gt; columns = new
 ArrayListlt;IExportableColumnlt;AffiliateModel, ?gt;();
 
 Hi François,
 
 Thanks for reply. I am using wicket 6.16. As per this  Link
 http://ci.apache.org/projects/wicket/apidocs/6.x/org/apache/wicket/extensions/markup/html/repeater/data/table/export/IExportableColumn.html

 we have,
 
 Interface IExportableColumnT,S,D
 
 Type Parameters:
 T - The type of each row in the table.
 S - The type of the sort property of the table.
 D - The type of the data displayed by this column.
 
 When I try : 
 ListIExportableColumnlt;AffiliateModel, ? columns = new
 ArrayListIExportableColumnlt;AffiliateModel, ?(); 
 
 I  get compile time error Incorrect number of arguments for type
 IExportableColumnT,S,D; it cannot be parameterized with arguments
 AffiliateModel, ?.
 
 Nonetheless, this works :
 ListIExportableColumnlt;AffiliateModel, ?, ? columns = new
 ArrayListIExportableColumnlt;AffiliateModel, ?, ?();
 
 I am getting a null pointer exception inside exportData (...) now which I am
 looking at. Will add reply if I need assistance.
 
 PS: It will be great if you can share some
 examples/tutorials/articals/anything on CSVDataExporter ( I am not very much
 comfortable with CSVDataExporter as of now).
 
 
 Thanks,
 Suvojit
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/How-to-use-CSVDataExporter-tp4668270p4668280.html
 Sent from the Users forum mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



Re: How to use CSVDataExporter

2014-11-05 Thread Francois Meillet
We have IExportableColumnT, S
where T is the type of each row in the table.
where S is the type of the sort property of the table.
 
and the method 
public T void exportData(IDataProviderT dataProvider, 
ListIExportableColumnT, ? columns, OutputStream outputStream)

try
ListIExportableColumnAffiliateModel, ? columns = new 
ArrayListIExportableColumnAffiliateModel, ?();


François Meillet
Formation Wicket - Développement Wicket





Le 5 nov. 2014 à 15:47, suvojit168 suvojit...@gmail.com a écrit :

 Hi,
 
 I am trying to export data to csv in my wicket pages. I am using
 CSVDataExporter for this purpose. Due to some constraints I am not using it
 in conjunction to ExportToolbar. There is a link and on click of the link I
 am trying to call exportData() on instance of CSVDataExporter. 
 I am using AbstractExportableColumn for columns writing data to columns. 
 
 However I am getting a compile time error on exportData. Follwoing is the
 code (excelDataImport is the link here ):
 
 excelDataImport.add(new AjaxEventBehavior(onclick) {
   private static final long serialVersionUID = 1L;
 
   protected void onEvent(AjaxRequestTarget target) {
   ListIExportableColumnlt;AffiliateModel, 
 String, String columns = new
 ArrayListIExportableColumnlt;AffiliateModel, String, String();
   columns.add(new 
 AbstractExportableColumnAffiliateModel, String,
 String(new ModelString(Affiliate Name), name) {
 
   @Override
   public IModelString getDataModel(
   IModelAffiliateModel 
 arg0) {
   // TODO Auto-generated method 
 stub
   return null;
   }
   
   });
   
   try {
   new CSVDataExporter().exportData(new 
 AffiliateDataProvider(null),
 columns, new FileOutputStream(test.xls));
   } catch (FileNotFoundException e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
   } catch (IOException e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
   } catch (Exception e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
   }
 
   
   
 
   }
   });
 
 The error message is  : The method exportData(IDataProviderT,
 ListIExportableColumnlt;T,?,?, OutputStream) in the type CSVDataExporter
 is not applicable for the arguments (AffiliateDataProvider,
 ListIExportableColumnlt;AffiliateModel,String,String,
 FileOutputStream).
 
 I think I did it all correctly (as per whatever knowledge I could get on
 this subject), am I doing something wrong here?
 
 Also, can anyone share with me some sample examples and description/details
 for CSVDataExporter? I have gone through example in  DataTablePage.java in
 wicket example but that is using  DataTable and ExportToolbar. 
 
 Thanks,
 Suvojit
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/How-to-use-CSVDataExporter-tp4668270.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: Error in java.lang.String during Internationalisation of a wicket project

2014-10-31 Thread Francois Meillet
When the toString() method of your class de.myproject.MyClass is called,
you get a LazyInitializationException.

This is from Hibernate

To get the LazyInitializationException's full explanation, see

https://developer.jboss.org/wiki/LazyInitializationExceptionOvercome?_sscc=t
http://blog.gmorales.net/2012/03/how-to-solve-orghibernatelazyinitializa.html
http://stackoverflow.com/questions/10760320/lazyinitializationexception-encountered-when-using-load-instead-of-get-with-hibe


François


François Meillet
Formation Wicket - Développement Wicket





Le 31 oct. 2014 à 12:51, jayeshps jayeshpsars...@gmail.com a écrit :

 I am getting a no session error while trying to display some details from the
 database. I have pasted the error log below
 
 Root cause:
 
 org.hibernate.LazyInitializationException: could not initialize proxy - no
 Session
 at
 org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:165)
 at
 org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:286)
 at
 org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:185)
 at de.myproject.MyClass_$$_jvstb50_11.toString(MyClass_$$_jvstb50_11.java)
 at java.lang.String.valueOf(String.java:2981)
 at java.lang.StringBuilder.append(StringBuilder.java:131)
 at
 org.apache.wicket.core.util.lang.PropertyResolver$MethodGetAndSet.getValue(PropertyResolver.java:1151)
 at
 org.apache.wicket.core.util.lang.PropertyResolver$ObjectAndGetSetter.getValue(PropertyResolver.java:652)
 at
 org.apache.wicket.core.util.lang.PropertyResolver.getValue(PropertyResolver.java:103)
 at
 org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:86)
 at org.apache.wicket.Component.getDefaultModelObject(Component.java:1590)
 at
 org.apache.wicket.Component.getDefaultModelObjectAsString(Component.java:1618)
 at
 org.apache.wicket.markup.html.basic.Label.onComponentTagBody(Label.java:131)
 at
 org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71)
 
 Any suggestions would be much appreciated. When I try to print the same
 details using JasperReports the pdf file seems to be rendered perfect. But
 only the display part on the browser gives this error.
 
 In MyClass, I use a String value that is stored as an Integer in the
 database and I retrieve it using i18n.
 
 Thanks and Regards,
 Jayesh Sarswat
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Error-in-java-lang-String-during-Internationalisation-of-a-wicket-project-tp4668192.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: Stateful StatelessForm works most of the time. How to make it crash?

2014-10-18 Thread Francois Meillet
Can you post your code ?

François Meillet
Formation Wicket - Développement Wicket





Le 17 oct. 2014 à 17:26, pureza pur...@gmail.com a écrit :

 Dear Wicket users,
 
 I believe I have found the cause of a long standing issue in my application.
 Basically, a form would submit with everything set to null or the default
 values even when the user filled in all the information. The problem is that
 this only happened once in a while and I was never able to reproduce it, so
 I couldn't figure out what was wrong.
 
 However, today I was looking at that code to reuse it somewhere else and
 something odd caught my attention. It turns out that my form is a
 StatelessForm when it shouldn't be. I don't remember why I made it like
 that, but I think it was because I was still learning Wicket at the time.
 Anyway, it always worked for me and for 99.9% of the users, so I was never
 able to identify the cause.
 
 I tried StatelessChecker and indeed it complains that the form is stateful.
 However, that still doesn't guarantee that this mistake is the cause of my
 problem. Can you think of any way to exploit this erroneous StatelessForm
 declaration so that it doesn't behave correctly?
 
 Thanks,
 
 Luis
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Stateful-StatelessForm-works-most-of-the-time-How-to-make-it-crash-tp4667977.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: resource encoding troubles

2014-08-28 Thread Francois Meillet
Look at 
http://apache-wicket.1842946.n4.nabble.com/How-to-localize-options-in-drop-down-tt4661751.html#a4661768


François Meillet
Formation Wicket - Développement Wicket





Le 28 août 2014 à 17:47, Garret Wilson gar...@globalmentor.com a écrit :

 I have Wicket 7.0.0-M2 running on embedded Jetty, which is correctly 
 returning a content type of UTF-8 for my Wicket page:
 
   Date: Thu, 28 Aug 2014 15:37:52 GMT
   Expires: Thu, 01 Jan 1970 00:00:00 GMT
   Pragma: no-cache
   Cache-Control: no-cache, no-store
   Content-Type: text/html; charset=UTF-8
   Transfer-Encoding: chunked
   Server: Jetty(9.1.0.v20131115)
 
 
 I have a properties file FooterPanel.properties that contains the following 
 line (encoded in ISO-8859-1, as properties files unfortunately require):
 
   copyright=© 2014 Example, Inc.
 
 
 FooterPanel.html is encoded in UTF-8, has the appropriate XML prolog, and 
 contains the following reference to the property resource:
 
   ?xml version=1.0 encoding=utf-8?
   ...
   psmallwicket:message key=copyright©
   Example/wicket:message/small/p
 
 
 When this all is rendered, here is what I see in Firefox 31 and Chrome 37:
 
   � 2014 Example, Inc.
 
 
 I thought I had all the correct encoding indicators at each stage in the 
 pipeline. But somebody blinked. Where is the problem?
 
 Garret



Re: resource encoding troubles

2014-08-28 Thread Francois Meillet
use *.utf8.properties

François Meillet
Formation Wicket - Développement Wicket





Le 28 août 2014 à 17:47, Garret Wilson gar...@globalmentor.com a écrit :

 I have Wicket 7.0.0-M2 running on embedded Jetty, which is correctly 
 returning a content type of UTF-8 for my Wicket page:
 
   Date: Thu, 28 Aug 2014 15:37:52 GMT
   Expires: Thu, 01 Jan 1970 00:00:00 GMT
   Pragma: no-cache
   Cache-Control: no-cache, no-store
   Content-Type: text/html; charset=UTF-8
   Transfer-Encoding: chunked
   Server: Jetty(9.1.0.v20131115)
 
 
 I have a properties file FooterPanel.properties that contains the following 
 line (encoded in ISO-8859-1, as properties files unfortunately require):
 
   copyright=© 2014 Example, Inc.
 
 
 FooterPanel.html is encoded in UTF-8, has the appropriate XML prolog, and 
 contains the following reference to the property resource:
 
   ?xml version=1.0 encoding=utf-8?
   ...
   psmallwicket:message key=copyright©
   Example/wicket:message/small/p
 
 
 When this all is rendered, here is what I see in Firefox 31 and Chrome 37:
 
   � 2014 Example, Inc.
 
 
 I thought I had all the correct encoding indicators at each stage in the 
 pipeline. But somebody blinked. Where is the problem?
 
 Garret



Re: resource encoding troubles

2014-08-28 Thread Francois Meillet
http://wicket.apache.org/guide/guide/

François Meillet
Formation Wicket - Développement Wicket





Le 28 août 2014 à 19:24, Garret Wilson gar...@globalmentor.com a écrit :

 So are you saying that Wicket does not support ISO-8859-1 properties files 
 that adhere do the Java standard? Or are you saying, I don't know what the 
 problem is, I'm just giving you a workaround? If so, I appreciate the 
 workaround tip, but that still doesn't explain what the problem is.
 
 I'm the sort of person who doesn't like to wave my hands as we say. I like 
 to find the source of the problem. My configuration, as far as I can tell, is 
 correct. Moreover, it is technically more correct than the 
 *.utf8.properties approach, as my approach follows the standard. In fact my 
 approach should be the default. So does anyone know why my configuration does 
 not work? What am I doing wrong?
 
 Sincerely,
 
 Garret
 
 On 8/28/2014 10:18 AM, Francois Meillet wrote:
 use *.utf8.properties
 
 François Meillet
 Formation Wicket - Développement Wicket
 
 
 
 
 
 Le 28 août 2014 à 17:47, Garret Wilson gar...@globalmentor.com a écrit :
 
 I have Wicket 7.0.0-M2 running on embedded Jetty, which is correctly 
 returning a content type of UTF-8 for my Wicket page:
 
   Date: Thu, 28 Aug 2014 15:37:52 GMT
   Expires: Thu, 01 Jan 1970 00:00:00 GMT
   Pragma: no-cache
   Cache-Control: no-cache, no-store
   Content-Type: text/html; charset=UTF-8
   Transfer-Encoding: chunked
   Server: Jetty(9.1.0.v20131115)
 
 
 I have a properties file FooterPanel.properties that contains the following 
 line (encoded in ISO-8859-1, as properties files unfortunately require):
 
   copyright=© 2014 Example, Inc.
 
 
 FooterPanel.html is encoded in UTF-8, has the appropriate XML prolog, and 
 contains the following reference to the property resource:
 
   ?xml version=1.0 encoding=utf-8?
   ...
   psmallwicket:message key=copyright©
   Example/wicket:message/small/p
 
 
 When this all is rendered, here is what I see in Firefox 31 and Chrome 37:
 
   � 2014 Example, Inc.
 
 
 I thought I had all the correct encoding indicators at each stage in the 
 pipeline. But somebody blinked. Where is the problem?
 
 Garret
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



Re: StringResourceModel with a defaultValue as model

2014-07-18 Thread Francois Meillet
In your Application.properties
you add the key key.to.be.good=theValue

and you can use the StringResourceModel like that

add( new Label(,  new StringResourceModel(key.to.be.good, null)));


François Meillet
Formation Wicket - Développement Wicket





Le 18 juil. 2014 à 18:14, Patrick Davids patrick.dav...@nubologic.com a écrit 
:

 Hi all,
 is there any way to implement a StringResourceModel which allows to give 
 a defaultValue as model?
 
 First I tried to override getDefaultModelAsString() of Label. (is final)
 Than I tried to implement an extending 
 ModeledDefaultValueStringResourceModel, catching a 
 MissingResourceException on getObject() or load() and retrieving my own 
 ModelString defaultValue, but everthing is final here, too.
 
 So, Im not able to achieve this, right now.
 
 I would like to do this, because I have a dynamic way of giving buttons 
 a label depending of my Wizard-subclass (have my own 
 SpecialWizardButtonBar).
 
 And if a button label is not availabe I want to fallback somewhere, but 
 the default cannot be a StringResourceModel.
 
 Can someone help? Or is this a feature request and have to open a ticket?
 
 kind regards, nice weekend
 PatrickB�CB��[��X��ܚX�KK[XZ[�\�\��][��X��ܚX�P�X��]�\X�K�ܙ�B��܈Y][ۘ[��[X[��K[XZ[�\�\��Z[�X��]�\X�K�ܙ�B�



Re: Validate FormComponent raw input before conversion

2014-07-12 Thread Francois Meillet
TextFieldInteger t = new TextFieldInteger(xyz) {

@Override
public final C IConverterC getConverter(ClassC clazz) {
return (IConverterC) new IntegerConverter() {
@Override
protected ConversionException 
newConversionException(String message, Object value, Locale locale) {
return new 
ConversionException(message).setSourceValue(value)
.setTargetType(getTargetType())
.setConverter(this)
.setLocale(locale)
.setResourceKey(integerKey);  
--
}
};
}
};


The integerKey : the key in the Application.properties for the message


François Meillet
Formation Wicket - Développement Wicket





Le 11 juil. 2014 à 21:11, Jack Berg erki.pub...@gmail.com a écrit :

 Hello!
 
 I have textfield backed by Integer Model object in the web app and a number
 field in the database.
 The maximum number the database can hold is less than Integer.MAX_VALUE so I
 have added a validator which checks that and reports the valid range. 
 
 The problem is that when the user enters a value larger than
 Integer.MAX_VALUE, the conversion fails and user recieves a generic message.
 
 Using BigInteger and BigDecimal everywhere in models seems excessive.
 And it seems I can't validate the raw input string before conversion? Would
 you consider adding this feature or is there a better way?
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Validate-FormComponent-raw-input-before-conversion-tp4666560.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: Pom.xml errors in Wicket

2014-07-08 Thread Francois Meillet
Add

 dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket-core/artifactId
version${wicket.version}/version
/dependency


 dependency
groupIdorg.slf4j/groupId
artifactIdslf4j-api/artifactId
version${slf4j-api.version}/version
/dependency


François Meillet
Formation Wicket - Développement Wicket





Le 8 juil. 2014 à 18:03, eaglei22 jchojnack...@gmail.com a écrit :

 Hello, I am getting an error:
 
 Missing artifact org.apache.wicket:wicket:pom:6.15.0:compile
 
 
 This is when I try to update to 6.15.0 from 1.5.5 .. I also get it for
 slf4j.. Here are the two errors together:
 
 7/8/14 11:01:51 AM CDT: Missing artifact
 org.apache.wicket:wicket:pom:6.15.0:compile
 7/8/14 11:01:51 AM CDT: Missing artifact
 org.slf4j:slf4j-api:jar:1.6.4:compile
 
 I can't understand why. It does this even if I change it to 6.12.0 for
 instance. What can I do to troubleshoot this, I don't get what would cause
 this issue. Here is my pom..
 
 properties
   wicket.version6.15.0/wicket.version
   jetty.version7.4.0.v20110414/jetty.version
   log4j.version1.2.16/log4j.version
   slf4j.version1.6.1/slf4j.version
   /properties
 
   dependencies
   
   
   dependency
   groupIdorg.apache.wicket/groupId
   artifactIdwicket/artifactId
   version${wicket.version}/version
   typepom/type
   /dependency
   dependency
   groupIdorg.apache.wicket/groupId
   artifactIdwicket-datetime/artifactId
   version${wicket.version}/version
   /dependency
   dependency
   groupIdorg.apache.wicket/groupId
   artifactIdwicket-extensions/artifactId
   version${wicket.version}/version
   /dependency
   dependency
   groupIdorg.apache.wicket/groupId
   artifactIdwicket-ioc/artifactId
   version${wicket.version}/version
   /dependency
   dependency
   groupIdorg.apache.wicket/groupId
   artifactIdwicket-spring/artifactId
   version${wicket.version}/version
   /dependency
 
   
 
   dependency
   groupIdlog4j/groupId
   artifactIdlog4j/artifactId
   version1.2.16/version
   /dependency
   dependency
   groupIdorg.slf4j/groupId
   artifactIdslf4j-log4j12/artifactId
   version${slf4j.version}/version
   /dependency
   dependency
   groupIdorg.slf4j/groupId
   artifactIdjcl-over-slf4j/artifactId
   version${slf4j.version}/version
   typejar/type
   scopecompile/scope
   /dependency
 
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Pom-xml-errors-in-Wicket-tp4666492.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: [6.16] AjaxButton.onSubmit not working after upgrading to wicket 6

2014-07-05 Thread Francois Meillet
On Wicket 7.02 it works.
With wicket-bootstrap dependencies.

Have you set a breakpoint in the onSubmit method of your ajax submit button ?

François


François Meillet
Formation Wicket - Développement Wicket





Le 5 juil. 2014 à 11:42, smallufo small...@gmail.com a écrit :

 I have a LoginModal which pops up a modal with username / password for user
 to login.
 It works before wicket 6.
 After upgrading to wicket 6 , it's not working anymore.
 
 Can someone check where goes wrong ?
 
 Here is the LoginModal code :
 http://pastebin.com/hNTMs3A7
 
 And here is the LoginPage code :
 http://pastebin.com/aDDxuZmx
 
 In wicket 1.5 , it generate the following code :
 input type=submit name=:submit id=*id98* value=submit
 input type=button name=cancel id=*id99* value=cancel
 And I search id98 , id99 , I can see them 'hooked' into wicket by
 
 Wicket.Event.add(window, domready, function(event) {
 Wicket.Ajax.ajax({sc::submit,c:id98,u:./page?19-1.IBehaviorListener.0-form-submit,e:click,f:id97,m:POST});;
 Wicket.Ajax.ajax({sc:cancel,c:id99,u:./page?19-1.IBehaviorListener.0-form-cancel,e:click,f:id97,m:POST});;
 
 But after upgrading to wicket 6 (well , with wicket-bootstrap ) , it
 generates :
 input type=submit class=btn btn-default name=:submit id=*submitdc*
 value=submit
 input type=button class=btn btn-default name=cancel id=*canceldd*
 value=cancel
 
 But I cannot find another submitdc or  canceldd string in the source
 code.
 
 So , no matter 'submit' or 'cancel' , the console prints nothing ( I put
 some logging in the onSubmit , .
 Wicket AJAX Debug console didn't show anything.
 
 What may go wrong here ?
 Thanks.



Re: [6.16] AjaxButton.onSubmit not working after upgrading to wicket 6

2014-07-05 Thread Francois Meillet
Run your app in debug mode and set some breakpoint.

eclipse
http://www.eclipse.org/jetty/documentation/current/debugging-with-intellij.html
http://www.vogella.com/tutorials/EclipseDebugging/article.html
http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fpreferences%2Frun-debug%2Fref-run_debug.htm

intellij
http://www.jetbrains.com/idea/webhelp/run-debug-configurations.html
http://www.jetbrains.com/idea/webhelp/creating-and-editing-run-debug-configurations.html

François Meillet
Formation Wicket - Développement Wicket





Le 5 juil. 2014 à 14:56, smallufo small...@gmail.com a écrit :

 2014-07-05 20:55 GMT+08:00 smallufo small...@gmail.com:
 
 
 But i still find another id6c or id6d  in the source code.
 
 
 sorry typo :
 
 But i still *cannot* find another id6c or id6d  in the source code.



Re: Errors in data view , req for help to fix the error in code

2014-05-27 Thread Francois Meillet
The DemoBean needs to implement the Serializable interface.

François Meillet
Formation Wicket - Développement Wicket





Le 27 mai 2014 à 07:54, kumar ramanathan kumarramana...@gmail.com a écrit :

 Hi Friends ,
 
 Am trying to execute a wicket program to accomplish the below task,
 
 a. a submit button is in place in a form
 b. when I click that i have to show the ouput in data view of the same page
 
 My codes are below and need your help to fix the erros and get the ouput
 
 
 *Demoapplication.java*
 
 package com.demo.application;
 
 import org.apache.wicket.Page;
 import org.apache.wicket.protocol.http.WebApplication;
 import com.demo.pages.*;
 
 public class DemoApplication extends WebApplication {
 
   @Override
   public Class? extends Page getHomePage() {
   // TODO Auto-generated method stub
   return DemoHomePage.class;
   }
 
 }
 
 DemoHomePage.html:
 html
 body
 form wicket:id=homePageForm
 input type=submit value=ok
 /form
 
 
 Id 
 Name 
 
 
 
 
 
 /body
 /html
 
 DemoHomePage.java
 package com.demo.pages;
 
 import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.wicket.markup.html.WebPage;
 import org.apache.wicket.markup.html.form.*;
 import org.apache.wicket.markup.html.list.*;
 import org.apache.wicket.markup.repeater.Item;
 import org.apache.wicket.markup.repeater.RepeatingView;
 import org.apache.wicket.markup.repeater.data.DataView;
 import org.apache.wicket.markup.repeater.data.ListDataProvider;
 
 import com.sun.xml.internal.ws.org.objectweb.asm.Label;
 
 
 
 public class DemoHomePage extends WebPage {
 public DemoHomePage ()
 {
  Form form=new Form(homePageForm){
 public void submit(){
   ListDemoBean list = new ArrayList();
   list.add(new DemoBean(1,ram));
   list.add(new DemoBean(2,sam));
   
   ListDataProviderDemoBean listDataProvider = new
 ListDataProviderDemoBean(list);
   
   DataViewDemoBean dataView = new
 DataViewDemoBean(row,listDataProvider){
   protected void populateItem(ItemDemoBean item){
   DemoBean bean=item.getModelObject();
   RepeatingView repeatingView = new 
 RepeatingView(dataRow);
   repeatingView.add(new 
 Label(repeatingView.newChildId().bean.getId()));
   repeatingView.add(new 
 Label(repeatingView.newChildId().bean.getName()));
   item.add(repeatingView);
   }
   };
   
   add(dataView);
 }
  };
 
 }
 
 }
 
 Am getting the below error in the highlighted red area ListDataProvider
 DemoBean and repeatingView.add.(.)
 
 Error: 
 Bound mismatch: The type DemoBean is not a valid substitute for the bounded
 parameter T extends Serializable of the type ListDataProviderT
 The method add(Component...) in the type MarkupContainer is not applicable
 for the arguments (Label)
 
 DemoBean.java
 
 package com.demo.pages;
 
 public class DemoBean {
 public String id;
 public String name;
 
 public DemoBean(String id,String name)
 {
   this.id=id;this.name=name;
 }
 
 public String getId(){
   return this.id;
 }
 
 public void setId(String id){
   this.id=id;
 }
 
 public String getName(){
   return this.name;
 }
 
 public void setName(String name){
   this.name=name;
 }
 
 
 }
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Errors-in-data-view-req-for-help-to-fix-the-error-in-code-tp4666025.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: Errors in data view , req for help to fix the error in code

2014-05-27 Thread Francois Meillet
You should read these very good documentation

http://wicket.apache.org/guide/guide/single.pdf
http://www.wicket-library.com/wicket-examples-6.0.x/repeater/


François Meillet
Formation Wicket - Développement Wicket





Le 27 mai 2014 à 09:16, kumar ramanathan kumarramana...@gmail.com a écrit :

 Thanks,
 The serializable error resolved once it has been implemented. I have the
 error in the below add component still(which is in bold font).Please help me
 on this.
 
 repeatingView*.add(n*ew Label(repeatingView.newChildId(), bean.getId()));
   repeatingView.add(new 
 Label(repeatingView.newChildId(),*
 bean.getName()));*
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Errors-in-data-view-req-for-help-to-fix-the-error-in-code-tp4666025p4666027.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: NPE in AbstractSingleSelectChoice

2014-05-25 Thread Francois Meillet
When the DropDownChoice try to convert the submitted choice id back to the 
choice object
there is an iteration over the choices.
You get the NPE in this iteration because nullItem has no id.

Have a look to AbstractSingleSelectChoice's setNullValid(true) method to 
include a null value.
http://ci.apache.org/projects/wicket/apidocs/6.x/org/apache/wicket/markup/html/form/AbstractSingleSelectChoice.html#setNullValid(boolean)



François Meillet
Formation Wicket - Développement Wicket





Le 25 mai 2014 à 21:18, Marco Springer ma...@glitchbox.nl a écrit :

 Haven't run the code but my guess is that the idValue returns a null instead 
 of  0.
 Take a look at AbstractSingleSelectChoice.convertChoiceIdToChoice(String) 
 line 
 281. (Wicket 6.15.0)
 if(renderer.getIdValue(choice, index).equals(id)
 This would trigger a NPE if a null is returned, which would be the case with 
 your nullItem.
 
 Cheers,
 Marco
 
 On Sunday 25 May 2014 21:06:41 Lucio Crusca wrote:
 I'm pretty sure it's my fault, but I can't spot it. I'm trying to use a
 DropDownChoice with custom renderer and a PropertyModel, without a Form.
 
 I get a NullPointerException in AbstractSingleSelectChoice, here is the
 quickstart:
 
 http://www.sulweb.org/download/sparsi/quickstart.zip
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



Re: How can I display modal dialog only if validation is sucessful?

2014-05-22 Thread Francois Meillet
Hi Bruce,

This is just one solution :
Have a look at http://pastebin.com/03DF5pcw


François Meillet
Formation Wicket - Développement Wicket





Le 21 mai 2014 à 16:15, Bruce Lombardi brlom...@gmail.com a écrit :

 Hi,
 
 
 
 I have a form with several question that a user must answer. If the answers
 are correct, an email is sent to the user and the user is returned to the
 login page. That's a bit abrupt for the user and I  would like to provide a
 simple modal dialog that confirms that the email is sent before sending them
 to the home page. However, if the answers to the questions are not correct,
 then a feedback panel must be displayed.
 
 
 
 I've looked at the approaches to providing a confirmation panel in this link
 https://cwiki.apache.org/confluence/display/WICKET/Getting+user+confirmation
 and other places, but I am having a problem with the approach. The
 JavaScript seems to run as soon as the button is clicked - before onSubmit
 or onValidate runs on the server. So I can't stop the pop-up from showing
 if the questions were not answered correctly.
 
 
 
 Does anyone know a way I can display the modal dialog only after validation
 has run?
 
 
 
 Thanks,
 
 
 
 Bruce
 
 
 



Re: DiskDataStore errors in production

2014-05-17 Thread Francois Meillet
You need to increase the maximum number of file handles allowed by your system.

On linux/OSX
find open files limit per process: ulimit -n
count all opened files by all process: lsof | wc -l
list of processes and the number of file handles they have open: lsof | cut -d 
  -f 1 | uniq -c | sort -nr


François Meillet
Formation Wicket - Développement Wicket





Le 15 mai 2014 à 12:29, Andrea Del Bene an.delb...@gmail.com a écrit :

 Hi,
 
 which version of Wicket are you using?
 Hi, my application in production often gets this error:
 May 14 09:12:27 ERROR
 DiskDataStore-/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/4729/2939/909EAC3343856968BA7B1864B71CEA85/data
 (Too many open files)
 java.io.FileNotFoundException:
 /opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/4729/2939/909EAC3343856968BA7B1864B71CEA85/data
 (Too many open files)
 at java.io.RandomAccessFile.open(Native Method)
 at java.io.RandomAccessFile.init(RandomAccessFile.java:233)
 at
 org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(DiskDataStore.java:425)
 at
 org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:343)
 at
 org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:181)
 at
 org.apache.wicket.pageStore.AsynchronousDataStore.storeData(AsynchronousDataStore.java:228)
 at
 org.apache.wicket.pageStore.DefaultPageStore.storePageData(DefaultPageStore.java:120)
 at
 org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:154)
 at
 org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.storeTouchedPages(PageStoreManager.java:412)
 at
 org.apache.wicket.page.RequestAdapter.commitRequest(RequestAdapter.java:181)
 
 
 
 
 and now I am getting this error for every page opened making the log file
 extremely large:
 
 May 14 11:36:31 WARN  DiskDataStore-Cannot save page with id '866' because
 the data file cannot be opened.
 May 14 11:36:31 ERROR
 DiskDataStore-/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data
 (Permission denied)
 java.io.FileNotFoundException:
 /opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data
 (Permission denied)
 at java.io.RandomAccessFile.open(Native Method)
 at java.io.RandomAccessFile.init(RandomAccessFile.java:233)
 at
 org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(DiskDataStore.java:425)
 at
 org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:343)
 at
 org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:181)
 at
 org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable.run(AsynchronousDataStore.java:355)
 at java.lang.Thread.run(Thread.java:722)
 May 14 11:36:31 WARN  DiskDataStore-Cannot save page with id '0' because the
 data file cannot be opened.
 May 14 11:36:32 ERROR
 DiskDataStore-/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data
 (Permission denied)
 java.io.FileNotFoundException:
 /opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data
 (Permission denied)
 at java.io.RandomAccessFile.open(Native Method)
 at java.io.RandomAccessFile.init(RandomAccessFile.java:233)
 at
 org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(DiskDataStore.java:425)
 at
 org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:343)
 at
 org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:181)
 at
 org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable.run(AsynchronousDataStore.java:355)
 at java.lang.Thread.run(Thread.java:722)
 May 14 11:36:32 WARN  DiskDataStore-Cannot save page with id '0' because the
 data file cannot be opened.
 
 
 
 
 
 What can be causing these errors? is this more of a Tomcat thing or Wicket?
 
 Thanks!
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/DiskDataStore-errors-in-production-tp4665841.html
 Sent from the Users forum mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



Re: Extending Border

2014-05-14 Thread Francois Meillet
Have a look at 
http://apache-wicket.1842946.n4.nabble.com/Adding-border-in-border-td4660191.html#a4660195


François Meillet
Formation Wicket - Développement Wicket





Le 8 mai 2014 à 23:07, Nick Pratt nbpr...@gmail.com a écrit :

 Ive got a class 'A' that extends Border, with the following markup:
 
 wicket:border
 div
 h1span wicket:id=header/spanspan
 class=closeaX/a/span/h1
 wicket:body/wicket:body
 /div
 /wicket:border
 
 
 This all works fine.  Can I extend class A? If so what should the markup of
 class B look like (i.e. how do I get the child markup dropped in to the
 wicket:body section)?
 
 I'm currently hitting:
 
 B.html: Unable to find wicket:border tag in associated markup file for
 Border: [B [Component id = bPanel]] MarkupStream: [unknown]
 
 
 
 Regards
 
 Nick



Re: Please help explain the script below, what's the 'className';'unloadConfirmation','mask' stand for? Is there relative docs could be refered to?

2014-05-12 Thread Francois Meillet
From the modal.js file
org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js

className 
set the class of window (blue or silver by default)

unloadConfirmation
Display confirmation dialog if the user is about to leave a page (IE and FF).

mask
Transparent or semi-transparent masks that prevents user from interacting
with the portion of page behind a window.


Fran?0?4ois Meillet
Formation Wicket - D??veloppement Wicket





Le 7 mai 2014 ?? 05:51, 003210 sunya...@raisecom.com a ??crit :

 
 Hi,
 Please help explain the script below, what's the 
 'className';'unloadConfirmation','mask' stand for?
 Is there relative docs could be refered to?
  
 'var element=document.getElementById('container');
 var settings = new Object();
 settings.minWidth=200;
 settings.minHeight=200;
 settings.className='w_blue';
 settings.width=700;
 settings.height=500;
 settings.resizable=true;
 settings.element=element;
 settings.title='2151.11';
 settings.mask='semi-transparent';
 settings.autoSize=false;
 settings.unloadConfirmation=true;
 Wicket.Window.create(settings).show();'
  
  
  
  
  ??
 ??58963399-5244



Re: Application Scope

2014-05-06 Thread Francois Meillet
You can use MyApp.get().setMetaData() and MyApp.get().getMetaData() 

François Meillet
Formation Wicket - Développement Wicket





Le 6 mai 2014 à 14:50, Richard W. Adams rwada...@up.com a écrit :

 Are you referring to org.apache.wicket.Application? I don't see a 
 getTasksMap() method there.  We use Wicket 1.4.17  our company will not 
 allow us to upgrade to newer versions). If getTasksMap() is unavailable in 
 1.4.17, could Application.getSharedResources() be used in a similar way?
 
 
 
 
 From:   Martin Grigorov mgrigo...@apache.org
 To: users@wicket.apache.org users@wicket.apache.org
 Date:   05/06/2014 07:26 AM
 Subject:Re: Background Threading
 
 
 
 Hi,
 
 You can put the tasks in an application scoped structure (e.g.
 MyApplication.get().getTasksMap()) and use a serializable key.
 
 Martin Grigorov
 Wicket Training and Consulting
 
 
 On Tue, May 6, 2014 at 2:11 PM, Richard W. Adams rwada...@up.com wrote:
 
 Interesting approach. Our use case is more complex, as it runs a
 background task in a separate thread. Our task has three basic
 requirements. It must:
 
 1. Be cancellable.
 
 2. Report its outcome (success/failure/warning).
 
 3. Report incremental progress.
 
 Our fundamental problem is not how to display the progress bar, it's how
 to determine the outcome of the background thread. That's an 
 unexpectedly
 a tough nut to crack. The vast majority of examples we've seen use the
 Runnable interface (which doesn't help us, as it can't be canceled or
 return a value), rather than Callable interface (which meets our needs,
 but doesn't seem to play well with Wicket)
 
 
 
 
 From:   Colin Rogers colin.rog...@objectconsulting.com.au
 To: users@wicket.apache.org users@wicket.apache.org
 Date:   05/05/2014 08:14 PM
 Subject:RE: Progress Bar
 
 
 
 There is a pretty nifty, jquery based progress bar, in wicket-jquery-ui
 library...
 
 
 http://www.7thweb.net/wicket-jquery-ui/progressbar/DefaultProgressBarPage
 
 Cheers,
 Col.
 
 -Original Message-
 From: Richard W. Adams [mailto:rwada...@up.com]
 Sent: Tuesday, 6 May 2014 3:19 AM
 To: users@wicket.apache.org
 Subject: Progress Bar
 
 We have a requirement to implement a progress bar for long-running 
 server
 operations. We can't use the code at
 https://github.com/wicketstuff/core/wiki/Progressbar, because it doesn't
 meet our corporate user interface look-and-feel standards.
 
 So, we started our own implementation. Our test page contains these
 methods below (the TestExecutor below class implements
 CallableExecutorResult).
 
 
 
 //--
 private Component createButton() {
return new AjaxButton(start-button) {
private static final long serialVersionUID = -1;
 
@Override protected void onSubmit(final 
 AjaxRequestTarget
 ajax, final Form? form) {
 
final ExecutorService service = Executors.
 newSingleThreadExecutor();
try {
final ProgressBarTestPage page =
 ProgressBarTestPage.this;
final TransactionData data = new
 TransactionData (page.getId(), false);
final TestExecutor executor = new
 TestExecutor(data, getPermissions());
 
executor.addListener(page); // 
 Request
 notification when done
future = service.submit(executor); //
 Begin execution
progressBarUpdater.start(ajax, 
 executor);
 // Start polling for progress
 
} catch (final Exception ex) {
throw new RuntimeException(ex);
}
service.shutdown(); // Terminate gracefully
 (VM probably
}   //  won't exit if we fail to do 
 this)
};
 }
 
 
 //--
 /**
   Observer Pattern method to let us know when the task is done so we 
 can
 check how things went.
 */
 @Override public void executionComplete(final EnmCallableExecutor
 executor) {
 
try {
if (!future.isCancelled()) { //
 Unless execution was canceled
final ExecutorResult result = future.get(); //
 Get the outcome
System.out.println(result);
/*
 * TODO: Show success or error message
 */
}
} catch (final Exception ex) {
ex.printStackTrace();
}
 }
 
 The ProgessBarUpdater class has this method:
 
 
 
 //--
 /**
 * Displays the progress bar amp; begins the polling. We don't start 
 the
 polling until
 * explicitly told to do, for 

Re: Application Scope

2014-05-06 Thread Francois Meillet
sessions are serialised

François Meillet
Formation Wicket - Développement Wicket





Le 6 mai 2014 à 15:28, Richard W. Adams rwada...@up.com a écrit :

 One more question: Since each task is associated with a single user, would 
 it make more sense to create a task map in Session scope? Or will Wicket 
 try to serialize a map we put into the session?
 
 
 
 
 From:   Martin Grigorov mgrigo...@apache.org
 To: users@wicket.apache.org users@wicket.apache.org
 Date:   05/06/2014 08:06 AM
 Subject:Re: Application Scope
 
 
 
 Please don't change the thread subject for all your answers. This confuses
 the threading support in some mail clients.
 
 I meant *My*Application, i.e. *Your*Application.
 Add this method and map/associate all tasks that your run to some id/key.
 Serialize the key and later get a reference to the FutureTask with
 something like:
 YourApp.get().getTasks().get(theKey).isDone()/.isCanceled()/...
 
 Martin Grigorov
 Wicket Training and Consulting
 
 
 On Tue, May 6, 2014 at 2:50 PM, Richard W. Adams rwada...@up.com wrote:
 
 Are you referring to org.apache.wicket.Application? I don't see a
 getTasksMap() method there.  We use Wicket 1.4.17  our company will not
 allow us to upgrade to newer versions). If getTasksMap() is unavailable 
 in
 1.4.17, could Application.getSharedResources() be used in a similar way?
 
 
 
 
 From:   Martin Grigorov mgrigo...@apache.org
 To: users@wicket.apache.org users@wicket.apache.org
 Date:   05/06/2014 07:26 AM
 Subject:Re: Background Threading
 
 
 
 Hi,
 
 You can put the tasks in an application scoped structure (e.g.
 MyApplication.get().getTasksMap()) and use a serializable key.
 
 Martin Grigorov
 Wicket Training and Consulting
 
 
 On Tue, May 6, 2014 at 2:11 PM, Richard W. Adams rwada...@up.com 
 wrote:
 
 Interesting approach. Our use case is more complex, as it runs a
 background task in a separate thread. Our task has three basic
 requirements. It must:
 
 1. Be cancellable.
 
 2. Report its outcome (success/failure/warning).
 
 3. Report incremental progress.
 
 Our fundamental problem is not how to display the progress bar, it's 
 how
 to determine the outcome of the background thread. That's an
 unexpectedly
 a tough nut to crack. The vast majority of examples we've seen use the
 Runnable interface (which doesn't help us, as it can't be canceled or
 return a value), rather than Callable interface (which meets our 
 needs,
 but doesn't seem to play well with Wicket)
 
 
 
 
 From:   Colin Rogers colin.rog...@objectconsulting.com.au
 To: users@wicket.apache.org users@wicket.apache.org
 Date:   05/05/2014 08:14 PM
 Subject:RE: Progress Bar
 
 
 
 There is a pretty nifty, jquery based progress bar, in 
 wicket-jquery-ui
 library...
 
 
 
 http://www.7thweb.net/wicket-jquery-ui/progressbar/DefaultProgressBarPage
 
 Cheers,
 Col.
 
 -Original Message-
 From: Richard W. Adams [mailto:rwada...@up.com]
 Sent: Tuesday, 6 May 2014 3:19 AM
 To: users@wicket.apache.org
 Subject: Progress Bar
 
 We have a requirement to implement a progress bar for long-running
 server
 operations. We can't use the code at
 https://github.com/wicketstuff/core/wiki/Progressbar, because it 
 doesn't
 meet our corporate user interface look-and-feel standards.
 
 So, we started our own implementation. Our test page contains these
 methods below (the TestExecutor below class implements
 CallableExecutorResult).
 
 
 
 
 
 //--
 private Component createButton() {
return new AjaxButton(start-button) {
private static final long serialVersionUID = -1;
 
@Override protected void onSubmit(final
 AjaxRequestTarget
 ajax, final Form? form) {
 
final ExecutorService service = Executors.
 newSingleThreadExecutor();
try {
final ProgressBarTestPage page =
 ProgressBarTestPage.this;
final TransactionData data = new
 TransactionData (page.getId(), false);
final TestExecutor executor = new
 TestExecutor(data, getPermissions());
 
executor.addListener(page); //
 Request
 notification when done
future = service.submit(executor); //
 Begin execution
progressBarUpdater.start(ajax,
 executor);
 // Start polling for progress
 
} catch (final Exception ex) {
throw new RuntimeException(ex);
}
service.shutdown(); // Terminate 
 gracefully
 (VM probably
}   //  won't exit if we fail to do
 this)
};
 }
 
 
 
 
 //--
 /**
   Observer Pattern method to let us 

Re: onInitialize() and exception handling

2014-04-29 Thread Francois Meillet
You can throw any exception that extends RuntimeException

François Meillet
Formation Wicket - Développement Wicket





Le 29 avr. 2014 à 14:35, Alberto Brosich abros...@ogs.trieste.it a écrit :

 
 Hi,
 
 I have a wicket application where I create page components (mainly
 labels and ListViews) using onInitialize() method of some panels I have
 in every page.
 In some cases, during the creation of the components, some exceptions
 can occur (for example if the content is downloaded from a webservice
 that returns error 404), and I would propagate it, but onInitialize() of
 Panel does not throw exceptions.
 So my questions are: which are the best practices to deal that cases?
 Is onInitialize() the best place where create components? 
 
 Regards
 
 Alberto
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



Re: Handling with Feedback Messages / setMaxMessages(1)-Problem / best practise

2014-03-04 Thread francois meillet
Session.get().getFeedbackMessages().clear();

François


On Tue, Mar 4, 2014 at 10:07 AM, Patrick Davids 
patrick.dav...@nubologic.com wrote:

 Hi all,
 I would like to have a FeedbackPanel always showing only one error message.

 As seen in FeedbackPanel code setMaxMessages() does this.
 But it seems it does not clear the rest of messages after doing its job.

 When I have put 3 error messages on a page, only the first one is shown.
 This is what I want, but reloading the page, all other messages are
 shown in sequence as long as I reload the page and until all are processed.

 Is setMaxMessage() not the recommended way for what I want to do?
 How can I force a clear?

 thanx in advance :-)
 Patrick
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: double type text field - auto roundsoff

2014-02-27 Thread francois meillet
Is there any specific DoubleConverter initialized in the Application's
newConverterLocator() method ?

François


On Wed, Feb 26, 2014 at 5:55 PM, nazeem md.naz...@gmail.com wrote:

 Changing the object type to Big Decimal solves this .. Still not clear
 how..
 if any body knows any clue please let me know..


 TextFieldBigDecimal 

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/double-type-text-field-auto-roundsoff-tp4664628p4664701.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: What is difference between setModel and setDefaultModel

2014-02-16 Thread Francois Meillet
in 6.13.0

Component#setDefaultModel(final IModel? model)
IGenericComponent#setModel(IModelT model);

The IGenericComponent implementations setter are typesafe.


François Meillet
Formation Wicket - Développement Wicket





Le 16 févr. 2014 à 10:15, Farrukh SATTOROV fireda...@gmail.com a écrit :

 What is difference between IGenericComponent#setModel(IModelT model) and
 Component#setDefaultModel(IModelT model) in purpose for practical use.
 
 -- 
 Regards, Farrukh



Re: Submitting values for null associations

2014-02-11 Thread francois meillet
The entity User needs to have a Job's instance when you construct your
model.

François


On Tue, Feb 11, 2014 at 2:56 PM, ChambreNoire a...@tentelemed.com wrote:

 Hi,

 I have a form which can flip between edit and view modes. Its fields share
 a
 common CompoundPropertyModel which in turn points to an AbstractEntityModel
 similar to that described in the 'Wicket in Action' blog.

 My problem is with associations that happen to be null. If I have a User
 entity with a lazily initialised Job association, during viewing all works
 fine but when I edit the user and enter some text into a field that is
 bound
 to User.Job.Name I get a WicketRuntimeException: Attempted to set
 property
 value on a null object. How is this kind of situation generally handled?

 Many thanks,

 Chambre

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Submitting-values-for-null-associations-tp4664365.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: Submitting values for null associations

2014-02-11 Thread francois meillet
As Hibernate save a new Job instance when you save the User if the relation
is empty
why don't you load the job (with an eager fetching strategy) when you load
the user ?

François


On Tue, Feb 11, 2014 at 3:22 PM, ChambreNoire a...@tentelemed.com wrote:

 I forgot to mention, the reason I don't systematically make a new Job
 instance is that when saving the form hibernate creates a new Job instance
 which is effectively empty if no Job details have been input.

 Chambre

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Submitting-values-for-null-associations-tp4664365p4664369.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: Submitting values for null associations

2014-02-11 Thread francois meillet
You use cascade=all on the job relation.
When job is created, it should have at least one non-empty property.
Job's instance is null because it doesn't have any non empty property.

François


On Tue, Feb 11, 2014 at 3:59 PM, ChambreNoire a...@tentelemed.com wrote:

 Why would that make any difference? A null Job is still a null Job. Unless
 I'm missing something...

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Submitting-values-for-null-associations-tp4664365p4664371.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: What is the default size of max per session in wicket

2014-02-09 Thread Francois Meillet
There is no simple response.
It depends on your non-functional requirements, on what you are trying to 
achieve, on the pages's size, on the types of model you use.

The api says:
IStoreSettings 
setMaxSizePerSession
Sets the maximum size of the File where page instances per session are stored. 
After reaching this size the DiskDataStore will start overriding the oldest 
pages at the beginning of the file.

I would say that 10mb is a good compromise.

François Meillet
Formation Wicket - Développement Wicket





Le 8 févr. 2014 à 09:58, Sharad Raut raut.sha...@gmail.com a écrit :

 Thanks for replay.
 By default it shows value 10MB.
 Is it sufficient 
 
 
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/What-is-the-default-size-of-max-per-session-in-wicket-tp4664307p4664315.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: What is the default size of max per session in wicket

2014-02-07 Thread francois meillet
Have a look to setMaxSizePerSession() in the IStoreSettings interface
application.getStoreSettings().setMaxSizePerSession(Bytes.megabytes(30));

François


On Fri, Feb 7, 2014 at 3:06 PM, Sharad Raut raut.sha...@gmail.com wrote:

 What is the default size of max per session in wicket

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/What-is-the-default-size-of-max-per-session-in-wicket-tp4664307.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: Memory leaks best practices

2014-02-06 Thread francois meillet
http://www.yourkit.com/docs/kb/class_loaders.jsp

François


On Thu, Feb 6, 2014 at 3:22 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 The best memory profiler is Eclipse MAT - https://www.eclipse.org/mat/
 But again it helps only with debugging problems in the heap, not in the
 perm gen

 Martin Grigorov
 Wicket Training and Consulting


 On Thu, Feb 6, 2014 at 3:18 PM, Maxim Solodovnik solomax...@gmail.com
 wrote:

  In my case OpenJPA handle DB connection open/close/pooling, so I hope
 this
  is not the case.
 
  Maybe you can suggest server side memory profiler for Ubuntu server?
 
 
  On Thu, Feb 6, 2014 at 9:12 PM, Shengche Hsiao shengchehs...@gmail.com
  wrote:
 
   I had the same issue, my problem was doesn't close the database
  connection!
  
  
   On Thu, Feb 6, 2014 at 8:54 PM, Maxim Solodovnik solomax...@gmail.com
   wrote:
  
Thanks a lot for quick answers have already added -Xms512M -Xmx2G
  -Xss1M
-XX:PermSize=192m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled
   
Now will add *Model.detach(); to the code and will check the
 stability
(currently application works ~2days before PermGen)
   
Redeployment is performed using Tomcat 7.0.50 restart.
   
Any other ideas are appreciated
   
   
On Thu, Feb 6, 2014 at 7:28 PM, Martin Grigorov 
 mgrigo...@apache.org
wrote:
   
 Hi,

 OOM in PermGen is not what you ask for.
 If you leak normal memory than the error would be with heap
  space.
 PermGen memory is used to keep the Class instances and interned
   Strings.
 If you deploy your app for first time then most probably you just
  need
   to
 set the proper initial and max value :
 -XX:PermSize and -XX:MaxPermSize.
 Use JConsole to see what size you need.

 If this error happens on redeploy then most probably you have a
ClassLoader
 memory leak, i.e. you keep references to Class instances and they
   cannot
be
 released so the PermGen is overloaded. Those are very tricky to be
 debugged.


 Martin Grigorov
 Wicket Training and Consulting


 On Thu, Feb 6, 2014 at 1:07 PM, Maxim Solodovnik 
  solomax...@gmail.com
 wrote:

  Hello All,
 
  Recently we have deployed our project to wicket project to
  production
  server.
  And start getting OutOfMemory PermGenSpace.
 
  I believe we have memory leak in our application
  maybe there is best practices how to deal with Models and JPA
   entities
to
  resolve this?
 
  Thanks in advance
 
  --
  WBR
  Maxim aka solomax
 

   
   
   
--
WBR
Maxim aka solomax
   
  
  
  
   --
  
  
 ---
   We do this not because it is easy. We do this because it is hard.
  
 ---
   ShengChe Hsiao
  
 ---
   front...@gmail.com
   front...@tc.edu.tw
  
 ---
   VoIP : 070-910-2450
  
 ---
  
 
 
 
  --
  WBR
  Maxim aka solomax
 



Re: Changed JSESSIONID Results in Wicket Exception

2014-02-05 Thread Francois Meillet
Use a system property :
System.setProperty(wicket.jsessionid.name, JSESSIONID_MYAPP);


François Meillet
Formation Wicket - Développement Wicket





Le 5 févr. 2014 à 22:05, Aaron J. Garcia agar...@rentec.com a écrit :

 Timo Schmidt wicket at xomit.de writes:
 
 
 On Wed 05.02.2014 13:12, Aaron J. Garcia wrote:
 Hi Everyone,
 
 I maintain a Wicket application running on Tomcat 7.0.39, and I recently
 altered $TOMCAT_HOME/conf/context.xml to include a sessionCookieName
 parameter.  I made a change like this:
 
 Context sessionCookieName=JSESSIONID_MYAPP
 
 This properly changes the session cookie that is used by Wicket to
 JESSIONID_MYAPP instead of JSESSIONID.  However, when I start up my Wicket
 app, I get the following error spit out to the logs in Development mode,
 when running in Intellij.  Any idea why?
 
 When I was using the normal JSESSIONID, it was properly ignoring it when it
 was appended to the classname for the SignInPage.
 
 See https://issues.apache.org/jira/browse/WICKET-4873
 
 as of Wicket 6.4.0 you may use a different session id name. Set
 a system property »wicket.jsessionid.name« to the desired
 value.
 
  -Timo
 
 -
 To unsubscribe, e-mail: users-unsubscribe at wicket.apache.org
 For additional commands, e-mail: users-help at wicket.apache.org
 
 
 
 This doesn't work for me.  Looking at the source for WicketObjects.java
 (where the error is coming from), it seems like the className passed into it
 should be passed through Strings.stripJSessionId() before it is attempted to
 be resolved.
 
 Should I open a JIRA issue for this change?  
 
 -- Aaron
 
 WARN  - WicketObjects  - Could not resolve class
 [org.mine.SignInPage;JSESSIONID_MYAPP=AFAB91436EA86A0DF57057C56DEBEEB4]
 java.lang.ClassNotFoundException:
 org/mine/SignInPage;JSESSIONID_MYAPP=AFAB91436EA86A0DF57057C56DEBEEB4
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:340)
   at org.apache.wicket.application.AbstractClassResolver
  .resolveClass(AbstractClassResolver.java:108)
   at org.apache.wicket.core.util.lang.WicketObjects
  .resolveClass(WicketObjects.java:72)
 
 ... snip ...
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



Re: Apache wicket project as osgi compoments

2014-02-04 Thread Francois Meillet
You should have a look at 

http://code.google.com/p/osgi-enterprise/wiki/WicketAndOsgi
https://github.com/wicketstuff/core/wiki/Osgi
http://hwellmann.blogspot.fr/2011/06/wicket-and-osgi.html
http://www.volkomenjuist.nl/blog/2012/07/25/wicket-mounting-in-an-osgi-environment/
https://ops4j1.jira.com/wiki/display/paxwicket/Install+Pax+Wicket
http://karaf.922171.n3.nabble.com/pax-wicket-example-running-on-karaf-td4027622.html

François Meillet
Formation Wicket - Développement Wicket





Le 4 févr. 2014 à 17:01, tho...@jarnot.de a écrit :

 Although we don't know anything about your application structure, I tend to
 answer YES.
 
 Assuming from the subject, that we are talking about OSGi modules (or rather
 bundles), making the application capable of that dynamism is surely
 possible. It simply depends on your decision of utilizing the OSGi
 programming model and execution environment. Do you have your application
 modules OSGi ready?
 
 Having a look a the wicket-distribution it seems to be OSGi-ready. You also
 may have a look at the Pax Wicket extension.
 
 So you're probably good to go.
 
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Apache-wicket-project-as-osgi-compoments-tp4664159p4664164.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: setting response parameters in wicket 6

2014-01-31 Thread Francois Meillet
try that ((WebResponse) 
requestCycle.getResponse()).setContentType(application/json);

François Meillet
Formation Wicket - Développement Wicket





Le 31 janv. 2014 à 09:17, chathuraka.waas chathuraka.w...@gmail.com a écrit 
:

 Hi,
 
 i'm trying to migrate my application from 1.4 to 6 and stuck in a problem. 
 
 the current code for setting content type and other parameters for response
 is, 
 
 requestCycle.getResponse().setContentType(application/json);
 requestCycle.getResponse().setCharacterEncoding(UTF-8);
 requestCycle.getResponse().setContentLength(authUrl.length());
 
 and in wicket 6 it seems response doesnt have those methods. how can i
 achieve this in wicket 6. 
 
 thanks in advance. 
 
 
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/setting-response-parameters-in-wicket-6-tp4664084.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: Error with getPageCount() when extending the Datatable in Wicket 6.13

2014-01-22 Thread Francois Meillet
The api changed.
Just replace the method signature you use in you backend layer.

François Meillet
Formation Wicket - Développement Wicket





Le 23 janv. 2014 à 08:13, chathuraka.waas chathuraka.w...@gmail.com a écrit :

 Hi,
 
 i'm trying to migrate my application from Wicket 1.4 to 6.13.0 and stuck on
 a compilation error related to DataTables.
 
 what my code does is extend the Datatable class. But when i do so it gives
 me a compilation error saying,
 
 getPageCount() in DataTable cannot implement getPageCount() in Ipageable
 return type long is not compatible with int
 
 I looked at both the Datatable class and the Ipagable interface but both
 methods use the long return type.
 
 glad if anyone can shed some light on this issue. Thanks in advance.
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Error-with-getPageCount-when-extending-the-Datatable-in-Wicket-6-13-tp4663896.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: Migrating from 1.4.21 to 6

2014-01-02 Thread Francois Meillet
You should migrate directly to verion 6.
If you have 200 K LoC on the web tier, you should budget between one to three 
months, depending the amount of specific code that has been written to improve 
the 1.4 api.

François Meillet
Formation Wicket - Développement Wicket





Le 2 janv. 2014 à 10:48, Wayne W waynemailingli...@gmail.com a écrit :

 I have about 200,000 lines of code. I don't have time to rewrite the app.
 Is there a fundamental difference the requires a rewrite?
 
 
 On Tue, Dec 31, 2013 at 4:34 PM, Martin Sachs sachs.mar...@gmail.comwrote:
 
 Hi,
 
 i would mirgate to 6 directly, if your application is relativ small and
 without special requesthandlings, webtrackings and last but not least
 javascript dependencies to other framework than wicket.
 
 e.g. for an application with round about 5.000 lines of code its easier
 to update. For big applications (20.000 LoC) an rewrite with wicket-6
 could be better and cleaner with the same effort as updating.
 
 cheers and good luck ;)
 
 Am 30.12.2013 17:45, schrieb Wayne W:
 Hi All,
 
 I'm wanting to upgrade to the latest version of wicket but am worried
 about
 the possible impact. Also I'm wanting to know the best migration plan. Do
 you think it would be best to jump straight to 6 or first upgrade to 5?
 
 Any tips or ideas would be much appreciated.
 
 thanks
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 



Re: response headers in Wicket 6

2013-12-09 Thread Francois Meillet
For the last two lines : 
data.getHeaders().addHeader(key, value);
 or
((WebResponse) attributes.getResponse()).addHeader(key, value);

for response.setAttachmentHeader(defaultFileName);
(from WebResponse.java)
setHeader(Content-Disposition, attachment + ((!Strings.isEmpty(filename)) ? 
(; filename=\ + filename + \) : ));


François Meillet
Formation Wicket - Développement Wicket





Le 9 déc. 2013 à 20:46, Entropy blmulholl...@gmail.com a écrit :

 Hi, I'm converting one of our apps from 1.4.7 to 6.12.  the old code extended
 WebResource.  I changed it to extend ByteArrayResource.  I changed
 setheaders to setResponseHeaders.  But the code inside, I am not sure how to
 change to Wicket 6 as the parameters are very different.
 
   @Override
   protected void setResponseHeaders(AbstractResource.ResourceResponse 
 data,
 IResource.Attributes attributes) {
   super.setResponseHeaders(data, attributes);
   response.setAttachmentHeader(defaultFileName);
   response.setHeader(Cache-Control, No-Cache); 
   response.setHeader(Cache-Control, No-Store);
   }
 
 How can I adapt the last three lines to Wicket 6?
 
 
 
 
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/response-headers-in-Wicket-6-tp4662864.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
 



a discussion on current java web stacks

2013-12-03 Thread francois meillet
http://www.reddit.com/r/java/comments/1rwvqa/current_java_web_stacks/?sort=old

François


In French - mission wicket à Paris

2013-11-26 Thread Francois Meillet
recherche un(e) Développeur Java pour un très bon client.
 
Indispensable :Java, Wicket, JPA, Hibernate.
Durée : 6 mois +
Lieu : Paris
Démarrage : ASAP
 
Contexte :
Sous l’autorité d’un chef de projet, vous intégrerez une équipe qui assure la 
conception, le développement, la diffusion, les évolutions et les maintenances 
d’une application de prise de commande.
Vous devrez concevoir la solution technique / mettre en place l’architecture 
logicielle / réaliser des développements et assurer la maintenance de 
différents composants.
 
Tâches quotidiennes :
-  Participer aux travaux d’étude sur l’architecture des composants 
à mettre en place
-Participer aux spécifications du système à développer
-  Réaliser les développements et les tests unitaires en utilisant 
les procédures et outils de l’équipe projet
-Documenter ses développements et documenter les 
spécifications détaillées
-Automatiser au maximum les tests unitaires et les tests 
fonctionnels
-Participer à toutes les réunions et rites organisées dans 
le cadre du mode agile.

Si cette mission vous correspond et vous intéresse, merci de m'envoyer votre CV.

François Meillet
Formation Wicket - Développement Wicket







Re: Filtered feedback message cleanup

2013-11-19 Thread Francois Meillet
Form form = new Form(form);
form.setOutputMarkupId(true);
add(form);

RequiredTextFieldString username = new
RequiredTextFieldString(username, new ModelString());
form.add(username);

final PasswordTextField password = new 
PasswordTextField(password, new
ModelString());
password.add(new ValidationMessageBehavior());
form.add(password);

LinkString localeLinkDE = new LinkString(localeLinkDE) {
@Override
public void onClick() {
Locale localeDE = new Locale(de, DE);
setLocale(localeDE);
password.getFeedbackMessages().clear();
}
};
add(localeLinkDE);



-
François Meillet
Formation Wicket - Développement Wicket
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Filtered-feedback-message-cleanup-tp4662503p4662523.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: logout on session destroy

2013-11-16 Thread Francois Meillet
You can write a unboundListener and register it in your sessionStore.
This code should be in your application init()

getSessionStore().registerUnboundListener( new ISessionStore.UnboundListener() {
@Override
public void sessionUnbound(String sessionId) {
// logout timestamp in the database
}
});


François Meillet
Formation Wicket - Développement Wicket





Le 15 nov. 2013 à 23:19, Dirk Wichmann dir...@team-wichmann.de a écrit :

 Hi all,
 
 it's quite frustrating, a simple thing gets complicated.
 I have a Webapp with login page and logout button.
 If the user clicks the logout I write a logout timestamp in the database.
 Now I want to write the same timestamp when the session expires.
 Only thing I have found on the Web is to use
 WebApplication.sessionUnbound with Session ID.
 When this method is called the AuthenticatedWebSession is still dead I
 think or maybe I cant get the Object.
 Other thing I found is the method onInvalidate() in the webSession, but
 this method is never called. (i'm on Wicket 6.1.)
 
 What is the right way to do the trick??
 
 Thanks in advance
 Dirk
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



Re: logout on session destroy

2013-11-16 Thread Francois Meillet
In this case, override the onInvalidate() method in your custom session.

from the api : 
onInvalidate is a callback method that is executed when the user session is 
invalidated
either by explicit call to {@link org.apache.wicket.Session#invalidate()}
or due to HttpSession expiration.


François Meillet
Formation Wicket - Développement Wicket





Le 16 nov. 2013 à 12:19, Dirk Wichmann dir...@team-wichmann.de a écrit :

 Thanks, that works, but how can I get my WebSession Object??
 In there the user is stored and I need the id of the user.
 WebSession.get() does not work
 
 Thanks in advance
 Dirk
 
 
 Am 16.11.2013 11:04, schrieb Francois Meillet:
 You can write a unboundListener and register it in your sessionStore.
 This code should be in your application init()
 
 getSessionStore().registerUnboundListener( new 
 ISessionStore.UnboundListener() {
  @Override
  public void sessionUnbound(String sessionId) {
  // logout timestamp in the database
  }
 });
 
 
 François Meillet
 Formation Wicket - Développement Wicket
 
 
 
 
 
 Le 15 nov. 2013 à 23:19, Dirk Wichmann dir...@team-wichmann.de a écrit :
 
 Hi all,
 
 it's quite frustrating, a simple thing gets complicated.
 I have a Webapp with login page and logout button.
 If the user clicks the logout I write a logout timestamp in the database.
 Now I want to write the same timestamp when the session expires.
 Only thing I have found on the Web is to use
 WebApplication.sessionUnbound with Session ID.
 When this method is called the AuthenticatedWebSession is still dead I
 think or maybe I cant get the Object.
 Other thing I found is the method onInvalidate() in the webSession, but
 this method is never called. (i'm on Wicket 6.1.)
 
 What is the right way to do the trick??
 
 Thanks in advance
 Dirk
 
 -
 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: logout on session destroy

2013-11-16 Thread Francois Meillet
Update to the 6.12 version or follow Ernesto's advice or write your own 
HttpSessionStore.
 
François Meillet
Formation Wicket - Développement Wicket





Le 16 nov. 2013 à 13:17, Dirk Wichmann dir...@team-wichmann.de a écrit :

 sorry, there is no methode onInvalidate() to overwrite??
 
 not in AuthenticatedWebSession or WebSession or in Session (I use Wicket
 6.1)
 
 
 Am 16.11.2013 12:47, schrieb Francois Meillet:
 In this case, override the onInvalidate() method in your custom session.
 
 from the api : 
 onInvalidate is a callback method that is executed when the user session is 
 invalidated
 either by explicit call to {@link org.apache.wicket.Session#invalidate()}
 or due to HttpSession expiration.
 
 
 François Meillet
 Formation Wicket - Développement Wicket
 
 
 
 
 
 Le 16 nov. 2013 à 12:19, Dirk Wichmann dir...@team-wichmann.de a écrit :
 
 Thanks, that works, but how can I get my WebSession Object??
 In there the user is stored and I need the id of the user.
 WebSession.get() does not work
 
 Thanks in advance
 Dirk
 
 
 Am 16.11.2013 11:04, schrieb Francois Meillet:
 You can write a unboundListener and register it in your sessionStore.
 This code should be in your application init()
 
 getSessionStore().registerUnboundListener( new 
 ISessionStore.UnboundListener() {
@Override
public void sessionUnbound(String sessionId) {
// logout timestamp in the database
}
 });
 
 
 François Meillet
 Formation Wicket - Développement Wicket
 
 
 
 
 
 Le 15 nov. 2013 à 23:19, Dirk Wichmann dir...@team-wichmann.de a écrit :
 
 Hi all,
 
 it's quite frustrating, a simple thing gets complicated.
 I have a Webapp with login page and logout button.
 If the user clicks the logout I write a logout timestamp in the database.
 Now I want to write the same timestamp when the session expires.
 Only thing I have found on the Web is to use
 WebApplication.sessionUnbound with Session ID.
 When this method is called the AuthenticatedWebSession is still dead I
 think or maybe I cant get the Object.
 Other thing I found is the method onInvalidate() in the webSession, but
 this method is never called. (i'm on Wicket 6.1.)
 
 What is the right way to do the trick??
 
 Thanks in advance
 Dirk
 
 -
 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: wicket conversation scope - weld integration

2013-10-31 Thread Francois Meillet
Hi,

you need to use compatible dependencies
  
run the 6.11 examples with these dependencies
   
dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket-core/artifactId
version6.11.0/version
/dependency

dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket-cdi/artifactId
version6.11.0/version
/dependency

dependency
groupIdjavax.enterprise/groupId
artifactIdcdi-api/artifactId
version1.0-SP4/version
/dependency

dependency
groupIdorg.jboss.seam.conversation/groupId
artifactIdseam-conversation-spi/artifactId
version3.0.0.Final/version
/dependency

François

François Meillet
Formation Wicket - Développement Wicket





Le 30 oct. 2013 à 16:10, brazz alexander.li...@man.eu a écrit :

 Hi Martin,
 
 thanks for your answer!
 With the dependencies from your link i now can see log entries of weld. So
 now it seems to initialize correctly. 
 
 But i have to run it with wicket version 1.5.10 from the examples page?
 When i run the examples with wicket 6.11, i get the compile error that
 method get() of Class CdiConfiguration does not exist. 
 When i run the old examples with wicket 6.11, i get the following (now well
 known error):
 
 WELD-001408 Unsatisfied dependencies for type [ApplicationCounter] with
 qualifiers [@Default] at injection point [[field] @Inject
 net.ftlines.wicket.cdi.examples.InjectionPage.counter]
 
 this seems to be the main default error of weld. 
 
 
 30.10.2013 15:16:30 org.jboss.weld.bootstrap.WeldBootstrap clinit
 INFO: WELD-000900 1.1.9 (Final)
 30.10.2013 15:16:30 org.jboss.weld.bootstrap.WeldBootstrap startContainer
 INFO: WELD-000101 Transactional services not available. Injection of @Inject
 UserTransaction not available. Transactional observers will be invoked
 synchronously.
 30.10.2013 15:16:31 org.jboss.weld.environment.tomcat7.Tomcat7Container
 initialize
 INFO: Tomcat 7 detected, CDI injection will be available in Servlets and
 Filters. Injection into Listeners is not supported
 30.10.2013 15:16:31 org.jboss.weld.interceptor.util.InterceptionTypeRegistry
 clinit
 WARNUNG: Class 'javax.ejb.PostActivate' not found, interception based on it
 is not enabled
 30.10.2013 15:16:31 org.jboss.weld.interceptor.util.InterceptionTypeRegistry
 clinit
 WARNUNG: Class 'javax.ejb.PrePassivate' not found, interception based on it
 is not enabled
 
 
 
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/wicket-conversation-scope-weld-integration-tp4662028p4662049.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: wicket conversation scope - weld integration

2013-10-30 Thread francois meillet
It seems that you have more than one copy of weld in your claspath.

Try with that :

wicket-core
cdi-api
seam-conversation-spi
wicket-cdi

François


On Wed, Oct 30, 2013 at 9:07 AM, brazz alexander.li...@man.eu wrote:

 Hi heapifyman,

 thanks for your reply. Yes i read it all. But the blog is from 2011 and is
 based on wicket 1.5. I downloaded the libs with maven, but it didn't work
 with wicket 6.11. I wanted to use the latest wicket for the new project.

 I also tried without seam-wicket in the classpath, but it also didn't help

 I feel like having tried all possible classpath combinations but none of
 them worked.
 I also debugged the initialization of weld at startup but couldn't detect
 the problem.







 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/wicket-conversation-scope-weld-integration-tp4662028p4662036.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: wicket conversation scope - weld integration

2013-10-30 Thread francois meillet
your weld related jars in classpath should be:

wicket-core
cdi-api
seam-conversation-spi
wicket-cdi

François


On Wed, Oct 30, 2013 at 10:50 AM, brazz alexander.li...@man.eu wrote:

 Hello François,

 thanks for your reply!
 I double checked this.
 I have weld-servlet.jar in my classpath. According to the documentation
 this
 is the ueber-jar that contains all classes of other jar files. I belive
 so
 because otherwise i get NoClassDef-Errors.

 i changed my classpath and removed wicket-weld according to heapifyman.
 No my weld related jars in classpath are:

 weld-servlet.jar
 seam-conversation-spi-3.0.0.Final.jar
 seam-conversation-weld-3.0.0.Final.jar
 wicket-cdi-6.11.0.jar

 i cannot imagine where a second weld implemention could reside?

 the rest of my configuration:
 web.xml:

  listener


 listener-classorg.jboss.weld.environment.servlet.Listener/listener-class
 /listener

 beans.xml (in WEB-INF- Folder):

 and my context.xml looks like this:

 Context path=/sandbox reloadable=true

 docBase=C:\develop\workspaces\1H_ASPWicketSandbox\ASPWicketSandbox\WebContent
 workDir=C:\develop\workspaces\1H_ASPWicketSandbox\ASPWicketSandbox\work 
 Logger className=org.apache.catalina.logger.SystemOutLogger
 verbosity=4 timestamp=true/
 Loader className=org.apache.catalina.loader.DevLoader
 reloadable=true
 debug=1 useSystemClassLoaderAsParent=false /
  Resource name=BeanManager
   auth=Container
   type=javax.enterprise.inject.spi.BeanManager
   factory=org.jboss.weld.resources.ManagerObjectFactory/

 /Context




 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/wicket-conversation-scope-weld-integration-tp4662028p4662046.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: Problems with FileUploadFile and CompoundPropertyModels

2013-10-25 Thread Francois Meillet
FileUploadField needs a model which implements IModelListFileUpload

have a look to these threads

http://apache-wicket.1842946.n4.nabble.com/file-upload-in-nested-form-with-CPM-needs-dummy-model-td4660468.html
http://apache-wicket.1842946.n4.nabble.com/AW-file-upload-in-nested-form-with-CPM-needs-dummy-model-td4660609.html


François Meillet
Formation Wicket - Développement Wicket





Le 25 oct. 2013 à 19:30, Edgar Merino donvo...@gmail.com a écrit :

 Hello, I'm having a problem with a FileUploadField, I'm using 
 CompoundPropertyModels through my application but for this single element I 
 would like to avoid having a model, however calling 
 fileUploadField.setDefauiltModel(null) will not work, since it will always 
 try to locate a CompoundPropertyModel, is there a way to avoid this?
 
 Thanks in advance.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



<    1   2   3   4   >