Re: Java Wickets Delete and Checkbox

2017-02-07 Thread Jeremy Thomerson
Ashu, the most likely cause of your problem is that the ListView is not
implemented correctly. Likely, rather than passing the ListView an
IModel you are passing it just a List when it is created.
This leads to the ListView having stale data. Then you think you need to
"refresh" the ListView. In most cases when it is correctly implemented, the
ListView will "just work" because it will reload its model, getting the
up-to-date list after you've modified the underlying data store (e.g.
deleted things from the database).

The best way for you to get more assistance is to post a code snippet with
your next email that shows how you're creating the listview, the
checkboxes, and the delete.

On Tue, Feb 7, 2017 at 9:58 PM ASHU_JAVA  wrote:

> Thanks Marcel for the link.
> I'm able to add checkbox group as provided in this link.
> However, I'm unable to refresh the list view once the item is deleted in
> the
> database.
>
> Can you please guide how to accomplish the task to refresh the listview
> (dataview)?
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Java-Wickets-Delete-and-Checkbox-tp4677014p4677040.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: # in URL

2014-05-13 Thread Jeremy Thomerson
Browsers don't send the # or anything after it to the server, so you can't
get access to that on the server. You can test this by watching in Firebug
or dev tools in your browser and submitting a request to
http://www.example.com/test/something/#afterhash or anything else. Only the
http://www.example.com/test/something/ part gets sent to the server. Most
JS frameworks use the # and what's after it for client-side state.


On Mon, May 12, 2014 at 9:36 PM, infiniter infini...@gmail.com wrote:

 Wicket version: 6.7.0

 I need to get the url parameters even if there is a #, because I have an
 AngularJS app running inside my Wicket page, which requires it. E.g.:
 mysite.com/myapp/#/john. John is shown by Wicket and AngularJS.
 However if there is a # in the url, the PageParemeters object comes in
 null.

 Is there a way to preprocess the url parameters before converting it to a
 PageParemeters object? Or is there another way?

 Thx,
 Carlos.

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/in-URL-tp4665799.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




-- 
Jeremy Thomerson
http://wickettraining.com


Re: Please remove the spam post from the wicket forum

2014-01-02 Thread Jeremy Thomerson
I'm checking with ASF infra to see if there is a way we can make that
happen.


On Thu, Jan 2, 2014 at 1:40 PM, Gabriel Landon glan...@piti.pf wrote:

 Can't the administrators blacklist/ban them? There are only 4 spammers
 spamming the nabble forum for a couple of weeks now...
 Is there a way to filter not accepted yet post? I haven't found the
 option
 if it exists!



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Please-remove-the-spam-post-from-the-wicket-forum-tp4662979p4663391.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




-- 
Jeremy Thomerson
http://wickettraining.com


Re: Please remove the spam post from the wicket forum

2013-12-31 Thread Jeremy Thomerson
The weird thing is that if you click on one of those posts it says that the
message has not been accepted by the mailing list yet. Is it possible that
Nabble is subscribed as a moderator of our list and gets the moderation
messages? See [1] for example.

[1]
http://apache-wicket.1842946.n4.nabble.com/green-type-grinding-machine-has-ushered-in-our-lives-td4663338.html




On Fri, Dec 13, 2013 at 3:43 AM, Martin Grigorov mgrigo...@apache.orgwrote:

 It seems only Nabble users see these messages.
 I am subscribed to the mailing list and I don't receive them.

 I know that Martijn and Jeremy moderate the list but I'm not sure how
 Nabble got spammed.


 On Fri, Dec 13, 2013 at 10:40 AM, Decebal Suiu decebal.s...@asf.ro
 wrote:

  Or it's a possibility to filter these spam posts? How do you read these
  mailling posts?
 
  Best regards,
  Decebal
 
 
 
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Please-remove-the-spam-post-from-the-wicket-forum-tp4662979p4662982.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
 
 




-- 
Jeremy Thomerson
http://wickettraining.com


Re: Please remove the spam post from the wicket forum

2013-12-31 Thread Jeremy Thomerson
Are you saying that the spammers actually used the Nabble forum to post the
message?


On Tue, Dec 31, 2013 at 9:54 AM, Sven Meier s...@meiers.net wrote:

 Nabble displays a 'not accepted yet' as long as it didn't receive the post
 from the list.

 For users (spammers) not subscribed to our mailing list, this means
 'forever'.

 Sven


 On 12/31/2013 03:50 PM, Jeremy Thomerson wrote:

 The weird thing is that if you click on one of those posts it says that
 the
 message has not been accepted by the mailing list yet. Is it possible that
 Nabble is subscribed as a moderator of our list and gets the moderation
 messages? See [1] for example.

 [1]
 http://apache-wicket.1842946.n4.nabble.com/green-type-
 grinding-machine-has-ushered-in-our-lives-td4663338.html




 On Fri, Dec 13, 2013 at 3:43 AM, Martin Grigorov mgrigo...@apache.org
 wrote:

  It seems only Nabble users see these messages.
 I am subscribed to the mailing list and I don't receive them.

 I know that Martijn and Jeremy moderate the list but I'm not sure how
 Nabble got spammed.


 On Fri, Dec 13, 2013 at 10:40 AM, Decebal Suiu decebal.s...@asf.ro
 wrote:

  Or it's a possibility to filter these spam posts? How do you read these
 mailling posts?

 Best regards,
 Decebal



 --
 View this message in context:

  http://apache-wicket.1842946.n4.nabble.com/Please-remove-
 the-spam-post-from-the-wicket-forum-tp4662979p4662982.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




-- 
Jeremy Thomerson
http://wickettraining.com


Re: wicket-el - is this a safe way to hook into wicket?

2013-12-23 Thread Jeremy Thomerson
On Sun, Dec 22, 2013 at 5:30 AM, Steve shadders@gmail.com wrote:

 So what it is the best way to go about requesting a change to
 wicket-core?  I'm happy to fork and create a pull request etc but it
 seems overkill for removing a single word from one class.  Should I
 create a JIRA ticket perhaps?


Create a JIRA that describes why you need it and put a link back to this
thread in the JIRA. That way it will be around for posterity if the change
is made.


-- 
Jeremy Thomerson
http://wickettraining.com


Re: Wicket and Responsive Design question

2013-12-03 Thread Jeremy Thomerson
Responsive design means different things to different people. However, the
most common definition these days has to do with markup that adjusts to
various types of devices. Accomplishing this primarily centers around your
HTML, CSS (using media queries, etc), and JS for enhanced features. Thus,
most of that doesn't have a strict requirement for Wicket. If you're new to
responsive design I'd suggest you compare responsive CSS frameworks like
Bootstrap [1] or some alternative [2].

You can use most of these frameworks without any additional Wicket-specific
code by using their flavor of markup and CSS class names, etc. However,
there are integration projects that folks have made available to make
common components that work with these frameworks (like wicket-bootstrap
[3] or [4]) that you can also take advantage of.

There are, of course, finer details to responsive design like providing
alternative image sizes for different devices, etc. However, there are a
myriad of ways those things can be accomplished and what you do largely
depends on your other integrations (i.e. how you serve your static assets,
etc).

[1] http://getbootstrap.com/
[2]
http://list.ly/list/303-alternatives-to-twitter-bootstrap-html5-css3-responsive-framework
[3] http://mvnrepository.com/artifact/org.apache.wicket/wicket-bootstrap
[4] https://github.com/l0rdn1kk0n/wicket-bootstrap

-- 
Jeremy Thomerson
http://wickettraining.com


On Tue, Dec 3, 2013 at 8:27 AM, gerritqf gerrit.wass...@qfactors.nl wrote:

 Hello,

 I am new to Wicket and i need some advice about building a webapplication
 with Wicket and making this suitable for several devices, like tablet and
 smartphone.
 What is the best way of building the markup pages with Wicket, or is it
 just
 a way of including the right css3 and html5 to the pages afterwards?
 Is it a good idea to make a Single-page application using panels or better
 inherit pages regarding responsive design?

 I hope you can help me into the right direction.

 Thanks in advance.

 Gerrit



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Wicket-and-Responsive-Design-question-tp4662736.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 Sessions and Akamai Caching

2013-11-19 Thread Jeremy Thomerson
Pages that are session-specific should not be cached in a way that allows
the cached response to be given to multiple users. Stateful forms are
session-specific.


On Tue, Nov 19, 2013 at 6:59 PM, Scott Carpenter scarpen...@gmail.comwrote:

 I have a client Wicket web site and they are using Akamai for caching. They
 wanted to cache more aggressively but it seems there's an issue with
 expired sessions. When a user hits a cached version of a page with a form
 and tries to submit it, a 500 error is raised. (I'm relaying this from at
 least two sources removed, so by now I might have the details thoroughly
 obfuscated.)

 I was hoping from this list I could get some pointers on best taking
 advantage of Akamai, and how I might work around issues like this. Please
 let me know if and what further information would be useful in answering.

 Thank you!

 Scott




-- 
Jeremy Thomerson
http://wickettraining.com


Re: http://wicketinaction.com/ broken?

2013-07-19 Thread Jeremy Thomerson
I can confirm pages other than the homepage are broken.  Martijn is away on
vacation right now, so it may be a few days before he gets it back up.




On Fri, Jul 19, 2013 at 5:16 PM, Daniel Watrous dwmaill...@gmail.comwrote:

 This looks like a wordpress issue. Look for a problem with the .htaccess
 file.

 It should include something like this:

 IfModule mod_rewrite.c
 RewriteEngine On
 RewriteBase /wordpress/
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule . /wordpress/index.php [L]
 /IfModule

 Daniel


 On Fri, Jul 19, 2013 at 2:42 PM, Gabriel Landon glan...@piti.pf wrote:

  The home page dos work :
 
  wget http://wicketinaction.com/
  --2013-07-19 10:40:45--  http://wicketinaction.com/
  Résolution de wicketinaction.com... 94.124.120.40
  Connexion vers wicketinaction.com|94.124.120.40|:80...connecté.
  requête HTTP transmise, en attente de la réponse...*200 OK*
 
  But not the other pages :
  wget
 http://wicketinaction.com/2013/02/replace-components-with-animation/
  --2013-07-19 10:41:45--
  http://wicketinaction.com/2013/02/replace-components-with-animation/
  Résolution de wicketinaction.com... 94.124.120.40
  Connexion vers wicketinaction.com|94.124.120.40|:80...connecté.
  requête HTTP transmise, en attente de la réponse...*404 Not Found*
  2013-07-19 10:41:46 ERREUR 404: Not Found.
 
 
 
 
 
 
 
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/http-wicketinaction-com-broken-tp4660379p4660385.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
 
 




-- 
Jeremy Thomerson
http://wickettraining.com


Re: Chrome Calling Pages Twice Issue?

2013-06-26 Thread Jeremy Thomerson
I've seen browsers re-request a page if you have, for example, an img tag
on the page that has an empty src attribute.


On Wed, Jun 26, 2013 at 4:27 PM, dhongyt davidhtr...@gmail.com wrote:

 Lately I have noticed weird things with Chrome and my local Eclipse
 environment.

 I have noticed that once I log into my WicketApplication, it would call the
 SessionService twice and also call my Homepage twice when it loads.

 When change a drop down choice, it calls it set method where I set the
 value
 of it and stored in the SessionService, submit the form.

 I noticed that some how the stored value isn't there anymore. So the drop
 down choice is back to Choose One

 I thought I did something wrong in my code, but when I try this in Firefox
 my value is being stored in SessionService and can be retrieved correctly.

 I also deployed this war file into my tomcat server and the odd thing is
 that it works correctly if I use Chrome also.

 Has anyone experience this oddity?



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Chrome-Calling-Pages-Twice-Issue-tp4659839.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




-- 
Jeremy Thomerson
http://wickettraining.com
*Ask me about our plans for on-line training lessons.*


Re: Brix CMS has stopped development?

2013-06-15 Thread Jeremy Thomerson
I think that Matej and Igor's company stopped using it, so they had no
reason to develop more on it.  Brian Topping also did some work on it and
tried to lead a second generation of development on it, but I think he too
was pulled in a different direction by $work.

It is a very nice project.  If you are interested in using it and adding
features / updating it, I'm sure that you could be added to the team, or
you could fork it and submit pull requests, etc.


On Sat, Jun 15, 2013 at 5:21 AM, nhsoft.yhw nhsoft@gmail.com wrote:

 I am looking for a product based on wicket cms, I found brix cms is very
 good, it can meet the customized development needs, but browse brix cms's
 github code, I found brix cms project nearly two years no code updates,
 upgrades, brix cms whether the project has stopped development?

 Brix CMS Site : https://github.com/bricket/brix-cms


 Thank you




 -
 my first wicket application: www.118114life.com
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Brix-CMS-has-stopped-development-tp4659520.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




-- 
Jeremy Thomerson
http://wickettraining.com
*Ask me about our plans for on-line training lessons.*


Re: Getting Form Data Without Submitting Form

2013-06-12 Thread Jeremy Thomerson
On Wed, Jun 12, 2013 at 3:26 PM, Richard W. Adams rwada...@up.com wrote:

 Well, first, HTML doesn't allow nested forms, per the w3.org site. Second,
 the search fields need to be part of the overall form, because they (along
 with the other fields) are persisted if the user presses the Save button.


Be careful about the tone of your email.  You may not have meant it this
way, but it sounds a bit snarky and disrespectful.  Sven knows what he's
talking about, and it would be rude if you meant to imply that he doesn't.

To your points:

1) HTML may not allow nested forms, but Wicket does.  It handles this
automatically for you.  Try it some time.
2) Okay, Sven didn't know that because it wasn't mentioned in your first
email.

Solution for your problem:

Use two buttons - one for save, one for search.  Move your onSubmit
logic out of your form and into each button.


-- 
Jeremy Thomerson
http://wickettraining.com
*Ask me about our plans for on-line training lessons.*


Re: FW: VITO:(CC0000002070237):Contracts from OPIB ZM from this week are not available in Signature

2013-05-09 Thread Jeremy Thomerson
-mail and instant messaging (including
 content),
  may be scanned by our systems for the purposes of information security
 and
  assessment of internal compliance with Accenture policy.
 
 
 
 __
 
  www.accenture.com
 
 
 
 
   --
   Martin Grigorov
  Wicket Training  Consulting
  http://jWeekend.com http://jweekend.com/
 
 
 
 
   --
   Martin Grigorov
  Wicket Training  Consulting
  http://jWeekend.com http://jweekend.com/
 



 --
 Martin Grigorov
 Wicket Training  Consulting
 http://jWeekend.com http://jweekend.com/




-- 
Jeremy Thomerson
http://wickettraining.com
*Ask me about our plans for on-line training lessons.*


Re: FW: VITO:(CC0000002070237):Contracts from OPIB ZM from this week are not available in Signature

