RE: Anybody is having problems with Wicket and Facebook Like button?

2012-07-05 Thread Dale Ogilvie
Alec, If you are running in Tomcat 7 you can add this to your web.xml to
turn off tomcat JSESSIONID in urls. Tomcat puts a jsessionid on all urls
until it receives a session cookie from the client, to cope with
cookieless clients.

session-config
tracking-modeCOOKIE/tracking-mode
/session-config

This is part of the servlet 3.0 spec.

web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns=http://java.sun.com/xml/ns/javaee;
xmlns:web=http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd;
xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd; id=WebApp_ID
version=3.0


-Original Message-
From: Alec Swan [mailto:alecs...@gmail.com] 
Sent: Friday, 6 July 2012 6:47 a.m.
To: users@wicket.apache.org
Subject: Re: Anybody is having problems with Wicket and Facebook Like
button?

Sorry for pushing this again, but this is a huge issue for us. Is
anybody having problems with Facebook Like button?

On Tue, Jul 3, 2012 at 3:34 PM, Alec Swan alecs...@gmail.com wrote:
 Hello,

 We started receiving complaints from users saying that Facebook Like 
 buttons don't work on our web site anymore. I don't know what happened

 on the Facebook side but now we are seeing the following errors when 
 user clicks Like button, e.g. on
 http://galecsy.com:88/lrm/ms/oid/74989:

 The page at 
 http://galecsy.com:88/lrm/ms/oid/../../ms/oid/74989.0;jsessionid=85C1F
 BAE4A7B21CA0FC7B8B10BB21EF1
 could not be reached.

 I read SEO - Search Engine Optimization and overwrote newWebResponse

 to remove JSESSIONID, however it looks like JSESSIONID is still being 
 added somewhere, probably Tomcat.

 I know this is not directly related to Wicket, but I am wondering how 
 other Wicket users handled interaction with Facebook Like button.

 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: Specified expiration page not being shown

2012-05-31 Thread Dale Ogilvie
After more investigation it seems that wicket 1.4.20 is not always
displaying the expired page if session expires on a form and the form
button link resolves to a url mounted using QueryStringUrlCodingStrategy

mount(new QueryStringUrlCodingStrategy(test,HomePage.class));

the relevant bit of code in WebRequestCycleProcessor is below,
requestCodingStrategy will return a target if path is not null, even if
session is dead.

// NOTE we are doing the mount check as the last item, so that it will
// only be executed when everything else fails. This enables URLs like
// /foo/bar/?wicket:bookmarkablePage=my.Page to be resolved, where
// is either a valid mount or a non-valid mount. I (Eelco) am not
// absolutely sure this is a great way to go, but it seems to have been
// established as the default way of doing things. If we ever want to
// tighten the algorithm up, it should be combined by going back to
// unmounted paths so that requests with Wicket parameters like
// 'bookmarkablePage' are always created and resolved in the same
// fashion. There is a test for this in UrlMountingTest.
if (target == null)
{
  // still null? check for a mount
  target = requestCodingStrategy.targetForRequest(requestParameters);

  if (target == null  requestParameters.getComponentPath() != null)
  {
// If the target is still null and there was a component path
// then the Page could not be located in the session
throw new PageExpiredException(
  Cannot find the rendered page in session [pagemap= +
requestParameters.getPageMapName() + ,componentPath= +
requestParameters.getComponentPath() + ,versionNumber= +
requestParameters.getVersionNumber() + ]);
  }
}

  -Original Message-
  From: Dale Ogilvie [mailto:dale_ogil...@trimble.com]
  Sent: Wednesday, 30 May 2012 9:52 a.m.
  To: users@wicket.apache.org
  Subject: Specified expiration page not being shown
 
  Hi,
 
  This is for wicket 1.4.20.
 
  In our WebApplication subclass we have used:
 
 
getApplicationSettings().setPageExpiredErrorPage(MyExpiredPage.class);
 
  However after session has expired on one of our pages, if I submit
the
 (fairly
  complex) form, the form error message is shown. By this I mean that
 page
  component validation fires and validation of an object from session
 (now
  defunct) fails and the page is redrawn with an error message in the
 feedback
  panel. The expired page IS displayed if an ajax backed combo is used
 on the
  same form, only form submission avoids the expiry page.
 
  Why might it be that our MyExpiredPage is not being shown in the
form
  submission case? We want our expired page to be displayed
 consistently.
 
  Thanks for any suggestions as to where to look for the issue.
 
  Dale
 
 
 
 
-
  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



Specified expiration page not being shown

