wicket + JSON web tokens

2015-07-28 Thread Jason Novotny

Hi,

Has anyone done any work with Wicket and JSON web tokens http://jwt.io/? 
I'm interested in getting away from server-side session management if 
possible.


Thanks, Jason

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



distributed session handling with redis

2015-07-26 Thread Jason Novotny

Hi,

I googled and found a discussion on using redis to handle sessions, and 
someone also came up with a project 
https://github.com/baholladay/WicketRedisSession.


Based on the thread 
http://mail-archives.apache.org/mod_mbox/wicket-dev/201502.mbox/%3c54e4cfee.80...@gmail.com%3E 
I wound up using spring-session with redis as per 
http://docs.spring.io/spring-session/docs/current/reference/html5/guides/httpsession.html


I see I would also need to modify the page manager provider-- is it 
sufficient to add the following, or is there more to do?


setPageManagerProvider(newDefaultPageManagerProvider(this) {
protectedIDataStore newDataStore() {
return 
newHttpSessionDataStore(getPageManagerContext(),newPageNumberEvictionStrategy(20));
}
});

Thanks, Jason




Re: wicket creating tons of sessions

2015-07-26 Thread Jason Novotny


Thanks Martin,

Turned out to be some weird misconfiguration with my intellij+tomcat dev 
environment.


Jason

On 7/26/15 4:03 AM, Martin Grigorov wrote:

Hi,

Register a
http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpSessionListener.html
and print the stacktrace in #sessionCreated(). This way you will see where
HttpServletRequest#getSession(true) is being called.
For some reason your web container doesn't recognize old session ids and
creates new sessions.

Martin Grigorov
Freelancer. Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Sun, Jul 26, 2015 at 6:16 AM, Jason Novotny 
wrote:


Hi,

In deploying my wicket 6.2 application I noticed sessions are getting
created like crazy-- I'm using Tomcat and the manager application and after
only a minute, there are over 6000 sessions(!) and oddly I only navigated
to the page once(!). Any ideas on where I can debug this to determine where
these sessions keep getting created?

Thanks, Jason



-
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 creating tons of sessions

2015-07-25 Thread Jason Novotny

Hi,

In deploying my wicket 6.2 application I noticed sessions are getting 
created like crazy-- I'm using Tomcat and the manager application and 
after only a minute, there are over 6000 sessions(!) and oddly I only 
navigated to the page once(!). Any ideas on where I can debug this to 
determine where these sessions keep getting created?


Thanks, Jason


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

wicket authroles 6.X and obtaining logged in users

2015-07-16 Thread Jason Novotny

Hi,

We're using wicket authroles 6.X and I'm trying to figure out how I can 
determine all the logged in users and then log them out.


Thanks, Jason

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



wicket-annotations and page mounting

2015-07-10 Thread Jason Novotny

Hi,

I'm using wicket-annotations and I've added:

newAnnotatedMountScanner().scanPackage("com.foo.web.pages").mount(this);

in my Application class.

My page classes all have:

@MountPath(value ="summary")

However, I want to adjust the pages to not use query parameters like &account=5 
and use / like account/5 instead.

Is there a way to set this across the app, just like scanPackage, or do I have 
to set this on each page in my application?

I'm using latest Wicket 6.

Thanks, Jason





Re: ajax events and manipulating DOM

2014-11-14 Thread Jason Novotny


Ok, to answer my own question, it was a jquery/javascript issue. Instead 
of removing dom, the approach that works is to use appendTo instead:


$('.actionbuttons').appendTo('.btns');

Jason

On 11/14/14, 6:13 PM, Jason Novotny wrote:

Hi,

I'm using jquery datatables which allows customization of table header 
by creating html in javascript via "dom" attribute which creates a div :


$('#datatable').dataTable({

 "dom": '<"top"<"dropholder"><"postpone"><"btns"><"holder"ip>>t',
 "language": {
 "info": "_START_-_END_ of _TOTAL_",
 "search": ""
 },
 "aaSorting": [],
 "aoColumnDefs": [
 {'bSortable': false, 'aTargets': [ 0, 4, 7 ] }
 ],
 'iDisplayLength': 12
 });
$('.btns').html('Send');

However I need these buttons to be server-side actions.

My naive solution was to create additional wicket links on the page:


 Cancel
 Send

and then at the top of my page:


 $(function() {
updateDataTable();  
 });

where I have

function updateDataTable() {
$('#datatable').dataTable({

 "dom": '<"top"<"dropholder"><"postpone"><"btns"><"holder"ip>>t',
 "language": {
 "info": "_START_-_END_ of _TOTAL_",
 "search": ""
 },
 "aaSorting": [],
 "aoColumnDefs": [
 {'bSortable': false, 'aTargets': [ 0, 4, 7 ] }
 ],
 'iDisplayLength': 12
 });

 var html = $('.actionbuttons').html();

 $('.btns').html(html);
 $('.actionbuttons').remove();
}
}

However, the send button when clicked needs to refresh the panel with 
an updated data table. So I have:


add(newAjaxSubmitLink("send") {
 @Override
 protected voidonSubmit(AjaxRequestTarget target, Form form) {
 container.addOrReplace(createDataTable());
target.add(container);
target.appendJavaScript("updateDataTable()");

}
});

Now this works the first time when the page loads. It removes the DOM 
section with wicket-ized links to the DOM section of the datatable. 
Clicking "send" results in an updated table. However, when I click 
"send" again, although the display looks good and it has replaced the 
DOM, the links seem to have no events associated and it doesn't do 
anything. I wonder if a disconnect is going on with the wicket event 
registration...


Is there a better way to do this, or am I missing something?

Thanks, Jason









ajax events and manipulating DOM

2014-11-14 Thread Jason Novotny

Hi,

I'm using jquery datatables which allows customization of table header 
by creating html in javascript via "dom" attribute which creates a div :


$('#datatable').dataTable({

"dom": '<"top"<"dropholder"><"postpone"><"btns"><"holder"ip>>t',
"language": {
"info": "_START_-_END_ of _TOTAL_",
"search": ""
},
"aaSorting": [],
"aoColumnDefs": [
{'bSortable': false, 'aTargets': [ 0, 4, 7 ] }
],
'iDisplayLength': 12
});
$('.btns').html('Send');


However I need these buttons to be server-side actions.

My naive solution was to create additional wicket links on the page:


Cancel
Send


and then at the top of my page:


$(function() {
updateDataTable();  
});


where I have

function updateDataTable() {

$('#datatable').dataTable({

"dom": '<"top"<"dropholder"><"postpone"><"btns"><"holder"ip>>t',
"language": {
"info": "_START_-_END_ of _TOTAL_",
"search": ""
},
"aaSorting": [],
"aoColumnDefs": [
{'bSortable': false, 'aTargets': [ 0, 4, 7 ] }
],
'iDisplayLength': 12
});

var html = $('.actionbuttons').html();

$('.btns').html(html);
$('.actionbuttons').remove();

}
}

However, the send button when clicked needs to refresh the panel with an 
updated data table. So I have:


add(newAjaxSubmitLink("send") {
@Override
protected voidonSubmit(AjaxRequestTarget target, Form form) {
container.addOrReplace(createDataTable());
target.add(container);
target.appendJavaScript("updateDataTable()");

}
});


Now this works the first time when the page loads. It removes the DOM 
section with wicket-ized links to the DOM section of the datatable. 
Clicking "send" results in an updated table. However, when I click 
"send" again, although the display looks good and it has replaced the 
DOM, the links seem to have no events associated and it doesn't do 
anything. I wonder if a disconnect is going on with the wicket event 
registration...


Is there a better way to do this, or am I missing something?

Thanks, Jason







Re: wicket + jsessionid and 302 issues

2014-11-12 Thread Jason Novotny

Hi,

I figured more detailed config info would be helpful. I want my 
production app to be accessible via https only. The connection is SSL to 
our Apache load balancer which is then http to our Tomcat7 instance.

The Tomcat 7 connector is default:

 

Just not sure how to config the web.xml or if my tomcat config needs 
changing.


Thanks, Jason

On 11/12/14, 1:40 PM, Jason Novotny wrote:

Hi wicketeers,

I was hoping to get rid of the jsessionid that appears in the 
browsewr bar when running my wicket app under Tomcat 7, and I added 
the following to web.xml:



30
COOKIE


However, now in production we get all these 302 redirects which are 
causing an infinite recursion. What is the best way to handle this? I 
also found a wiki page 
https://cwiki.apache.org/confluence/display/WICKET/SEO+-+Search+Engine+Optimization 
but wasn't sure if this also applied to using Wicket 6.


Thanks, Jason



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



wicket + jsessionid and 302 issues

2014-11-12 Thread Jason Novotny

Hi wicketeers,

I was hoping to get rid of the jsessionid that appears in the 
browsewr bar when running my wicket app under Tomcat 7, and I added the 
following to web.xml:



30
COOKIE


However, now in production we get all these 302 redirects which are 
causing an infinite recursion. What is the best way to handle this? I 
also found a wiki page 
https://cwiki.apache.org/confluence/display/WICKET/SEO+-+Search+Engine+Optimization 
but wasn't sure if this also applied to using Wicket 6.


Thanks, Jason

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



wicket6 + sso and redirects

2014-11-03 Thread Jason Novotny

Hi,

I'm adding support to my application use SSO outbound from my webapp to 
an Identity provider (IP) to authenticate a user from my webapp to an 
external web application.


I have SSO code and the steps involved on my page are:

1. send redirect to

https://www.3rdparty.com?authnReqRedirectUrl=myurl

where myurl is a wicket page e.g. /sso

2. Now the wicket page at /sso should receive a SAMLRequest parameter, 
which is then used to create a SAMLResponse


3. The SAMLResponse should be posted back to the 3rd party thru a form:






I believe the form can be auto-submitted thru javascript:


window.onload = function () {
document.forms[0].submit();
}


And then the user should land on the 3rdparty web application.

So basically my question is how do I do step 1, I'm using wicket6 and tried:

add(new AjaxLink("test") {
@Override
public void onClick(AjaxRequestTarget target) {
throw new 
RedirectToUrlException("https://thirdparty.com?authnReqRedirectUrl=https://mysite.com/sso";);

}
});


But seems that it doesn't return to my wicket page mounted at /sso. Am I 
doing this right?


Thanks, Jason



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



Re: jquery DataTable + wicket Cannot bind a listener

2014-10-28 Thread Jason Novotny


Hi Martin,

Are there examples? What about this simple piece of code...

WebMarkupContainer tbody = new WebMarkupContainer("tbody");
tbody.add(new AjaxEventBehavior("onclick") {
@Override
protected void onEvent(AjaxRequestTarget target) {

}

protected void updateAjaxAttributes(AjaxRequestAttributes 
attributes) {

super.updateAjaxAttributes(attributes);
attributes.setChildSelector("td");
// TODO what do i do here?
}
});


Thanks, Jason

On 10/28/14, 1:10 AM, Martin Grigorov wrote:

Hi,

You should read about JavaScript event delegation. This is what they
recommend.

Wicket has basic support for this
with org.apache.wicket.ajax.attributes.AjaxRequestAttributes#setChildSelector.
I.e. you can register an Ajax behavior on the table or tbody and use
childSelector to "listen" for events only on specific children, e.g. 'tr',
'td', 'td div', etc.

This is more lightweight than using Wicket's built-in AjaxLink, but it is
also a bit more complex for you as an application developer.

Good luck!


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

On Mon, Oct 27, 2014 at 8:37 PM, Jason Novotny 
wrote:


Hi Martin,

Thanks for the help-- I've reached out to them, the js appears pretty
complex
http://cdn.datatables.net/1.10.3/js/jquery.dataTables.js


They indicate that listeners need to be added according to:
http://www.datatables.net/examples/advanced_init/events_live.html