2013-05-08 Thread Jeremy Thomerson
*
 
  *Van:* Pervela, P. (Praveen Kumar) (NETCO CE Generic ESS Delivery) *
  Verzonden:* donderdag 4 april 2013 14:13*
  Aan:* Bruijn, R.B.R. (Ruud) (NETCO CE BSS Business Market Delivery)*
  CC:* kpn-ecm_...@wwpdl.vnet.ibm.com*
  Onderwerp:* RE: VITO:(CC002070237):Contracts from OPIB ZM from this
  week are not available in Signature
 
  Hi Ruud,
 
  Could you please let us know if there are any changes with respect to
 the
  check in process at the STREAMSERVE end. Also, some metadata which we
  discussed over the call and you agreed to send us the metadata.
 
  Please let us know at the earliest as we see the request has already
  breached the SLA.
 
  We appreciate your cooperation in the meanwhile.
 
  *Regards,
  Praveen K Pervela*
  KPN-ECM-TAM,
  IBM India Private Ltd.
  3B Building, 6th Floor, Mindspace,
  APIIC Layout, Madhapur, Hyderabad.
  Email : *ppervela*@in.ibm.com pperv...@in.ibm.com
 
  *NOTE: Please copy our team mail id **kpn-ecm_...@wwpdl.vnet.ibm.com*
 kpn-ecm_...@wwpdl.vnet.ibm.com
  * for a quick reply.*
   --
 
 
  *From:* malay.na...@kpn.com [malay.na...@kpn.com]*
  Sent:* Tuesday, April 02, 2013 11:19 PM*
  To:* Bruijn, R.B.R. (Ruud) (NETCO CE BSS Business Market Delivery)*
  Cc:* kpn-ecm_...@wwpdl.vnet.ibm.com*
  Subject:* RE: VITO:(CC002070237):Contracts from OPIB ZM from this
  week are not available in Signature
  Hi Ruud,
 
  Please give us some more detials like the customer id to search so that
  it could be helpful for our analysis.
 
  *Thanks  Regards*,
  Malay Kumar Nayak
  KPN-ECM-TAM,
  IBM India Private Ltd.
  EGL C-Block ,2nd Floor
  Bangalore
  Email:-malan...@in.ibm.com
  KPN Account
  Mobile-09742290785
 
 
   --
 
 
  *From:* Bruijn, R.B.R. (Ruud) (NETCO CE BSS Business Market Delivery)*
  Sent:* 02 April 2013 12:28 PM*
  To:* Nayak, M. (Malay) (NETCO IT Operations FixedGeneric Mgt)*
  Cc:* kpn-ecm_...@wwpdl.vnet.ibm.com*
  Subject:* RE: VITO:(CC002070237):Contracts from OPIB ZM from this
  week are not available in Signature
  Hi Malay,
 
  Orderdetails and letters to customer generated by OneCRM-Streamserve are
  not available in Signature for orders confirmed in Siebel from
 25thMarch until now. All orderdetails and letters before 22
  nd March can be retrieved in Signature.
  The screenprints give an example of an order before 22nd March and after
  25th March. Please check why orders after 25th March cannot be found in
  Signature. Is the interface between Streamserve and Signature up-and
  –running?
 
  Met vriendelijke groet / kind regards,
 
  Ruud Bruijn
  Quality Manager
  KPN ZM Volume*
  *ruud.bru...@kpn.com
  06 43 95 25 33
 
  *not working on Fridays*
 
  *Van:* Nayak, M. (Malay) (NETCO IT Operations GenericTraditional) *
  Verzonden:* zondag 31 maart 2013 15:31*
  Aan:* Bruijn, R.B.R. (Ruud) (NETCO CE BSS Business Market Delivery)*
  CC:* kpn-ecm_...@wwpdl.vnet.ibm.com*
  Onderwerp:* VITO:(CC002070237):Contracts from OPIB ZM from this week
  are not available in Signature
 
  Dear Ruud,
 
  We can able to find the document and open.
  Could you please do let us know the issue you are facing in this
 document
  so that we can work accordingly.
 
 
  *Thanks  Regards*,
  Malay Kumar Nayak
  KPN-ECM-TAM,
  IBM India Private Ltd.
  EGL C-Block ,2nd Floor
  Bangalore
  Email:-malan...@in.ibm.com
  KPN Account
  Mobile-09742290785
 
 
 
   --
 
  This message is for the designated recipient only and may contain
  privileged, proprietary, or otherwise confidential information. If you
 have
  received it in error, please notify the sender immediately and delete
 the
  original. Any other use of the e-mail by you is prohibited.
 
  Where allowed by local law, electronic communications with Accenture and
  its affiliates, including e-mail and instant messaging (including
 content),
  may be scanned by our systems for the purposes of information security
 and
  assessment of internal compliance with Accenture policy.
 
 
 
 __
 
  www.accenture.com
 
 
 
 
   --
   Martin Grigorov
  Wicket Training  Consulting
  http://jWeekend.com http://jweekend.com/
 



 --
 Martin Grigorov
 Wicket Training  Consulting
 http://jWeekend.com http://jweekend.com/




-- 
Jeremy Thomerson
http://wickettraining.com
*Ask me about our plans for on-line training lessons.*


Re: Problem with Wicket distribution

2013-01-13 Thread Jeremy Thomerson
Have you tried the links on this page?

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


On Sat, Jan 12, 2013 at 11:41 PM, e.spyro...@teamconcepts.gr wrote:

 Hi all,

 I cannot find anything in the distribution servers' wicket folder, except
 the KEYS file.

 Only one mirror in Pakistan, which has not been updated for several days,
 still holds the wicket files.

 Has something gone wrong?

 Best Regards
 Elias




-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Conditional JS includes

2012-12-07 Thread Jeremy Thomerson
You could use if/else blocks in your text templates.

On Friday, December 7, 2012, Nick Pratt wrote:

 Do TextTemplate's aggregate, and can that aggregate be provided as a single
 Resource?

 N

 On Fri, Dec 7, 2012 at 3:28 AM, Martin Grigorov 
 mgrigo...@apache.orgjavascript:;
 wrote:

  You can also use TextTemplate(s) to construct/concat the JS dynamically.
 
 
  On Fri, Dec 7, 2012 at 12:51 AM, Nick Pratt 
  nbpr...@gmail.comjavascript:;
 wrote:
 
   I currently have a single javascript file in a custom Behavior that Id
  like
   to conditionally include sections of depending on provided user
 options.
  
   Whats the best way to achieve this?
  
   Split the single file in to, say 3 separate JS files and then
  conditionally
   include them in Java during the renderHead() of my Behavior? Is there a
   better way?
  
  
   Nick
  
 
 
 
  --
  Martin Grigorov
  jWeekend
  Training, Consulting, Development
  http://jWeekend.com http://jweekend.com/
 



-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: what is Wicket 2.x?

2012-12-07 Thread Jeremy Thomerson
Yep.  There was a big change to constructors IIRC, although I can't
remember exactly what the change was.  Next came 1.3.0 with generics.



-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


On Fri, Dec 7, 2012 at 12:55 PM, Pierre Goupil goupilpie...@gmail.comwrote:

 Good evening,

 It's an old experiment which was due to go to ready for prime-time but
 never succeeded. If I remember correctly, it was before what became Wicket
 1.3.

 Regards,

 Pierre


 On Fri, Dec 7, 2012 at 7:47 PM, Lucio Crusca lu...@sulweb.org wrote:

  Hello *,
 
  while reading this page
 
  https://cwiki.apache.org/WICKET/working-with-wicket-models.html
 
  I stumbled upon the following sentence:
 
  «NOTE: this page is about models like they exist for Wicket 1.x. The
 IModel
  interface is slightly changed in Wicket 2.x»
 
  What version of Wicket is 2.x? I'm aware of 1.x and 6.x, but never heard
  about
  2.x...
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 


 --
 Le bonheur n'est pas une destination, mais une façon de voyager.

 Papa d'une petite Lou-Ann depuis le 30 juin.



[DISCUSS] Security Frameworks

2012-10-17 Thread Jeremy Thomerson
Our of curiosity: among the wider community: what security framework(s) do
you use with with Wicket, and why?

[  ] I use my own custom framework
[  ] I use Shiro
[  ] I use Spring Security
[  ] I use WASP/Swarm
[  ] Other (please specify)

And don't forget the why.

-- 
Jeremy Thomerson
http://wickettraining.com


Re: Twitter Bootstrap in Wicket

2012-10-11 Thread Jeremy Thomerson
On Thu, Oct 11, 2012 at 6:11 PM, Chris Colman
chr...@stepaheadsoftware.comwrote:

 Is it possible/feasible to 'selectively' use the Twitter bootstrap in a
 wicket app?

 Scenario: our app serves many different clients. Some will want the
 Twitter Bootstrap look and feel but others will be happy to use any
 number of existing CSS/JS templates that we have created for them over
 the years.

 Currently we use a combination of Wicket variations and conditional
 header injection to provide different look and feel for customers even
 though they all use the same Wicket page classes.

 Is it possible to use Twitter Bootstrap in the same way? i.e.
 conditionally use it when rendering a page for one customer but not
 using it when rendering that same page class for another customer?


It sounds like you already have the system for this built.  Bootstrap is
just HTML and CSS, so keep doing what you were with the variations and
different header contributions.  Is there something else that you need?

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Problem in implementing user confirm modal while deleting something..

2012-09-28 Thread Jeremy Thomerson
On Fri, Sep 28, 2012 at 10:21 AM, kshitiz k.agarw...@gmail.com wrote:

 *Last cause: The component(s) below failed to render. A common problem is
 that you have added a component in code but forgot to reference it in the
 markup (thus the component will never be rendered).

 1. [Component id = message]*



The error message says it all.  Somewhere you have a component added to
your java hierarchy that is not in the markup.  Look for message in your
codebase.  If you can't find it, put a breakpoint in the Component class
constructor with a conditional if the ID is message.  Find where that
component is being created but not referenced in the markup.

You can also turn this check off, but that's not a fix.  The message is
indicative of a problem.  If you do decide to turn the check off it's
somewhere in the app's settings (debug or markup - can't remember) - look
for component use check.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Highlight selected row in AjaxFallbackDefaultDataTable

2012-09-21 Thread Jeremy Thomerson
On Fri, Sep 21, 2012 at 9:51 AM, tome badshahbe...@yahoo.com wrote:

 I am using AjaxFallbackDefaultDataTable to display data.In 1 of the
 Abstractcolumn, calling the fragment which has AjaxLink.On click of that
 link would like to highlight the complete row where this link  is present.
 I
 looked at the OIR sample but could make it out.Please help me.


I'd suggest just using JS for this and doing the highlight on the
client-side.  Use something like jQuery to add a highlighted CSS class to
the parent TR of the link and then add the appropriate CSS.  There's no
reason to go back to the server just to highlight a row.


-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Highlight selected row in AjaxFallbackDefaultDataTable

2012-09-21 Thread Jeremy Thomerson
On Fri, Sep 21, 2012 at 1:26 PM, tome badshahbe...@yahoo.com wrote:

 Hi Jeremy,

 Thank your for suggestion but being a new in wicket can't understand the TR
 meaning also it would be great healp if you give more details like sample
 code or detail pointers. Don't know how to use jquery here.


TR = table row.  It's just plain HTML.  Sorry I don't have more time right
now for a more detailed response, but Google should be able to help you
out.  If you're using Wicket 6.0 jQuery is already packaged into it.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Stateless ajax in wicket 6

2012-09-20 Thread Jeremy Thomerson
On Thu, Sep 20, 2012 at 5:40 AM, Oscar Besga Arcauz obe...@isdefe.eswrote:

  Hi wickers

 I know thats an old xxx in wicket lands, but I wonder if anyone has done
 something so far...

 Or simply make an ajax call to a bookmarable stateless page manually from
 web page

 Thanks

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


If you're just looking for something like data retrieval via normal AJAX
(json/xml/etc as opposed to Wicket's component-replacement AJAX) you can
always use jQuery (or similar) and make calls to a Wicket shared resource
that returns JSON/XML/etc.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Variable number of links with just one wicket id?

2012-09-20 Thread Jeremy Thomerson
On Thu, Sep 20, 2012 at 9:50 AM, fabley a.j...@lrworld.com wrote:

 Hello again,

 I'm sorry but it seems like this doesn't work for me. In your example it
 always uses the same text for each link, but I want to define my own text
 for each link. Is there a way to do this?

 Code Snippets:

  HTML
 
 
  div id=menu
 
  ul
  li wicket:id=repeater
  /li
  /ul
 
  /div


  Java
 
  RepeatingView view = new RepeatingView(repeater);
  Link link = new Link(1) {
  @Override
  public void onClick() {
 
  }
  };
  view.add(link);
  add(view);





 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Variable-number-of-links-with-just-one-wicket-id-tp4652150p4652178.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


Add a label to each link.  Then in your code set the model for the label
according to what is being linked to.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Variable number of links with just one wicket id?

2012-09-20 Thread Jeremy Thomerson
On Thu, Sep 20, 2012 at 9:53 AM, Jeremy Thomerson jer...@wickettraining.com
 wrote:

 On Thu, Sep 20, 2012 at 9:50 AM, fabley a.j...@lrworld.com wrote:

 Hello again,

 I'm sorry but it seems like this doesn't work for me. In your example it
 always uses the same text for each link, but I want to define my own text
 for each link. Is there a way to do this?

 Code Snippets:

  HTML
 
 
  div id=menu
 
  ul
  li wicket:id=repeater
  /li
  /ul
 
  /div


  Java
 
  RepeatingView view = new RepeatingView(repeater);
  Link link = new Link(1) {
  @Override
  public void onClick() {
 
  }
  };
  view.add(link);
  add(view);





 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Variable-number-of-links-with-just-one-wicket-id-tp4652150p4652178.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


 Add a label to each link.  Then in your code set the model for the label
 according to what is being linked to.


Or, in your link override onComponentTagBody and write the text out.  But a
label is generally better.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: bookmarkable page being processed twice, second time, extra parameters passed

2012-09-18 Thread Jeremy Thomerson
I've seen pages be re-requested because of blank image tags.  Look for
image or CSS tags, etc, that might have a href=?someExtraParams.



-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


On Mon, Sep 17, 2012 at 11:46 AM, Fergal Keating 
fergal.keat...@directski.com wrote:

 The only similar issues i have come across are with plugins to my browser
 (firebug etc) causing second requests without any parameters. But this may
 be something similar.

 On 17 September 2012 11:18, lucast lucastol...@hotmail.com wrote:

  Dear Forum,
  I have a bookmarkable page which can take two parameters:
  uniqueName=[uniqueName] and unique_id_key=[]
 
  For some reason, the page is being instantiated twice.
  The first time, the right parameters are being passed.
 
  The second time, a lot of parameters are being passed and one of the
  parameters has the wrong value:
  0=[panel], 1=[style.css], uniqueName=[uniqueName], unique_id_key=[style]
 
  Has anyone experienced this before? how can one stop the second request
  coming through?
 
  Thanks in advance,
  Lucas
 
 
 
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/bookmarkable-page-being-processed-twice-second-time-extra-parameters-passed-tp4652031.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
 
 


 --
 Fergal Keating
 IT Senior Engineer
 ---
 e. fergal.keat...@directski.com
 p. NA
 w. www.directski.com



Re: Wicket 6.0.0: RenderStrategy.REDIRECT_TO_RENDER and missing FeedbackMessages in ComponentFeedbackPanel.

2012-09-18 Thread Jeremy Thomerson
On Mon, Sep 17, 2012 at 10:42 AM, Dan Haywood
d...@haywood-associates.co.ukwrote:

 We're using RenderStrategy.REDIRECT_TO_RENDER (ie redirect after post
 strategy; in 1.4.x this was working fine and our FeedbackMessage's were
 rendered correctly against their reporter using ComponentFeedbackPanel.

 Having upgraded to 6.0.0, the messages no longer appear.

 Investigating, it seems that the FeedbackMessage#detach() causes reporter
 to be set to null, meaning that the ComponentFeedbackPanel's filter makes
 no match on the subsequent render.

 Changing the RenderStrategy to REDIRECT_TO_BUFFER causes the feedback
 messages to appear.

 This looks like a regression to me?  But perhaps there's something I'm
 meant to do that isn't in the 6.0.0 migration notes?

 Any advice welcome!
 Dan


Can you create a small quickstart to demonstrate the problem?

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: [announce] Wicket-CDI for Wicket 6.0.0 released

2012-09-13 Thread Jeremy Thomerson
On Wed, Sep 12, 2012 at 3:59 PM, Bruno Borges bruno.bor...@gmail.comwrote:

 This is really great Igor, thanks.

 I am preparing my slides for my Wicket/Java EE session at JavaOne, and this
 just came in perfect time.

 I'll update my archetype and some slides to show this and let everyone know
 about =)