2012-05-29 Thread Dale Ogilvie
Hi,

This is for wicket 1.4.20.

In our WebApplication subclass we have used:

getApplicationSettings().setPageExpiredErrorPage(MyExpiredPage.class);

However after session has expired on one of our pages, if I submit the
(fairly complex) form, the form error message is shown. By this I mean
that page component validation fires and validation of an object from
session (now defunct) fails and the page is redrawn with an error
message in the feedback panel. The expired page IS displayed if an ajax
backed combo is used on the same form, only form submission avoids the
expiry page.

Why might it be that our MyExpiredPage is not being shown in the form
submission case? We want our expired page to be displayed consistently. 

Thanks for any suggestions as to where to look for the issue.

Dale



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



RE: Specified expiration page not being shown

2012-05-29 Thread Dale Ogilvie
I have narrowed the behaviour that prevents our MyExpiredPage appearing
to this code below, specifically the StringEqualsValidator.

captchaToken = new
RequiredTextFieldString(captchaToken, 
new PropertyModelString(this,
captchaEntered))
{
@Override
protected final void onComponentTag(final
ComponentTag tag)
{

super.onComponentTag(tag);
// clear the field after each render
if ( captchaToken.hasErrorMessage() ) {
tag.put(value, );
}
}
};
 captchaToken.add(new StringEqualsValidator(
captcha.getAnswer() ));


public class StringEqualsValidator implements IValidatorString {
 
private final String toCompare;

public StringEqualsValidator(String str) {
toCompare = str;
}
 
@Override
public void validate(IValidatableString validatable) {
final String input = validatable.getValue();

if (StringUtils.equals(input, toCompare) == false) {
error(validatable, notequal);
}
}
 
private void error(IValidatableString validatable, String
errorKey) {
ValidationError error = new ValidationError();
error.addMessageKey(getClass().getSimpleName() + . +
errorKey);
validatable.error(error);
}
 
}

 -Original Message-
 From: Dale Ogilvie [mailto:dale_ogil...@trimble.com]
 Sent: Wednesday, 30 May 2012 9:52 a.m.
 To: users@wicket.apache.org
 Subject: Specified expiration page not being shown
 
 Hi,
 
 This is for wicket 1.4.20.
 
 In our WebApplication subclass we have used:
 
 getApplicationSettings().setPageExpiredErrorPage(MyExpiredPage.class);
 
 However after session has expired on one of our pages, if I submit the
(fairly
 complex) form, the form error message is shown. By this I mean that
page
 component validation fires and validation of an object from session
(now
 defunct) fails and the page is redrawn with an error message in the
feedback
 panel. The expired page IS displayed if an ajax backed combo is used
on the
 same form, only form submission avoids the expiry page.
 
 Why might it be that our MyExpiredPage is not being shown in the form
 submission case? We want our expired page to be displayed
consistently.
 
 Thanks for any suggestions as to where to look for the issue.
 
 Dale
 
 
 
 -
 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: Passing query string data from an expired page to the expiry page

2012-05-16 Thread Dale Ogilvie
Thanks for your suggestion. I forgot to mention our app is wicket 1.4. I
could not find the code below for RequestCycleListener. WebApplication
does not have a collection of RequestCycleListeners per 1.5, as far as I
could see.

Basically our app has branding based on a url parameter passed to each
page. The session expiry page does not receive this parameter. Ideally
we want to brand the expiry page, to do this we need the parameters from
the expired page.

Any more pointers?

 -Original Message-
 From: vineet semwal [mailto:vineetsemwal1...@gmail.com]
 Sent: Tuesday, 15 May 2012 6:44 p.m.
 To: users@wicket.apache.org
 Subject: Re: Passing query string data from an expired page to the
expiry
 page
 
 you can create a requestcyclelistener which on exception checks if
it's a
 pageexpiredexception if it's you can get client url or
requestparameters there
 from the request which you can pass to your errorpage ,just create an
 appropriate pagerquesthandler at that time .


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



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

2012-05-14 Thread Dale Ogilvie
Hi there,

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

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

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

Thanks

Dale

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



RE: deserialization - got nulll lastPage

2012-05-02 Thread Dale Ogilvie
Thanks Dan, possibly this should be downgraded from WARN.

-Original Message-
From: Dan Retzlaff [mailto:dretzl...@gmail.com] 
Sent: Thursday, 3 May 2012 4:11 a.m.
To: users@wicket.apache.org
Subject: Re: deserialization - got nulll lastPage

Hi Dale,