Is there any kind of "mode" in wicket possibly that would preserve the
listeners in this way?

Thanks, Jason


On 10/26/14, 11:40 PM, Martin Grigorov wrote:


Hi,

Try with Ajax loading of the new pages.

I am not sure how DataTables removes and re-adds the rows later. It should
use jQuery's clone(true, true) to preserve the event bindings. Ask in
their
forums.

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

On Sun, Oct 26, 2014 at 12:46 AM, Jason Novotny 
wrote:

  I've managed to figure out the cause of the problem but no solution.

jquery datatables removes DOM elements when configured for pagination.
This means the AjaxLinks in my listview generate wicket javascript like:

Wicket.Ajax.ajax({"u":"./executed?7-1.IBehaviorListener.0-container-
executedTransactionPanel-executedListView-0-
detailsLink","e":"click","c":"
detailsLinkff"});;
Wicket.Ajax.ajax({"u":"./executed?7-1.IBehaviorListener.0-container-
executedTransactionPanel-executedListView-1-
detailsLink","e":"click","c":"
detailsLink100"});;
Wicket.Ajax.ajax({"u":"./executed?7-1.IBehaviorListener.0-container-
executedTransactionPanel-executedListView-2-
detailsLink","e":"click","c":"
detailsLink101"});;
Wicket.Ajax.ajax({"u":"./executed?7-1.IBehaviorListener.0-container-
executedTransactionPanel-executedListView-3-
detailsLink","e":"click","c":"
detailsLink102"});;
...


If the table has 2 pages, it removes the DOM elements from the 2nd page
so
I get the wicket debug error  "Wicket.Ajax: Cannot bind a listener for
event "click" on element "elementId" because the element is not in the
DOM"

Now when I hit the link for next page of the table, the DOM has been
updated to reflect the rows, but the javascript events need to be added
again and so the links are broken.

Is there any good way to do this?

Thanks, Jason


On 10/24/14, 1:24 PM, Jason Novotny wrote:

  I should add I'm using Wicket 6.17.

Thanks, Jason

On 10/24/14, 10:47 AM, Jason Novotny wrote:

  Hi,

I'm using latest jquery DataTable with a ListView and in wicket:head of
the page, I initiate the DataTable:

$(function () {
  $('.datatable_executed').dataTable({
  'lengthChange': false,
  'dom': '<"top"<"doc-filter"><"holder"ip>>t',
  "language": {"info": "_START_-_END_ of _TOTAL_"},
  "aaSorting": [],
  'iDisplayLength': 12
  });
  });

It all looks good, however because one of my columns contains
AjaxLinks,
I get an error from my wicket debug window with the following:
"Wicket.Ajax: Cannot bind a listener for event "click" on element
"elementId" because the element is not in the DOM"

The thing is the links seem to actually work on the first page, but
when
I click -> to go to the next page the links don't work. Has anyone
experienced this before or have any idea how I can debug this?

Thanks, Jason




-
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: jquery DataTable + wicket Cannot bind a listener

2014-10-27 Thread Jason Novotny


Hi Martin,

Thanks for the help-- I've reached out to them, the js appears pretty 
complex

http://cdn.datatables.net/1.10.3/js/jquery.dataTables.js


They indicate that listeners need to be added according to:
http://www.datatables.net/examples/advanced_init/events_live.html

Is there any kind of "mode" in wicket possibly that would preserve the 
listeners in this way?


Thanks, Jason

On 10/26/14, 11:40 PM, Martin Grigorov wrote:

Hi,

Try with Ajax loading of the new pages.

I am not sure how DataTables removes and re-adds the rows later. It should
use jQuery's clone(true, true) to preserve the event bindings. Ask in their
forums.

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

On Sun, Oct 26, 2014 at 12:46 AM, Jason Novotny 
wrote:


I've managed to figure out the cause of the problem but no solution.

jquery datatables removes DOM elements when configured for pagination.
This means the AjaxLinks in my listview generate wicket javascript like:

Wicket.Ajax.ajax({"u":"./executed?7-1.IBehaviorListener.0-container-
executedTransactionPanel-executedListView-0-detailsLink","e":"click","c":"
detailsLinkff"});;
Wicket.Ajax.ajax({"u":"./executed?7-1.IBehaviorListener.0-container-
executedTransactionPanel-executedListView-1-detailsLink","e":"click","c":"
detailsLink100"});;
Wicket.Ajax.ajax({"u":"./executed?7-1.IBehaviorListener.0-container-
executedTransactionPanel-executedListView-2-detailsLink","e":"click","c":"
detailsLink101"});;
Wicket.Ajax.ajax({"u":"./executed?7-1.IBehaviorListener.0-container-
executedTransactionPanel-executedListView-3-detailsLink","e":"click","c":"
detailsLink102"});;
...


If the table has 2 pages, it removes the DOM elements from the 2nd page so
I get the wicket debug error  "Wicket.Ajax: Cannot bind a listener for
event "click" on element "elementId" because the element is not in the DOM"

Now when I hit the link for next page of the table, the DOM has been
updated to reflect the rows, but the javascript events need to be added
again and so the links are broken.

Is there any good way to do this?

Thanks, Jason


On 10/24/14, 1:24 PM, Jason Novotny wrote:


I should add I'm using Wicket 6.17.

Thanks, Jason

On 10/24/14, 10:47 AM, Jason Novotny wrote:


Hi,

I'm using latest jquery DataTable with a ListView and in wicket:head of
the page, I initiate the DataTable:

$(function () {
 $('.datatable_executed').dataTable({
 'lengthChange': false,
 'dom': '<"top"<"doc-filter"><"holder"ip>>t',
 "language": {"info": "_START_-_END_ of _TOTAL_"},
 "aaSorting": [],
 'iDisplayLength': 12
 });
 });

It all looks good, however because one of my columns contains AjaxLinks,
I get an error from my wicket debug window with the following:
"Wicket.Ajax: Cannot bind a listener for event "click" on element
"elementId" because the element is not in the DOM"

The thing is the links seem to actually work on the first page, but when
I click -> to go to the next page the links don't work. Has anyone
experienced this before or have any idea how I can debug this?

Thanks, Jason





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



Re: jquery DataTable + wicket Cannot bind a listener

2014-10-25 Thread Jason Novotny


I've managed to figure out the cause of the problem but no solution.

jquery datatables removes DOM elements when configured for pagination. 
This means the AjaxLinks in my listview generate wicket javascript like:


Wicket.Ajax.ajax({"u":"./executed?7-1.IBehaviorListener.0-container-executedTransactionPanel-executedListView-0-detailsLink","e":"click","c":"detailsLinkff"});;
Wicket.Ajax.ajax({"u":"./executed?7-1.IBehaviorListener.0-container-executedTransactionPanel-executedListView-1-detailsLink","e":"click","c":"detailsLink100"});;
Wicket.Ajax.ajax({"u":"./executed?7-1.IBehaviorListener.0-container-executedTransactionPanel-executedListView-2-detailsLink","e":"click","c":"detailsLink101"});;
Wicket.Ajax.ajax({"u":"./executed?7-1.IBehaviorListener.0-container-executedTransactionPanel-executedListView-3-detailsLink","e":"click","c":"detailsLink102"});;
...


If the table has 2 pages, it removes the DOM elements from the 2nd page 
so I get the wicket debug error  "Wicket.Ajax: Cannot bind a listener 
for event "click" on element "elementId" because the element is not in 
the DOM"


Now when I hit the link for next page of the table, the DOM has been 
updated to reflect the rows, but the javascript events need to be added 
again and so the links are broken.


Is there any good way to do this?

Thanks, Jason

On 10/24/14, 1:24 PM, Jason Novotny wrote:


I should add I'm using Wicket 6.17.

Thanks, Jason

On 10/24/14, 10:47 AM, Jason Novotny wrote:

Hi,

I'm using latest jquery DataTable with a ListView and in wicket:head 
of the page, I initiate the DataTable:


$(function () {
$('.datatable_executed').dataTable({
'lengthChange': false,
'dom': '<"top"<"doc-filter"><"holder"ip>>t',
"language": {"info": "_START_-_END_ of _TOTAL_"},
"aaSorting": [],
'iDisplayLength': 12
});
});

It all looks good, however because one of my columns contains 
AjaxLinks, I get an error from my wicket debug window with the 
following: "Wicket.Ajax: Cannot bind a listener for event "click" on 
element "elementId" because the element is not in the DOM"


The thing is the links seem to actually work on the first page, but 
when I click -> to go to the next page the links don't work. Has 
anyone experienced this before or have any idea how I can debug this?


Thanks, Jason







Re: jquery DataTable + wicket Cannot bind a listener

2014-10-24 Thread Jason Novotny


I should add I'm using Wicket 6.17.

Thanks, Jason

On 10/24/14, 10:47 AM, Jason Novotny wrote:

Hi,

I'm using latest jquery DataTable with a ListView and in wicket:head 
of the page, I initiate the DataTable:


$(function () {
$('.datatable_executed').dataTable({
'lengthChange': false,
'dom': '<"top"<"doc-filter"><"holder"ip>>t',
"language": {"info": "_START_-_END_ of _TOTAL_"},
"aaSorting": [],
'iDisplayLength': 12
});
});

It all looks good, however because one of my columns contains 
AjaxLinks, I get an error from my wicket debug window with the 
following: "Wicket.Ajax: Cannot bind a listener for event "click" on 
element "elementId" because the element is not in the DOM"


The thing is the links seem to actually work on the first page, but 
when I click -> to go to the next page the links don't work. Has 
anyone experienced this before or have any idea how I can debug this?


Thanks, Jason




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



jquery DataTable + wicket Cannot bind a listener

2014-10-24 Thread Jason Novotny

Hi,

I'm using latest jquery DataTable with a ListView and in wicket:head of 
the page, I initiate the DataTable:


$(function () {
$('.datatable_executed').dataTable({
'lengthChange': false,
'dom': '<"top"<"doc-filter"><"holder"ip>>t',
"language": {"info": "_START_-_END_ of _TOTAL_"},
"aaSorting": [],
'iDisplayLength': 12
});
});

It all looks good, however because one of my columns contains AjaxLinks, 
I get an error from my wicket debug window with the following: 
"Wicket.Ajax: Cannot bind a listener for event "click" on element 
"elementId" because the element is not in the DOM"


The thing is the links seem to actually work on the first page, but when 
I click -> to go to the next page the links don't work. Has anyone 
experienced this before or have any idea how I can debug this?


Thanks, Jason


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



adding wicket generated link to javascript

2014-09-03 Thread Jason Novotny

Hi,

My designer gave me code where HTML is created in javascript as part of 
a jquery dataTable:



$(document).ready(function() {
$('#datatable').dataTable( {

$('.clientinvoices .dropholder').html('
class="opener">
**');
..



And I need that button to be a wicket button, is there a way to pass it 
a generated link, etc? What would be the best way to deal with this?


Thanks, Jason



wicketAjaxGet and wicket 1.5 and StalePage exceptions



Hi,

Recently converting an app from wicket 1.4.18 to wicket 1.5.2 and 
am now seeing stack traces like the following:


org.apache.wicket.request.mapper.StalePageException
at 
org.apache.wicket.request.handler.PageProvider.getStoredPage(PageProvider.java:302)
at 
org.apache.wicket.request.handler.PageProvider.resolvePageInstance(PageProvider.java:257)
at 
org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:165)


I've tracked it down to a wicketAjaxGet request invoked on the client 
that looks something like this:


var wcall = wicketAjaxGet(url + args, function() { }, function() { });

url looks something like: "'myBuildings?52-1.IBehaviorListener.2-' which 
I create from AbstractDefaultAjaxBehavior.getCallbackUrl().toString()


It seems the problem has to do with page versioning not matching the 
page on the server.


Is there a workaround or another way to code this up? Let me know if I 
can provide any additional information.


Thanks, Jason



mouse over table cells and dialog popup with ajaxlinks



Hi,

I have a fairly complex use-case scenario: I want a dialog to popup 
when a "hover" event occurs within a table cell. The dialog will provide 
a couple of links (ideally AjaxLink) that should trigger a wicket ajax 
event.


I can imagine maybe creating the dialogs all on the client so there 
is no need to hit the server when the mouse hovers over the table cell 
(seems that ajax would be no good in any case since the latency would be 
high when hovering over potentially many cells within the table anyhow). 
But then the issue is how to create the AjaxLink in the javascript that 
constructs the dialog on the client?


Any ideas are greatly appreciated!

Thanks, Jason


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



Re: mouse over table cells and dialog popup with ajaxlinks



Thanks!

My real concern isn't so much the creation of the dialog/tooltip 
but how do I create a wicket appropriate link in that dialog/tooltip in 
order to edit the item that is contained in the table cell?


Thanks again, Jason

On 9/18/10 8:08 AM, Ernesto Reinaldo Barreiro wrote:

Jason,

I do a similar thing for one of my applications. I have a table and
when the user hovers the mouse over some button on each row then I
show a "dialog" with more details about the row. What I do is having a
hidden div next to the table and make it appear, its contents updated
via AJAX, with the help of a jquery plugin: I use plugin shown in [1]
in combination with grid shown at [2]. For other use cases, when
dialog contents are very heavy I use a ModalWindow triggered by an
"onclick".

Maybe I could strip my code of "the business logic" and post it
somewhere so that you could use or adapt it.

Regards,

Ernesto

1-http://wiquery-plugins-demo.appspot.com/demo/?wicket:bookmarkablePage=:com.wiquery.plugins.demo.ToolTipPage
2-http://wiquery-plugins-demo.appspot.com/demo/?wicket:bookmarkablePage=:com.wiquery.plugins.demo.TablePage

On Sat, Sep 18, 2010 at 2:13 AM, Jason Novotny  wrote:

  Hi,

I have a fairly complex use-case scenario: I want a dialog to popup when
a "hover" event occurs within a table cell. The dialog will provide a couple
of links (ideally AjaxLink) that should trigger a wicket ajax event.

I can imagine maybe creating the dialogs all on the client so there is no
need to hit the server when the mouse hovers over the table cell (seems that
ajax would be no good in any case since the latency would be high when
hovering over potentially many cells within the table anyhow). But then the
issue is how to create the AjaxLink in the javascript that constructs the
dialog on the client?

Any ideas are greatly appreciated!

Thanks, Jason

-
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



mouse over table cells and dialog popup with ajaxlinks


 Hi,

I have a fairly complex use-case scenario: I want a dialog to popup 
when a "hover" event occurs within a table cell. The dialog will provide 
a couple of links (ideally AjaxLink) that should trigger a wicket ajax 
event.


I can imagine maybe creating the dialogs all on the client so there 
is no need to hit the server when the mouse hovers over the table cell 
(seems that ajax would be no good in any case since the latency would be 
high when hovering over potentially many cells within the table anyhow). 
But then the issue is how to create the AjaxLink in the javascript that 
constructs the dialog on the client?


Any ideas are greatly appreciated!

Thanks, Jason

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



how to override wicket DataTable.html



Hi,

   I want to add a css class to the tbody that is part of 
DataTable.html that looks like:




   


   


   
   
   [cell]
   
   



where none exists already? What is the easiest way to do this w/o 
modifying core wicket code that I would have to maintain?


Thanks, Jason

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



setting PageExpiredErrorPage not working



Hi,

   I'm using Wicket-1.4.3 and just trying to set the expired page to my 
home page in my Application class like so:


   IApplicationSettings settings = getApplicationSettings();
   settings.setPageExpiredErrorPage(getHomePage());

In addition, I'm using the HttpsRequestCycleProcessor in production and  
I see that I still get stack traces like these if for instance a user 
comes back to the page after the session expires and clicks on an AjaxLink


org.apache.wicket.protocol.http.PageExpiredException: Cannot find the rendered 
page in session [pagemap=null,componentPath=20:header:logout,versionNumber=0]
at 
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:197)
at 
org.apache.wicket.protocol.https.HttpsRequestCycleProcessor.resolve(HttpsRequestCycleProcessor.java:172)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)


   What can I do to handle these exceptions cleanly?

   Thanks, Jason

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



autocomplete text field with dropdown style functionality


Hi,

   I'm using the autocomplete text field with great success. However, 
I'm looking for a way where a user can start to move down the list and 
once they are at the last choice, it will continue to pull new items 
back from the server. If this seems confusing let me explain with my 
use-case:


   I have a "State" autocomplete textfield. Initially they enter "C" 
and get all the states that start with C. As they go down the list and 
say first California is highlighted and then Colorado and then 
Connecticut I would like the list to display Delaware (possibly even a 
few more like Florida and Georgia) as the next entries available even 
though a C was entered into the text field. It seems I would need to 
know that the last option was selected as a trigger to make a call to 
display more items from the server. Does anyone have any idea how to do 
this?


   Thanks, Jason


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



open modal window w/o ajax resolved?



Hi,

   I was trying to figure out how to display wicketmodal once a page is 
created-- this has been a popular issue

http://issues.apache.org/jira/browse/WICKET-12

It seems just a week ago it has been marked resolved in  wicket 1.4.4, 
can someone tell me what the "fix" is or what I need to do in my code, 
asuming I've grabbed the v. 1.4..4 of this file?


Also, is it possible to have a non-modal "wicketmodal"? If I want to use 
this component as a normal dialog, or is there a better component?


   Thanks, Jason


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



Re: Wicket and JQuery



   Bingo!! I've been hitting this wall, and pulling my hair out-- in 
fact I may ditch jQuery for this very reason since I can't find a 
suitable workaround :-(


Martin Makundi wrote:

... and expect trouble with ajaxifying jquery plugins that skin html
components. They will not work properly if you replace your components
via ajax - or at least you might have to work hard on it.

**
Marin

2009/10/27 Jeremy Thomerson :
  

I'd suggest only using jQuery for the UI effects and let Wicket do the AJAX.

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, Oct 27, 2009 at 4:06 PM, Jeffrey Schneller <
jeffrey.schnel...@envisa.com> wrote:



I am trying to determine how to use Wicket and JQuery.  I would prefer
not using wiQuery or similar.  I would like to just include the jQuery
libraries in my html and then use jQuery as javascript and not wrap
everything in java on the server side to generate the client code.



How would one go about doing this?  I assume the basic jQuery
functionality is straight forward.  However how would you implement
jQuery code that uses Ajax to communicate back to the server using
Wicket on the server?  Or would the recommendation be to let Wicket
handle the Ajax communication and only use jQuery for the UI components
such as "Lightbox", "Greybox", apple like sliders, etc.



Any ideas?



Thanks.






  


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

  



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



Re: Wicket HTML before graphics design with CSS ...



   My best experiences have been when the designer has full reign to do 
what they need on the CSS/HTML front on a blank canvas-- obviously after 
doing wireframes with something like OmniGraffle, Balsamiq or Fireworks. 
It helps if they add things like static error messages or a highlighted 
tab so the wicket developer gets a sense of when they will probably do 
some kind of onComponentTag override to change a class or HTML 
attribute, etc. Things that screw up designers IMO are repeaters... it's 
hard sometimes for them to know to what degree the layout structure is 
created on the server side. For instance I really like the DataBrowser 
component where it provides pagination, sorting, zebra stripes, etc, but 
the designer just sees a  and thats it. 
Obviously they can still style it but the entire structure is hidden 
from them. OTOH ListViews and others expose more structure to the 
designer which makes them feel closer to home. It's all a tradeoff 
really. The biggest rule I give is to just know that any tag with 
wicket:id in it means that behavior to some extent is controlled on the 
server side so beware. I like this model as a developer since I really 
enjoy taking a nice looking static page and making it come alive, as 
opposed to my own crappy HTML since I can't design worth beans. I've 
also found subtleties where you really want the design up front, one 
concrete example was a tabbed pane. In one case the styles were applied

as


one
...


or another as



one


These are subtleties that the designer can change on the fly rather 
easily, but in wicket it makes a huge difference. I wouldn't want to 
force the decision on the designer, this should be their choice.


But this is just my 2 cents

   Jason

Igor Vaynberg wrote:

really? because we have quiet the opposite experience.

we take a wireframe prototype, build it, and have the designer go in
afterwards and pretty it up. with only a couple of hours of
wicket-related training the designers know what to touch and what not
to touch.

-igor

On Tue, Oct 27, 2009 at 9:15 PM, John Armstrong  wrote:
  

Its amazing what designers can screw up :)

Design can have a huge impact on code. This peaceful co-existence can
really only occur if you let the designers go first. If you start with
wicket you will either A) tell your designers to go to h*ll daily or
B) spend hours and hours re-factoring to meet their 'whims'.

The separation of html/code is wonderful in wicket and a key reason I
use it and advocate for it but its no substitute for good planning and
a 'design first' mentality.

John-

On Tue, Oct 27, 2009 at 8:18 PM, Dave B  wrote:



While my Wicket usage is very basic at the stage, one of the
attractive parts is the code and logic is completely separate to the
layout.  So your designers can do all the fine tuning and magic
without screwing up your work.

Cheers,
Dave
  

-
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



jquery ui dialog and ajax component updating



Hi,

   I'm not sure if this is a jquery or wicket problem I'm having. I am 
using wicket ajax to update (replace) a panel component with a link


AjaxLink link = new AjaxLink("link") {
   public void onClick(AjaxRequestTarget target) {
   summaryDialog.displaySummary("my summary", target);
   }
   };

that when clicked will display the summary dialog that contains a Jquery 
dialog component I created called SummaryDialog that looks like this:




   
   $.ui.dialog.defaults.bgiframe = true;
   $(function() {
$("#summaryDialog").dialog({ draggable: true, resizable: false, autoOpen: false, height: 400, width: 800 }).toggle();
   });

   

   
   
   



and the java code is simply:

public class SummaryDialog extends Panel {

   Label label;
   Model labelModel = new Model();

   public SummaryDialog(String id) {
   super(id);
   label = new Label("label", labelModel);
   label.setVisible(false);
   label.setOutputMarkupId(true);
   label.setOutputMarkupPlaceholderTag(true);
   add(label);
   }

   public void displaySummary(String summary, AjaxRequestTarget target) {
   label.setVisible(true);
   labelModel.setObject(summary);
   target.addComponent(label);
   target.appendJavascript("$(\"#summaryDialog\").dialog('open');"); 
   target.appendJavascript("$(\"#summaryDialog\").dialog('option', 
'title', '" + summary+ " Summary');");


   }


It all works fine and I notice that at the bottom of the generated HTML, 
Jquery has added this to the DOM:


tabindex="-1" class="ui-dialog ui-widget ui-widget-content 
ui-corner-all  ui-draggable" style="overflow: hidden; display: none; 
position: absolute; z-index: 1000; outline-color: -moz-use-text-color; 
outline-style: none; outline-width: 0px;">unselectable="on" id="ui-dialog-title-summaryDialog" 
class="ui-dialog-title">My summary Summarystyle="-moz-user-select: none;" unselectable="on" role="button" 
class="ui-dialog-titlebar-close ui-corner-all" href="#">style="-moz-user-select: none;" unselectable="on" class="ui-icon 
ui-icon-closethick">close


   My Summary


The problem is when I do something that updates the original panel in 
Ajax, it never removes the generated DOM so it results in two of these



   My Summary


   My New Summary


which causes it to no longer work since there are two elements with the 
same id in the generated DOM.


Has anyone encountered anything like this before? I could change my 
AjaxLinks to normal Link to perform a whole page refresh to get rid of 
jquery's generated DOM but I'd rather not if I could find a workaround.



   Thanks, Jason

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



Re: How to write HTML directly



Try changing

add(new Label("output","Hello")).setEscapeModelStrings(false);

to

Label label = new Label("output","Hello");
label.setEscapeModelStrings(false);
add(label);

Jason

NiJK wrote:


igor.vaynberg wrote:
  

Also, despite the setEscapeModelString(false), all the HTML is escaped.
  

that is pretty weird. i just tried and it worked fine for me...
-igor




Igor,

Thanks for the info about setStripWicketTags(true).

Something as simple as 
add(new Label("output","Hello")).setEscapeModelStrings(false);

is rendering as

Hello

I take it you're not seeing the same? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org

using wicket ajax to add components containing javascript



Hi,

   I'm using AjaxLinks all over the place to refresh a container that 
contains custom components that themselves also use javascript. So what 
happens is  when I do target.add(myCustomComponent) that the javascript 
is not really in the page, its in the rendered markup so it often just 
doesn't work. Has anyone else had this problem or knows of a way to deal 
with it? Maybe I should put all the components javascript  as an include 
at the top, but I was hoping to keep it self-contained with the 
component itself for maximum reusability.


   Thanks, Jason

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



usage of select and optgroup



Hi,

   I see there is a select component that offers "optgroup" element 
support-- does anyone have a simple example of usage HTML and Java? I 
couldn't find anything on wicketstuff or the wiki...


   Thanks! Jason

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



Re: adding ajaxindicator to dropdownchoice



   Thanks! That got me in the right direction-- I basically copied 
IndicatingAjaxLink and made a IndicatingDropDownChoice below... seems 
like it would be good to have as part of the default widget set...


public class IndicatingDropDownChoice extends DropDownChoice 
implements IAjaxIndicatorAware {


   private final AjaxIndicatorAppender indicatorAppender = new 
AjaxIndicatorAppender();
  
   public IndicatingDropDownChoice(final String id) {

   super(id);
   add(indicatorAppender);
   }

   /**
* @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, 
java.util.List)

*/
   public IndicatingDropDownChoice(final String id, final Listextends T> choices)

   {
   super(id, choices);
   add(indicatorAppender);
   }

   /**
* @see 
org.apache.wicket.ajax.IAjaxIndicatorAware#getAjaxIndicatorMarkupId()

*/
   public String getAjaxIndicatorMarkupId()
   {
   return indicatorAppender.getMarkupId();
   }
}


Peter Thomas wrote:

On Thu, Sep 24, 2009 at 11:40 AM, Jason Novotny wrote:

  

Hi,

  I have a DropDownChoice that triggers an ajax event to occur using the
 AjaxFormComponentUpdatingBehavior. Since the event takes a little while to
complete, I'd like to display  an ajaxindicator similar to an
IndicatingAjaxButton next to it... how can this be done?




Have a look at this code, line #137 and #159

http://code.google.com/p/perfbench/source/browse/trunk/perfbench/wicket-jpa/src/main/java/wicketjpa/wicket/MainPage.java#137

In the HTML, use something like:



You can also use an Image component and get the markupId generated by wicket
instead of hardcoding "spinner" etc.  Hope this helps.

- Peter.



  

  Thanks, Jason

-
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



adding ajaxindicator to dropdownchoice



Hi,

   I have a DropDownChoice that triggers an ajax event to occur using 
the  AjaxFormComponentUpdatingBehavior. Since the event takes a little 
while to complete, I'd like to display  an ajaxindicator similar to an 
IndicatingAjaxButton next to it... how can this be done?


   Thanks, Jason

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



Re: why is getHomePage called multiple times?



Hi Nick,

   I tried with the simplest page:

http://www.w3.org/1999/xhtml"; 
xmlns:wicket="http://www.w3.org/1999/xhtml";>




hello wicket



The good news is that it only happens after loading the app for the 
first time-- after an additional request is made to the home page, it's 
instantiated only once.


   Cheers, Jason

Nick Heudecker wrote:

Any chance you have empty image src attributes in your home page?

On Mon, Aug 31, 2009 at 9:19 PM, Jason Novotny wrote:

  

Hi,

  My home page takes longer to load than expected and after placing a log
line in getHomePage#MyWicketApplication I see that it's being called 3
times:

Connected to server
gethome page
called me!
gethome page
called me!
gethome page
called me!

  Is there sort of a LoadableDetachableModel equivalent for pages, so they
are just instantiated one per request cycle?

  Thanks, Jason

-
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



why is getHomePage called multiple times?



Hi,

   My home page takes longer to load than expected and after placing a 
log line in getHomePage#MyWicketApplication I see that it's being called 
3 times:


Connected to server
gethome page
called me!
gethome page
called me!
gethome page
called me!

   Is there sort of a LoadableDetachableModel equivalent for pages, so 
they are just instantiated one per request cycle?


   Thanks, Jason

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



a DataTable header that allows selection of # items per page?


Hi,

   I've been a happy user of the AjaxNavigationToolbar to display which 
page is being displayed with arrows for paging, however is there a 
Toolbar that provides a dropdown to allow a user to select the number of 
items per page? Just asking before I attempt to write one ;-)


   Thanks, Jason

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



ajax navigation toolbars not updating when rows are added to initially empty table


Hi,
  
   In a nutshell, I have a table that starts off empty and rows are 
added to it dynamically. So I have a DataTable inside of a 
WebMarkupContainer where setOutputMarkupId(true) and in the ajax 
callback I do a target.addComponent(markupContainer). So far so good and 
the table does update with new table rows. However, the paging toolbar 
on the bottom never gets displayed. So if I set the rowsPerPage to 3 and 
enter a 4th item, the row basically disappears. The code knows not to 
display a 4th row, but it doesn't display the navigation toolbar either. 
If I refresh the entire page, then the complete table with navigator 
suddenly appears.  It feels as if setOutputMarkupPlaceholderTag was 
never set to true deep in the bowels of the datatable/toolbar code since 
once it starts out as invisible it never has a chance to become visible. 
Does anyone have any ideas if this is a bug or I'm just missing 
something. FYI, I'm using wicket 1.4.0 just released.


   Thanks, Jason

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



simple example of RadioGroup



Hi,

   Somehow I seem to have problems if I want to do individual radio 
buttons in my HTML and it looks like I need to use RadioGroup. Here is 
the example HTML and I'm trying to figure out how to wicket-ize it... 
the model just needs to be a boolean since I have only two values.


 Click here for 
option one
   value=""> Click here for option two



Thanks, Jason


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



Re: how to not display RepeaterView



Igor, Jeremy,

Just want to say thanks for your constant support on the mailing list! 
This is a huge part of why I've become a wicket enthusiast. Keep up the 
great work!


   Cheers, Jason

Igor Vaynberg wrote:

no need, just attach it to a wicket:container

[wicket:container][h3]..[/h3][div]..[/div][/wicket:container]

alternatively you can attach it to any tag and call setrenderbodyonly
on the component that is direct child of repeatingview

-igor

On Tue, Apr 21, 2009 at 5:48 PM, Jeremy Thomerson
 wrote:
  

Sorry - poor formatting in my client made it hard to notice the closing H3.

Looking at RV code - it really doesn't seem to work for this.  I'd suggest
opening a JIRA and then adjusting your jquery script to expect the div.

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, Apr 21, 2009 at 7:35 PM, Jason Novotny wrote:



Ah but the h3 doesn't wrap the whole thing (or does it need to?) Basically
I'm trying to repeat the following structure:

some stuff
some div

more stuff
more div

more more stuff
more more div

Thanks Jeremy!


Jeremy Thomerson wrote:

  

Why don't you just make your outermost tag the repeater (it looks like an
H3
in your example)?

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, Apr 21, 2009 at 7:24 PM, Jason Novotny 

wrote:
  




Hi,

I have some markup I wish to repeat like so:

...

Blah Blah
Blah

 
 
 Workout
Name.
 
 



...

So I wrapped the whole thing inside a  like
so:


 Blah Blah
Blah
   
    


and use a RepeatingView rv = new RepeatingView("container");

This works fine except the resulting HTML still contains the outer div to
appear which causes the markup to break since it relies on Jquery to
attach
some classes, etc and is not expecting the outer div's.
I've tried rv.setRenderBody(false) which works for wicket Label's if you
don't want to display the span tag but doesn't work here. Does anyone
have
any idea of how to not display the RepeatingView markup of div tags?

Thanks a bunch. Jason



-
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: how to not display RepeaterView



Ah but the h3 doesn't wrap the whole thing (or does it need to?) 
Basically I'm trying to repeat the following structure:


some stuff
some div

more stuff
more div

more more stuff
more more div

Thanks Jeremy!

Jeremy Thomerson wrote:

Why don't you just make your outermost tag the repeater (it looks like an H3
in your example)?

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, Apr 21, 2009 at 7:24 PM, Jason Novotny wrote:

  

Hi,

I have some markup I wish to repeat like so:

...

Blah Blah
Blah
 
  
  
  Workout
Name.
  
  



...

So I wrapped the whole thing inside a  like so:


  Blah Blah
Blah

 


and use a RepeatingView rv = new RepeatingView("container");

This works fine except the resulting HTML still contains the outer div to
appear which causes the markup to break since it relies on Jquery to attach
some classes, etc and is not expecting the outer div's.
I've tried rv.setRenderBody(false) which works for wicket Label's if you
don't want to display the span tag but doesn't work here. Does anyone have
any idea of how to not display the RepeatingView markup of div tags?

Thanks a bunch. Jason



-
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



how to not display RepeaterView



Hi,

I have some markup I wish to repeat like so:

...

Blah Blah 
Blah
  


   
   
   wicket:id="label">Workout Name.

   
   



...

So I wrapped the whole thing inside a  like so:


   Blah Blah 
Blah
  
   
    
   



and use a RepeatingView rv = new RepeatingView("container");

This works fine except the resulting HTML still contains the outer div 
to appear which causes the markup to break since it relies on Jquery to 
attach some classes, etc and is not expecting the outer div's.
I've tried rv.setRenderBody(false) which works for wicket Label's if you 
don't want to display the span tag but doesn't work here. Does anyone 
have any idea of how to not display the RepeatingView markup of div tags?


Thanks a bunch. Jason



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



changing style of ajax link



Hi,

I have code to create an ajax link and I want it to dynamically adjust 
its css class when clicked. This doesn't work since I don't think the 
onComponentTag is being called.


final AjaxLink link = new AjaxLink("navlink") {
   @Override
   public void onClick(AjaxRequestTarget target) {

 
   }


   public void onComponentTag(ComponentTag tag) {
   super.onComponentTag(tag);
   if (foo == 77) {
  tag.put("class", "secondaryCurrent");
   }
   }

   };

Any help is greatly appreciated!

Thanks, Jason

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



how to display a BookmarkableLink so it can't be clicked



Hi,

I have a case where if some condition is met I don't want a link to be 
clickable... but I want it to display the link text (so overriding 
isVisible() is not an option). Any ideas on the most elegant approach?


Thanks, Jason

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



Re: anyone see error "Internal error parsing wicket:interface = iepngfix.htc"?



Hi,

Unfortunately it causes an InternalErrorPage-- we basically have a css file
included in the html:


 
The css includes the iepng.htc file:

 img {behavior: url('../iepngfix.htc');}

Nothing out of the ordinary :-(

Thanks, Jason

Serkan Camurcuoglu-3 wrote:
> 
> we had used iepngfix.htc method, but our css file was relative to our 
> web application, so iepngfix.htc file was not served through wicket.. 
> but I believe it should not be problematic.. does it cause any obvious 
> error in the application other than the error log?
> 
> 
> 
> novotny wrote:
>> Hi,
>>
>> In order to support .png files on IE we added a "fix/hack" as documented
>> here 
>> http://www.twinhelix.com/css/iepngfix/
>>
>> However in the logs we're seeing this wicket error:
>>
>> org.apache.wicket.WicketRuntimeException: Internal error parsing
>> wicket:interface = iepngfix.htc
>>at
>> org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:596)
>>at
>> org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.decode(BookmarkablePageRequestTargetUrlCodingStrategy.java:104)
>>at
>> com.homeaccount.web.wicket.WebRequestCodingStrategy.targetForRequest(WebRequestCodingStrategy.java:498)
>>at
>> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:184)
>>at org.apache.wicket.RequestCycle.step(RequestCycle.java:1246)
>>
>> Has anyone else had this problem and is there a way to deal with it?
>>
>> Thanks, Jason
>>
>>   
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/anyone-see-error-%22Internal-error-parsing-wicket%3Ainterface-%3D-iepngfix.htc%22--tp22730324p22731175.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



anyone see error "Internal error parsing wicket:interface = iepngfix.htc"?


Hi,

In order to support .png files on IE we added a "fix/hack" as documented
here 
http://www.twinhelix.com/css/iepngfix/

However in the logs we're seeing this wicket error:

org.apache.wicket.WicketRuntimeException: Internal error parsing
wicket:interface = iepngfix.htc
   at
org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:596)
   at
org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.decode(BookmarkablePageRequestTargetUrlCodingStrategy.java:104)
   at
com.homeaccount.web.wicket.WebRequestCodingStrategy.targetForRequest(WebRequestCodingStrategy.java:498)
   at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:184)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1246)

Has anyone else had this problem and is there a way to deal with it?

Thanks, Jason

-- 
View this message in context: 
http://www.nabble.com/anyone-see-error-%22Internal-error-parsing-wicket%3Ainterface-%3D-iepngfix.htc%22--tp22730324p22730324.html
Sent from the Wicket - User mailing list archive at Nabble.com.


problems with back button


Hi,

I notice when I hit the back button it takes me to the last page without
hitting the server. I read some posts that mentioned the method in WebPage
that should disable caching by default

protected void setHeaders(WebResponse response) {
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache, max-age=0,
must-revalidate"); // no-store
}

But it doesn't seem to work-- I'm using Firefox version 3.0.7. Has anyone
encountered this problem before?

Thanks, Jason
-- 
View this message in context: 
http://www.nabble.com/problems-with-back-button-tp22714651p22714651.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: PageExpiredException problems


Hi Jeremy,

I'm not seeing any serialization errors in my logs... I couldn't find
anything useful when I searched the archives, although I did see some stuff
regarding this error that could be ajax related. I guess the first step
would be to figure out which URLs could be triggering this behavior. Do you
have any ideas how I could get that info?

Thanks, Jason


novotny wrote:
> 
> 
> Hi,
> 
> Our log file in production is showing a lot of these type errors:
> 
> 
> org.apache.wicket.protocol.http.PageExpiredException: Cannot find the
> rendered page in session [pagemap=null,componentPath=1,versionNumber=0]
>at
> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:190)
>at org.apache.wicket.RequestCycle.step(RequestCycle.java:1246)
>at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1366)
>at org.apache.wicket.RequestCycle.request(RequestCycle.java:498)
>at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:444)
> 
> Does anyone know what can cause this to happen? Also is there a way (maybe
> a class or method I can override) to log the URLs that a user is hitting
> to maybe narrow this down?
> 
> Thanks, Jason
> 

-- 
View this message in context: 
http://www.nabble.com/PageExpiredException-problems-tp22608403p22608868.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



PageExpiredException problems



Hi,

Our log file in production is showing a lot of these type errors:


org.apache.wicket.protocol.http.PageExpiredException: Cannot find the
rendered page in session [pagemap=null,componentPath=1,versionNumber=0]
   at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:190)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1246)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1366)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:498)
   at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:444)

Does anyone know what can cause this to happen? Also is there a way (maybe a
class or method I can override) to log the URLs that a user is hitting to
maybe narrow this down?

Thanks, Jason
-- 
View this message in context: 
http://www.nabble.com/PageExpiredException-problems-tp22608403p22608403.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



get the index number of the RadioChoice selected and and not the label


Hi,

I couldn't seem to find the answer to this question but it's probably pretty
easy. I have a radio choice like so:

RadioChoice rc = new RadioChoice("answer", new
PropertyModel(item, "selected"), item.getAnswers());

But basically it saves the answer text when what I really want to save is
the value number e.g. "1" if the first radio was selected or "2" if it was
the second. 

Thanks! Jason


-- 
View this message in context: 
http://www.nabble.com/get-the-index-number-of-the-RadioChoice-selected-and-and-not-the-label-tp22486349p22486349.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: using wasp/swarm + acegi and RunAs capability


I just found SwitchUser in the Spring security code as well-- this seems to
be what I want, has anyone had any experience using it?

Thanks, Jason


novotny wrote:
> 
> Hi,
> 
> I'm currently using wicket security with acegi following the wicketstuff
> documentation
> http://wicketstuff.org/confluence/display/STUFFWIKI/Swarm+and+Acegi+HowTo.
> WaspSession is subclasssed to provide authenticate and logoff methods that
> use spring's AuthenticationManager and SecurityContextHolder classes. Now
> however I have some admin pages and I need the capability for an admin to
> "run as" a user. Has anyone had any experience with this? I'm sort of at a
> loss to know where to begin-- I see that Spring has a RunAsManager
> http://static.springframework.org/spring-security/site/reference/html/runas.html
>  
> but I'm not sure how to use it. Any help is greatly appreciated!
> 
> Thanks, Jason
> 

-- 
View this message in context: 
http://www.nabble.com/using-wasp-swarm-%2B-acegi-and-RunAs-capability-tp22444906p22446728.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



using wasp/swarm + acegi and RunAs capability


Hi,

I'm currently using wicket security with acegi following the wicketstuff
documentation
http://wicketstuff.org/confluence/display/STUFFWIKI/Swarm+and+Acegi+HowTo.
WaspSession is subclasssed to provide authenticate and logoff methods that
use spring's AuthenticationManager and SecurityContextHolder classes. Now
however I have some admin pages and I need the capability for an admin to
"run as" a user. Has anyone had any experience with this? I'm sort of at a
loss to know where to begin-- I see that Spring has a RunAsManager
http://static.springframework.org/spring-security/site/reference/html/runas.html
 
but I'm not sure how to use it. Any help is greatly appreciated!

Thanks, Jason
-- 
View this message in context: 
http://www.nabble.com/using-wasp-swarm-%2B-acegi-and-RunAs-capability-tp22444906p22444906.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



how to save "validated" fields in a form even if entire form still needs work


Hi,

I have a form with 8 required fields. I'd like it if even if they just fill
out 4 of the fields, I can go ahead and persist those field answers to the
database and still remind them to fill out the remaining fields. What is the
hook method that I override to persist the valid fields?

Thanks, Jason
-- 
View this message in context: 
http://www.nabble.com/how-to-save-%22validated%22-fields-in-a-form-even-if-entire-form-still-needs-work-tp22343848p22343848.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: using tabindex attribute in a radio input


I just happened to google https://issues.apache.org/jira/browse/WICKET-2031
 as someone else filed the same issue. However I am using RadioGroup and
it's still not working... if someone has a simple example of this, let me
know!

Thanks, Jason



novotny wrote:
> 
> Hi,
> 
> It's a bit complex but i"m using the wicket ajax RadioGroup to
> display/hide another form. That part works and when the radio is selected
> the form is displayed. However the input textfields all have "tabindex"
> attributes set (thsi allows a user to tab to the next input field).
> However if the "tabindex" is added to a  wicket:id="myradio"/> the tabindex doesn't seem to be there. I tried view
> source of the HTML but since this form is in a webmarkupcontainer that is
> normally not visible, it doesn't show up. Initially I had the "tabindex"
> in the HTML just as the textfields, and then I tried adding the attribute
> in java both as onComponentTag and SimpleAttributeModifier but it just
> doesn't display any help is greatly appreciated!
> 
> Thanks, Jason
> 
> 
>  
> 

-- 
View this message in context: 
http://www.nabble.com/using-tabindex-attribute-in-a-radio-input-tp2234p22343371.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



using tabindex attribute in a radio input


Hi,

It's a bit complex but i"m using the wicket ajax RadioGroup to display/hide
another form. That part works and when the radio is selected the form is
displayed. However the input textfields all have "tabindex" attributes set
(thsi allows a user to tab to the next input field). However if the
"tabindex" is added to a  the tabindex doesn't seem to be there. I tried view
source of the HTML but since this form is in a webmarkupcontainer that is
normally not visible, it doesn't show up. Initially I had the "tabindex" in
the HTML just as the textfields, and then I tried adding the attribute in
java both as onComponentTag and SimpleAttributeModifier but it just doesn't
display any help is greatly appreciated!

Thanks, Jason


 
-- 
View this message in context: 
http://www.nabble.com/using-tabindex-attribute-in-a-radio-input-tp2234p2234.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



MixedParamUrlCodingStrategy and too many path parts



Hi,

I'm using MixedParamUrlCodingStrategy which seems to work fine. However I
saw a bunch of errors in the log file:

"Too many path parts, please provide sufficient number of path parameter
names"

If this shows up, how can I direct a user to a PageNotFound? Also how can I
log what HTTp requests users are making to the site to see where this is
coming from?

Thanks, Jason
-- 
View this message in context: 
http://www.nabble.com/MixedParamUrlCodingStrategy-and-too-many-path-parts-tp22316857p22316857.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: multiple feedback panels in same page



Great-- for those googling, this works:

final Form form = new Form("form");

ComponentFeedbackMessageFilter filter = new
ComponentFeedbackMessageFilter(form);

FeedbackPanel feedback = new FeedbackPanel("feedback", filter);
feedback.setEscapeModelStrings(false);
add(feedback);

  and then elsewhere in the code I can do:

 form.info("hello world");

Thanks!

Jeremy Thomerson-5 wrote:
> 
> there's a filter interface that you can use with the feedback panel that
> allows you to filter just the messages you want in that panel.  i.e., you
> could have a FBP by every form component and only show the messages
> generated by that component.
> 
> -- 
> Jeremy Thomerson
> http://www.wickettraining.com
> 
> On Mon, Mar 2, 2009 at 4:54 PM, novotny  wrote:
> 
>>
>> Hi,
>>
>> I have two feedback panels in the same page and want to direct my info
>> message to only one of them. Any ideas on how to do this? Right now when
>> I
>> do "info("hello")" "hello" shows up in both panels.
>>
>> Thanks, Jason
>> --
>> View this message in context:
>> http://www.nabble.com/multiple-feedback-panels-in-same-page-tp22298693p22298693.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/multiple-feedback-panels-in-same-page-tp22298693p22299635.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: multiple feedback panels in same page


Do you have some simple example where only a feedback message created from
the class that page that instantiates the feedbackpanel can display a
message... or maybe any example will do since I couldn't see any from
googling... :-)

Thanks again, Jason


novotny wrote:
> 
> Hi,
> 
> I have two feedback panels in the same page and want to direct my info
> message to only one of them. Any ideas on how to do this? Right now when I
> do "info("hello")" "hello" shows up in both panels.
> 
> Thanks, Jason
> 

-- 
View this message in context: 
http://www.nabble.com/multiple-feedback-panels-in-same-page-tp22298693p22298900.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



multiple feedback panels in same page


Hi,

I have two feedback panels in the same page and want to direct my info
message to only one of them. Any ideas on how to do this? Right now when I
do "info("hello")" "hello" shows up in both panels.

Thanks, Jason
-- 
View this message in context: 
http://www.nabble.com/multiple-feedback-panels-in-same-page-tp22298693p22298693.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



a simple RepeatingView to display links with labels


Hi,

The sample from the javadocs works:

 Java:

 RepeatingView view = new RepeatingView("repeater");
 view.add(new Label("1", "hello"));
 view.add(new Label("2", "goodbye"));
 view.add(new Label("3", "good morning"));
 

Markup:

  

 

Yields:

  
hello
goodbye
good morning

 

However, I can't seem to add a label to a BoomarkablePageLink in the same
way... does anyone have an idea of how to do this?

I was trying 

 RepeatingView view = new RepeatingView("repeater");
 view.add(new BookmarkablePageLink("1", MyPage.class).add(new Label("1",
"hello")));

with the same markup to no avail.

Thanks, Jason
-- 
View this message in context: 
http://www.nabble.com/a-simple-RepeatingView-to-display-links-with-labels-tp22256741p22256741.html
Sent from the Wicket - User mailing list archive at Nabble.com.


Re: external image inside link



Jeremy, you're the man! That works!

Thanks a bunch, Jason


Jeremy Thomerson-5 wrote:
> 
> Sorry, missed that - but found the issue - stop passing your link the
> label
> - the link is trying to replace it's body with your label rather than the
> markup you wrote.  Do this:
> 
> ExternalLink link = new ExternalLink("bankURL", lender.getWebsite());
> StaticImage image = new StaticImage("bank", "images/logos/" +
> lender.getImageSrc(), lender.getLender());
> link.add(image);
> add(link);
> 
> 
> -- 
> Jeremy Thomerson
> http://www.wickettraining.com
> 
> 
> 
>>> ExternalLink link = new ExternalLink("bankURL",
>>> lender.getLenderWebsite(),
>>> lender.getLender());
>>>  StaticImage image = new StaticImage("bank", "images/logos/" +
>>> lender.getImageSrc(), lender.getLender());
>>>  link.add(image);
>>>  add(link);
> 
> On Tue, Feb 24, 2009 at 7:00 PM, novotny  wrote:
> 
>>
>>
>> Hi
>>
>> I am using import org.apache.wicket.markup.html.link.ExternalLink;
>>
>> in my import but I do have a custom StaticImage class:
>>
>> public class StaticImage extends WebComponent {
>>
>>private String url;
>>private String alt;
>>
>>public StaticImage(String id, String url, String alt) {
>>super(id);
>>this.url = url;
>>this.alt = alt;
>>}
>>
>>protected void onComponentTag(ComponentTag tag) {
>>super.onComponentTag(tag);
>>checkComponentTag(tag, "img");
>>tag.put("src", url);
>>tag.put("alt", alt);
>>}
>>
>> }
>>
>> Thanks again, Jason
>>
>>
>> Jeremy Thomerson-5 wrote:
>> >
>> > Wait - I just realized that your "ExternalLink" class is custom. 
>> That's
>> > the
>> > culprit.  Show us the code.
>> >
>> > On Tue, Feb 24, 2009 at 6:15 PM, novotny 
>> wrote:
>> >
>> >>
>> >> Thanks, however I still get the same error:
>> >>
>> >> WicketMessage: Expected close tag for '<a wicket:id="bankURL"
>> href="#"
>> >> target="_new">' Possible attempt to embed component(s) '<img
>> >> wicket:id="bank" alt="" class="pic"/>' in the body of this
>> component
>> >> which discards its body
>> >>
>> >> and my code looks like:
>> >>
>> >> ExternalLink link = new ExternalLink("bankURL",
>> >> lender.getLenderWebsite(),
>> >> lender.getLender());
>> >>  StaticImage image = new StaticImage("bank", "images/logos/" +
>> >> lender.getImageSrc(), lender.getLender());
>> >>  link.add(image);
>> >>  add(link);
>> >>
>> >> Thanks, Jason
>> >>
>> >>
>> >>
>> >> Jeremy Thomerson-5 wrote:
>> >> >
>> >> > I think your problem is that in your long add() call, you are
>> actually
>> >> > adding the image to your outer container rather than the link.  The
>> >> code
>> >> > is
>> >> > formatted poorly in the email.  Try this:
>> >> >
>> >> > ExternalLink link = new ExternalLink(..)
>> >> > link.add(new StaticImage(..))
>> >> > add(link);
>> >> >
>> >> > On Tue, Feb 24, 2009 at 6:03 PM, novotny 
>> >> wrote:
>> >> >
>> >> >>
>> >> >>
>> >> >> That's exactly what I tried and I get
>> >> >>
>> >> >> WicketMessage: Expected close tag for '<a wicket:id="bankURL"
>> >> href="#"
>> >> >> target="_new">' Possible attempt to embed component(s) '<img
>> >> >> wicket:id="bank" alt="" class="pic"/>' in the body of this
>> >> component
>> >> >> which discards its body
>> >> >>
>> >> >> here's my java
>> >> >> add(new ExternalLink("bankURL", lender.getLenderWebsite(),
>> >> >> lender.getLender()).add(new StaticImage("bank", "images/logos/" +
>> >> >> lender.getImageS

Re: external image inside link



Hi

I am using import org.apache.wicket.markup.html.link.ExternalLink;

in my import but I do have a custom StaticImage class:

public class StaticImage extends WebComponent {

private String url;
private String alt;

public StaticImage(String id, String url, String alt) {
super(id);
this.url = url;
this.alt = alt;
}

protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
checkComponentTag(tag, "img");
tag.put("src", url);
tag.put("alt", alt);
}

}

Thanks again, Jason


Jeremy Thomerson-5 wrote:
> 
> Wait - I just realized that your "ExternalLink" class is custom.  That's
> the
> culprit.  Show us the code.
> 
> On Tue, Feb 24, 2009 at 6:15 PM, novotny  wrote:
> 
>>
>> Thanks, however I still get the same error:
>>
>> WicketMessage: Expected close tag for '<a wicket:id="bankURL" href="#"
>> target="_new">' Possible attempt to embed component(s) '<img
>> wicket:id="bank" alt="" class="pic"/>' in the body of this component
>> which discards its body
>>
>> and my code looks like:
>>
>> ExternalLink link = new ExternalLink("bankURL",
>> lender.getLenderWebsite(),
>> lender.getLender());
>>  StaticImage image = new StaticImage("bank", "images/logos/" +
>> lender.getImageSrc(), lender.getLender());
>>  link.add(image);
>>  add(link);
>>
>> Thanks, Jason
>>
>>
>>
>> Jeremy Thomerson-5 wrote:
>> >
>> > I think your problem is that in your long add() call, you are actually
>> > adding the image to your outer container rather than the link.  The
>> code
>> > is
>> > formatted poorly in the email.  Try this:
>> >
>> > ExternalLink link = new ExternalLink(..)
>> > link.add(new StaticImage(..))
>> > add(link);
>> >
>> > On Tue, Feb 24, 2009 at 6:03 PM, novotny 
>> wrote:
>> >
>> >>
>> >>
>> >> That's exactly what I tried and I get
>> >>
>> >> WicketMessage: Expected close tag for '<a wicket:id="bankURL"
>> href="#"
>> >> target="_new">' Possible attempt to embed component(s) '<img
>> >> wicket:id="bank" alt="" class="pic"/>' in the body of this
>> component
>> >> which discards its body
>> >>
>> >> here's my java
>> >> add(new ExternalLink("bankURL", lender.getLenderWebsite(),
>> >> lender.getLender()).add(new StaticImage("bank", "images/logos/" +
>> >> lender.getImageSrc(), lender.getLender(;
>> >>
>> >>
>> >> and my html:
>> >> <a wicket:id="bankURL" href="#" target="_new">somewhere<img
>> >> wicket:id="bank" alt="" class="pic"/></a>
>> >>
>> >> Thanks, Jason
>> >>
>> >>
>> >> igor.vaynberg wrote:
>> >> >
>> >> > the bottom of that page shows you how to embed an external image
>> into
>> >> > an external link.
>> >> >
>> >> > -igor
>> >> >
>> >> > On Tue, Feb 24, 2009 at 3:24 PM, novotny 
>> >> wrote:
>> >> >>
>> >> >> Hi all,
>> >> >>
>> >> >> Apologies for such a  simple question but I couldn't find
>> anything--
>> >> the
>> >> >> closet was
>> >> >> http://cwiki.apache.org/WICKET/how-to-load-an-external-image.html
>> >> >> but it just didn't work for me.
>> >> >>
>> >> >> Here's the html I want:
>> >> >>
>> >> >> <a href="http://www.gohere.com"><img
>> >> >> src="images/logo.gif"></a>
>> >> >>
>> >> >> I tried to do something like ExternalLink("link",
>> >> >> "http://www.gohere.com";,
>> >> >> "<img src=\"images/logos/" + lender.getImageSrc() + "\"/>");
>> but
>> >> it
>> >> >> escaped the img I tried to pass in as a label.
>> >> >>
>> >> >> Thanks a bunch!
>> >&g

Re: external image inside link


Thanks, however I still get the same error:

WicketMessage: Expected close tag for '<a wicket:id="bankURL" href="#"
target="_new">' Possible attempt to embed component(s) '<img
wicket:id="bank" alt="" class="pic"/>' in the body of this component
which discards its body

and my code looks like:

ExternalLink link = new ExternalLink("bankURL", lender.getLenderWebsite(),
lender.getLender());
 StaticImage image = new StaticImage("bank", "images/logos/" +
lender.getImageSrc(), lender.getLender());
 link.add(image);
 add(link);

Thanks, Jason



Jeremy Thomerson-5 wrote:
> 
> I think your problem is that in your long add() call, you are actually
> adding the image to your outer container rather than the link.  The code
> is
> formatted poorly in the email.  Try this:
> 
> ExternalLink link = new ExternalLink(..)
> link.add(new StaticImage(..))
> add(link);
> 
> On Tue, Feb 24, 2009 at 6:03 PM, novotny  wrote:
> 
>>
>>
>> That's exactly what I tried and I get
>>
>> WicketMessage: Expected close tag for '<a wicket:id="bankURL" href="#"
>> target="_new">' Possible attempt to embed component(s) '<img
>> wicket:id="bank" alt="" class="pic"/>' in the body of this component
>> which discards its body
>>
>> here's my java
>> add(new ExternalLink("bankURL", lender.getLenderWebsite(),
>> lender.getLender()).add(new StaticImage("bank", "images/logos/" +
>> lender.getImageSrc(), lender.getLender(;
>>
>>
>> and my html:
>> <a wicket:id="bankURL" href="#" target="_new">somewhere<img
>> wicket:id="bank" alt="" class="pic"/></a>
>>
>> Thanks, Jason
>>
>>
>> igor.vaynberg wrote:
>> >
>> > the bottom of that page shows you how to embed an external image into
>> > an external link.
>> >
>> > -igor
>> >
>> > On Tue, Feb 24, 2009 at 3:24 PM, novotny 
>> wrote:
>> >>
>> >> Hi all,
>> >>
>> >> Apologies for such a  simple question but I couldn't find anything--
>> the
>> >> closet was
>> >> http://cwiki.apache.org/WICKET/how-to-load-an-external-image.html
>> >> but it just didn't work for me.
>> >>
>> >> Here's the html I want:
>> >>
>> >> <a href="http://www.gohere.com"><img
>> >> src="images/logo.gif"></a>
>> >>
>> >> I tried to do something like ExternalLink("link",
>> >> "http://www.gohere.com";,
>> >> "<img src=\"images/logos/" + lender.getImageSrc() + "\"/>"); but
>> it
>> >> escaped the img I tried to pass in as a label.
>> >>
>> >> Thanks a bunch!
>> >>
>> >> Jason
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/external-image-inside-link-tp22193027p22193027.html
>> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> -
>> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> >> For additional commands, e-mail: users-h...@wicket.apache.org
>> >>
>> >>
>> >
>> > -
>> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> > For additional commands, e-mail: users-h...@wicket.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/external-image-inside-link-tp22193027p22193550.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> 
> 
> -- 
> Jeremy Thomerson
> http://www.wickettraining.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/external-image-inside-link-tp22193027p22193714.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: external image inside link



That's exactly what I tried and I get 

WicketMessage: Expected close tag for '<a wicket:id="bankURL" href="#"
target="_new">' Possible attempt to embed component(s) '<img
wicket:id="bank" alt="" class="pic"/>' in the body of this component
which discards its body

here's my java 
add(new ExternalLink("bankURL", lender.getLenderWebsite(),
lender.getLender()).add(new StaticImage("bank", "images/logos/" +
lender.getImageSrc(), lender.getLender(;


and my html:
<a wicket:id="bankURL" href="#" target="_new">somewhere<img
wicket:id="bank" alt="" class="pic"/></a>

Thanks, Jason


igor.vaynberg wrote:
> 
> the bottom of that page shows you how to embed an external image into
> an external link.
> 
> -igor
> 
> On Tue, Feb 24, 2009 at 3:24 PM, novotny  wrote:
>>
>> Hi all,
>>
>> Apologies for such a  simple question but I couldn't find anything-- the
>> closet was
>> http://cwiki.apache.org/WICKET/how-to-load-an-external-image.html
>> but it just didn't work for me.
>>
>> Here's the html I want:
>>
>> <a href="http://www.gohere.com"><img
>> src="images/logo.gif"></a>
>>
>> I tried to do something like ExternalLink("link",
>> "http://www.gohere.com";,
>> "<img src=\"images/logos/" + lender.getImageSrc() + "\"/>"); but it
>> escaped the img I tried to pass in as a label.
>>
>> Thanks a bunch!
>>
>> Jason
>> --
>> View this message in context:
>> http://www.nabble.com/external-image-inside-link-tp22193027p22193027.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/external-image-inside-link-tp22193027p22193550.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



external image inside link


Hi all,

Apologies for such a  simple question but I couldn't find anything-- the
closet was http://cwiki.apache.org/WICKET/how-to-load-an-external-image.html
but it just didn't work for me.

Here's the html I want:



I tried to do something like ExternalLink("link", "http://www.gohere.com";,
""); but it
escaped the img I tried to pass in as a label.

Thanks a bunch!

Jason
-- 
View this message in context: 
http://www.nabble.com/external-image-inside-link-tp22193027p22193027.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



external image inside link


Hi all,

Apologies for such a  simple question but I couldn't find anything-- the
closet was http://cwiki.apache.org/WICKET/how-to-load-an-external-image.html
but it just didn't work for me.

Here's the html I want:

http://www.gohere.com  images/logo.gif  

I tried to do something like ExternalLink("link", "http://www.gohere.com";, "
\"images/logos/" "); but it escaped the img I tried to pass in as a label.

Thanks a bunch!

Jason
-- 
View this message in context: 
http://www.nabble.com/external-image-inside-link-tp22193003p22193003.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



SSL pages and links



Hi,

I need to secure some pages as well as providing a login link that uses
HTTPS. I read thru the document
http://cwiki.apache.org/WICKET/how-to-switch-to-ssl-mode.html  but it seems
there are several approaches and various source code some of which doesn't
compile. I am using wicket 1.4 with generics support. Can someone please
share with me there working configuration for setting secure links and
pages? Also this is such a critical piece of functionality for any
enterprise site that maybe one of the wicket gurus could cleanup the
documentation or even provide classes as part of the core wicket code to do
this kind of thing.
For the record, I tried the very last approach "Edit (Wicket 1.3.x)
alternative:", but it seems to ignore my components that are not pages that
are annotated with @RequireSSL (e.g. I created a SecureBookmarkablePageLink
that extends BookmarkablePageLink and has the annotation at the top)

Thanks, Jason
-- 
View this message in context: 
http://www.nabble.com/SSL-pages-and-links-tp22130162p22130162.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



how to create a link that goes to an anchor on a page


Hi,

I have PageA and I want to create a link that takes me to an anchor on page
B like so:

Any content 

So the link should look like PageB#label. How can I do this with
BookmarkablePageLink (or any link)?

I can set page parameters but it doesn't seem like that does what I need.

Thanks, Jason
-- 
View this message in context: 
http://www.nabble.com/how-to-create-a-link-that-goes-to-an-anchor-on-a-page-tp22006232p22006232.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: access ServletOutputStream in wicket


Hi,

Ok I found in wicketstuff, a JRPdfResource  class that does the jasper to
pdf conversion for me
and I added code to do this:

InputStream is = getClass().getResourceAsStream("/test.jasper");

JRResource pdfResource = new JRPdfResource(is);

pdfResource.setReportParameters(new HashMap());
add(new ResourceLink("print", pdfResource));

But when I run it I get 

org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
Unable to serialize class: java.io.ByteArrayInputStream
Field hierarchy is:
  2 [class=com.homeaccount.web.loanoptions.MortgageResultsPage, path=2]
private java.lang.Object org.apache.wicket.MarkupContainer.children
[class=[Ljava.lang.Object;]
  private java.lang.Object org.apache.wicket.MarkupContainer.children[8]
[class=org.apache.wicket.markup.html.link.ResourceLink, path=2:print]
private final org.apache.wicket.Resource
org.apache.wicket.markup.html.link.ResourceLink.resource
[class=com.homeaccount.web.jasper.JRPdfResource]
  private com.homeaccount.web.jasper.JRResource$JasperReportFactory
com.homeaccount.web.jasper.JRResource.jasperReportFactory
[class=com.homeaccount.web.jasper.JRResource$1]
final java.io.InputStream
com.homeaccount.web.jasper.JRResource$1.val$report
[class=java.io.ByteArrayInputStream] <- field that is not serializable
at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:349)
at
org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:618)
at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:541)

I checked and JRResources implements Serializable, is there a way I can get
Wicket to avoid serializing this?

I was also thinking maybe I could do something like this:

add(new Link("print") {


public void onClick() {
InputStream is =
getClass().getResourceAsStream("/test.jasper");
JRResource pdfStream = new JRPdfResource(is);
pdfStream.setReportParameters(new HashMap());
getRequestCycle().setRequestTarget(new
ResourceStreamRequestTarget(pdfStream).setFileName("test.pdf"));
}
});

But turns out JRResource extends DynamicWebResource and does not implement
IResourceStream so not sure if this can be made to work...

Thanks, Jason


Pills wrote:
> 
> Hi,
> 
> look at RequestCycle#setRequestTarget and ResourceStreamRequestTarget
> 
> 
> novotny wrote:
>> Hi,
>>
>> I'm learning Jasper to create/display a PDF when a link is clicked and
>> the
>> template code I have looks like:
>>
>> ServletOutputStream servletOutputStream = response.getOutputStream();
>> InputStream reportStream =
>> getServletConfig().getServletContext().getResourceAsStream("/reports/FirstReport.jasper");
>>   
>> JasperRunManager.runReportToPdfStream(reportStream,
>> servletOutputStream, new HashMap(), new
>> JREmptyDataSource());
>>
>> response.setContentType("application/pdf");
>> servletOutputStream.flush();
>> servletOutputStream.close();
>>
>> How should I acccess the servlet objects, or is there a better way to do
>> this that is the "wicket way(tm)"?
>>
>> Much appreciated, Jason
>>
>>   
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/access-ServletOutputStream-in-wicket-tp21487704p21491294.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



access ServletOutputStream in wicket


Hi,

I'm learning Jasper to create/display a PDF when a link is clicked and the
template code I have looks like:

ServletOutputStream servletOutputStream = response.getOutputStream();
InputStream reportStream =
getServletConfig().getServletContext().getResourceAsStream("/reports/FirstReport.jasper");
  
JasperRunManager.runReportToPdfStream(reportStream,
servletOutputStream, new HashMap(), new
JREmptyDataSource());

response.setContentType("application/pdf");
servletOutputStream.flush();
servletOutputStream.close();

How should I acccess the servlet objects, or is there a better way to do
this that is the "wicket way(tm)"?

Much appreciated, Jason
   
-- 
View this message in context: 
http://www.nabble.com/access-ServletOutputStream-in-wicket-tp21487704p21487704.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: using AutoCompleteTextField with wicket 1.4-rc1



I found my problem-- mootools javascript and wicket ajax components 
don't play nicely :-(


Jason Novotny wrote:


Hi,

   I saw the example of the autocomplete textfield at 
http://www.wicket-library.com/wicket-examples/ajax/autocomplete.1 and 
I'm trying to use it. Problem is it doesn't look like it responds at 
all when I start typing in the textfield. I see that the rendered 
input field does not have a onchange attribute added like the example 
does. Does anyone know what I'm missing? Here is my html and java below?




   Country: size="50"/>

   

and my java (same as the example)

Form form = new Form("form1");
   add(form);

   form.add(new AutoCompleteTextField("ac", new 
Model(""))

   {
   protected Iterator getChoices(String input)
   {
   if (Strings.isEmpty(input))
   {
   return Collections.EMPTY_LIST.iterator();
   }

   List choices = new ArrayList(10);

   Locale[] locales = Locale.getAvailableLocales();

   for (int i = 0; i < locales.length; i++)
   {
   final Locale locale = locales[i];
   final String country = locale.getDisplayCountry();

   if 
(country.toUpperCase().startsWith(input.toUpperCase()))

   {
   choices.add(country);
   if (choices.size() == 10)
   {
   break;
   }
   }
   }

   return choices.iterator();
   }
   });
   }

Thanks a bunch, Jason


-
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



using AutoCompleteTextField with wicket 1.4-rc1



Hi,

   I saw the example of the autocomplete textfield at 
http://www.wicket-library.com/wicket-examples/ajax/autocomplete.1 and 
I'm trying to use it. Problem is it doesn't look like it responds at all 
when I start typing in the textfield. I see that the rendered input 
field does not have a onchange attribute added like the example does. 
Does anyone know what I'm missing? Here is my html and java below?




   Country: size="50"/>

   

and my java (same as the example)

Form form = new Form("form1");
   add(form);

   form.add(new AutoCompleteTextField("ac", new 
Model(""))

   {
   protected Iterator getChoices(String input)
   {
   if (Strings.isEmpty(input))
   {
   return Collections.EMPTY_LIST.iterator();
   }

   List choices = new ArrayList(10);

   Locale[] locales = Locale.getAvailableLocales();

   for (int i = 0; i < locales.length; i++)
   {
   final Locale locale = locales[i];
   final String country = locale.getDisplayCountry();

   if 
(country.toUpperCase().startsWith(input.toUpperCase()))

   {
   choices.add(country);
   if (choices.size() == 10)
   {
   break;
   }
   }
   }

   return choices.iterator();
   }
   });
   }

Thanks a bunch, Jason


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



Re: examples of Wizard and working back button



No, still looking :-(


jorgesantoro wrote:
> 
> I have the same problem, did you find a solution for it?
> Thanks,
> 
> 
> novotny wrote:
>> 
>> 
>> Hi,
>> 
>> I should have been more clear- I mean an example where the browser back
>> button works like the "previous" button in the 1-2-3 example. I have a
>> simple wizard already working but if a user is on Step 3 and hits browser
>> back button it takes them to 1.
>> 
>> Thanks, Jason
>> 
>> 
>> Jeremy Thomerson-5 wrote:
>>> 
>>> If by back button you mean a previous button, here's a regular old
>>> wizard
>>> example, as easy as 1-2-3:
>>> 
>>> 1 - http://www.google.com/search?q=wicket+examples
>>> 2 - http://www.wicket-library.com/wicket-examples/
>>> 3 - http://www.wicket-library.com/wicket-examples/wizard/
>>> 
>>> Hope this helps.
>>> 
>>> On Tue, Dec 2, 2008 at 8:09 PM, novotny  wrote:
>>> 
>>>>
>>>> Hi,
>>>>
>>>> I'm looking for a code example of writing a wizard in wicket with a
>>>> working
>>>> back button. The code at
>>>> http://cwiki.apache.org/WICKET/building-wizard-functionality.html is no
>>>> longer available and I was wondering if it was an old example anyway.
>>>> Any
>>>> help is greatly appreciated!
>>>>
>>>> Thanks, Jason
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/examples-of-Wizard-and-working-back-button-tp20805386p20805386.html
>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> -
>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>
>>>>
>>> 
>>> 
>>> -- 
>>> Jeremy Thomerson
>>> http://www.wickettraining.com
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/examples-of-Wizard-and-working-back-button-tp20805386p21321853.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: how to reuse a label in the same page?



I meant



at the bottom...


novotny wrote:
> 
> 
> Basically I need two of the same links on the page, and it looks like I
> have to do this which just seems kinda lame...
> 
> add(new BookmarkablePageLink("personaldetails",
> PersonalDetailsPage.class));
> add(new BookmarkablePageLink("personaldetails2",
> PersonalDetailsPage.class));
> 
> 
> 
>  Click Here 
>  Profile page 
> 
> 
> 
> 
> 
> 
> 
> jWeekend wrote:
>> 
>> Jason,
>> 
>> What are you trying to achieve?
>> 
>> Here are some ideas that may give the desired effect, depending on what
>> that is ...
>> 
>> 1 - Make a model for your data and give that to all the Label instances
>> as required, (but each with their unique id and separate markup).
>> 2 - Use a repeater (like a ListView) to render several labels (no
>> repetition of Java code or markup).
>> 3 - Write a method that takes a model (or just a String) and an id, that
>> returns an appropriately configured Label instance  (saves on repeating
>> Java code - still need markup per component and your own unique ids).
>> 
>> Regards - Cemal
>>  http://www.jWeekend.co.uk jWeekend 
>> 
>> 
>> 
>> novotny wrote:
>>> 
>>> 
>>> I have a simple label "hello" and I want to display it twice in the same
>>> page, but wicket complains the wicket:id needs to be unique in my
>>> page what do I need to do, is there an alias or something?
>>> 
>>> Thanks, Jason
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/how-to-reuse-a-label-in-the-same-page--tp20964351p20964589.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: how to reuse a label in the same page?



Basically I need two of the same links on the page, and it looks like I have
to do this which just seems kinda lame...

add(new BookmarkablePageLink("personaldetails",
PersonalDetailsPage.class));
add(new BookmarkablePageLink("personaldetails2",
PersonalDetailsPage.class));



Click Here 
Profile page 







jWeekend wrote:
> 
> Jason,
> 
> What are you trying to achieve?
> 
> Here are some ideas that may give the desired effect, depending on what
> that is ...
> 
> 1 - Make a model for your data and give that to all the Label instances as
> required, (but each with their unique id and separate markup).
> 2 - Use a repeater (like a ListView) to render several labels (no
> repetition of Java code or markup).
> 3 - Write a method that takes a model (or just a String) and an id, that
> returns an appropriately configured Label instance  (saves on repeating
> Java code - still need markup per component and your own unique ids).
> 
> Regards - Cemal
>  http://www.jWeekend.co.uk jWeekend 
> 
> 
> 
> novotny wrote:
>> 
>> 
>> I have a simple label "hello" and I want to display it twice in the same
>> page, but wicket complains the wicket:id needs to be unique in my
>> page what do I need to do, is there an alias or something?
>> 
>> Thanks, Jason
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/how-to-reuse-a-label-in-the-same-page--tp20964351p20964551.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



how to reuse a label in the same page?



I have a simple label "hello" and I want to display it twice in the same
page, but wicket complains the wicket:id needs to be unique in my page
what do I need to do, is there an alias or something?

Thanks, Jason
-- 
View this message in context: 
http://www.nabble.com/how-to-reuse-a-label-in-the-same-page--tp20964351p20964351.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: getting page expired


I checked and everything is serializable, I tried stepping thru the code but
I don't see where in wicket is the behavior to choose the page expiration
page


Mathias P.W Nilsson wrote:
> 
> Are there any loggers in the class? When using private Logger logger =
> Logger.getLogger(this.getClass());
> this might cause pag expired. If it is contained in a wicket web page. At
> least I know some of my collegues has got this a while ago. I'm not
> familiar with WASP so there might be someone else that can help you.
> 

-- 
View this message in context: 
http://www.nabble.com/getting-page-expired-tp20921513p20924363.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: getting page expired



userMap is just a normal HashMap

private final Map userMap = new HashMap();

I wonder if his problem is caused by WASP security somehow?


Mathias P.W Nilsson wrote:
> 
> What does userMap( userName ) returns? Make sure it is an object that
> implements serializable.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/getting-page-expired-tp20921513p20923527.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



getting page expired



Hi,

I'm creating a demo app where someone can select a prepacked identity from a
drop down box and be logged in as that user. The login process checks to see
if someone is already logged in, then logs them off  and logs in as the new
user before redirecting back to the logged in page. Problem is I keep
getting page expired after being redirected and I have no idea how to turn
this behavior off or where in the wicket stack it occurs. Stepping thru with
the debugger it does in face go thru the HomePage before ultimately
resulting in page expired. Here is the code below, it is using Swarm.

Form f = new Form("userform") {
protected void onSubmit() {
if (AuthenticatedSession.get().isAuthenticated()) {
AuthenticatedSession.get().logout();
}
try {
AuthenticatedSession.get().login(new LoginContext(new
UsernamePasswordAuthenticationToken(userMap.get(username), null)));
} catch (LoginException e) {
throw new RuntimeException(e);
}
setResponsePage(new HomePage());
setRedirect(true);
}
};

Thanks, Jason

-- 
View this message in context: 
http://www.nabble.com/getting-page-expired-tp20921513p20921513.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Component with id [[feedback]] 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.


Hi,

I have a modal dialog (a stateless form) with a feedback panel. The code
looks like:

public final class SignInForm extends StatelessForm {

private FeedbackPanel feedback;

public SignInForm(final String id) {
// sets a compound model on this form, every component without
an
// explicit model will use this model too
super(id, new CompoundPropertyModel(new ValueMap()));

feedback = new FeedbackPanel("feedback");
feedback.setOutputMarkupId(true);
feedback.setMarkupId("feedback");
add(feedback);

add(new AjaxButton("submit", this) {

protected void onSubmit(AjaxRequestTarget target, Form
form) {
.
error(getLocalizer().getString("exception.login",
this,
"Illegal username password combo"));
feedback.setOutputMarkupId(true);
feedback.setMarkupId("feedback");
target.addComponent(feedback);
}

@Override
protected void onError(AjaxRequestTarget target, Form
form)
{
// repaint the feedback panel so errors are shown
super.onError(target, form);
feedback.setOutputMarkupId(true);
feedback.setMarkupId("feedback");
target.addComponent(feedback);
}
});

and my HTML looks like:




Sign In to Your Account


Username



Password



Sign In



but it never renders the feedback panel. I get:
 Component with id [[feedback]] 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.
in my "Wicket Ajax Debug" window...  what can I be missing?

Thanks, Jason
-- 
View this message in context: 
http://www.nabble.com/Component-with-id---feedback---a-was-not-found-while-trying-to-perform-markup-update.-Make-sure-you-called-component.setOutputMarkupId%28true%29-on-the-component-whose-markup-you-are-trying-to-update.-tp20907226p20907226.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



how to invoke javascript method after form validation?


Hi,

I have markup like Enter text

And I'm using FeedbackPanel currently, but instead of showing all the errors
at the top, we want to change class="noerror" to class="error" which seems
easier to do in javascript. But how can I indicate to wicket to invoke this
javascript function which changes class="noerror" to class="error" for those
fields that have errrors?
I'm open to other ideas, but I have lots of wicket panels and don't want to
have to add a lot more wicket code to every class e.g. doing  in markup and adding RepeatingView/Label solutions seems like
more work.

Thanks, Jason
-- 
View this message in context: 
http://www.nabble.com/how-to-invoke-javascript-method-after-form-validation--tp20865454p20865454.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



how to print only one validation message from a listview of radiobuttons


Hi,

I have a ListView containing several RadioButtons.setRequired(true) (a Q & A
list) that are all required to be answered. However, if someone doesn't
click on all of the radio buttons, I see three "Please answer the question"
messages on the feedback panel. How can I just consolidate it so only one
message appears if any of the questions i.e. radiobuttons is not selected?

Thanks, Jason
-- 
View this message in context: 
http://www.nabble.com/how-to-print-only-one-validation-message-from-a-listview-of-radiobuttons-tp20846684p20846684.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: examples of Wizard and working back button



Hi,

I should have been more clear- I mean an example where the browser back
button works like the "previous" button in the 1-2-3 example. I have a
simple wizard already working but if a user is on Step 3 and hits browser
back button it takes them to 1.

Thanks, Jason


Jeremy Thomerson-5 wrote:
> 
> If by back button you mean a previous button, here's a regular old wizard
> example, as easy as 1-2-3:
> 
> 1 - http://www.google.com/search?q=wicket+examples
> 2 - http://www.wicket-library.com/wicket-examples/
> 3 - http://www.wicket-library.com/wicket-examples/wizard/
> 
> Hope this helps.
> 
> On Tue, Dec 2, 2008 at 8:09 PM, novotny <[EMAIL PROTECTED]> wrote:
> 
>>
>> Hi,
>>
>> I'm looking for a code example of writing a wizard in wicket with a
>> working
>> back button. The code at
>> http://cwiki.apache.org/WICKET/building-wizard-functionality.html is no
>> longer available and I was wondering if it was an old example anyway. Any
>> help is greatly appreciated!
>>
>> Thanks, Jason
>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/examples-of-Wizard-and-working-back-button-tp20805386p20805386.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> Jeremy Thomerson
> http://www.wickettraining.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/examples-of-Wizard-and-working-back-button-tp20805386p20809746.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



examples of Wizard and working back button


Hi,

I'm looking for a code example of writing a wizard in wicket with a working
back button. The code at
http://cwiki.apache.org/WICKET/building-wizard-functionality.html is no
longer available and I was wondering if it was an old example anyway. Any
help is greatly appreciated!

Thanks, Jason



-- 
View this message in context: 
http://www.nabble.com/examples-of-Wizard-and-working-back-button-tp20805386p20805386.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



RE: Get informed about invalidation of a session


This has been discussed multiple times and the only reasonable solution that
I found (and just implemented) is to have a concurrent hashmap of session
ids into session objects in the custom Application class. The reason is that
on the unBind() / onDestroy the actual session object does not exist anymore
- the only thing you have is the destroyed session ID.

I needed to persist some user info on the logout.

My solution goes like  this:
public class DavanoApplication extends
org.apache.wicket.protocol.http.WebApplication {
  private Map activeUsersMap = new ConcurrentHashMap();
  ...
@Override
public void sessionDestroyed(String sessionId) {
User user = activeUsersMap.get(sessionId);
if(user != null) {
userDao.saveOrUpdate(user);
userDao.updateLastLogin(user);
  activeUsersMap.remove(sessionId);
}


super.sessionDestroyed(sessionId);
}
}
I am not sure whether this is correct solution, but it did help me.

Robert

BatiB80 wrote:
> 
> Hi Warren,
> 
> thanks for your answer. But I'm not sure how I could use this. The
> information that I need to access are stored in the session. How can I
> access a single instance of this session from the session store?
> 
> Thanks,
> Sebastian
> 

-- 
View this message in context: 
http://www.nabble.com/Get-informed-about-invalidation-of-a-session-tp16447452p16467385.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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