Will you be posting those slides and archetype somewhere non-attendees can
access when done?

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Since when has your application been running in production?

2012-09-11 Thread Jeremy Thomerson
On Tue, Sep 11, 2012 at 7:56 AM, Martijn Dashorst 
martijn.dasho...@gmail.com wrote:

 I found myself asking: What is the first Wicket application running
 in production? and conversely What Wicket application is still
 running in production since the beginning?

 Our company, Topicus, developed during 2005 and 2006 Vocus (a student
 information system for high schools in The Netherlands), which has
 been running in production since 16 september 2006 (as far as I can
 determine—it's a long way back).

 I know that Meetmoi.com has been running in public beta since 2
 september 2006, so they beat us by about 14 days (through the wayback
 machine—it shows wicket:id's and wicket:interface URLs).

 What is your longest running application? Does it beat meetmoi.com as
 the longest running Wicket application?

 Martijn

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



TexasHuntFish.com started running its new Wicket-based app in public
production on December 4, 2006.  It had been running in private beta for a
month or two before that - so, it doesn't win, but it comes close to the
ones you mentioned.  It still runs on Wicket, although I have not worked
there for several years now.  I am not sure how much longer they will use
the original Wicket-based platform.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: DropDownChoice Default Value

2012-07-22 Thread Jeremy Thomerson
On Sun, Jul 22, 2012 at 3:52 PM, vimalsymbi vimal_sy...@yahoo.com wrote:

 Hi All,

 I have searched and wasted much of my time figuring out the default Value
 for DropDownChoice for Object as dropdown but couldn't find the solution.
 For String dropdown i was able to make it work but somehow for object it
 is not working.

 Below is the Simple example that i have been trying,
 DropDownChoicePage.html
 and DropDownChoicePage.java files.

 Can someone please help me that what am i missing into
 DropDownChoicePage.java class that is not setting the Drop Down Default
 value?

 

 DropDownChoicePage.html

 html xmlns=http://www.w3.org/1999/xhtml;
 head
 titleDropDown Example/title
 /head
 body

 Select your favorite Language   select
 wicket:id=languageDropDown/select

 /body
 /html

 ---

 DropDownChoicePage.java

 public class DropDownChoicePage extends WebPage {

 public class KeyValue {

 private String key;
 private String value;

 public KeyValue(String key, String value) {
 this.key = key;
 this.value = value;
 }

 public String getKey() {
 return key;
 }

 public String getValue() {
 return value;
 }

 public void setKey(String key) {
 this.key = key;
 }

 public void setValue(String value) {
 this.value = value;
 }

 @Override
 public String toString() {
 return getKey();
 }
 }

 private static final long serialVersionUID = 2304448232406333188L;

 private KeyValue defaultValue = new KeyValue(JAVA, Java);

 /**
  * Constructor
  */
 public DropDownChoicePage() {

 ListKeyValue keyValues = new
 ArrayListDropDownChoicePage.KeyValue();
 keyValues.add(new KeyValue(PHP, php));
 keyValues.add(new KeyValue(JAVA, Java));
 keyValues.add(new KeyValue(DOT_NET, Dot Net));

 DropDownChoiceKeyValue dropDownChoice = new
 DropDownChoiceKeyValue(
 languageDropDown, new
 PropertyModelKeyValue(this,
 defaultValue), keyValues,
 new ChoiceRendererKeyValue(key,
 value));
 add(dropDownChoice);

 }

 public KeyValue getDefaultValue() {
 return defaultValue;
 }

 public void setDefaultValue(KeyValue defaultValue) {
 this.defaultValue = defaultValue;
 }

 }

 Thanks,
 Vimal.



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-Default-Value-tp4650704.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


If I had to guess I'd guess it's because your KeyValuePair class does not
properly implement either equals or hashCode.  As I say many times during
my classes: don't get so distracted with how do I do this in Wicket that
you forget that this is just java.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: chekbox - allow only 5 selected

2012-07-03 Thread Jeremy Thomerson
On Tue, Jul 3, 2012 at 12:09 PM, Dan12321 wee...@centrum.cz wrote:

 Hi,

 I have CheckGroupUser group = new CheckGroupUser(usersGroup, list);
 and in repeater I add checkbox: item.add(new CheckUser(checkboxUser,
 group));

 I have got 20 checkboxes, but I want to allow only 5 checkboxes select.
 When
 will be selected more than 5 checkboxes, it shows error (in feedback).
 I want to check this when the checkbox is selected (not after submitting
 form).



It will require JavaScript, so I'd just make it an entirely client-side
validation.  Of course, you'll still want the server-side validation to
mirror it for when the form is submitted - potentially with forced values
or JS disabled.


-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Model is not created

2012-07-02 Thread Jeremy Thomerson
On Mon, Jul 2, 2012 at 4:45 PM, Andre Schütz wic...@faustas.de wrote:

 Hello,

 I have a problem with the creation of a model in one of my pages.
 It works as follows:

 I have a link that uses setResponsePage(new MyPage(parameters)) on the
 click
 with parameters as PageParameters.
 At the MyPage site, the constructor creates a:
 IModelMyModel model = new IModelMyModel() {
   public void setObject ..
   public MyModel getObject..
 }

 This variable is used to create a CompoundPropertyModel for a Form.

 The first time when I click on my link to the MyPage site, everything
 is fine. At the second time, the MyModel variable is not empty. The
 variable is filled with the selected values from the first time when
 I clicked on the link to the MyPage site.

 I do not understand this behavior. Normally, the MyModel variable
 should be empty and not filled with the last selection.

 Has someone an idea?

 Thanks,
 Andre

 --
 Andre Schütz wic...@faustas.de

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



You'd need to show more code for us to be more helpful.  I'm suspecting
that you are clicking a stateful link on that page, which means of course
that your constructor will not be called again.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: guestbook application with database update

2012-06-26 Thread Jeremy Thomerson
For future reference in case somebody stumbles across this post: this guy
was moderated through, which requires a different remove command.  Martijn
pointed out that the command for that is for a list moderator to email:
users-allow-unsubscribe-jaffa.wify=gmail@wicket.apache.org

Thanks Martijn!

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*

On Mon, Jun 25, 2012 at 3:08 PM, Jeremy Thomerson jer...@wickettraining.com
 wrote:

 All list moderators do.  I just emails to users-unsubscribe-jaffa.wify=
 gmail@wicket.apache.org and users-deny-subscribe-jaffa.wify=
 gmail@wicket.apache.org which I think will block this guy.

 More info: http://www.apache.org/dev/committers.html#problem_posts

 --
 Jeremy Thomerson
 http://wickettraining.com
 *Need a CMS for Wicket?  Use Brix! http://brixcms.org*



 On Thu, Jun 21, 2012 at 7:30 AM, Martin Grigorov mgrigo...@apache.orgwrote:

 This looks like a spam.
 Third mail in this thread with unrelated content.
 Who has the karma to block this user ?

 On Thu, Jun 21, 2012 at 3:23 PM, jaffa jaffa.w...@gmail.com wrote:
  Names and addresses provided in guestbooks, paper based or electronic,
 are
  frequently recorded and collated for use in providing statistics about
  visitors to the site, and to contact visitors to the site in the future.
  Thanks.
  Regards,
  http://www.webryze.com toronto online marketing
 
 
  --
  View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/guestbook-application-with-database-update-tp4316943p4650155.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
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

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






Re: guestbook application with database update

2012-06-25 Thread Jeremy Thomerson
All list moderators do.  I just emails to users-unsubscribe-jaffa.wify=
gmail@wicket.apache.org and users-deny-subscribe-jaffa.wify=
gmail@wicket.apache.org which I think will block this guy.

More info: http://www.apache.org/dev/committers.html#problem_posts

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*



On Thu, Jun 21, 2012 at 7:30 AM, Martin Grigorov mgrigo...@apache.orgwrote:

 This looks like a spam.
 Third mail in this thread with unrelated content.
 Who has the karma to block this user ?

 On Thu, Jun 21, 2012 at 3:23 PM, jaffa jaffa.w...@gmail.com wrote:
  Names and addresses provided in guestbooks, paper based or electronic,
 are
  frequently recorded and collated for use in providing statistics about
  visitors to the site, and to contact visitors to the site in the future.
  Thanks.
  Regards,
  http://www.webryze.com toronto online marketing
 
 
  --
  View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/guestbook-application-with-database-update-tp4316943p4650155.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
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

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




Re: Determine session size for Wicket 1.5

2012-06-23 Thread Jeremy Thomerson
On Fri, Jun 22, 2012 at 11:28 PM, Walter Rugora m...@sudus.eu wrote:

 Hi,

 when I apply the Wicket 1.3 way to determine session size,
 RequestCycle.get().getSession().getSizeInBytes()
 it results in an around 3000bytes value in my case. And adding or
 removing Labels changed the session size.

 Now with Wicket 1.5 using
 Session.get().getSizeInBytes()
 session size is 857bytes. And I can add or remove as many Lables as I
 wish, that size stays the same. Obviously I use it wrong. Currently I
 just add the session size result to a Label added to my single WebPage:
 public HomePage(final PageParameters parameters) {
  ...
  add(new Label(ssize, String.valueOf(Session.get().getSizeInBytes(;
  ...
 }


Here you're doing it in the constructor.  So, if this is the first page you
visit there won't be any (Wicket) stuff in the session yet.

Have you tried just adding the debug bar to your page?  Add a dependency to
wicket-devutils in your pom.xml and then add(new DebugBar(someID)); to
your page (and add it to the markup obviously).

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Wicket Events

2012-06-19 Thread Jeremy Thomerson
Have we talked about adding an IEventDispatcher that dispatches events by
their class type based on event method signature?

Example:

class MyComponent {

@EventListener // or some annotation
public void onUserAddedEvent(UserAddedEvent event) {
  // do something here
}

}

Then when someone calls sink(new UserAddedEvent()) it gets dispatched to
only those methods that take a UserAddedEvent as their method argument?

Would that be useful (it seems like it to me - it avoids the instanceof
checks)?  Am I off track?  Is there something like this or better already
built?

An alternative would be that the annotation could take an argument of event
class(es) that it want's to be notified of.




-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*



On Tue, Jun 19, 2012 at 2:36 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:


 http://grepcode.com/file/repo1.maven.org/maven2/org.apache.wicket/wicket-core/6.0.0-beta1/org/apache/wicket/EventDispatcherTest.java#EventDispatcherTest

 -igor

 On Tue, Jun 19, 2012 at 12:31 PM, Douglas Ferguson the...@gmail.com
 wrote:
  Where's the source repository located?
 
 
  On Jun 19, 2012, at 2:20 PM, Martin Grigorov wrote:
 
  See org.apache.wicket.EventDispatcherTest in wicket-core's tests
 
  On Tue, Jun 19, 2012 at 9:58 PM, Douglas Ferguson the...@gmail.com
 wrote:
  Anybody have a good pattern for using Events without having lots of
 instanceOf, if/else, or switch statements?
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  Martin Grigorov
  jWeekend
  Training, Consulting, Development
  http://jWeekend.com
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
  -
  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: Store models short-term

2012-05-05 Thread Jeremy Thomerson
On Fri, May 4, 2012 at 6:15 PM, Dan Retzlaff dretzl...@gmail.com wrote:

 I'll mention one hack for which another Wicket user should rightly
 reprimand me. As I mentioned recently, Wicket keeps the most recently
 accessed page is a deserialized state to optimize serving the next request.
 All components are still detached, but if you override IModel#detach() in
 your LDM and suppress super.detach() then your entity will hang around.
 This has the behavior you describe, since (1) the entity does not need to
 be reloaded on subsequent requests, and since it's object reference is
 transient (2) it goes away as soon as another page is accessed, and (3) it
 does not get replicated among the cluster.



Well, you admitted you should be reprimanded :)  Doesn't that hack
still leave you with lots of problems like stale/detached entities etc?  I
definitely would not recommend that hack to someone new who is just trying
to learn Java *and* Wicket.  I'd instead say (like you started off with)
don't prematurely optimize, learn and get experience with the new way of
doing things and make sure you 150% understand them (and everything else
that's going on) before trying to 'fix' things.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Wicket Application on GoDaddy

2012-04-04 Thread Jeremy Thomerson
On Wed, Apr 4, 2012 at 1:49 AM, Satrix satrix...@gmail.com wrote:

 Yes. I know that I can redirect all requests but the question is how to
 deploy Java Web App on their hosting because there is something like
 Parallels Panel and you have to upload your WAR file and the files are
 generated (cant edit them by hand).

 That's why my application is available under
 www.domain.com/warfilename/home
 My context.xml file in the application has path= so it should start on
 default path


It's a GoDaddy hosting-related question, not Wicket.  Maybe someone here
has done it before, but as someone upthread mentioned you'll really just
have to search GoDaddy tech docs or contact their support for further help.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Wicket 1.5: sessions

2012-03-18 Thread Jeremy Thomerson
On Sun, Mar 18, 2012 at 5:08 PM, Pierre Goupil goupilpie...@gmail.comwrote:

 Good evening,

 I'm currently in the process of migrating my app from Wicket 1.4 to Wicket
 1.5. I've read the migration guide and everything seems to go fine, except
 for session management.

 Here's my code:

 public class MySession extends WebSession
 {

  public static MySession get()
{
return (MySession)Session.get();
}

 }

 When call, the get() method gives this stacktrace:

 Caused by: java.lang.ClassCastException:
 org.apache.wicket.protocol.http.WebSession cannot be cast to MySession

 Any help, please?

 Regards,

 Pierre Goupil



Does your application override newSession and return a new MySession?

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Wicket 1.5: sessions

2012-03-18 Thread Jeremy Thomerson
Put a breakpoint in the WebSession constructor and see where it's getting
called.

Or, perhaps you won't see anything there if this is happening because you
are in a serialized WebSession.  You can test that by clearing all cookies,
etc, and starting a new session.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*

On Sun, Mar 18, 2012 at 5:40 PM, Pierre Goupil goupilpie...@gmail.comwrote:

 Yes, absolutely:


public Session newSession(final Request request, final Response
 response)
{
return new MySession(request);
 }




 On Sun, Mar 18, 2012 at 10:32 PM, Jeremy Thomerson 
 jer...@wickettraining.com wrote:

  On Sun, Mar 18, 2012 at 5:08 PM, Pierre Goupil goupilpie...@gmail.com
  wrote:
 
   Good evening,
  
   I'm currently in the process of migrating my app from Wicket 1.4 to
  Wicket
   1.5. I've read the migration guide and everything seems to go fine,
  except
   for session management.
  
   Here's my code:
  
   public class MySession extends WebSession
   {
  
public static MySession get()
  {
  return (MySession)Session.get();
  }
  
   }
  
   When call, the get() method gives this stacktrace:
  
   Caused by: java.lang.ClassCastException:
   org.apache.wicket.protocol.http.WebSession cannot be cast to MySession
  
   Any help, please?
  
   Regards,
  
   Pierre Goupil
  
 
 
  Does your application override newSession and return a new MySession?
 
  --
  Jeremy Thomerson
  http://wickettraining.com
  *Need a CMS for Wicket?  Use Brix! http://brixcms.org*
 



 --
 Si tu penses que la violence ne résout rien, c'est que tu n'as pas tapé
 assez fort.



Re: Github?

2012-02-25 Thread Jeremy Thomerson
On Sat, Feb 25, 2012 at 6:17 PM, robmcguinness 
robert.mcguinness@gmail.com wrote:

 I understand Apache has a git server where the Wicket trunk code is being
 commited, but is there a reason why the Github account isn't being mirrored
 properly?


I've notified ASF Infra that it's fallen behind.  We may not have switched
it over to track the new repo when we switched to ASF git hosting.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: no input when using a link

2012-02-18 Thread Jeremy Thomerson
Chris is right - use SubmitLink

On Sat, Feb 18, 2012 at 4:52 PM, Chris Colman
chr...@stepaheadsoftware.comwrote:

 What Wicket class did you use for the I forgot my password button. I
 think it has to be one of the 'submitting' types for the model to be
 updated.

 -Original Message-
 From: lang [mailto:delan...@telfort.nl]
 Sent: Sunday, 19 February 2012 8:48 AM
 To: users@wicket.apache.org
 Subject: no input when using a link
 
 I made a login form. The user can click on the link I forgot my
 password
 In the program I want to read the input email address field. But it is
 always empty. When I use the ok button i can read the email field
 succesfully. What to do?
 
 --
 View this message in context: http://apache-
 wicket.1842946.n4.nabble.com/no-input-when-using-a-link-
 tp4400550p4400550.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




-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Serving different content depending on User Agent

2012-02-18 Thread Jeremy Thomerson
On Mon, Feb 13, 2012 at 8:21 AM, Richard W. Adams rwada...@up.com wrote:

 Could someone explain the meaning of the string argument to
 Session.setStyle()? Unfortunately, the javadocs give no clue, other saying
 that a skin can be used. Is the string the name of a stylesheet file, or
 something else?

 Note to Wicket team: The Wicket Javadocs are woefully inadequate. Time
 invested in fleshing them out would be well spent  would prevent a lot of
 questions like this.


Patches welcome.

Of course, Javadocs can always be improved, but your statement that they
will prevent a lot of questions like this isn't necessarily true.  I've
been on lots of mailing lists over the years and it doesn't matter how good
the javadocs are, there are still questions.   Most people don't look at
the javadocs.

Did you actually read the entire javadoc?  The setStyle javadocs give you a
link to the Session (class) javadocs.  These docs explain what style is and
then give a long list of exactly how all the resources are loaded -
including the style parameter and how it effects resource names.  If you
see something that can be improved there, please by all means submit a
patch or even an email that says please add such-and-such.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: No answers in last time

2012-02-17 Thread Jeremy Thomerson
On Fri, Feb 17, 2012 at 5:02 AM, cosmindumy cosmind...@yahoo.com wrote:

 Hello,
 It's not a wicket core question but I noticed that my last posts got no
 answer, starting with end of December. Are my questions too stupid or the
 wicket experts are overloaded?
 Thanks.

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/No-answers-in-last-time-tp4396828p4396828.html
 Sent from the Users forum mailing list archive at Nabble.com.


Providing links to the messages that were not answered would be helpful
here.

That said, I searched back and of the 15 messages I saw that had a message
from you it looked like only the ones sent earlier this week had gone
unanswered.  On all the others you received a response within a day max.

The best course of action is not starting a new thread but responding to
the original message so that the thread bubbles to the top of everyone's
mail client again.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Promlem with date format on changing locale

2012-02-17 Thread Jeremy Thomerson
On Mon, Feb 13, 2012 at 8:57 AM, cosmindumy cosmind...@yahoo.com wrote:

 Hello again,
 I have the following problem. I have a customized DateTimePanel component,
 wich has a DateTextFiled. The problem is that when I change the locale and
 pressing submit the date is not valid anymore due to date format.
 For example I have set the locale de-DE, date looks 02.02.2012 I press
 submit, lets say the validation fails for other reason, when I change the
 locale to en-GB the date is still the german format. I have to choose again
 the date, and now it has the right format. If I don't press submit, when
 changing back to de-DE the date has the german format(even if before was
 english format). If I press the submit when locale is en-GB and the I
 change
 to de-DE the date has english format.
 I hope it is clear the situation, and maybe you have an answer for this.
 Thanks.


Please provide code so we can see your custom component and offer
assistance.  It seems like your component should pull the locale from the
session - perhaps in onBeforeRender - rather than requiring that it be set
on the component at construction.


-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: pooling validators

2012-02-08 Thread Jeremy Thomerson
On Mon, Feb 6, 2012 at 10:38 PM, jsanca jsa...@gmail.com wrote:

 Hi Jeremy

 Thanks for your answer, I agree with you (reason why I sent this email, to
 double check my theory)
 I am just trying to find way to optimize the app, I am new with Wicket and
 I feel the Framework creates so much instances just to render a page, so I
 see the validators everywhere might a good idea to pooling it


Great.  The JRE has been very efficient at this for a long time.  It's not
really a problem like it was in low versions like JRE 1.1, etc.  You
shouldn't hit any problems where instance creation is the issue.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: pooling validators

2012-02-06 Thread Jeremy Thomerson
On Mon, Feb 6, 2012 at 5:43 PM, jsanca jsa...@gmail.com wrote:

 Hi All,

 As a common practice in Wicket we create IValidator objects for each
 component we need to add a validation, there are some scenarios when we use
 the same validator for several objects, so I was wondering if there is any
 issue if I create a pooling to provide this validators

 Thread Safe issues


Potentially.


 Concurrency issues


Potentially.


 Any other issue


Potentially.

Really, the question is: why?  Sounds like premature optimization.  Until
you see that validators actually cause a problem there's no need to do it.
 If they do cause a problem, I can almost 300% guarantee that pooling them
won't be the way to solve it.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Communication (in-vm) between webapps

2012-02-04 Thread Jeremy Thomerson
I agree a messaging queue is a nice scalable system.  But I also think
pragmatic approaches are best.  You don't have messages that need to be
sent right now (data sent between disparate apps).  You have a single
command that needs to be invoked.  That happens to be what HTTP is *really*
good at.  And, you're already writing a web app.  That said, I'd choose
Serban's recommendation.  Create a Wicket bookmarkable page that takes a
pre-shared key or some other method of authentication and call that from
the app.  If it's just an encrypted URL param that gives authorization you
don't even need to call it from the other app - just give the user a link
to click that goes straight to the flush cache page on the frontend.
 Open that in a new window, have your page print out all your strings are
belong to us and you're done :)


-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*

On Sat, Feb 4, 2012 at 6:47 AM, Bas Gooren b...@iswd.nl wrote:

 François,

 Thanks for your response.

 Playing around with messaging has been on my wishlist for a while now.
 I really like the features of JBoss HornetQ, in the context of my question
 especially the no dependencies, can be embedded through guice, handles
 persistence itself without external db and ... in-vm transport.

 I didn't know about this project, so thanks for pointing it out.

 Sebastian

 Op 4-2-2012 12:39, schreef Francois Meillet:

  Hi Sebastian,


 1) crossContext :
 Tomcat 7 - javadocs:

 Set to true if you want calls within this application to
 ServletContext.getContext()
 to successfully return a request dispatcher for other web applications
 running on
 this virtual host.

 But if you want something secure :
 Set to false (the default) in security conscious environments, to make
 getContext() always return null.
 Easy, not scalable, unsecure


 2) socket :
 Write a server and a listener using Socket and ServerSocket.
 Inexpensive, not-scalable,  must manage new threads


 3) jmx / mxbean
 If you want to write a lot of lines of code 


 4) Memory-mapped file with NIO
 Easy, not scalable


 5) messaging
 It may be overkill at first glance. Only at first glance,

 If you want something scalable and secure, go for a messaging bus:
 For example, why not using  JBoss HornetQ messaging system ?
 It's scalable, multi-protocol, embeddable.

 Your components will be loosely-coupled, scalable and secure, and your
 unit tests  much easier.
 Especially if you deploy your web app to a cluster


 François Meillet




 Le 4 févr. 2012 à 12:17, Bas Gooren a écrit :

  Yeah, I was thinking the same thing.

 The only thing I need to take care of then is access control, normal
 users should not be able to invoke a cache clear by calling the url. But
 since the call made from the admin to the frontend will not go over a
 public network I can simply use a pre-shared key for that.

 Thanks to all who replied for their input!

 Op 4-2-2012 11:02, schreef Martin Grigorov:

 On Fri, Feb 3, 2012 at 10:17 PM, Serban.Balamacithespamtrapp@**
 gmail.com thespamtr...@gmail.com   wrote:

 Some REST interface to be called through Httpclient from the admin
 application I'd say it's the simplest approach.

 I also think this is better than JMX, JMS/RabbitMQ/0mq, ... because
 these require different ports to be open and sometimes this is
 problematic.

  --
 View this message in context: http://apache-wicket.1842946.**
 n4.nabble.com/Communication-**in-vm-between-webapps-**
 tp4355616p4355667.htmlhttp://apache-wicket.1842946.n4.nabble.com/Communication-in-vm-between-webapps-tp4355616p4355667.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



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




Re: calling shell script from Wicket java program

2012-02-04 Thread Jeremy Thomerson
On Sat, Feb 4, 2012 at 4:56 AM, Martin Grigorov mgrigo...@apache.orgwrote:

 On Fri, Feb 3, 2012 at 5:53 AM, abhisheks sachini...@gmail.com wrote:
  i am developing a web application using apache wickets. I need to call a
  shell script residing on my local disk from java code.
 
  this is the section of code under concern :
 
  ProcessBuilder builder = new
 
 ProcessBuilder(sh,/media/drive_/MtechDocuments/ProgramingNOTES/RunShellfromJAVA/test.sh);
  builder.redirectErrorStream(true);
 final Process process =
 builder.start();
 }
  process.waitFor();
 
  --
 
  This is piece of code successfully runs fine and execute a shell when
 this
  code is a part of java prgram residing anywhere on my laal disk. However,
  when i make a jar file of a progeam , put in webapps folder , and start
 the
  web application , it reports permission denied error on test.sh script.
 
  I then modify the line as :
 
  ProcessBuilder builder = new ProcessBuilder(sudo, -A,
 
 sh,/media/drive_/MtechDocuments/ProgramingNOTES/RunShellfromJAVA/test.sh);
  and set the SUDO_ASKPASS env variable to script returning my sudo
 password ,
  then it reports the following error :
  sudo: 3 incorrect password attempts and script calling is failed. Again
 this
  works correctly when i run the program outside the web development
  environment , it is able to read my sudo password correctly at run time
 with
  -A option. Why is it failing when running the same program from web
  application ?  please help !!

 Maybe your web server runs with a user which has no permissions to
 become different user (via sudo).
 When you run it as a normal Java program you run it with your user
 which has this permission.

 In any case it has nothing to do with Wicket.


