Re: Wicket architecture diagram?

2012-05-14 Thread Martin Grigorov
Hi,

My company provides teaching and consulting. We have materials with
diagrams for many parts of the Wicket architecture.
You can reach us at http://jweekend.com/dev/ContactUs for more information.

On Sun, May 13, 2012 at 11:42 PM, infiniter infini...@gmail.com wrote:
 So, we are in 2012 now. Anyone has any diagram accurate enough to show in a
 meeting? I'm looking for Wicket 1.4, but any other version can be useful
 too.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Wicket-architecture-diagram-tp1884376p4631021.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: pageablelistview is giving out of memory exception while loading more than 70000 records wicket example

2012-05-14 Thread Martin Grigorov
Hi,

Options:
1) decrease the number of shown items. 70k is way too much information
for a single page
2) use lighter model objects
3) increase your JVM max memory (-Xmx)

On Mon, May 14, 2012 at 9:06 AM, raju.ch raju.challagun...@gmail.com wrote:
 Hi all,

 When loading more than 7 records pageableListview is giving out of
 memory exception..Is there a way to avoid this problem?

 Please reply back to me as early as possible.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/pageablelistview-is-giving-out-of-memory-exception-while-loading-more-than-7-records-wicket-exame-tp4631614.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: WicketStuff HTML validator 1.5-rc3 released

2012-05-14 Thread Martijn Dashorst
I did some work on it. You can find it for the moment in my personal
github repositories:

https://github.com/dashorst/wicket-stuff-markup-validator

I have switched the validator from using Tuckey's old school (X)HTML
validator that stops at HTML4.01 and XHTML 1.1 for the validator.nu
variant that also validates HTML5, with great help from Emond
Papegaaij.

The UI has been modified considerably (and prettified I might add).

There is no release of the plugin available, so you need to install
the snapshot yourself for the moment.

Martijn

On Tue, May 8, 2012 at 10:16 AM, Martijn Dashorst
martijn.dasho...@gmail.com wrote:
 Probably coming friday.

 Martijn

 On Tue, May 8, 2012 at 7:56 AM, northar josef.anders...@gmail.com wrote:
 Any updates coming to this component soon, as it don't seem to be in the repo
 at https://github.com/wicketstuff?

 Are there any other good alternatives to this component for validating on
 the fly in wicket?

 Thanks for any hints!

 /Northar


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/WicketStuff-HTML-validator-1-5-rc3-released-tp3478279p4616629.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




 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

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



Re: pageablelistview is giving out of memory exception while loading more than 70000 records wicket example

2012-05-14 Thread raju.ch
Sorry that I didn't give the proper information, actually we are showing 10
records per page and the size of the list is 7 which we are passing to
PageableListview..It seems listview is loading all 7 items at once..and
each request it probably might iterating the List..so I think loading whole
list at once is giving the out memory exception below is the code we are
using.. Please suggest a solution asap.

