Re: Efficiency of 1.5 MountMapper weighted/matching algorithm

2011-10-15 Thread Jeremy Thomerson
On Sat, Oct 15, 2011 at 8:28 PM, Chris Colman
wrote:

> Obviously this isn’t a problem during debug with a single user but when
> 1000s of pages need to be rendered each minute the time spent performing the
> above operations may become significant. I haven’t done any benchmark
> testing but from experience, the frequenct allocation and compiling of
> collections and sorting can get CPU expensive and switching to a caching
> alternative usually leads to significant performance improvements.
>
>
It'd definitely be worth optimizing if we can prove it's a bottle-neck.  But
we try to avoid premature optimization.  Can you put together some numbers
to see what kind of processing load we're talking about?  I'd be interested
in seeing % of overall processing time under load.  Something like "with X
clients browsing Y pages per minute, each page render took an average R
milliseconds, and Z milliseconds of this was in creating link URLs".  Or
something like that.

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


Efficiency of 1.5 MountMapper weighted/matching algorithm

2011-10-15 Thread Chris Colman
While debugging a problem during our migration from 1.4 to 1.5 I noticed
that for each bookmarkable page link that we created quite an extensive
set of operations occurs:
 
We have pages that can have 20-40 links to bookmarkable pages. We also
have about 40 different page classes, each mounted with a different
path.
 
What I noticed was that when each BookmarkablePageLink was established
the following occurred:
 
Every mounted page was compared with the URL of the link - this involved
many URL segment comparisons
A matching score/weight was associated with each mounted page.
The score/page pairs were added to a collection.
After all mounted pages were evaluated the collection was then sorted.
The page with the best match is then used for further processing of the
BookmarkablePageLink.
 
Given the number of links we have on each page and the number of page
classes we have mounted and the processor intensive work in performing
the above steps I was wondering if the information collected above could
be cached to avoid performing all of the above steps each time a
BookmarkablePageLink is created.
 
Obviously this isn't a problem during debug with a single user but when
1000s of pages need to be rendered each minute the time spent performing
the above operations may become significant. I haven't done any
benchmark testing but from experience, the frequenct allocation and
compiling of collections and sorting can get CPU expensive and switching
to a caching alternative usually leads to significant performance
improvements.
 
Yours sincerely,
 
Chris Colman
 
Pagebloom Team Leader,
Step Ahead Software

 
pagebloom - your business & your website growing together
 
Sydney: (+61 2) 9656 1278 Canberra: (+61 2) 6100 2120 
Email: chr...@stepahead.com.au  
Website:
http://www.pagebloom.com http://www.pagebloom.com/> 
http://develop.stepaheadsoftware.com
http://develop.stepaheadsoftware.com/> 
 


Re: HTML within the feedback panel message

2011-10-15 Thread Igor Vaynberg
panel.setescapemodelstrings(false)

-igor

On Sat, Oct 15, 2011 at 12:51 PM, Arjun Dhar  wrote:
> I want the String to be unescaped so I can add CSS to certain *parts* of the
> feedback message. Like Highlight an area in the error message etc.
>
> -
> Software documentation is like sex: when it is good, it is very, very good; 
> and when it is bad, it is still better than nothing!
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/HTML-within-the-feedback-panel-message-tp3908134p3908134.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



HTML within the feedback panel message

2011-10-15 Thread Arjun Dhar
I want the String to be unescaped so I can add CSS to certain *parts* of the
feedback message. Like Highlight an area in the error message etc.

-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/HTML-within-the-feedback-panel-message-tp3908134p3908134.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: ListChoice and it's renderer

2011-10-15 Thread hsteisjo
Great thanks, exactly what I was looking for.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ListChoice-and-it-s-renderer-tp3906100p3908065.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Can not locate error messages from property messages

2011-10-15 Thread Andrea Del Bene

Hi,

are you sure that code

 'getClass().getSimpleName() + "." + errorKey'

generates a valid key bundle?

Hi;

I am using a really simple property file, to display some validation errors,
it used to work fine, but it stopped working, now I can't even get the
simplest example to work. and I am receiving an Could not locate error
message for component:


Here's the code that I am using(directly from cookbook), and I have
PasswordPolicyValidator.properties file in the same folder
package cookbook;

import java.util.regex.Pattern;

import org.apache.wicket.validation.IValidatable;
import org.apache.wicket.validation.IValidator;
import org.apache.wicket.validation.ValidationError;

public class PasswordPolicyValidator implements IValidator  {

private static final Pattern UPPER = Pattern.compile("[A-Z]");
private static final Pattern LOWER = Pattern.compile("[a-z]");
private static final Pattern NUMBER = Pattern.compile("[0-9]");

public void validate(IValidatable  validatable) {
final String password = validatable.getValue();

if (!NUMBER.matcher(password).find()) {
error(validatable, "no-digit");
}

if (!LOWER.matcher(password).find()) {
error(validatable, "no-lower");
}

if (!UPPER.matcher(password).find()) {
error(validatable, "no-upper");
}
}

private void error(IValidatable  validatable, String errorKey) {
ValidationError error = new ValidationError();
error.addMessageKey(getClass().getSimpleName() + "." + errorKey);
validatable.error(error);
}

}

PasswordPolicyValidator.no-digit=${label} must contain at least one digit
PasswordPolicyValidator.no-lower=${label} must contain at least one lower
case letter
PasswordPolicyValidator.no-upper=${label} must contain at least one upper
case letter

Erinc




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



Re: ListChoice and it's renderer

2011-10-15 Thread Andrea Del Bene

Hi,

take a look at method AbstractChoice.appendOptionHtml. You can override 
it and manipulate the HTML as you desire.

Hi All,

I want to extend a simple listchoice component to also include a "title"
attribute in the generated html code. So basically I want the  tag
to be generated like this:

User display

Can anyone give me some input on where I can add this feature to an existing
ListChoice or the IChoiceRenderer.

Thanks




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



Re: UTF-8 not working

2011-10-15 Thread Mathias Nilsson
Oh, And I've also tried putting
org.springframework.web.filter.CharacterEncodingFilter as the first filter

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/UTF-8-not-working-tp3906237p3907047.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: UTF-8 not working

2011-10-15 Thread Mathias Nilsson
This is my web.xml. Still does not work



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_2_5.xsd";
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
id="media-server" version="2.5">

media-server


contextConfigLocation
classpath:applicationContext.xml


log4jConfigLocation
classpath:log4j.xml


configuration
development



webAppRootKey
media-server


encodingFilter

org.springframework.web.filter.CharacterEncodingFilter

encoding
UTF-8


forceEncoding
true



Spring OpenEntityManagerInViewFilter


org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter



Spring OpenEntityManagerInViewFilter
/*


encodingFilter
/*


wicket.media

org.apache.wicket.protocol.http.WicketFilter

applicationClassName

se.fototext.media.server.web.application.MediaApplication




wicket.media
/*



org.springframework.web.context.ContextLoaderListener


CXFServlet

org.apache.cxf.transport.servlet.CXFServlet


CXFServlet
/services/*




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/UTF-8-not-working-tp3906237p3907026.html
Sent from the Users forum mailing list archive at Nabble.com.

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