And if your webapp *is* running as a user with sudo access you're just
asking for trouble.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Get Wicket to ignore wicket parameters

2012-01-17 Thread Jeremy Thomerson
On Tue, Jan 17, 2012 at 4:01 PM, Steve Fatula st...@neobits.com wrote:

 I have taken over management of a site using wicket, which I was woefully
 unfamiliar with. Have been able to do some screens, modify them, add stuff,
 etc. without much trouble. However, the overflow flow I am not familiar
 with.

 The site had some web pages that were stateful and had a sort bar. That
 was removed. Wicket parms in the url are encoded.

 So, a previous link might look like:

 www.site.com/something.html?page=2z=afhyewifewicfhewichewicvhweripcvh

 These pages were indexed by the search engines. Now that the sort
 functions are gone, and, we've made the page a stateless page, requests to
 pages with the wicket parms (in the z=) now return an error as so:

 2012-01-17 10:55:36,700 (TP-Processor23) [
 RequestCycle.java:1432:ERROR] unable to find component with path
 someProductList:productList:topToolbars:2:toolbar:headers:2:header:orderByLink
 on stateless page

 Wel, is true of course since that's been removed. However, we want pages
 to still work, just, ignore the wicket stuff.

 Can this be handled via some method in wicket? i.e., something that can
 tell wicket to ignore the wicket stuff for the specific page in question?
 Some stuff in the query string are still used on those pages, just want to
 not process the wicket stateful stuff. Or, is it best handled with
 mod_rewrite in Httpd?


I'm sure it can be handled in Wicket, but even then I'd default to
mod_rewrite for something as simple as always remove parameter X from
query string for pages A, B, C.  To me dealing with old URLs is better
done at that level rather than cluttering the application with it.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: signOut and port

2012-01-03 Thread Jeremy Thomerson
On Mon, Jan 2, 2012 at 5:38 PM, brettTi bret...@hotmail.com wrote:

 We're running a wicket app on jetty and having an issue with signout. The
 app
 runs on port 8443 and we have iptables redirecting from port 443.  This
 lets
 us go to https://ourap.lab without port numbers and without having the web
 app run as root.

 Everything is great until we do signout.  We have a LogoutPage that does
 this:

   AuthenticatedWebSession.get().signOut();
   setResponsePage(HomePage.class);

 Works fine, we get sent to the Login page.  Only problem is that the url
 has
 the :8443 port number in it.  For some reason, this is the end of the world
 for our users.

 Any ideas?  Thanks


Maybe a combination of these two things:

First, do the iptables packet redirection [1] - sounds like you have this
working.
Then, tell Wicket what port to send redirects to [2] - sounds like this may
fix your problem.

[1] http://wiki.eclipse.org/Jetty/Howto/Port80#Using_iptables
[2]
http://www.petrikainulainen.net/programming/tips-and-tricks/wicket-https-tutorial-part-one-creating-secure-webpages/


-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Model Not Updated for Empty Fields

2011-12-05 Thread Jeremy Thomerson
On Mon, Dec 5, 2011 at 4:31 PM, Richard W. Adams rwada...@up.com wrote:

 For some  reason my data model is not being updated when I completely
 erase an input text field.

  I'm submitting the form via an AjaxSubmitLink, and the model shows
 changes to the contents when there ARE contents. And the model correctly
 shows changes to the field contents when I change the contents. But if
 completely ERASE the field content, the model does NOT show an empty
 string. Instead it shows the value before the erasure. The problem occurs
 regardless TextField.setConvertEmptyInputStringToNull is set to true or
 false.


Is that field required?  If you've called setRequired(true) it will not
blank it out because that's a validation error.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: How to set a common HTTP Header on all Responses?

2011-11-28 Thread Jeremy Thomerson
I can't find the original message you replied to anywhere in my email.
Perhaps because it is from Nabble? I think posting to the list from Nabble
is blocked. Anyway, how about a custom subclass of WebResponse? Application
creates it for every response.

PS - Sent from a tablet. Please excuse typos, spelling and compiler errors.

-- 
Jeremy Thomerson
http://wickettraining.com
Need a CMS for Wicket?  Use Brix! http://brixcms.org
On Nov 28, 2011 10:15 PM, jcgarciam jcgarc...@gmail.com wrote:

 What about using a filter in front of your Wicket application

 On Mon, Nov 28, 2011 at 1:15 PM, Sven Ludwig [via Apache Wicket] 
 ml-node+s1842946n4115751...@n4.nabble.com wrote:

  Hello,
 
  is there a way to set a common HTTP Header on all Responses of a Wicket
  1.4.19 Application which returns redirect-to-buffer responses, Ajax
  responses and possibly also resource responses? Is there possibly
 a(nother)
  way since Wicket 1.5?
 
  If I set the Header for example in overwritten
  WebRequestCycle.onBeginRequest, there is a problem with at least the
  redirect-to-buffer responses done in my case by the
  HybridUrlCodingStrategy. The HTTP Header will be present in the first
  response which is the redirect itself, but not in second response coming
  from the buffer.
 
  Best Regards,
  Sven
 
 
  --
   If you reply to this email, your message will be added to the discussion
  below:
 
 
 http://apache-wicket.1842946.n4.nabble.com/How-to-set-a-common-HTTP-Header-on-all-Responses-tp4115751p4115751.html
   To unsubscribe from Apache Wicket, click here
 http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=
 
  .
  NAML
 http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespacebreadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
 
 



 --

 JC


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/How-to-set-a-common-HTTP-Header-on-all-Responses-tp4115751p4117902.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: intercept client request