PageableListViewUserProfile userProfileDisplay = new
PageableListViewUserProfile(userProfileDisplay,userProfileDTOsList,10) {
@Override
protected void 
populateItem(ListItemUserProfile listItem) {
final UserProfile userProfileModel = 
listItem.getModelObject();
listItem.add(new Label(userId, 
userProfileModel.getUserId()));
listItem.add(new Label(userName, 
userProfileModel.getUserName()));
listItem.add(new Label(appGroup, 
userProfileModel.getGroupName()));
listItem.add(new Label(createdDate,
pattern.format(userProfileModel.getCreatedDate(;
listItem.add(new
UserDetailsPanel(userdetails,getUserProfileManager().getUserProfileByUserIdAndGroup(userProfileModel.getUserId(),userProfileModel.getGroupName(;
  

final LinkString editLink = new 
LinkString(edit) {

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

@Override
public void onClick() {

UserProfileAddPage 
userProfilePage = new
UserProfileAddPage(userProfileModel,true,userProfileDisplay.getCurrentPage(),
null);

setResponsePage(userProfilePage);
}
};
listItem.add(editLink);

final LinkString deleteLink = new 
LinkString(delete) {

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

@Override
public void onClick() {
//  boolean isDeleted =
getAppProfileManager().deleteApp(appProfileDTO.getAppId());
//  if(isDeleted){
//  PageParameters 
pageParameters = new
PageParameters(message=Deleted Successfully);
//  
setResponsePage(UserProfileDisplayPage.class,pageParameters);


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/pageablelistview-is-giving-out-of-memory-exception-while-loading-more-than-7-records-wicket-exame-tp4631614p4631717.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: Feedback panel inside form

2012-05-14 Thread Andrea Del Bene

Hi,

it's absolutely ok to insert a feedback panel into its form.


Every example of feedback panel I have seen places the feedback panel 
outside the form element.


I have some markup from a client that has some Javascript doing client 
side validation with a styled feedback panel (a div) inside the form 
element itself.


Is it only convention that sees most Wicket samples having the 
feedback panel outside the form? i.e. can Wicket use a feedback panel 
that is actually inside the form?


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 mailto://chr...@stepahead.com.au

Website:

http://www.pagebloom.com blocked::http://www.pagebloom.com/

http://develop.stepaheadsoftware.com 
blocked::http://develop.stepaheadsoftware.com/






RE: Feedback panel inside form

2012-05-14 Thread Chris Colman
I added it inside the form in the markup and made sure I added the
FeedbackPanel to the form component itself and it appears to work quite
well.

The wicket framework must have a flexible algorithm when looking for the
FeedbackPanel component to toggles it's visibility and add error
messages. I had previously always assumed that it only looked for the
FeedbackPanel in the parent of the form component.


-Original Message-
From: Andrea Del Bene [mailto:adelb...@ciseonweb.it]
Sent: Monday, 14 May 2012 6:22 PM
To: users@wicket.apache.org
Subject: Re: Feedback panel inside form

Hi,

it's absolutely ok to insert a feedback panel into its form.

 Every example of feedback panel I have seen places the feedback panel
 outside the form element.

 I have some markup from a client that has some Javascript doing
client
 side validation with a styled feedback panel (a div) inside the form
 element itself.

 Is it only convention that sees most Wicket samples having the
 feedback panel outside the form? i.e. can Wicket use a feedback panel
 that is actually inside the form?

 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 mailto://chr...@stepahead.com.au

 Website:

 http://www.pagebloom.com blocked::http://www.pagebloom.com/

 http://develop.stepaheadsoftware.com
 blocked::http://develop.stepaheadsoftware.com/



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



RE: Status of wicketstuff jquery integration

2012-05-14 Thread Hielke Hoeve
WiQuery does depend on a small amount of libraries, we are working on 
minimizing this for Wicket 6.

Have fun.

Hielke

-Original Message-
From: Jesse Long [mailto:j...@unknown.za.net] 
Sent: woensdag 9 mei 2012 16:00
To: users@wicket.apache.org
Subject: Re: Status of wicketstuff jquery integration

Hi Hielke,

It seems I was using an outdated version of WiQuery (1.2.3), but even then, I 
cant reproduce the extra 10M.

It may be that I had the dependencies for WiQuery and something else added to 
the war at the same time, my apologies.

wiquery-core 1.5.5 (and dependencies) adds just over 2MB new quickstart. 
(Probably worth it).

Cheers,
Jesse

On 09/05/2012 10:38, Hielke Hoeve wrote:
 Hi Jesse,

 Your 10mb of WiQuery puzzles me. The wiquery-core jar is 256 KB and the 
 wiquery-jquery-ui jar is 857KB. I wonder which jars you include in your war. 
 If you do not use jQuery UI then there is no need for wiquery-jquery-ui.

 Hielke

 -Original Message-
 From: Jesse Long [mailto:j...@unknown.za.net]
 Sent: woensdag 2 mei 2012 10:48
 To: users@wicket.apache.org
 Subject: Status of wicketstuff jquery integration

 Hi All,

 I'm interested in using features of the jquery integration in wicketstuff, 
 but it seems it is not being maintained. The version of jquery packaged with 
 the wicketstuff-jquery jar seems to be 1.3.2, which is quite old already. Am 
 I missing something? Is there a preferred way of integrating jquery into 
 wicket?

 (WiQuery adds 10Mb to my war. JQWicket looks good, but why choose it over 
 wicketstuff-jquery)?

 I also note that the wicketstuff-jquery project does not make use of the 
 wicketstuff-jslibraries project. Why not? Is wicketstuff-jslibraries the 
 officially recommended way of including js libraries, or should I look 
 elsewhere? wicketstuff-jquery method of detecting jquery.js presence seems 
 like a hack.

 Thanks,
 Jesse

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


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




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


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



Re: Feedback panel inside form

2012-05-14 Thread Martin Grigorov
On Mon, May 14, 2012 at 10:36 AM, Chris Colman
chr...@stepaheadsoftware.com wrote:
 I added it inside the form in the markup and made sure I added the
 FeedbackPanel to the form component itself and it appears to work quite
 well.

 The wicket framework must have a flexible algorithm when looking for the
 FeedbackPanel component to toggles it's visibility and add error
 messages. I had previously always assumed that it only looked for the
 FeedbackPanel in the parent of the form component.

FeedbackPanel cares about this itself.
Depending on the feedbackmessagefilter it decides whether there are
any messages for it and changes its visibility.
FeedbackPanel do not know anything about any Form component(s).



-Original Message-
From: Andrea Del Bene [mailto:adelb...@ciseonweb.it]
Sent: Monday, 14 May 2012 6:22 PM
To: users@wicket.apache.org
Subject: Re: Feedback panel inside form

Hi,

it's absolutely ok to insert a feedback panel into its form.

 Every example of feedback panel I have seen places the feedback panel
 outside the form element.

 I have some markup from a client that has some Javascript doing
 client
 side validation with a styled feedback panel (a div) inside the form
 element itself.

 Is it only convention that sees most Wicket samples having the
 feedback panel outside the form? i.e. can Wicket use a feedback panel
 that is actually inside the form?

 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 mailto://chr...@stepahead.com.au

 Website:

 http://www.pagebloom.com blocked::http://www.pagebloom.com/

 http://develop.stepaheadsoftware.com
 blocked::http://develop.stepaheadsoftware.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: Feedback panel inside form

2012-05-14 Thread Alexander Cherednichenko
Hi!

We have created our own thing -- FeedbackLabel, which stands next to the
component inside of a form, and also works as a feedback. It takes
component to listen to as a constructor argument, and then just adds
appropriate class/title when there's something to show. For our app, if
something is wrong, label turns red and hovering it displays the error
text.

Then, for the case of Ajax Submit one would need to add all the feedback
labels to the AjaxRequestTarget. We do this with the FormComponentVisitor.

public class FeedbackLabel extends Label {
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);

if (feedbackSource.getFeedbackMessage() == null) {
return;
}
if (feedbackSource.getFeedbackMessage().isRendered()) {
return;
}
FeedbackMessage fbMessage = feedbackSource.getFeedbackMessage();
fbMessage.markRendered();

if (feedbackSource.getFeedbackMessage().getMessage() == null) {
LOGGER.warn(Unable to render component feedback message - it
is null! Component is 
+ feedbackSource.getPath());
}

tag.put(title, fbMessage.getMessage().toString());
tag.put(class, CSS_VALIDATION_ERROR_CLASS);
}
}

br,
alex.

2012/5/14 Martin Grigorov mgrigo...@apache.org

 On Mon, May 14, 2012 at 10:36 AM, Chris Colman
 chr...@stepaheadsoftware.com wrote:
  I added it inside the form in the markup and made sure I added the
  FeedbackPanel to the form component itself and it appears to work quite
  well.
 
  The wicket framework must have a flexible algorithm when looking for the
  FeedbackPanel component to toggles it's visibility and add error
  messages. I had previously always assumed that it only looked for the
  FeedbackPanel in the parent of the form component.

 FeedbackPanel cares about this itself.
 Depending on the feedbackmessagefilter it decides whether there are
 any messages for it and changes its visibility.
 FeedbackPanel do not know anything about any Form component(s).

 
 
 -Original Message-
 From: Andrea Del Bene [mailto:adelb...@ciseonweb.it]
 Sent: Monday, 14 May 2012 6:22 PM
 To: users@wicket.apache.org
 Subject: Re: Feedback panel inside form
 
 Hi,
 
 it's absolutely ok to insert a feedback panel into its form.
 
  Every example of feedback panel I have seen places the feedback panel
  outside the form element.
 
  I have some markup from a client that has some Javascript doing
  client
  side validation with a styled feedback panel (a div) inside the form
  element itself.
 
  Is it only convention that sees most Wicket samples having the
  feedback panel outside the form? i.e. can Wicket use a feedback panel
  that is actually inside the form?
 
  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 mailto://chr...@stepahead.com.au
 
  Website:
 
  http://www.pagebloom.com blocked::http://www.pagebloom.com/
 
  http://develop.stepaheadsoftware.com
  blocked::http://develop.stepaheadsoftware.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




-- 
Alexander Cherednichenko

[ the only way out is the way up ]


Re: pageablelistview is giving out of memory exception while loading more than 70000 records wicket example

2012-05-14 Thread raju.ch
- Can you please provide a sample of LoadableDetachModel?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/pageablelistview-is-giving-out-of-memory-exception-while-loading-more-than-7-records-wicket-exame-tp4631614p4631794.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: pageablelistview is giving out of memory exception while loading more than 70000 records wicket example

2012-05-14 Thread Thomas Götz
https://cwiki.apache.org/WICKET/detachable-models.html

   -Tom


raju.ch wrote:

 - Can you please provide a sample of LoadableDetachModel?


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



Redirect to Wicket page with 301 Moved Permanently

2012-05-14 Thread jarnis
Hey guys

I'm trying to make a redirect form an old url to a new one. The browser url
should be changed to the new one and the response code for the original
request to the old url should be 301 Moved permanently so search engines
will forget the old url.

Making the redirect by throwing a RestartResponseException works fine,
except I can't change the response code from 302 Moved Temporarily to 301
Moved Permanetly

I've also tried using the RedirectToUrlException, where setting the response
code is easy, but I have problems getting it to construct a correct relative
url so I don't have to hard code it to a specific host name.

What is the best way to solve this?

Thanks in advance

Jarnis

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Redirect-to-Wicket-page-with-301-Moved-Permanently-tp4631888.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: Redirect to Wicket page with 301 Moved Permanently

2012-05-14 Thread Martin Grigorov
Hi,

On Mon, May 14, 2012 at 11:56 AM, jarnis jarnis.bertel...@exedio.com wrote:
 Hey guys

 I'm trying to make a redirect form an old url to a new one. The browser url
 should be changed to the new one and the response code for the original
 request to the old url should be 301 Moved permanently so search engines
 will forget the old url.

 Making the redirect by throwing a RestartResponseException works fine,
 except I can't change the response code from 302 Moved Temporarily to 301
 Moved Permanetly

The reason is that this code uses: HttpServletResponse#sendRedirect()
which always sets status code 302.


 I've also tried using the RedirectToUrlException, where setting the response
 code is easy, but I have problems getting it to construct a correct relative
 url so I don't have to hard code it to a specific host name.

What exactly is the problem with the urls ?
You can take a look at
org.apache.wicket.request.http.handler.RedirectRequestHandler#respond()
and see what happens.


 What is the best way to solve this?

 Thanks in advance

 Jarnis

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Redirect-to-Wicket-page-with-301-Moved-Permanently-tp4631888.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: How can I get the page before the current one?

2012-05-14 Thread cosmindumy
Hello, 
I also have a question. I hope is the right place here for it. I didn't
wrote that code, so I don't know exactly what happen there, 
but the main idea is that a link is created like this.
link.append(RequestCycle.get().urlFor(pageMap, Upload.class, new
PageParameters(? 
I want to get a reference from the redirect page to the page that created
the link. How can this be made?
Thanks.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Redirect-to-Wicket-page-with-301-Moved-Permanently-tp4631888p4632051.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: How can I get the page before the current one?

2012-05-14 Thread Martin Grigorov
you can use request header 'Referrer'

On Mon, May 14, 2012 at 1:54 PM, cosmindumy cosmind...@yahoo.com wrote:
 Hello,
 I also have a question. I hope is the right place here for it. I didn't
 wrote that code, so I don't know exactly what happen there,
 but the main idea is that a link is created like this.
 link.append(RequestCycle.get().urlFor(pageMap, Upload.class, new
 PageParameters(?
 I want to get a reference from the redirect page to the page that created
 the link. How can this be made?
 Thanks.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Redirect-to-Wicket-page-with-301-Moved-Permanently-tp4631888p4632051.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



Wicket 1.5.6 duplicates segments in absolute URLs

2012-05-14 Thread Dirk Forchel
Since we migrate our application to Wicket 1.5.6 some URLs from
BookmarkablePageLinks have duplicate segements for indicating a Shop and a
Language item from our persistence model. For indicating a Shop and Language
item we use our own ShopMapper and LanguageMapper (subclass of
AbstractComponentMapper). This was working until we migrate to 1.5.6. 
For instance ...

correct URL: host/servlet/shop/en/page
wrong URL: host/servlet/shop/en/shop/en/page

This happens, for example, when the protocol of the linked URL is different
from the current protocol (http/https). So, basically, all links that point
to pages that are annotated with @RequireHttps are wrong.

In our Application class we set the HttpsMapper as RootRequestMapper, e.g.:



Using a debugger, I've tracked down the spot where wrong URL is rendered:


Either it's a bug in Wicket introduced with WICKET-4518 or WICKET-4514 or
there's something wrong with our LanguageMapper and ShopMapper. The
algorithm of these two mappers that add the segment to the URL are called
twice in resolveRelative.
Any idea?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-6-duplicates-segments-in-absolute-URLs-tp4632213.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 1.5.6 duplicates segments in absolute URLs

2012-05-14 Thread Martin Grigorov
Hi,

On Mon, May 14, 2012 at 3:37 PM, Dirk Forchel dirk.forc...@exedio.com wrote:
 Since we migrate our application to Wicket 1.5.6 some URLs from
 BookmarkablePageLinks have duplicate segements for indicating a Shop and a
 Language item from our persistence model. For indicating a Shop and Language
 item we use our own ShopMapper and LanguageMapper (subclass of
 AbstractComponentMapper). This was working until we migrate to 1.5.6.
 For instance ...

 correct URL: host/servlet/shop/en/page
 wrong URL: host/servlet/shop/en/shop/en/page

 This happens, for example, when the protocol of the linked URL is different
 from the current protocol (http/https). So, basically, all links that point
 to pages that are annotated with @RequireHttps are wrong.

 In our Application class we set the HttpsMapper as RootRequestMapper, e.g.:



 Using a debugger, I've tracked down the spot where wrong URL is rendered:


 Either it's a bug in Wicket introduced with WICKET-4518 or WICKET-4514 or
 there's something wrong with our LanguageMapper and ShopMapper. The
 algorithm of these two mappers that add the segment to the URL are called
 twice in resolveRelative.
 Any idea?

Create a quickstart (better without your mappers) and attach it to a
ticket in Jira.


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-6-duplicates-segments-in-absolute-URLs-tp4632213.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: Wicket and JPA: iplease/i a simple way to go

2012-05-14 Thread hfriederichs
It isn't; the database requirements are. I expected to get that done in an
hour or so, so that I could quickly continue with the more advanced and
complex functions. In the end it cost me a day.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-and-JPA-i-please-i-a-simple-way-to-go-tp4628562p4632270.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



how to debug MarkupNotFoundException

2012-05-14 Thread cosmindumy

I've got the following exception. How can I know wich is the problem? I have
a FormComponent that has inside a RepeatingView. I'm not sure that is the
problem, but I coldn't find ogher cause. How can I start debugging the
cause?

Markup of type 'html' for component
'org.apache.wicket.markup.html.panel.Panel' not found. Enable debug messages
for org.apache.wicket.util.resource to get a list of all filenames tried.:
[MarkupContainer [Component id = 1]]
org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html' for
component 'org.apache.wicket.markup.html.panel.Panel' not found. Enable
debug messages for org.apache.wicket.util.resource to get a list of all
filenames tried.: [MarkupContainer [Component id = 1]]

Thanks.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-debug-MarkupNotFoundException-tp4632356.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



AW: how to debug MarkupNotFoundException

2012-05-14 Thread Hans Lesmeister
Hi,

- do you have an HTML file with the same name as Panel-Class? (like
MyPanel.java and MyPanel.html - case sensitiv). 
- Is the HTML-file in the same package?
- Is it copied to the class-path after compiling? 
- there is a markup-setting which you can set to get more info on your
console about how Wicket tries to find the HTML file


-Ursprüngliche Nachricht-
Von: cosmindumy [mailto:cosmind...@yahoo.com] 
Gesendet: Montag, 14. Mai 2012 16:57
An: users@wicket.apache.org
Betreff: how to debug MarkupNotFoundException


I've got the following exception. How can I know wich is the problem? I have
a FormComponent that has inside a RepeatingView. I'm not sure that is the
problem, but I coldn't find ogher cause. How can I start debugging the
cause?

Markup of type 'html' for component
'org.apache.wicket.markup.html.panel.Panel' not found. Enable debug messages
for org.apache.wicket.util.resource to get a list of all filenames tried.:
[MarkupContainer [Component id = 1]]
org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html' for
component 'org.apache.wicket.markup.html.panel.Panel' not found. Enable
debug messages for org.apache.wicket.util.resource to get a list of all
filenames tried.: [MarkupContainer [Component id = 1]]

Thanks.

--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/how-to-debug-MarkupNotFoundExcept
ion-tp4632356.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: AW: how to debug MarkupNotFoundException

2012-05-14 Thread cosmindumy
Thanks for reply. 
Actually the panel is first time displayed, but after I refershit with ajax
I get that exception. The problem is that I don't know exactly which panel
cause that problem. Is it mandatory to be a panel that is in its own class
and has html file or it might be any other panel?  
The situation is that from that panel I go to another one and after I return
to it I get that error. I added a repeater and this could be the problem.  

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-debug-MarkupNotFoundException-tp4632356p4632436.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: 1.5 migration and border magic

2012-05-14 Thread Girts Ziemelis


Sorry, answering my own questions ... ;)

On 2012-05-11 17:03, Girts Ziemelis wrote:
1.I assume _header is staff added to page header? Can I identify it 
differently, not by string _header? instanceof HtmlHeaderContainer?

Seems that check for HtmlHeaderContainer  works fine.

2. is it sufficient to just override the add?

No other problems so far.
3. Can I use page and border getAssociatedMarkup().find(wicketId) and 
decide based on checking, if specified wicked id is in a base 
class/border?

Yes, checking markup works fine, so I can use
  if (border == null
 || getAssociatedMarkup().find(component.getId()) != null
 || component instanceof HtmlHeaderContainer) {
super.add(component);
  } else {
border.add(component);
  }

I also do not like the extra path border:border_body now to be added 
in wicket tester asserts
I  actually decided to replace  border with 2 panels (header and 
footer). Simpler and no need to have a border in a hierarchy any more 


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



onSelectionChanged is not calling converters

2012-05-14 Thread Gonzalo Aguilar Delgado
Hello, 

I've just found working with 1.5.6 that DropDownChoice control that it
may be not calling Converters. 

Because the model is still a string while calling to
onSelectionChanged(Provincia provincia) and it fails:

Caused by: java.lang.ClassCastException: java.lang.String cannot be
cast to generated.Provincia

I have something like this:

DropDownChoiceProvincia provinciaChoice=new
DropDownChoiceProvincia(provincia,new WSProvinceModel()){
...
protected void onSelectionChanged(Provincia provincia) {
if(provincia!=null)
{
if(cityModel!=null)

cityModel.setProvinceId(provincia.getId().toString());
}
}

...
};


---

In the application:
@Override
protected IConverterLocator newConverterLocator() {
ConverterLocator converterLocator = new ConverterLocator();
converterLocator.set(Provincia.class, new
ProvinciaEntryConverter());
return converterLocator;
}


It seems that it calls converter when setting the modelObject - So it
converts from Provincia to String. 

But it does not when doing the oposite. Getting model does not get
converted from String to provincia.

This side of the converter never gets called.

For a shake of completeness:

The rederer.

provinciaChoice.setChoiceRenderer(new 
IChoiceRendererProvincia(){

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

@Override
public Object getDisplayValue(Provincia provincia) {
return provincia.getDescripcion();
}

@Override
public String getIdValue(Provincia provincia, int 
index) {
return String.valueOf(provincia.getId());
}
});

Where is the problem?

I think that onSelectionChanged in DropDownChoice should call converter.

/**
 * Called when a selection changes.
 */
public final void onSelectionChanged()
{
convertInput();
updateModel();
onSelectionChanged(getModelObject());
}






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



RE: Redirect to Wicket page with 301 Moved Permanently

2012-05-14 Thread Jeffrey Schneller
Are you using Apache HTTPD in front of your app server?  If so, you can just 
use a Rewrite Rule to send the 301 redirect with the new URL.  You may want to 
look into your app server to see if url rewriting is an option.



-Original Message-
From: jarnis [mailto:jarnis.bertel...@exedio.com] 
Sent: Monday, May 14, 2012 5:56 AM
To: users@wicket.apache.org
Subject: Redirect to Wicket page with 301 Moved Permanently

Hey guys

I'm trying to make a redirect form an old url to a new one. The browser url 
should be changed to the new one and the response code for the original request 
to the old url should be 301 Moved permanently so search engines will forget 
the old url.

Making the redirect by throwing a RestartResponseException works fine, except I 
can't change the response code from 302 Moved Temporarily to 301 Moved 
Permanetly

I've also tried using the RedirectToUrlException, where setting the response 
code is easy, but I have problems getting it to construct a correct relative 
url so I don't have to hard code it to a specific host name.

What is the best way to solve this?

Thanks in advance

Jarnis

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Redirect-to-Wicket-page-with-301-Moved-Permanently-tp4631888.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: Redirect to Wicket page with 301 Moved Permanently

2012-05-14 Thread Martin Makundi
Also you can hack jetty or similar...

// Force 302 redirect status code into 301 'permanent redirect'
Field statusField = HttpGenerator.class.getDeclaredField(__status);
statusField.setAccessible(true);
Object[] statusMap = (Object[]) statusField.get(HttpStatus.class);
statusMap[HttpStatus.MOVED_TEMPORARILY_302] =
statusMap[HttpStatus.MOVED_PERMANENTLY_301];


2012/5/14 Jeffrey Schneller jeffrey.schnel...@envisa.com:
 Are you using Apache HTTPD in front of your app server?  If so, you can just 
 use a Rewrite Rule to send the 301 redirect with the new URL.  You may want 
 to look into your app server to see if url rewriting is an option.



 -Original Message-
 From: jarnis [mailto:jarnis.bertel...@exedio.com]
 Sent: Monday, May 14, 2012 5:56 AM
 To: users@wicket.apache.org
 Subject: Redirect to Wicket page with 301 Moved Permanently

 Hey guys

 I'm trying to make a redirect form an old url to a new one. The browser url 
 should be changed to the new one and the response code for the original 
 request to the old url should be 301 Moved permanently so search engines will 
 forget the old url.

 Making the redirect by throwing a RestartResponseException works fine, except 
 I can't change the response code from 302 Moved Temporarily to 301 Moved 
 Permanetly

 I've also tried using the RedirectToUrlException, where setting the response 
 code is easy, but I have problems getting it to construct a correct relative 
 url so I don't have to hard code it to a specific host name.

 What is the best way to solve this?

 Thanks in advance

 Jarnis

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Redirect-to-Wicket-page-with-301-Moved-Permanently-tp4631888.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


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



Re: AW: how to debug MarkupNotFoundException

2012-05-14 Thread cosmindumy
The problem is at repeater. I replaced it with another dummy component and
there is no error. I just have to learn how to use the repeater. Maybe you
can help with a link at a good example. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-debug-MarkupNotFoundException-tp4632356p4632612.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: Ajax Error in MSIE 8

2012-05-14 Thread Richard W. Adams
We finally dug deep enough to find the root cause of the problem. We have 
a corporate framework that adds a layer to Wicket for company-specific 
functionality. I discovered this morning that my Maven POM declared 
dependencies for both Wicket AND our corporate layer. This caused my app 
to use a different version of Wicket than our corporate layer, which 
caused inconsistencies. The solution was to remove the Wicket dependency 
from my Maven POM, thus inheriting the Wicket version our corporate layer 
uses. And (surprise!) the problems went away.

So, not Wicket's fault. Thought you'd like to know. Thanks for the help  
insight.

(Slinks away with red face...)




From:   Richard W. Adams rwada...@up.com
To: users@wicket.apache.org
Date:   05/11/2012 11:46 AM
Subject:Re: Ajax Error in MSIE 8



I just found a key difference between the IE8  IE9 behaviors in this 
code:

   f (typeof(window.XMLHttpRequest) != undefined  typeof(DOMParser) != 

undefined) { 
var parser = new DOMParser();
xmldoc = parser.parseFromString(responseAsText, text/xml); 
   } else if (window.ActiveXObject) {
xmldoc = t.responseXML;
   }

On our desktops, IE9 always goes into the first part of the if block, but 
IE8 always goes into the second part (after the elseif). Based on Google 
checks, it appears this might be due to browser security settings. Do you 
know if any special settings are required to make IE8 work correctly?



From:   Martin Grigorov mgrigo...@apache.org
To: users@wicket.apache.org
Date:   05/11/2012 09:56 AM
Subject:Re: Ajax Error in MSIE 8



I'm not sure why this fails for you. And why it fails only from time to
time.
But looking at this Javascript code I think it can be improved.
File a ticket with a failing test case if possible.

On Fri, May 11, 2012 at 5:46 PM, Richard W. Adams rwada...@up.com wrote:

 We dug into wicket-ajax.js using this version of MSIE 8:



 We discovered the problem occurs in this code:



 *Wicket.Ajax.Request.prototype = {*

 **
 *// Method that processes the request states*
 *stateChangeCallback: function() {*

 *.*

 *if (status == 200 || status == ) { // as
 stupid as it seems, IE7 sets status to  on ok*
 *// response came without error*
 *var responseAsText = t.responseText;*
 **

 *// parse the response if the callback
 needs a DOM tree*
 *if (this.parseResponse == true) {*
 *var xmldoc;
*
 *if
 (typeof(window.XMLHttpRequest) != undefined  typeof(DOMParser) !=
 undefined) {
var parser = new DOMParser();*
 *xmldoc =
 parser.parseFromString(responseAsText, text/xml);
*
 *} else if
 (window.ActiveXObject) {*
 *xmldoc =
 t.responseXML;*
 *}*
 *// invoke the loaded
 callback with an xml document*
 *
 this.loadedCallback(xmldoc); *
 *} else {*
 *// invoke the loaded
 callback with raw string*
 *
 this.loadedCallback(responseAsText);*
 *}*
 *if (this.suppressDone == 
false)*
 *this.done();*
 *}*


 The offending code is:

 *   xmldoc = t.responseXML;*

 Looking at the contents of t (a transport object), 
the*transport.responseText
 * field is set to the expected xml message, but* 
transport.responseXML*is empty and has no XML message.  Unfortunately, we 
could not see where
 transport.responseXML variable should have been set.

 Does IE8 have known ajax bugs? Or is there a configuration setting we
 should be using to make this work? Or something else? We're willing to 
dig
 into the script more, but don't know where to look, as the Ajax 
processing
 is asynchronous  we can't simply step through the code execution.






 From:Martin Grigorov mgrigo...@apache.org
 To:users@wicket.apache.org
 Date:05/11/2012 07:26 AM

 Subject:Re: Ajax Error in MSIE 8
 --



 Don't see anything suspicious.
 You'll have to debug what happens in wicket-ajax.js ...

 On Fri, May 11, 2012 at 3:07 PM, Richard W. Adams rwada...@up.com 
wrote:
  Sorry. Should have provided more details:
 
  Wicket Version: 1.4.20
 
  Operating System: Windows XP
 
  Scenario: Users clicks an icon with an Ajax onclick event. In the 
event
  handler on the server, we copy the 

Need help in implementing Ajax form

2012-05-14 Thread kshitiz
Hi,

I am trying to learn Ajax in Wicket and implement it in my project. I am
trying to use AjaxFallbackButton but there is something I am missing. Here
is my code:

StatelessFormUserDomain loginForm = new StatelessFormUserDomain(
loginForm, new 
CompoundPropertyModelUserDomain(userDomain));


AjaxFallbackButton ajaxSubmitButton = new AjaxFallbackButton(
ajaxSubmitButton, loginForm) {

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

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

if(target!=null){
UserService userService = new UserService();
try {
userDomain = 
userService.login(emailIdTextField.getValue(),

passwordTextField.getValue());
} catch (Exception exception) {
error(exception.getMessage());
error = true;
}

if (!error) {
setResponsePage(Home.class, 
pageParameters);
}
}
}

@Override
protected void onError(AjaxRequestTarget target, 
Form? form) {
// TODO Auto-generated method stub

}
};
loginForm.add(ajaxSubmitButton);
}

Html is 
input type=submit value=Login class=formbutton name=Login
wicket:id=ajaxSubmitButton/

But when I press Login button, nothing happens...Please help me out here as
I am new to this. Is there any good doc available for this? Also, why WICKET
AJAX DEBUG mark is coming in bottom right corner of my web page?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Need-help-in-implementing-Ajax-form-tp4632760.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: onSelectionChanged is not calling converters

2012-05-14 Thread Sven Meier

Hi,

DropDownChoice doesn't use converters, that's intended.

What default model is your choice getting/setting values from/to? Do you 
use a CompoundPropertyModel?


Sven


On 05/14/2012 05:59 PM, Gonzalo Aguilar Delgado wrote:

Hello,

I've just found working with 1.5.6 that DropDownChoice control that it
may be not calling Converters.

Because the model is still a string while calling to
onSelectionChanged(Provincia provincia) and it fails:

 Caused by: java.lang.ClassCastException: java.lang.String cannot be
cast to generated.Provincia

I have something like this:

DropDownChoiceProvincia  provinciaChoice=new
DropDownChoiceProvincia(provincia,new WSProvinceModel()){
 ...
protected void onSelectionChanged(Provincia provincia) {
 if(provincia!=null)
 {
if(cityModel!=null)

cityModel.setProvinceId(provincia.getId().toString());
 }
}

...
};


---

In the application:
 @Override
 protected IConverterLocator newConverterLocator() {
 ConverterLocator converterLocator = new ConverterLocator();
 converterLocator.set(Provincia.class, new
ProvinciaEntryConverter());
 return converterLocator;
 }


It seems that it calls converter when setting the modelObject -  So it
converts from Provincia to String.

But it does not when doing the oposite. Getting model does not get
converted from String to provincia.

This side of the converter never gets called.

For a shake of completeness:

The rederer.

provinciaChoice.setChoiceRenderer(new 
IChoiceRendererProvincia(){

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

@Override
public Object getDisplayValue(Provincia provincia) {
return provincia.getDescripcion();
}

@Override
public String getIdValue(Provincia provincia, int 
index) {
return String.valueOf(provincia.getId());
}
});

Where is the problem?

I think that onSelectionChanged in DropDownChoice should call converter.

/**
 * Called when a selection changes.
 */
public final void onSelectionChanged()
{
convertInput();
updateModel();
onSelectionChanged(getModelObject());
}






-
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: Need help in implementing Ajax form

2012-05-14 Thread Sebastien
Hi kshitiz,

Well, looking at the code as-is does not make me understand what is going
wrong. I mean, it should go until onSubmit(). For you implementation, I can
just notice that you did not reattach any feedback panel to the target.
Maybe you do not see the error (but if it happens, you can see it in the
console as Component feedback message was left unrendered...); and you
changed the reference to the userDomain object. the model is then not sync.
You need to do something like loginForm.setModelObject(userDomain). Mark
the form as final to be able to access it from the anonymous method
onSubmit.

But apart from that, I just would like to tell you that if you need an
authentication mechanism, you'll probably better have to use the
wicket-auth-roles.
All you need to know is here:
http://wicket.apache.org/learn/projects/authroles.html

Regards,
Sebastien

On Mon, May 14, 2012 at 8:10 PM, kshitiz k.agarw...@gmail.com wrote:

 Hi,

 I am trying to learn Ajax in Wicket and implement it in my project. I am
 trying to use AjaxFallbackButton but there is something I am missing. Here
 is my code:

 StatelessFormUserDomain loginForm = new StatelessFormUserDomain(
loginForm, new
 CompoundPropertyModelUserDomain(userDomain));


 AjaxFallbackButton ajaxSubmitButton = new AjaxFallbackButton(
ajaxSubmitButton, loginForm) {

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

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

if(target!=null){
UserService userService = new UserService();
try {
userDomain =
 userService.login(emailIdTextField.getValue(),

  passwordTextField.getValue());
} catch (Exception exception) {
error(exception.getMessage());
error = true;
}

if (!error) {
setResponsePage(Home.class,
 pageParameters);
}
}
}

@Override
protected void onError(AjaxRequestTarget target,
 Form? form) {
// TODO Auto-generated method stub

}
};
loginForm.add(ajaxSubmitButton);
 }

 Html is
 input type=submit value=Login class=formbutton name=Login
 wicket:id=ajaxSubmitButton/

 But when I press Login button, nothing happens...Please help me out here as
 I am new to this. Is there any good doc available for this? Also, why
 WICKET
 AJAX DEBUG mark is coming in bottom right corner of my web page?

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Need-help-in-implementing-Ajax-form-tp4632760.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: Need help in implementing Ajax form

2012-05-14 Thread Sebastien
And the WICKET AJAX DEBUG mark appears as soon as you are dealing with
wicket ajax component. It is not displayed anymore when your configuration
changes from development to deployment (web.xml)

On Mon, May 14, 2012 at 9:47 PM, Sebastien seb...@gmail.com wrote:

 Hi kshitiz,

 Well, looking at the code as-is does not make me understand what is going
 wrong. I mean, it should go until onSubmit(). For you implementation, I can
 just notice that you did not reattach any feedback panel to the target.
 Maybe you do not see the error (but if it happens, you can see it in the
 console as Component feedback message was left unrendered...); and you
 changed the reference to the userDomain object. the model is then not
 sync. You need to do something like loginForm.setModelObject(userDomain).
 Mark the form as final to be able to access it from the anonymous method
 onSubmit.

 But apart from that, I just would like to tell you that if you need an
 authentication mechanism, you'll probably better have to use the
 wicket-auth-roles.
 All you need to know is here:
 http://wicket.apache.org/learn/projects/authroles.html

 Regards,
 Sebastien

 On Mon, May 14, 2012 at 8:10 PM, kshitiz k.agarw...@gmail.com wrote:

 Hi,

 I am trying to learn Ajax in Wicket and implement it in my project. I am
 trying to use AjaxFallbackButton but there is something I am missing. Here
 is my code:

 StatelessFormUserDomain loginForm = new StatelessFormUserDomain(
loginForm, new
 CompoundPropertyModelUserDomain(userDomain));


 AjaxFallbackButton ajaxSubmitButton = new AjaxFallbackButton(
ajaxSubmitButton, loginForm) {

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

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

if(target!=null){
UserService userService = new
 UserService();
try {
userDomain =
 userService.login(emailIdTextField.getValue(),

  passwordTextField.getValue());
} catch (Exception exception) {
error(exception.getMessage());
error = true;
}

if (!error) {
setResponsePage(Home.class,
 pageParameters);
}
}
}

@Override
protected void onError(AjaxRequestTarget target,
 Form? form) {
// TODO Auto-generated method stub

}
};
loginForm.add(ajaxSubmitButton);
 }

 Html is
 input type=submit value=Login class=formbutton name=Login
 wicket:id=ajaxSubmitButton/

 But when I press Login button, nothing happens...Please help me out here
 as
 I am new to this. Is there any good doc available for this? Also, why
 WICKET
 AJAX DEBUG mark is coming in bottom right corner of my web page?

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Need-help-in-implementing-Ajax-form-tp4632760.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: Need help in implementing Ajax form

2012-05-14 Thread W Mazur
Hi,
-  Use Firefox with Firebug to track down client-server comunication
(or lack of it) - Do you have javascript enebled? If terget == null
then nothing happens in onSubmit() method.
- Add some logging (log4j etc.), to your app

Regards
Wlodek

2012/5/14 Sebastien seb...@gmail.com:
 And the WICKET AJAX DEBUG mark appears as soon as you are dealing with
 wicket ajax component. It is not displayed anymore when your configuration
 changes from development to deployment (web.xml)

 On Mon, May 14, 2012 at 9:47 PM, Sebastien seb...@gmail.com wrote:

 Hi kshitiz,

 Well, looking at the code as-is does not make me understand what is going
 wrong. I mean, it should go until onSubmit(). For you implementation, I can
 just notice that you did not reattach any feedback panel to the target.
 Maybe you do not see the error (but if it happens, you can see it in the
 console as Component feedback message was left unrendered...); and you
 changed the reference to the userDomain object. the model is then not
 sync. You need to do something like loginForm.setModelObject(userDomain).
 Mark the form as final to be able to access it from the anonymous method
 onSubmit.

 But apart from that, I just would like to tell you that if you need an
 authentication mechanism, you'll probably better have to use the
 wicket-auth-roles.
 All you need to know is here:
 http://wicket.apache.org/learn/projects/authroles.html

 Regards,
 Sebastien

 On Mon, May 14, 2012 at 8:10 PM, kshitiz k.agarw...@gmail.com wrote:

 Hi,

 I am trying to learn Ajax in Wicket and implement it in my project. I am
 trying to use AjaxFallbackButton but there is something I am missing. Here
 is my code:

 StatelessFormUserDomain loginForm = new StatelessFormUserDomain(
                                loginForm, new
 CompoundPropertyModelUserDomain(userDomain));


 AjaxFallbackButton ajaxSubmitButton = new AjaxFallbackButton(
                                ajaxSubmitButton, loginForm) {

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

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

                                if(target!=null){
                                UserService userService = new
 UserService();
                                try {
                                        userDomain =
 userService.login(emailIdTextField.getValue(),

  passwordTextField.getValue());
                                } catch (Exception exception) {
                                        error(exception.getMessage());
                                        error = true;
                                }

                                if (!error) {
                                        setResponsePage(Home.class,
 pageParameters);
                                }
                                }
                        }

                        @Override
                        protected void onError(AjaxRequestTarget target,
 Form? form) {
                                // TODO Auto-generated method stub

                        }
                };
                loginForm.add(ajaxSubmitButton);
 }

 Html is
 input type=submit value=Login class=formbutton name=Login
 wicket:id=ajaxSubmitButton/

 But when I press Login button, nothing happens...Please help me out here
 as
 I am new to this. Is there any good doc available for this? Also, why
 WICKET
 AJAX DEBUG mark is coming in bottom right corner of my web page?

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Need-help-in-implementing-Ajax-form-tp4632760.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: Need help in implementing Ajax form

2012-05-14 Thread Sebastien
Damed! I just make me realizing I wrote the anonymous method onSubmit! I
cannot believe it...

On Mon, May 14, 2012 at 9:59 PM, W Mazur wlodekma...@gmail.com wrote:

 Hi,
 -  Use Firefox with Firebug to track down client-server comunication
 (or lack of it) - Do you have javascript enebled? If terget == null
 then nothing happens in onSubmit() method.
 - Add some logging (log4j etc.), to your app

 Regards
 Wlodek

 2012/5/14 Sebastien seb...@gmail.com:
  And the WICKET AJAX DEBUG mark appears as soon as you are dealing with
  wicket ajax component. It is not displayed anymore when your
 configuration
  changes from development to deployment (web.xml)
 
  On Mon, May 14, 2012 at 9:47 PM, Sebastien seb...@gmail.com wrote:
 
  Hi kshitiz,
 
  Well, looking at the code as-is does not make me understand what is
 going
  wrong. I mean, it should go until onSubmit(). For you implementation, I
 can
  just notice that you did not reattach any feedback panel to the target.
  Maybe you do not see the error (but if it happens, you can see it in the
  console as Component feedback message was left unrendered...); and you
  changed the reference to the userDomain object. the model is then not
  sync. You need to do something like
 loginForm.setModelObject(userDomain).
  Mark the form as final to be able to access it from the anonymous method
  onSubmit.
 
  But apart from that, I just would like to tell you that if you need an
  authentication mechanism, you'll probably better have to use the
  wicket-auth-roles.
  All you need to know is here:
  http://wicket.apache.org/learn/projects/authroles.html
 
  Regards,
  Sebastien
 
  On Mon, May 14, 2012 at 8:10 PM, kshitiz k.agarw...@gmail.com wrote:
 
  Hi,
 
  I am trying to learn Ajax in Wicket and implement it in my project. I
 am
  trying to use AjaxFallbackButton but there is something I am missing.
 Here
  is my code:
 
  StatelessFormUserDomain loginForm = new StatelessFormUserDomain(
 loginForm, new
  CompoundPropertyModelUserDomain(userDomain));
 
 
  AjaxFallbackButton ajaxSubmitButton = new AjaxFallbackButton(
 ajaxSubmitButton, loginForm) {
 
 /**
  *
  */
 private static final long serialVersionUID = 1L;
 
 @Override
 protected void onSubmit(AjaxRequestTarget
 target,
  Form? form) {
 
 if(target!=null){
 UserService userService = new
  UserService();
 try {
 userDomain =
  userService.login(emailIdTextField.getValue(),
 
   passwordTextField.getValue());
 } catch (Exception exception) {
 error(exception.getMessage());
 error = true;
 }
 
 if (!error) {
 setResponsePage(Home.class,
  pageParameters);
 }
 }
 }
 
 @Override
 protected void onError(AjaxRequestTarget target,
  Form? form) {
 // TODO Auto-generated method stub
 
 }
 };
 loginForm.add(ajaxSubmitButton);
  }
 
  Html is
  input type=submit value=Login class=formbutton name=Login
  wicket:id=ajaxSubmitButton/
 
  But when I press Login button, nothing happens...Please help me out
 here
  as
  I am new to this. Is there any good doc available for this? Also, why
  WICKET
  AJAX DEBUG mark is coming in bottom right corner of my web page?
 
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Need-help-in-implementing-Ajax-form-tp4632760.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




Wicket data picker that's got no JS fallback

2012-05-14 Thread Chris Colman
Is there a JS powered date picker control for Wicket that falls back to
a standard set of text fields (maybe single text field or 3 text field)
when rendered to a browser that has JS disabled?
 
Also - will the fall back happen transparently? i.e. won't need any
special coding on the server side to cater for JS/non JS modes.
 
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 mailto://chr...@stepahead.com.au 
Website:
http://www.pagebloom.com blocked::http://www.pagebloom.com/ 
http://develop.stepaheadsoftware.com
blocked::http://develop.stepaheadsoftware.com/ 
 
 


Re: Aggregating JavaScript

2012-05-14 Thread kamiseq
I was thinking about creating custom behaviour that will connect to other
behaviour and render all scripts needed at the bottom of the page (If this
is possible),
I understand that headerContributior is not good choice as it will render
scripts in head section and we want them at the bottom

pozdrawiam
Paweł Kamiński

kami...@gmail.com
pkaminski@gmail.com
__


On 27 April 2012 09:46, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,

 I think there are two options:
 1) use a IMarkupFilter that will extract the scripts from the markup and
 transform them to header contributions via ComponentTag#addBehavior()
 2) wicket:head has a non-documented attribute called wicket:scope that
 may help here. I haven't used it (otherwise I'd document it) and I'm not
 quite sure whether it will do the job

 On Thu, Apr 26, 2012 at 7:05 PM, Ashoka Upadhya aupad...@art.com wrote:

  I would like to aggregate all javascript and move to the bottom of the
  page. I looked into the resource aggregation example and also filtering
  header response. If I understand correctly header response filter methods
  are called only when the scripts are added explicitly through
  IHeaderResponse methods (renderJavaSCriptReference ..etc)
 
  ** **
 
  In our case, scripts are added in the markup (these markups are defined
 in
  the CMS). Is there a way to collect all scripts from the markup and also
  added through IHeaderResponse?
 
  ** **
 
  Regards, 
 
   
 
  Ashoka Upadhya 
 
  Principal Software Engineer
 
  Art.com
 
  Phone: (510) 879-4858
 
  Fax: (510) 588-3930
 
  [image: art.com, inc]
 
   
 
  ** **
 
  [image: art.com] http://www.art.com/
 
  [image: allposters.com] http://www.allposters.com/
 
  [image: artist] http://www.artistrising.com/
 
  If you have received this e-mail in error, please immediately notify the
  sender by reply e-mail and destroy the original e-mail and its
 attachments
  without reading or saving them. This e-mail and any documents, files or
  previous e-mail messages attached to it, may contain confidential or
  privileged information that is prohibited from disclosure under
  confidentiality agreement or applicable law. If you are not the intended
  recipient, or a person responsible for delivering it to the intended
  recipient, you are hereby notified that any disclosure, copying,
  distribution or use of this e-mail or any of the information contained in
  or attached to this e-mail is STRICTLY PROHIBITED. Thank you.
 



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



RE: Wicket data picker that's got no JS fallback

2012-05-14 Thread Chris Colman
That subject might have been misleading. I meant Wicket data picker
that's go a no JS support fallback. i.e. will work in JS enabled and
JS disabled browsers.
 


From: Chris Colman [mailto:chr...@stepaheadsoftware.com] 
Sent: Tuesday, 15 May 2012 7:32 AM
To: users@wicket.apache.org
Subject: Wicket data picker that's got no JS fallback
 
Is there a JS powered date picker control for Wicket that falls back to
a standard set of text fields (maybe single text field or 3 text field)
when rendered to a browser that has JS disabled?
 
Also - will the fall back happen transparently? i.e. won't need any
special coding on the server side to cater for JS/non JS modes.
 
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 mailto://chr...@stepahead.com.au 
Website:
http://www.pagebloom.com blocked::http://www.pagebloom.com/ 
http://develop.stepaheadsoftware.com
blocked::http://develop.stepaheadsoftware.com/ 
 
 


Wicket 1.5.6, Ajax and expired page

2012-05-14 Thread Guillaume Smet
Hi,

I noticed this evening that when a page is expired, if we make an Ajax
call from this page (autocomplete for example), the Ajax call returns
a 302 and then the entire page content (and not a valid XML Ajax
response) - I investigated it with Firebug as there's no error
anywhere.

Could it be related to WICKET-4454 ? We upgraded to 1.5.6 a few days ago.

It might be that I never waited long enough to see the problem before
but I'm pretty sure it was working correctly in previous versions.

Thanks for your feedback.

-- 
Guillaume

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



wicket 6 global services

2012-05-14 Thread kamiseq
hej,
I have few questions about how to do few things in wicket, right now I
m focusing on 6th version.

I would like to create global service that returns for example JSON or
html. and given I have stateless page with components that supports
AJAX I would like to point my JS components to this global service.

I think it best to accomplish this with mounting
1) mount resource and then use
getRequestCycle().urlFor(resourceReference, parameters);
2) if I have to return html maybe it is better to mount page

I ve also found somewhere that I could implement custom renderers that
could render simple html or jason or whatever text I need, but I
cannot find anything about right now.

what about adding custom RequestCycleListener, or something like that?

pozdrawiam
Paweł Kamiński

kami...@gmail.com
pkaminski@gmail.com
__

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



wicket 6 dynamic form parts generated in JS

2012-05-14 Thread kamiseq
hej,
I would like to dynamically add same part to form, let say I have a
form that has a section with 3 inputs : start, end and name. those
section can occur many times depending on model.

this is very easy when depending on server logic and making full page
refresh every time users add section via link.
I would like to add such section from javascript, without server
interaction. the problem I see is that I need to generate names of
inputs in section witch will contain the right index so wicket knows
where to put data, right?

example

form
  ol
li wicket:id=each.section
   div wicket:id=form.part/div
/li
  /ol
/form
I created custom FormComponentPanel and overridden convertInput. and
added ListView to create list with panels.
when I looked on generated html, names of input where something like :
name=each.section:1:form.part:start, so I guess I could generate
something like that in JS but I wonder if this will not break wicket
logic. more even I hack those names creating elements in JS list will
not be synchronised with model on server and they will be removed when
user refreshes the page

I think the best way to do it is to make a round trip to server with
ajax and replace form content every time user clicks a button.

what do you think?

pozdrawiam
Paweł Kamiński

kami...@gmail.com
pkaminski@gmail.com
__

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



wicket 6 using external session

2012-05-14 Thread kamiseq
hej,
I need to handle 2 frameworks in the same time (one with legacy
application and wicket application that will handle pieces of old
functionality and new features - at least for some time until
everything is rewritten to wicket app) - maybe Im wrong here but this
means I need to share session between those to frameworks. has anyone
done something like that.

I thinking of using some key-value database that scales well or some
centralised custom rest service.
any thoughts on implementation provided that wicket stores a lot in
session, what about rendering to buffer and so on.

pozdrawiam
Paweł Kamiński

kami...@gmail.com
pkaminski@gmail.com
__

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



Passing query string data from an expired page to the expiry page

2012-05-14 Thread Dale Ogilvie
Hi there,

We use:
getApplicationSettings().setPageExpiredErrorPage(MyExpiredPage.class);

When MyExpiredPage is rendered, we want it customized according to a
query string parameter on the previous page.

Any tips on the best way we can determine the previous page parameters,
given that session is gone?

Thanks

Dale

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