Wicket keeps the most recent page from each session in a deserialized
state, in addition to writing it to disk. This is an optimization since
most requests interact with only the most recent page. After restart,
these deserialized pages will not be available, forcing Wicket to
restore the page from disk. It's not really an error, and as you've
observed should not affect the user.

I don't have the code with me to verify this explanation, but I'm pretty
sure this is correct.

Dan

On Tue, May 1, 2012 at 5:19 PM, Dale Ogilvie
dale_ogil...@trimble.comwrote:

 What does this warning from our wicket 1.4.20 app signify?

 WARN org.apache.wicket.protocol.http.SecondLevelCacheSessionStore
 PageMap deserialization - got nulll lastPage

 It seems to occur in a couple of situations:

 a) when the application is reloaded due to a web.xml change
 b) when restarting the tomcat instance

 nothing out of the ordinary is being done here, just re-loading the
app.

 Thanks

 Dale


 -
 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



deserialization - got nulll lastPage

2012-05-01 Thread Dale Ogilvie
What does this warning from our wicket 1.4.20 app signify?

WARN org.apache.wicket.protocol.http.SecondLevelCacheSessionStore
PageMap deserialization - got nulll lastPage

It seems to occur in a couple of situations:

a) when the application is reloaded due to a web.xml change
b) when restarting the tomcat instance

nothing out of the ordinary is being done here, just re-loading the app.

Thanks

Dale


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



StyleSheetReference change between 1.4.19 and 1.4.20

2012-03-22 Thread Dale Ogilvie
Hi there,

 

We had code using 1.4.19 for style sheet references:

 

add(new StyleSheetReference(stylesheet_popup, Register.class,
/nz/co/acme/accounts/styles/popup.css));

 

Upgrading to 1.4.20 we had to modify our references to remove the
leading slash:

 

add(new StyleSheetReference(stylesheet_popup, Register.class,
nz/co/acme/accounts/styles/popup.css));

 

What is behind this change? Was it intentional?

 

Thanks

 

Dale

 



RE: Getting new lines in RepeatingView

2012-02-27 Thread Dale Ogilvie
Using an override of RepeatView, I get better output. The only slight
imperfection being that each individual row does not take it's starting
cue from the position of the repeated element. I can live with that.

i.e. output now has the first element positioned per the template, the
remainder are left justified:

ul
lihello/li
ligoodbye/li
ligood morning/li
/ul


public class NewLineRepeatingView extends RepeatingView {

private static final long serialVersionUID = 1L;

public NewLineRepeatingView(String id) {
super(id);
}

public NewLineRepeatingView(String id, IModel? model) {
super(id, model);
}

@Override
protected void renderChild(Component child) {
super.renderChild(child);
getResponse().write(\n);
}

}


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



Getting new lines in RepeatingView

2012-02-23 Thread Dale Ogilvie
Hi,

 

From the docs:

 

Java:

 

RepeatingView view = new RepeatingView(repeater);

view.add(new Label(view.newChildId(), hello));

view.add(new Label(view.newChildId(), goodbye));

view.add(new Label(view.newChildId(), good morning));

add(view);

 

Markup:

 

  ul

  li wicket:id=repeater/li

  /ul

 

Yields:

 

  ul

  lihello/liligoodbye/liligood morning/li

  /ul

 

I want to have a new line after each repeating element. The generated
markup looks pretty messy with one massive long line making up all the
repeated elements.

 

Desired:

 

  ul

  lihello/li

  ligoodbye/li

  ligood morning/li

  /ul

 

How can I achieve this?

 

Thanks!

 

Dale

 



Location of css and js files

2009-12-20 Thread Dale Ogilvie

Hello,

For html page markup containing style and javascript, what is the best
practice for positioning the css and js files, so that they are
available both at design time, and at run time?

I want the designer to be able to see the markup in full glory, while
still having this translate properly at run-time.

I'm thinking of an html file such as:

html
head
link rel='stylesheet' href='style.css' type='text/css'
script type=text/javascript src=javascript.js/script
/head
body
p class=pretty onclick=doit();Hello world/p
/body
/html

If this markup is alongside the java source, that would imply that the
css and js would also have to be there. But tradition would have these
files under a sub directory like so:

...
link rel='stylesheet' href='/style/style.css' type='text/css'
script type=text/javascript src=/js/javascript.js/script
...

What is the wicket way?

Thanks!

Dale

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



RE: Location of css and js files

2009-12-20 Thread Dale Ogilvie

Thanks Igor.

So having your css and js collected off under another path is not the
wicket way?

Are you saying the following for best-practice:

com/acme/myweb
 HelloWorldPage.java
 HelloWorldPage.html
 style.css
 Javascript.js

What about images used by the css? Would these live alongside the
style.css as well?


-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Sent: Monday, 21 December 2009 4:23 p.m.
To: users@wicket.apache.org
Subject: Re: Location of css and js files

head
wicket:link
link rel='stylesheet' href='style.css' type='text/css' script
type=text/javascript src=javascript.js/script /wicket:link
/head

and have the files in the same package as the page

-igor

On Sun, Dec 20, 2009 at 7:21 PM, Dale Ogilvie
dale.ogil...@trimble.co.nz wrote:

 Hello,

 For html page markup containing style and javascript, what is the best

 practice for positioning the css and js files, so that they are 
 available both at design time, and at run time?

 I want the designer to be able to see the markup in full glory, while 
 still having this translate properly at run-time.

 I'm thinking of an html file such as:

 html
 head
 link rel='stylesheet' href='style.css' type='text/css' script 
 type=text/javascript src=javascript.js/script /head body p

 class=pretty onclick=doit();Hello world/p /body /html

 If this markup is alongside the java source, that would imply that the

 css and js would also have to be there. But tradition would have these

 files under a sub directory like so:

 ...
 link rel='stylesheet' href='/style/style.css' type='text/css' 
 script type=text/javascript src=/js/javascript.js/script ...

 What is the wicket way?

 Thanks!

 Dale

 -
 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: Location of css and js files

2009-12-20 Thread Dale Ogilvie
 
Hi Alex,

I'm after best practice for css/img and js locations. 

I know there are many ways to do something, I'm after a recommendation
as to what is the best way to do this in wicket. 

The way that allows the html markup to be opened by the web designer
showing the same page view that appears at runtime.

Thanks

Dale


-Original Message-
From: Alex Rass [mailto:a...@itbsllc.com] 
Sent: Monday, 21 December 2009 5:03 p.m.
To: users@wicket.apache.org
Subject: RE: Location of css and js files

Global resources you can reference globally. Use can use the
non-wicket links. Container hosts folders you can use.

Idea behind this is to use components which are fully contained. Hence
(all in one place).  If this doesn't suit you - there are bunch of
tutorials on how to load resources from elsewhere.

- Alex

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



RE: MarkupnotFoundException in eclipse 3.4.2

2009-08-17 Thread Dale Ogilvie
 
Thanks, that worked. 

I wonder why this isn't automatically set up in the quickstart?

-Original Message-
From: jWeekend [mailto:jweekend_for...@cabouge.com] 
Sent: Tuesday, 18 August 2009 5:25 a.m.
To: users@wicket.apache.org
Subject: Re: MarkupnotFoundException in eclipse 3.4.2


The quick fix is:
  in Project Properties/Java Build Path/Source) set Included: *.* (and
make sure *.html is not Excluded) for the folder your html is in, most
likely src/main/java if you keep your templates next to your Java source
files.

Regards - Cemal
jWeekend
OO  Java Technologies, Wicket Training and Development
http://jWeekend.com


dale77 wrote:
 
 Eclipse is not copying the .html file alongside the .class. But the 
 Java
 | Compiler | Output Folder | Filtered Resources is only *.launch. How 
 | do
 I make eclipse copy the html file next to the class?

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



MarkupnotFoundException in eclipse 3.4.2

2009-08-16 Thread Dale Ogilvie
Hello,

The quickstart is proving anything but. I run quickstart:

mvn archetype:create -DarchetypeGroupId=org.apache.wicket
-DarchetypeArtifactId=wicket-archetype-quickstart
-DarchetypeVersion=1.4.0 -DgroupId=nz.co.acme -DartifactId=myproject

Then generate and eclipse project:

mvn eclipse:eclipse -DdownloadSources=true

Then I import the project into eclipse, leaving copy into workspace
unchecked, and Run As Junit test on TestHomePage.java...

Markup of type 'html' for component 'nz.co.acme.HomePage' not found.
Enable debug messages for org.apache.wicket.util.resource to get a list
of all filenames tried.: [Page class = nz.co.acme.HomePage, id = 0,
version = 0] org.apache.wicket.markup.MarkupNotFoundException: Markup of
type 'html' for component 'nz.co.acme.HomePage' not found.

Eclipse is not copying the .html file alongside the .class. But the Java
| Compiler | Output Folder | Filtered Resources is only *.launch. How do
I make eclipse copy the html file next to the class?

No doubt there is a simple explanation, but I'm not seeing it. Can
anyone help me out?

Thanks

Dale


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