2011-11-27 Thread Jeremy Thomerson
On Sun, Nov 27, 2011 at 9:14 PM, nazeem md.naz...@gmail.com wrote:

 In the server side, i need to know who is performing this action to do
 auditing and other related services. So I need to use a thread local
 variable that will be available at any place in the chain of request until
 response is sent back. But I do not know how to set this thread local
 variable at the time of request. I have the current user in session, so i
 need to get it from session and set it to thread local variable on each
 request. if possible distinguish and filter only user request actions
 instead for all css, js request.

 When i look at the stack trace, when i click a submit link to update
 employee..  this is the strucutre.

 I am interested to intercept between this to set the thread local variable.
 how do i do it ?



You can override newRequestCycle in your application, provide a custom
subclass of WebRequestCycle, and use onBeginRequest / onEndRequest.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Howto override markup

2011-11-26 Thread Jeremy Thomerson
On Sat, Nov 26, 2011 at 4:37 PM, Stan. pab...@email.cz wrote:

 Hallo, please advice.
 I have BasePage, Page1 and Page2. Page2 extends Page1, Page1 extends
 BasePage. When is Page1 opened, his markup is placed into BasePage instead
 wicket:child/. But doesn't work identically for Page2. How can I do this?
 Thanks.


BasePage.html:

body
  blah, blah
  wicket:child /
/body

Page1.html (extends BasePage)

body
wicket:extend
  this is page 1
  wicket:child /
/wicket:extend
some other markup
/body

Page2.html (extends Page1)

body
wicket:extend
  this is page 2
/wicket:extend
some other markup
/body

Now

Viewing Page1 gives you:
body
  blah, blah
  this is page 1
/body

Viewing Page2 gives you:
body
  blah, blah
  this is page 1
  this is page 2
/body

Is that what you wanted?

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Dynamic component?

2011-11-25 Thread Jeremy Thomerson
On Fri, Nov 25, 2011 at 8:20 AM, Fabiosakiyam fabiosakiy...@gmail.comwrote:

 Hello,

 Sorry if this is already solved, but i couldn't find it, 'cause i don't
 really know what is the name of this, that's why the subject is weird.

 Ok so, im creating a new component (extends panel), and his .java is
 something like this:

 class Component {
getType().buildContainer();
 }

 It builds a container, depending on it's type. At the moment i have to 2
 types only.
 And the component .html is something like this:

 wicket:panel
div wicket:id=firstContainerName/
div wicket:id=secondeContainerName/
 /wicket:panel

 the first and second container have a .java and a .html as well, declaring
 the fields, etc.
 I want to know if it's possible to do what i'm trying at the component.html
 , i mean, declaring all types of containers i have (but only 1 will be
 built, at the getType().buildContainer()), and by declaring the wicket:id
 of
 them, it will get the wicket:id from the fields declared at the container
 too.

 It's kinda confuse to explain, i hope someone understand.
 Sorry for bad english.

 Thanks.


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Dynamic-component-tp4107323p4107323.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


This is an XY problem [1].  You're asking can I do this weird thing with a
panel.  Hard to say.  Why don't you explain to us what you're really
trying to accomplish.  My bet is that there is a much better way of doing
it than what you're asking about above.  That's the nature of XY problems.


[1] - http://www.perlmonks.org/?node_id=542341

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: AW: Dynamically choosing component to add

2011-11-25 Thread Jeremy Thomerson
On Fri, Nov 25, 2011 at 1:26 PM, Fabiosakiyam fabiosakiy...@gmail.comwrote:

 Hi Bertrand,

 I have almost the same problem you do (i think, im still a newbie).
 I'm trying to create a component that creates one specific container,
 depending on it's type. So i'd like to add only this container. I'm having
 problem at the .html, since i don't know if i should declare all
 wicket:id=idContainer or just the chosen one, since each container have
 it's own .html, how to 'link' the component html to the container .html.

 I want to know what you did on your .html, 'cause since your adding only
 the
 chosen panel to add, how you declared all possible panels on the .html? i
 wonder if you declared all panels on the .html or only the chosen one...


I think I just responded to you in your own thread - where I didn't know
what you were trying to do.  I still don't claim to fully understand, but I
think I better understand your question here.  If you mean that you have
one panel that *may possibly contain any one of X panels*, then here's one
solution:

ContainingPanel.html:

wicket:panel
  Some markup here
  Blah, blah, blah...
  div wicket:id=childPanel/div
  More surrounding markup...
/wicket:panel

ContainingPanel.java:

class ContainingPanel extends Panel {

  public void onBeforeRender() {
if(getModelObject() is of some type) {
  addOrReplace(new SomePanel(childPanel));
} else if(getModelObject() is of some other type) {
  addOrReplace(new SomeOtherPanel(childPanel));
}
  }
}

You only need one wicket:id in your containing panel.  You just swap at
runtime which component actually shows up in that spot.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Added issue for assertFeedback

2011-11-20 Thread Jeremy Thomerson
On Sun, Nov 20, 2011 at 12:46 AM, Jablow, Eric R eric.jab...@mantech.comwrote:

 I've just submitted issue WICKET-4246 for the problem I found where
 WicketTester.assertFeedback required the actual feedback messages to be the
 expected messages in their exact order. Since the ftlines validation
 project through the Hibernate validator project returns messages in an
 unspecified and nondeterministic order, testing for the existence of
 messages is not very useful.

 I'd provide a patch, but I'm not sure what is more Wicket-y; have
 assertFeedback compare a sorted version of the expected messages to a
 sorted version of the actual messages, or to add a
 WicketTester.assertFeedbackInAnyOrder method.

 I did later attach a Maven quickstart project. This has a test class with
 two methods, one of which will fail in each run; the one that does cannot
 be predicted.

 Respectfully,
 Eric Jablow
 This communication, along with any attachments, is covered by federal and
 state law governing electronic communications and may contain company
 proprietary and legally privileged information.  If the reader of this
 message is not the intended recipient, you are hereby notified that any
 dissemination, distribution, use or copying of this message is strictly
 prohibited.  If you have received this in error, please reply immediately
 to the sender and delete this message.  Thank you.


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




-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: How to build a hudson/jenkins like live log viewer?

2011-11-20 Thread Jeremy Thomerson
On Sun, Nov 20, 2011 at 8:59 PM, James james.eliye...@gmail.com wrote:

 Dear wicket community,

 In a project that I'm working on, I need to build a live log viewer or
 dynamic log viewer or refreshable log viewer.
 Much like how hudson/jenkins displays the console output.

 The idea is to dynamically display the new data added to a log file along
 with the existing content.

 How to go about doing this? Please throw some light on this.

 I searched about this in the web, mailing lists but couldn't find what I
 was looking for, so I'm posting it here.
 If this is asked elsewhere, kindly re-direct me to the respective resource.


I suppose you're only asking about the web UI portion of this application.
 The service / backend stuff is out of the context of this forum.
 (Although I would suggest looking at using something like Camel that has
all the necessary stuff for monitoring files and file streams and then
routing messages through to your application and/or other processors - see
[1] below).

For the web UI part, there are basically two methods: push, poll

1 - push - using something like cometd, etc to do AJAX push events (really,
these are long-pollers, leaving long-running HTTP requests going and
processing a stream of events that are received over the life of the
connection)

2 - poll - if you have some component that shows the last X lines of a log
file, just call component.add(new AjaxSelfUpdatingTimer(someDuration)).  As
long as you've written your IModel correctly (it always retrieves the most
up-to-date data), this will work out of the box

[1] http://camel.apache.org/stream.html - and things like scanStream

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Apache Wicket is a Flawed Framework

2011-11-19 Thread Jeremy Thomerson
 the same things - it's not the
silver bullet for every application on the internet.  You'll find a lot of
pragmatic and open-minded developers in this community.  But you can't come
think you're going to teach us all something by telling us how stupid we
are and talking in a demeaning way.


 I am definitely in the “I like to hand-code HTML, CSS, and Javascript”
 camp.


You should love Wicket then.  It gives you absolute control over your HTML.
 You won't get that in JSF (
http://code.google.com/p/maps4jsf/wiki/JSFMarkupPrototypes)


 I even like hand-coding SQL.  I get complete control.  These are all pretty
 easy languages; most of them are declarative.  They are easier than Java.
  I
 know most Java developers do not feel this way and want to just do
 everything in Java.  I think you should use the best tool for the job.
  Java
 is a mediocre tool to use in every domain.


I agree.  I use a fair amount of other languages within various
applications that I write.  I'm even refactoring some image and video
processing that I previously did in Java to be done with a combination of
bash and perl using linux applications, communicating with my Java app
through STOMP (through ActiveMQ).  It's fun stuff.  Much better than
image/video processing in Java, which is a total nightmare for the simple
things I need.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Chained dropdowns

2011-11-18 Thread Jeremy Thomerson
show the code

On Fri, Nov 18, 2011 at 1:36 PM, Tito njyt...@gmail.com wrote:

 Hi, I'm trying to connect three drowpdowns.

 For example.

 combo1: Country
 combo2: Province
 combo3: City

 I'm updating dropdowns by Ajax with
 AjaxFormComponentUpdatingBehavior(onChange) and it works ok.
 But if you choose a Country, then a Province, then a City and after that
 you change the Country, the Province changes but not the city.

 I'm doing everything with models and adding all dropdowns to
 AjaxRequestTarget.

 Regards

 Norberto




-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Duplicate Markup Ids

2011-11-14 Thread Jeremy Thomerson
Curious, what was it?

PS - Sent from a tablet. Please excuse typos, spelling and compiler errors.

-- 
Jeremy Thomerson
http://wickettraining.com
Need a CMS for Wicket?  Use Brix! http://brixcms.org
On Nov 14, 2011 7:18 PM, Jered Myers jer...@maplewoodsoftware.com wrote:

 I found the problem.  It was not a Wicket bug as expected.  Thanks for
 taking the time to look at this anyway.

 On 11/14/2011 03:36 PM, Jered Myers wrote:

 I forgot to post Wicket version 1.4.18

 On 11/14/2011 02:07 PM, Jered Myers wrote:

 The HTML markup is always span wicket:id=headerLabel/**span, so I
 think the answer is no.  I end up with a markup id like headerLabel8f.

 On 11/14/2011 12:54 PM, Sven Meier wrote:

 Do you have markup ids pre-defined in your html markup?

 Sven

 On 11/14/2011 09:39 PM, Jered Myers wrote:

 I am getting components with duplicate markup ids in my label
 components.  What can cause this to happen?

 I am letting Wicket set the markup ids.  Only one user is setup in a
 manner that creates the problem, so in general there is not a duplication
 problem.  As I understand it the markup id number is coming from the
 Session's nextSequenceValue method, so I don't see how it could be
 duplicated.  The components are getting built by multiple instances of the
 same class and added into the same array.  Here is an example reduced down
 to the basic parts:

 Several classes build the MyDisplayRow objects and add them to the
 same ArrayList...
 for (DataRow data : myData)
 {
  MyDisplayRow row = new MyDisplayRow();
  row.setLabelComponent(new Label(headerLabel,
 data.getTextColumnData());
  getMyRowArrayList().add(row);
 }

 ...
 ListViewMyDispayRow repeater = new ListViewMyDisplayRow(**repeater,
 myRowArrrayListModel)
 {
  protected void populateItem(ListItem**MyDisplayRow item)
  {
// Here is where I see the duplicate markup ids
log.debug(item.getModelObject(**).getLabelComponent().**
 getMarkupId());
item.add(item.getModelObject()**.getLabelComponent());
  }
 }



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


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


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


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




Re: Icefaces

2011-11-08 Thread Jeremy Thomerson
On Wed, Nov 9, 2011 at 12:17 AM, saraswathi saraswathi1...@gmail.comwrote:

 I am new to the Icefaces web technologies i have some problem to generate
 the
 expandable datatable in icefaces can u send how to generate expand
 datatable
 in icefaces with complete example


This is a *Wicket* mailing list.  Are you dealing with Icefaces?  Or
Wicket?  Or an integration of both?

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: MIgration to 1.5.2 seems a disaster

2011-11-05 Thread Jeremy Thomerson
On Sat, Nov 5, 2011 at 4:23 PM, hfriederichs h.friederi...@ohra.nl wrote:

 I'm sorry, but my initial question was how to debug my migrated
 application.

 No matter what I do - for example I commented vast amounts of code, to
 reduce the scope of the problem - nothing works.


Can you go the opposite direction - try to start with a quickstart (iow,
the minimum amount of code) and add some of your page code to it to
reproduce the problem?  Then you would have something you could send us to
reproduce (and fix) it.


-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Enhancements from Logica Feedback

2011-10-24 Thread Jeremy Thomerson
On Mon, Oct 24, 2011 at 8:26 PM, Chris Colman
chr...@stepaheadsoftware.comwrote:

 ** ** **

 Hi Peter,

 ** **

 I was wondering if you had a chance to go through the estimates. The hybrid
 option (3) comes in at around 4.4 days and gives Logica a system that will
 allow them to demonstrate uploading of payroll files and progress through
 the workflow using the existing functionality while providing no risk
 because we aren’t adding any extra functionality or model changes – purely
 reskinning and mocking up other features. This option’s effort actually
 comes in slightly less than option 1 – adding changes to the existing mock
 up because simulating many of the feedback features in a mock up is not
 trivial and many of them are already present in the current prototype.

 ** **

 Given the 4.4 days effort on the hybrid option I could complete this by
 Saturday our time, Friday their time (by working standard days or quicker if
 I put in some 14 hour days – but probably not necessary) which would allow
 them to get acquainted with it for their demo on 2/11. In fact, given that
 the changes in the hybrid are purely mock up (except for the addition of NI
 number – which is a trivial addition of an extra field) there are no reasons
 why they couldn’t start preparing for their demo earlier as only the look
 and feel will be changing as the hybrid option avoids ‘blow out’ risk by
 avoiding any underlying model changes.

 ** **

 Yours sincerely,

 ** **

 **Chris Colman**

  

 Pagebloom Team Leader,

 Step Ahead Software

 

 pagebloom - your business  your website growing together

 ** **

 **Sydney**: (+61 2) 9656 1278 Canberra: (+61 2) 6100 2120
 

 Email: chr...@stepahead.com.au //chr...@stepahead.com.au

 Website:

 http://www.pagebloom.com

 http://develop.stepaheadsoftware.com

  

 ** **


Chris,

  Did you send this to the wrong email address or did I miss something?

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Efficiency of 1.5 MountMapper weighted/matching algorithm

2011-10-15 Thread Jeremy Thomerson
On Sat, Oct 15, 2011 at 8:28 PM, Chris Colman
chr...@stepaheadsoftware.comwrote:

 Obviously this isn’t a problem during debug with a single user but when
 1000s of pages need to be rendered each minute the time spent performing the
 above operations may become significant. I haven’t done any benchmark
 testing but from experience, the frequenct allocation and compiling of
 collections and sorting can get CPU expensive and switching to a caching
 alternative usually leads to significant performance improvements.


It'd definitely be worth optimizing if we can prove it's a bottle-neck.  But
we try to avoid premature optimization.  Can you put together some numbers
to see what kind of processing load we're talking about?  I'd be interested
in seeing % of overall processing time under load.  Something like with X
clients browsing Y pages per minute, each page render took an average R
milliseconds, and Z milliseconds of this was in creating link URLs.  Or
something like that.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Community tools

2011-10-06 Thread Jeremy Thomerson
On Thu, Oct 6, 2011 at 6:27 PM, Gaetan Zoritchak 
g.zoritc...@moncoachfinance.com wrote:

 First of all, I love wicket. I think it's a very effective framework,
 with an active community.


Great, thanks!


 But ...

 I regret that some tools reduce its visibility. I think, in particular, the
 mode of exchange based on a mailing list is quite outdated. This mailing
 list which requires subscription limits the number
 of participants.


Heh.  You just said we have a very active community.

While I do like Stack Overflow for many things, it's not a true way of
building a community.  It's a way of asking questions.  (Yes, this is just
my opinion - not meaning to start a flamewar).  We have a vibrant community
here - I don't think the mailing list is limiting the community.

Plus, mailing lists are still THE way to communicate in open source.
 Especially is this true with Apache projects.


 Moreover, research on old messages are poorly referenced. I
 have recently experienced it one more time  during the migration of my
 project on Wicket 1.5. The solution to my problem has already been
 discussed
 and resolved but it took me a long time to find it. Why not drop this
 mailing list and discuss all questions
 onStackOverflow. The business community would be more visible.


How can we quantify such a statement?  If you can provide some kind of proof
that it's easier to find an answer by searching SO rather than mailing list
archives, we could look into alternatives.  But such a statement just isn't
easily (if at all) quantifiable.


 Source management and bugs are also outdated. The version on github is much
 better.


Github is awesome.  I don't care about the issue management on it.  JIRA has
a ton more features and support.  It works for us.  I think that we would
like to move to git at some point - but it's not (yet) supported for all
projects at the ASF.  There is a public beta running of git for one project
at the ASF right now.  If it succeeds, I think we'll be one of the first
projects to switch as soon as they make it available to all projects.


 My 2 cents,

 Gaetan


Thanks!  Hope to see you around this antiquated mailing list :)



-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Ajax Response xml showing in browser

2011-08-12 Thread Jeremy Thomerson
Sorry, but I wasn't looking for a solution.  I have no way to reproduce the
issue.  It seemed like you were making good progress in your other thread.

However, if you're able to create a quickstart that can reliably reproduce
the issue, the core devs will certainly be interested in taking a look at
it.


-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


On Fri, Aug 12, 2011 at 12:27 AM, Wayne W waynemailingli...@gmail.comwrote:

 Hi Jeremy,

 did you find a solution as we've had the problem for a long time now
 and more and more people are reporting it as they move over to FF and
 Chrome?


 On Tue, Jan 25, 2011 at 3:39 AM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
  Perhaps this thread will help:
 
 http://apache-wicket.1842946.n4.nabble.com/Ajax-response-render-as-source-in-the-browser-tt3028722.html
 
  --
  Jeremy Thomerson
  http://wickettraining.com
  *Need a CMS for Wicket?  Use Brix! http://brixcms.org*
 
  On Mon, Jan 24, 2011 at 9:48 AM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
 
  please attach a quickstart that reproduce it to a jira issue.
 
  -igor
 
  On Sun, Jan 23, 2011 at 10:40 PM, Jeffrey Schneller
  jeffrey.schnel...@envisa.com wrote:
   Got an odd issue occurring where the Ajax Response xml is showing in
 the
   browser rather than modifying the DOM of the page as it usually does.
   The scenario is the following:
  
  
  
   My Login page is abstract and has an abstract method called
   onLoginSuccess.
  
   When the login is successful we call onLoginSuccess.
  
  
  
  
  
   Abstract Class called LoginLink which extends AjaxLink
  
   LoginLink has an abstract method called onSuccess() and
   onAlreadyLoggedIn()
  
   The Login page is constructed and has it's abstract method
   onLoginSuccess defined to call onSuccess()
  
   The onClick method of LoginLink does a setResponsePage to my Login
 page
   if not already logged in and calls onAlreadyLoggedIn() if the user is
   already logged into the site.
  
  
  
   I have a page called Page1 which contains a LoginLink.
  
   The onSuccess() method is defined to setResponsePage() to the page I
   ultimately need to go to say Page2.
  
   The onAlreadyLoggedIn() method is defined to setResponsePage() to the
   page I ultimately need to go to say Page2.
  
  
  
   On Page2, there are AjaxButtons to submit forms.  If any button is
   clicked I get the AjaxResponse xml showing in the browser window.
  
  
  
   Any ideas on how to solve this?   Is there another way of doing this
   interaction with built in wicket components.
  
  
  
   Thanks.
  
  
  
   Jeff
  
  
  
  
  
  
 
  -
  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




RFC: Ten things every Wicket programmer must know?

2011-07-27 Thread Jeremy Thomerson
Hello all,

  I'm writing an article for a Java magazine and would like to include in it
a list of ten things every Wicket programmer must know.  Of course, I have
my list, but I'd be very curious to see what you think should be on that
list from your own experience.  Or, put another way, maybe the question
would be what I wished I knew when I started Wicket - what tripped you up
or what made you kick yourself later?

  Please reply back if you have input.  Please note that by replying, you
are granting me full permission to use your response as part of my article
without any attribution or payment.  If you disagree with those terms,
please respond anyway but in your response mention your own terms.

Best regards,

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Validation problem - OnError event everytime I submit

2011-07-27 Thread Jeremy Thomerson
Are you adding the feedback panel to the ajax request target in,both
onSubmit and onError?  If so, it should tell you what error is making you
get to the onError method.
 On 2011 7 27 21:50, phaedoland phaedol...@gmail.com wrote:
 Hello everyone,

 I'm a newbie using this wicket framework. I'm developing a user
registration
 form, which works quite fine. But when it comes to validate certain
fields,
 there is no way to have this form behaving as I wish.

 My textfields are simple *TextFieldString* and some of them have the
 *setRequired *set to true. I also have an *AjaxButton *which submits the
 form. To show the validation messages, I use the *FeedbackPanel*, but I
want
 to show a message next to each invalid field.

 This button has the the *onSubmit *and *onError *methods overriden.

 The thing is, once I submit the form and there is a validation error, even
 if I fulfill all the fields, I get the same error. (onError method is
always
 called).

 Please, could you help me?

 Thank you very much.

 Daniel.


 --
 View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Validation-problem-OnError-event-everytime-I-submit-tp3696379p3696379.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 as template engine

2011-07-19 Thread Jeremy Thomerson
Search the mailing list archives for things like emailing pages. There have
been a lot of discussions about the topic that will help you.
On 2011 7 19 10:32, Leszek Gawron lgaw...@apache.org wrote:
 I know I could use freemarker, velocity or any other tool. But these
 tools require me to create a full blown template model up front as
 wicket allows for a bunch of models chained togeter pulling data from
 different sources when they are needed.

 I have a set of load of panels that create a single Page. The customer
 wants me to export page contents to pdf so I thought I could:

 1. create a print skin for the panels
 2. render the panels/page using print skin to the external html file.
 3. use some html to pdf rendering tool (like flying saucer)
 4. serve pdf as with content-disposition: attachment

 Everything is easy apart from 1). Can you advise?

 lg
 --
 Leszek Gawron http://lgawron.posterous.com

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



Re: Issues with HeaderResponseContainerFilteringHeaderResponse

2011-07-19 Thread Jeremy Thomerson
To start, don't use a Label to contribute css.  Use a header contributor.
That's what they're made for.
On 2011 7 19 13:22, Loren Cole loren.c...@gmail.com wrote:
 We're making our application skinable, but I'm having some trouble getting
 user specified css into the right place in the header. We're working in a
 distributed environment, so instead of saving their css in the file system
 we're putting it in our database, and in order to get the cascade to work
 properly we need to add this css after all the others. Here's how I'm
 adding it:

 StandardPage.java

 onInitialize()
 //Add any override style
 Tenant tenant = MyWebSession.get().getTenant();
 Css css = cssRepository.GetStyleByTenant(tenant);
 if(tenant.getBranding()  css != null) {
 add(new Label(style, css.getStyle()));
 }
 }

 StandardPage.html

 wicket:head
 style type=text/css wicket:id=style/style
 /wicket:head

 -
 So the issue is that thet style tag comes before all my header
 contributions. I've tried specifying a header response decorator like so:

 Application.java

 public static final String HEADER_FILTER_NAME = myHeaderBucket;

 init() {
 super.init();
 setHeaderResponseDecorator(new IHeaderResponseDecorator() {

 HeaderResponseContainerFilteringHeaderResponse.IHeaderResponseFilter[]
 filters = {new CssAcceptingHeaderResponseFilter(HEADER_FILTER_NAME)};
 @Override
 public IHeaderResponse decorate(IHeaderResponse response) {
 return new
 HeaderResponseContainerFilteringHeaderResponse(response,
HEADER_FILTER_NAME,
 filters);
 }
 });
 }

 StandardPage.html

 wicket:head
 div wicket:id=myHeaderBucket/div
 style type=text/css wicket:id=style/style
 /wicket:head

 --

 Unfortunately I'm getting this exception when I instantiate a page:

 12:28:04,097 INFO [STDOUT] 2011-07-19 12:28:04.096 [http-127.0.0.1-8080-1]
 [127.0.0.1] [T:2] [U:3 - joe_sharp]
 [com.transverse.bleep.wicket.desktop.DesktopPage] ERROR
 org.apache.wicket.RequestCycle 1529 - Exception in rendering component:
 [MarkupContainer [Component id = headerBucket]]
 org.apache.wicket.WicketRuntimeException: Exception in rendering
component:
 [MarkupContainer [Component id = headerBucket]]
 at org.apache.wicket.Component.renderComponent(Component.java:2729)
 ~[wicket-1.4.17.jar:1.4.17]
 at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1539)
 ~[wicket-1.4.17.jar:1.4.17]
 at org.apache.wicket.Component.render(Component.java:2521)
 ~[wicket-1.4.17.jar:1.4.17]
 ...
 Caused by: java.lang.RuntimeException: there was an error processing the
 header response - you tried to render a bucket of response from
 HeaderResponseContainerFilteringHeaderResponse, but it had not yet run and
 been closed. this should occur when the header container that is standard
 in wicket renders, so perhaps you have done something to keep that from
 rendering?
 at

org.apache.wicket.resource.filtering.HeaderResponseFilteredResponseContainer.onComponentTagBody(HeaderResponseFilteredResponseContainer.java:67)
 ~[wicket-1.4.17.jar:1.4.17]
 at org.apache.wicket.Component.renderComponent(Component.java:2690)
 ~[wicket-1.4.17.jar:1.4.17]
 ... 81 common frames omitted


 Any ideas on what I'm doing wrong? Is there an easier approach I can take?

 Thanks,
 Loren


Re: AutoCompleteTextField which uses an Object, not a String

2011-06-14 Thread Jeremy Thomerson
I'd be up for at least moving the ObjectAutoComplete into core and adding
@Deprecated to the existing one before 1.5.0 if there is consensus on it.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*

On Tue, Jun 14, 2011 at 11:27 AM, James Carman
ja...@carmanconsulting.comwrote:

 On Tue, Jun 14, 2011 at 11:25 AM, Clint Checketts checke...@gmail.com
 wrote:
  Is there a good reason (besides backwards compatiblity) that the
  objectautocomplete hasn't replaced the broken string based one in
  wicket-extensions?
 
  It seems like AutoComplete should behave as similarly to DropDownChoice
 as
  possible. As it currently is, IChoiceRenderer feels broken with it.
 

 I would think it should have at least made its way into the core or
 extension by now.  There have been enough requests for it.

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




Re: Rendering the page, error some elements are missing

2011-05-15 Thread Jeremy Thomerson
On Fri, May 13, 2011 at 2:10 PM, Anna Simbirtsev asimbirt...@gmail.comwrote:

 The component(s) below failed to render. A common problem is that you
 have added a component in code but forgot to reference it in the
 markup (thus the component will never be rendered).

 1. [MarkupContainer [Component id = fragment]]
 2. [MarkupContainer [Component id = reason]]
 3. [MarkupContainer [Component id = submit]]


This seems to be saying that submit is in reason, which is in fragment
(in your code).  But, your markup shows submit outside of fragment.  Are
you adding two components with the ID submit in your code?

Without seeing the full code, there's not much more we can do to help.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Getting Parameters from URL

2011-05-15 Thread Jeremy Thomerson
Hielke's response is spot-on.  The real question is: why do you need to
access parameters in your session?  At least your example is concerning -
it's not typically a good sign to be pulling the User ID from the request
(where it looks like you're using it to create a session for a user).


-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


On Fri, May 13, 2011 at 2:58 AM, Hielke Hoeve hielke.ho...@topicus.nlwrote:

 This is because a session is created only once for each user, until it
 expires ofcourse...
 If you wish to check url parameters for each request I would suggest you
 do this in RequestCycle.onBeginRequest(). There is also
 RequestCylce.onEndRequest() if you need to do anything at the end of the
 cycle (letting go of variables and what not).

 If you want to check parameters only for a few pages then you could also
 choose to use the Page(PageParameters) constructor, wicket will give
 that constructor a hashmap with all the parameters from the url.

 Hielke

 -Original Message-
 From: drf [mailto:davidrfi...@gmail.com]
 Sent: donderdag 12 mei 2011 15:49
 To: users@wicket.apache.org
 Subject: Getting Parameters from URL

 We have code in our session object as follows:

 public class OurSession extends WebSession {

   public OurSession(Request request)}{
   super(request)
   // GET PARAMETERS FROM REQUEST
   userId = request.getParameter(userId);
  }

 }

 This works the first time, so if the url has a parameter of userId=JOHN
 then this can be picked up in the above code.
 However, if the application is again requested from the browser (and the
 session already exists), this code will not get called.
 What is then the best way to pick up the parameters on the url?
 Thanks


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Getting-Parameters-from-URL-t
 p3517499p3517499.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: WELCOME to users@wicket.apache.org

2011-04-28 Thread Jeremy Thomerson
Please post for future people who find this thread.

On Thu, Apr 28, 2011 at 5:41 PM, Matthew Goodson
matt...@spidertracks.comwrote:

 I finally managed to figure out a workaround for this so it's all workin
 now.
 Thanks for your help!

 On Fri, Apr 29, 2011 at 8:49 AM, Matthew Goodson
 matt...@spidertracks.comwrote:

 
  Yeah on the javascript side it will fire off a request to the server to
  reload the tab each time. But wicket on the server thinks that the
 requested
  tab is already loaded so ignores the request
 
  On Thu, Apr 28, 2011 at 9:07 PM, Martin Grigorov mgrigo...@apache.org
 wrote:
 
  The random parameter is there to prevent caching of the Ajax response.
  AFAIK clicking on a tab will reload its content each time. I.e. Wicket
  doesn't think that the tab is already loaded.
 
  On Thu, Apr 28, 2011 at 12:41 AM, Matthew Goodson
  matt...@spidertracks.com wrote:
   Yeah I'm not feeling too hopeful
   I have a tabbed panel which loads the tabs via ajax. When the page is
  loaded
   from the browsers cache i.e. the user hits the back button, the ajax
  request
   to load the tab is sent but wicket thinks that tab is already loaded
   (getSelectedTab()) so ignores the request.
  
   Here's the request that's sent. Wicket adds the random parameter. I'm
  not
   sure if I removed the random param (somehow) if that would breaks
  things.
  
  
 
 http://localhost?wicket:interface=:27::IActivePageBehaviorListener:21:2wicket:ignoreIfNotActive=truetab=privacysettingsrandom=0.8811610792763531
  
   Any ideas?
  
  
   On Wed, Apr 27, 2011 at 7:22 PM, Martin Grigorov 
 mgrigo...@apache.org
  wrote:
  
   Hi,
  
   I'm not sure whether this is possible at all.
   Why do you need to do this ?
  
   On Wed, Apr 27, 2011 at 8:12 AM, Matthew Goodson
   matt...@spidertracks.com wrote:
Hi guys,
I'm trying to find out if an ajax request has come from page that
 was
   loaded
from the browsers cache. Does anyone have any ideas of how I could
   achieve
this?
Thanks
   
  
  
  
   --
   Martin Grigorov
   jWeekend
   Training, Consulting, Development
   http://jWeekend.com
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
 
 
 
  --
  Martin Grigorov
  jWeekend
  Training, Consulting, Development
  http://jWeekend.com
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
 
  Matthew
 
  Software Engineer
 
  Matthew Goodson | spidertracks
 
  po box 5203 | 117a the square | Palmerston North 4441 | new zealand
 
  P: +64 6 353 3395 | M: +64 27 6969639
 
  E: *matt...@spidertracks.co.nz* matt...@spidertracks.co.nz   *
  www.spidertracks.com*
 
  spiderwatch - because in the rescue game, time = life.
 
 


 --

 Matthew

 Software Engineer

 Matthew Goodson | spidertracks

 po box 5203 | 117a the square | Palmerston North 4441 | new zealand

 P: +64 6 353 3395 | M: +64 27 6969639

 E: *matt...@spidertracks.co.nz* matt...@spidertracks.co.nz   *
 www.spidertracks.com*

 spiderwatch - because in the rescue game, time = life.




-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Complex Grid with Wicket

2011-04-20 Thread Jeremy Thomerson
On Wed, Apr 20, 2011 at 5:59 PM, Bruno Borges bruno.bor...@gmail.comwrote:

 Can someone wonder how could one, using Wicket, accomplish an interface
 like
 the one below?

 http://papers.consegi.gov.br/pub/palestras.php


What part do you want to know how to do?  The rowspan on some cells?

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Use of AbstractReadOnlyModel

2011-04-15 Thread Jeremy Thomerson
On Fri, Apr 15, 2011 at 8:43 PM, Marek Šabo ms...@buk.cvut.cz wrote:

 Hi all,

 I would like to ask for some examples where use of AROM comes in handy. We
 had a sort of dispute in one project whether it is better to provide static
 text, no i18n labels with Model.of(Object o) or

final Object o;
new AbstractReadOnlyModel(){

getObject() {
return o;
};
 }


Functionally, your two models are equivalent.  They both have a private
instance variable that contains the object that will be returned by
getObject.

Could someone who uses them in fitting scenarion provide some advice? It
 shows up in our code more and more often and I'm not convinced of that being
 right. That argument was augmented by ResourceModel being sublclass of AROM.



I see people use AROM all over the place for all the wrong reasons.  Doing
things like the following are typically *bad*:

// this should typically be a LoadableDetachableModel:
new AbstractReadOnlyModelFoo { public Foo getObject() { return
database.getFoo(); } }

// this is almost always from a wrong understanding of what models are:
(in a ListView):
newItem(ListItemFoo item) {
  final Foo obj = item.getModelObject();
  add(new Label(label, new AbstractReadOnlyModelString() {
public String getObject() {
  return obj.getSomeString();
}
  });
  // see guys!  I'm awesome!  I used a MODEL
}

AbstractReadOnly models are good to use when your use meets all the
following criteria:
1 - you're using it for a read-only component (label, etc)
2 - whatever you must store in it is okay to be serialized (remember that if
your getObject method references a final variable declared outside of the
AROM, that entire object will be serialized into your AROM as a private
field by the compiler)
3 - whatever you are returning is cheap to retrieve (if it's not, like you
must get it from the database, you will typically want a
LoadableDetachableModel)

Acceptable use:
add(new Label(username, new AbstractReadOnlyModelString() {
  public String getObject() {
return getSession().getUser().getUsername();
  }
});

In this example:
1 - I'm using it on a label
2 - I'm not stroring any state in my AROM, because I have no fields in the
anonymous class, and I'm not accessing a final variable declared outside the
class
3 - Assuming the user is kept in session memory, I'm not doing a DB lookup
or other expensive operation to get that string in my AROM

Of course, I could have also done this:
add(new Label(username, new PropertyModelString(this,
session.user.username)));

Honestly, I don't use AROM a whole lot.  LDM and PropertyModel are generally
the most common.  But I'm sure Igor will prove me wrong :)

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Refreshing loadable detachable model object inside an ajax call

2011-04-14 Thread Jeremy Thomerson
On Thu, Apr 14, 2011 at 3:51 PM, Iain Reddick
iain.redd...@beatsystems.comwrote:

 Firstly, that LDM code is broken - calling detach() on load() makes no
 sense.


Right - you should *not* call detach from within load().


 Also, it will hit hibernate on every call to getObject(), as you aren't
 caching the loaded Parent entity. This is probably the cause of the
 hibernate exceptions you are seeing.


Wrong - LDM caches the returned object within it.  That's the whole point of
LDM.


 Check out http://wicketinaction.com/2008/09/building-a-smart-entitymodel/for 
 a solid persistence backed LDM implementation.

 Unrelated, your ParentsService.load() method probably doesn't need to take
 the entity class a parameter - the service should know the entity type it is
 querying hibernate for.


-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: fter 1 minute the Pagemap null is still locked by: Thread[[ACTIVE]

2011-04-03 Thread Jeremy Thomerson
You should use some asynchronous querying.  In other words, you search is
submitted to a background process and the Wicket request completes to some
intermediary please wait while we do your search page (like all the big
airline middlemen do)  It polls the background service to see if it's
complete, and when it is, continues on.

You don't want page requests that literally take minutes.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*



On Sun, Apr 3, 2011 at 9:47 AM, fachhoch fachh...@gmail.com wrote:

 we have a complex search  screen , right now the query behind the search
  is
 not tuned , sometimes for different combinations search takes very long
 time
 and I get

 [raw]
 Caused by: org.apache.wicket.WicketRuntimeException: After 1 minute the
 Pagemap null is still locked by: Thread[[ACTIVE] ExecuteThread: '3' for
 queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads], giving up
 trying to get the page for path: 2
 [raw/]

 once I get this error then   all links becomes non functional ,ie I click
 on
 the link nothing happens all my links are ajax links .only way to get rid
 of
 this error is kill the session ie kill the browser and open new browser  .


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/fter-1-minute-the-Pagemap-null-is-still-locked-by-Thread-ACTIVE-tp3423610p3423610.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: Set all form fields to output markup id automatically

2011-03-28 Thread Jeremy Thomerson
On Sun, Mar 27, 2011 at 11:43 PM, Bruno Borges bruno.bor...@gmail.comwrote:

 For now, I simply did this:

  object autoMarkupId extends IComponentInstantiationListener {
 def onInstantiation(component: Component) {
if (component.isInstanceOf[FormComponent[_]]) {
   component.setOutputMarkupId(true)
   component.setMarkupId(component.getId())
}
 }
  }

  getComponentInstantiationListeners().add(autoMarkupId);

 I've been playing with this technic, of having all Form components
 outputing
 their ids as is. Of course, this is application-specific, and Wicket should
 not take this to its core.


I personally would suggest *not* having that second line
component.setMarkupId(component.getId()) there.  Let Wicket generate the
IDs for you so that they're all unique on a page.  Your approach above
breaks using two EmailAddressTextField (fake example class) components on
the same page.

Designers should use css class to style.  An occasional ID that isn't
attached to a Wicket component can also help (div surrounding content
section, etc).

But it seems that improves development time, when the web designer codes CSS
 and HTML with the application running on his machine. No more code like

  wicket:id=foo id=foo

 Now, I'm considering to implement a different way to define a Wicket
 component in the HTML:

   div id=w_foo
   /div

  add(new WebMarkupContainer(foo));

 What you guys think of this?


This approach of coding in the markup and automagic generation of components
has been discussed numerous times.  It's not in line with Wicket's core
principles, so we won't add it, but we've made it easy enough to add it to
your own app.  However, watch out: the example you give above is useless -
it just creates a markup container.  So, the next request will be let me
configure that component by adding attributes in the markup; maybe I can
have 'property='firstName'' to show that this should be a label that
displays the first name.  Now you're programming in markup - you might as
well use PHP!  :P

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Page to select something and use the selection in another page

2011-03-27 Thread Jeremy Thomerson
window.opener?

http://www.w3schools.com/jsref/prop_win_opener.asp

On Sun, Mar 27, 2011 at 1:54 PM, fernandospr fernando...@gmail.com wrote:

 Hi,


 I need to build a page (1) where the user will have a form and one of the
 inputs will have a button that will open another page (2) where he/she will
 select something from a list, probably from a DataView, then accept and use
 the selected item in the form of page (1).

 Any ideas?

 Thanks in advance.

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Page-to-select-something-and-use-the-selection-in-another-page-tp3409591p3409591.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




-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Apache Wicket Cookbook Published!

2011-03-25 Thread Jeremy Thomerson
I had the privilege of previewing the book's content over the past few
months, and I can tell you that this book is going to be worth every penny
and then some!  I'd recommend it for every Wicket develop out there - even
if you think you've already done it all.  I guarantee you'll pick up a
trick or two - I did!

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


On Fri, Mar 25, 2011 at 1:44 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 For the past nine months I have been quietly working on a book about
 Wicket. Unlike other books on the market this one does not attempt to
 teach you Wicket from the ground up. Instead, it is for developers who
 already know the basics and want to learn how to implement some of the
 more advanced use cases. Essentially, it contains recipes that show
 the reader how to implement solutions to some of, what I think are,
 the most commonly asked questions and stumbling blocks. This morning I
 was informed that the book has been published! You can read more about
 it and pick up a copy on PACKT's Site[1]. I hope you enjoy it, more
 details below...

 [1] https://www.packtpub.com/apache-wicket-cookbook/book

 ## Description ##

 Apache Wicket is one of the most famous Java web application
 frameworks. Wicket simplifies web development and makes it fun. Are
 you bored of going through countless pages of theory to find out how
 to get your web development done? With this book in hand, you don't
 need to go through hundreds of pages to figure out how you will
 actually build a web application. You will get practical solutions to
 your common everyday development tasks to pace up your development
 activities.

 Apache Wicket Cookbook provides you with information that gets your
 problems solved quickly without beating around the bush. This book is
 perfect for you if you are ready to take the next step from tutorials
 and step into the practical world. It will take you beyond the basics
 of using Apache Wicket and show you how to leverage Wicket's advanced
 features to create simpler and more maintainable solutions to what at
 first may seem complex problems.

 You will learn how to integrate with client-side technologies such as
 JavaScript libraries or Flash components, which will help you to build
 your application faster. You will discover how to use Wicket paradigms
 to factor out commonly used code into custom Components, which will
 reduce the maintenance cost of your application, and how to leverage
 the existing Wicket Components to make your own code simpler.

 A straightforward Cookbook with highly focused practical recipes to
 make your web application development easier with the Wicket web
 framework

 ## What you will learn from this book ##

 * Leverage Wicket to implement a wide variety of both simple and
 advanced use cases in a narrative that gets straight to the point
 * Make forms work in the crazy world of the Web by learning the ways
 of Wicket's form processing
 * Simplify localizing your Wicket applications
 * Take the boring out of your forms by discovering how to improve the
 user experience while simplifying your code at the same time
 * Leverage the built-in Table component to make displaying tabular data a
 snap
 * Think Wicket's Borders are not very useful? Learn to use them in
 unexpected places to simplify things
 * See how to integrate with Flash components and create interactive
 charts at the same time
 * Web 1.0 too boring? Learn how to tame Wicket's AJAX support and
 bring your application into Web 2.0
 * Simplify your security code by learning various security techniques
 * An application cannot be built with Wicket alone; see how to make it
 play nice with other frameworks

 ## Approach ##

 This is a hands-on practical guide to a large variety of topics and
 use cases. This book tries to use real-world examples when possible,
 but is not afraid to come up with a contrived pretext if it makes
 explaining the problem simpler. Unlike a lot of other books, this one
 does not try to maintain a continuous theme from chapter to chapter,
 such as demonstrating solutions on the same fictional application;
 doing so would be almost impossible given the wide variety of recipes
 presented here. Instead, this book concentrates on focused problems
 users are likely to encounter and shows clear solutions in a
 step-by-step manner. This book tries to teach by example and is not
 afraid to show a lot of code because, after all, it is for coders.

 ## Who this book is written for ##

 This book is for current users of the Apache Wicket framework; it is
 not an introduction to Wicket that will bore you with tons of theory.
 You are expected to have built or maintained a simple Wicket
 application in the past and to be looking to learn new and better ways
 of using Wicket. If you are ready to take your Wicket skills to the
 next level this book is for you.

 Cheers, and I hope you enjoy the book!
 -Igor

Re: Wicket in Action: problem with redirection

2011-03-10 Thread Jeremy Thomerson
On Thu, Mar 10, 2011 at 12:36 PM, Jim Goodwin sophin...@comcast.net wrote:

 I'm a Wicket newbie, working my way through /Wicket in Action.

 /I don't understand redirection too clearly yet, but there is
 an example in the book which doesn't work right when I
 try it and I'd like to ask if the book example code makes
 sense to more experienced folks.

 Page 271 Listing 11.3 line 4: The onSubmit() method calls
 !continueToOriginalDestination().


continueToOriginalDestination() lets the user continue on to the place they
were going before being interrupted by the security mechanism if they aren't
logged in.  i.e:

user on home page
user clicks restricted page link
security strategy says can't go there without being logged in as X,
redirects user to login page
user logs in, and continueToOriginalDestination() redirects to restricted
page (original dest) and returns true.

another example:
user clicks bookmarked link in a new tab in their browser to login page (or
goes to unrestricted home page and clicks link for login page)
user logs in, and continueToOriginalDestination() can't redirect them
anywhere, because there is no original destination that was interrupted

Page 272 Listing 11.4 , new Link(...){ ... method onClick():
 throws new RestartResponseAtInterceptPageException(signInPage)


This is a way to stop processing at ANY point in your application and
redirect the user to a certain page.


 How is this supposed to work?

 Suppose the user is on the Home page, and the Home Page
 has a UserPanel, and the user clicks on the Sign In link.
 Then  the link itself sets an intercept to the sign-in page
 (that is how the link arranges to take you there, as far as I can
 understand).

 But then, when the user enters name/password and submits, and
 the submit method  calls continueToOriginalDestination(), it will
 always succceed, and find the original destination to be the signIn
 page, regardless of where it really originated (the Home Page, in
 this case).


You're a bit confused by original and destination.  Since the user
clicked the signin page link, the *destination* was the signin page -
which is unrestricted, so the continueToOriginalDestination() method can not
redirect them anywhere, and thus returns false.  You now need to redirect
them somewhere manually or the signin page will re-render.

The *origin* was the home page - but that doesn't matter.  Don't be thrown
off by original (destination) and origin - which are two different
things.  :)

For a while my code was working like that: Signing in worked,
 i.e. it did sign you in, but you were returned to a blank sign-in page.
 (My code doesn't work like that just this minute, but that is only
 because I've been enhancing it with other bugs.)

 Can anyone explain how the book-example is supposed to work?

 Thanks
 Jim



-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Test

2011-02-24 Thread Jeremy Thomerson
Oh, it worked!  :)

On Thu, Feb 24, 2011 at 3:49 PM, Jim Goodwin jwg...@gmail.com wrote:

 Everything I send to this list is being bounced by a  spam-filter
 at the list-serv end. Just testing a very simple text-only message.
 Very sorry if this actually goes through, nothing else would


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




-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: How to do document.write(Hello Word); in Wicket?

2011-02-20 Thread Jeremy Thomerson
On Sun, Feb 20, 2011 at 7:35 PM, Paolo irresistible...@gmail.com wrote:

 How can I write something into the HTML page, from Java code.
 A similar fast metod like in javascript to write in HTML:

 document.write(Hello word);

 It is userfull for conditional messagge like:

 If (sum==5) { document.write(It is right!) }


If this were a sum of something else dynamic on the page, it should be done
in a model because other things can change the value while on that page.
 Doing it, for instance, an AbstractReadOnlyModel would ensure that the
calculation is always current.


 or it may be userfull for an simple email antispam system, like in
 javascript:

 document.write(irresi+stiblecam+@+gma+il.com);


This makes absolutely no sense.  If you had document.write on the server
side, your example would be writing the email address out in its complete
form to be rendered on the client.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: How discover the caller page (referer)?

2011-02-20 Thread Jeremy Thomerson
Get the http servlet request from the request, and get the referrer header.

On Sun, Feb 20, 2011 at 8:09 PM, Paolo irresistible...@gmail.com wrote:

 How can I discover the caller page (referer) of my wicket application or
 specific page?

 http://en.wikipedia.org/wiki/HTTP_referrer

 Thank you.
 Paolo

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




-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: a common component for all my pages which takes lot of time to load

2011-02-17 Thread Jeremy Thomerson
On Thu, Feb 17, 2011 at 9:34 PM, fachhoch fachh...@gmail.com wrote:


 I need acomponent which I want to show in all my pages , this component
 takes time for loading so
 I don't want to contruct this   everytime but create it once  when user
 logs
 in put in his  session and show the same component in all my pages  and
 also
 this componenet should update itself at frequent intervals  in a seperate
 thread   .Please advice me , and are there any examples  ?


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/a-common-component-for-all-my-pages-which-takes-lot-of-time-to-load-tp3311989p3311989.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



Don't share components across pages.  It will cause problems.  Most likely,
it is not your component that actually takes a long time to load - it's
probably the data.  You may be loading it in the constructor, but you
shouldn't be.  You should be loading it in a model
(LoadableDetachableModel).  And, you should load it from a service that does
this caching / refreshing for you.  It shouldn't be managed by your UI.

I could be off - but that answer is right 99% of the time for these
questions.  If I'm off, send more details, preferably including code.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: a common component for all my pages which takes lot of time to load

2011-02-17 Thread Jeremy Thomerson
On Thu, Feb 17, 2011 at 10:36 PM, fachhoch fachh...@gmail.com wrote:


 thanks for the reply , yes it is the model which takes time to load, I did
 not start the coding yet  to show you the code  I am   looking for
 suggestions.,
 write now my idea is to create this model object when user logs in and put
 in his session, this panel gets the data from session  and  it will have
 AjaxSelfUpdatingTimerBehavior  to  update  itself.
 but the difficult part   where  I need advice is how to tell my session to
 reload this model at frequent intervals?
  if this is not a good idea please advice me  with  better way to do .


I don't think you should be doing this in your UI layer at all.  It'd be
better IMHO as a function of a service that handles caching, uses a least
recently used map, expires caches after X seconds / minutes, optionally
refreshes that cache after X seconds / minutes, etc.  Your UI component
would just get it from this caching / data management service, which should
always be a quick operation after the first retrieval.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: dynamically create table row, and with each record create radio buttons

2011-02-17 Thread Jeremy Thomerson
See DataTable, Form, and related examples in wicket-examples

On Thu, Feb 17, 2011 at 11:58 AM, Jehan jeeha...@gmail.com wrote:

 Dear all

 I want to read  records(userid and username) from database table,
 display it in table structure , and with each record display 3 radio
 buttons(A,B,C) .

 When clicked on button then database table update using userid and
 selected radio button value.

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




-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Is wicket suited for my needs?

2011-02-14 Thread Jeremy Thomerson
As Jonathan asked, did you really mean 10k concurrent *requests* (which is
what you stated originally), or did you mean 10k concurrent *sessions*?

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


On Mon, Feb 14, 2011 at 11:31 PM, Suraj Chandran 
suraj.chand...@ny.email.gs.com wrote:

 I understand that wicket is a stateful session based framework, but there
 is
 still provision for stateless stuff.
 My aim would be to push requests towards statelessness as much as possible.
 Noticing this some guys have told me that maybe wicket is not for this.
 Considering that atleast 20% of the requests will be session based, do you
 suggest using wicket.


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




Re: Unable to update FeedBackPanel within AjaxEventBehavior call

2011-02-14 Thread Jeremy Thomerson
On Mon, Feb 14, 2011 at 3:11 PM, sheadley3228 steven.head...@cats.usdoj.gov
 wrote:


 I am getting the following error in the wicket ajax debug window when
 trying
 to update the feedback panel in my result page.

 ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedback91]]
 a
 was not found while trying to perform markup update. Make sure you called
 component.setOutputMarkupId(true) on the component whose markup you are
 trying to update.


That error is on the client side, meaning that the markup can't be found.


 my question is how do I find this component programmatically? is there a
 getComponentByID call or something?? I call my compenent feedback, where
 is the 'feedback91' comming from??


You must have already found or referenced your component in your server
side code to add it to the ajax request target.  So, what do you mean by
this question?

feedback91 is the markup ID associated to the component by Wicket.  That's
the markup ID that is not showing up in the client side of the page.

Your problem is most likely related to the feedback panel or one of its
parents being invisible during the initial request, which is why it can't be
found on the page when you do the ajax update.

Try calling feedback.setOutputMarkupPlaceholder(true) where you created the
feedback panel.

Also, I am using AjaxEventBehavior on a checkbox so that once the checkbox
 is clicked, I would like to update the feedback panel without refreshing
 the
 page. How could this be accomplished?? is there some sort of render that
 would show the new message in the feedbackpanel?


It appears that you're already doing what needs to be done (namely, adding
the feedback panel to the ajax request target), but it's not appearing
because of the aforementioned problem.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: usage of JavascriptFilteredIntoFooterHeaderResponse

2011-02-14 Thread Jeremy Thomerson
On Mon, Feb 14, 2011 at 12:11 AM, Zilvinas Vilutis cika...@gmail.comwrote:


 Hi Jeremy,

 Thanks for the implementation ( I've found that you're the author of most
 of
 the files :) ) - it will be really useful in the future.

 1st problem I ran into - no usage example in Javadocs :) However, mailing
 list helped!
 ... after that
 I've found that one of the core WiQuery classes renders javascript with
 response.renderString method (
 org.wicketstuff.jquery.JQueryBehavior.renderHead(IHeaderResponse) ):


Hmm, yeah, renderString doesn't give us any metadata to work with to realize
it's JS and therefore filter it.  It could be anything, or any combination
of things.  I think you should ask the WiQuery guys to change their usage to
use renderJavascript so that you can use this with it.


@Override
public void renderHead(IHeaderResponse response) {
try {
super.renderHead(response);
if(getIncludeJQueryJS(response)) {
response.renderJavascriptReference(JQUERY_JS);
if
 (Application.DEVELOPMENT.equals(Application.get().getConfigurationType()))
 {
response.renderJavascriptReference(JQUERY_DEBUG_JS);
}
}
CharSequence script = getOnReadyScript();
if ((script != null)  (script.length()  0)) {
StringBuilder builder = new StringBuilder();
builder.append(script
 type=\text/javascript\\n$(document).ready(function(){\n);
builder.append(script);
builder.append(\n});/script);
response.renderString(builder.toString());
}
} catch (RuntimeException exc) {
throw exc;
} catch (Exception exc) {
throw new RuntimeException(wrap:  + exc.getMessage(), exc);
}
}


 Which is not being filtered and gets into header - which causes the
 $('document') string to be not valid before jquery.js was loaded.

 Basic features looks good and definitely a good start!

 Probably I'll need more examples how to use
 AbstractResourceDependentResourceReference to create JS Reference
 dependencies and make sure the order is all right.


Take a look at the examples and start a thread for questions if you have
them.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Unfriendly Model.ofList etc. methods; can anything be done?

2011-02-13 Thread Jeremy Thomerson
On Sat, Feb 12, 2011 at 8:49 AM, Willis Blackburn wbo...@panix.com wrote:

 jer...@wickettraining.com wrote:
 
  On Sat, Feb 12, 2011 at 7:56 AM, Willis Blackburn wbo...@panix.com
  wrote:
 
  As a side note, rarely should you ever use Model class for a list of
  things,
  especially things loaded from a database.  If you then pass that model to
  a
  component, all the things in it will be serialized.
 
 

 I'm sorry that I said that I loaded the list from a database, since that
 has
 apparently created a distraction from my key point, which is that if you
 start with a ListC and pass it to Model.listOf, you get back something
 that is not a ListC, which is undesirable and perhaps unnecessary.


I understood your key point, which is why I said as a side note but my
point still remains.  Loading a list and then sticking it into Model class
is in almost all cases a *bad* idea.


  So use the Model constructors instead.  The factory methods are just
 there
  to help remove some verbosity related to generics.
 

 Have you tried this yourself?  Because it doesn't work.  You can only
 instantiate Model with a Serializable instance, and java.util.List does not
 implement Serializable.  The whole point of the ofList method is to
 generate
 serializable lists, and the documentation even says so: This factory
 method
 will automatically rebuild a nonserializable list into a serializable one.
 You're confusing Model.listOf with Model.of.


Sorry, yes, it was early and I wasn't paying attention.  Hadn't had my
Wheaties yet :)  Have you looked at the ListModel class?  It may help with
what you're looking for.

Do you have a suggestion for a better method signature for that method?  The
problem you are describing, if I understand your description correctly, is a
problem with Java generics, not with Wicket's use of them.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: usage of JavascriptFilteredIntoFooterHeaderResponse

2011-02-13 Thread Jeremy Thomerson
Please let us know how it works for you.  It is a fairly new feature added a
couple releases ago.

On Sun, Feb 13, 2011 at 11:09 AM, Zilvinas Vilutis cika...@gmail.comwrote:


 Thank you! That's what I needed!

 -
 
 nothing is impossible
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/usage-of-JavascriptFilteredIntoFooterHeaderResponse-tp3302046p3303816.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




-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: DataTable and toolbar

2011-02-13 Thread Jeremy Thomerson
WebMarkupContainer requires an ID.  The magic here is happening in the
ToolbarContainer class, which is delegating its rendering to the toolbar
that you passed in.  The requirement of the toolbar component ID appears to
be somewhat arbitrary, probably just to remove confusion about what ID to
use, or else for legacy reasons where it may have appeared in the markup.

On Fri, Feb 11, 2011 at 7:48 AM, Alex Shubert alex.shub...@gmail.comwrote:

 It looks like WebMarkupContainer  does not require ID at all. It
 somehow unusuall




 2011/2/11 Robert Dahlström robert.dahlst...@bwin.org:
  As far as I can tell yes. But maybe someone with better knowledge can
  enlighten us?
 
  /Robert




 --
 Best regards
 Alex

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




-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Unfriendly Model.ofList etc. methods; can anything be done?

2011-02-12 Thread Jeremy Thomerson
On Sat, Feb 12, 2011 at 7:56 AM, Willis Blackburn wbo...@panix.com wrote:


 I'm constantly running into problems with this method:

 public static C IModelList? extends C ofList(final List? extends C
 list)

 This says that ofList takes, as a parameter, a List of C or some subclass
 of
 C, and returns a List of C or of some subclass of C.

 The problem that I keep having is that the type of the input list and the
 type of the output list may not be the same.  I think that in practice they
 are, but the compiler does not know that.  If C = StringedInstrument then
 the parameter may be ListViolin while the returned list may be
 ListGuitar.

 So every time I call Model.listOf, the type parameter of my List becomes
 hazy, which has annoying downstream effects.  If I load a
 ListStringedInstrument from a database, then pass it to Model.ofList, I
 wind up with a List? extends StringedInstrument--the compiler has no idea
 what the generic type of the List is, only that whatever it is, it is
 compatible with StringedInstrument.


As a side note, rarely should you ever use Model class for a list of things,
especially things loaded from a database.  If you then pass that model to a
component, all the things in it will be serialized.

You should be using LoadableDetachableModel and have the load from
database logic in the load method.

Model is just a dataholder implementation of IModel that should typically
only be used for transient data (data that can't be loaded from somewhere)
because it must serialize whatever you get it.  This is especially bad
whenever you are dealing with any collection of things.


  I can still get StringedInstrument
 instances out of the List, but I can't pass it to any method (like a
 component constructor) that takes a ListStringedInstrument or an
 IModelListStringedInstrument without ugly casting.

 Since Model.ofList must return a list that is compatible with the original
 list--it's a wrapper, not a transformer--can't it just take ListC and
 return ListC?

 Same goes for the other ofCollection-type methods.


So use the Model constructors instead.  The factory methods are just there
to help remove some verbosity related to generics.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Estimated number of developers in the Wicket community

2011-02-09 Thread Jeremy Thomerson
On Wed, Feb 9, 2011 at 2:10 PM, Bruno Borges bruno.bor...@gmail.com wrote:


 Does anyone have an update over this?

 It seems the website

 http://people.apache.org/~coar/mlists.html#wicket.apache.org

 does not show anymore the Wicket dashboard.

 I'm looking for a number of active members on the mailing list (also,
 number
 of messages).


I wrote the person that generated that and asked about it since it appears
that it is way out of date and is obviously missing many lists.


-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Mapping wicket:id to component without changing Java code

2011-02-05 Thread Jeremy Thomerson
create your own component resolver

Jeremy Thomerson
http://wickettraining.com
-- sent from my smart phone, so please excuse spelling, formatting, or
compiler errors

On Jan 31, 2011 7:52 PM, Alec Swan alecs...@gmail.com wrote:

Hello,

I would like to add credit card processing form to many different pages in
my application. However, I don't know which pages it will be added to and it
is up to the web designer to decide.

I would like to allow the web designer to be able to put div
wicket:id=creditCardForm/ anywhere in HTML. This would typically cause
Wicket to throw an error saying that a matching component was not added.

Is there a way to configure Wicket to somehow add an instance of
CreditCardForm class whenever it sees div wicket:id=creditCardForm/?

Thanks,

Alec


Re: Why is my css variant not used in markup?

2011-01-25 Thread Jeremy Thomerson
On Tue, Jan 25, 2011 at 2:02 AM, Mike Mander wicket-m...@gmx.de wrote:

 Hi all,

 i try to load a variant of my main css file (wicket 1.4.15).

 The file is located in a webapp-subfolder (src/main/webapp/_css).
 So i set the style of session to branda.  In the page i load the css like
 this
 code
 add(CSSPackageResource.getHeaderContribution(/_css/main.css, screen));
 /code

 I expected to get css-file /_css/main_brenda.css but it's /_css/main.css.
 The session style attribute is really branda. I've checked that already.

 Can i do something else to get that working?

 Thanks
 Mike

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


I don't have my IDE open in front of me, but have you tried using a resource
reference rather than a static URL to your resource?

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


  1   2   3   4   5   6   7   8   9   10   >