Re: Validating in form returns always error but textfield has a value

2011-10-18 Thread rawe
Here are some code snippets.

When clicking on a tree node I validate the form..
If no errors I update the form component models.
The class MyMutableTreeNode extends DefaultMutableTreeNode.
Each node references an own panel component.
getNodeEntryDetail() returns the panel referenced by the node.

Where is the difference to a SubmitLink call. If calling SubmitLink
validation works fine and input values of the textfields in panel are
filled.
When calling validate() programmatic the input values are null.

??



ralph

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Validating-in-form-returns-always-error-but-textfield-has-a-value-tp3912361p3914396.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: Efficiency of 1.5 MountMapper weighted/matching algorithm

2011-10-18 Thread Erik van Oosten

 I realize it may not be a hotspot but, intuitively at least, it sounds like 
 your new caching improvement will help reduce CPU load. It should also reduce 
 the workload of the garbage collector by not having, in the above example, 
 2800 objects allocated and then dereferenced with every page render.


Don't trust intuition, measure. CPUs and garbage collectors behave different 
then you might think.

Introducing caching means introducing thread collaboration. Any synchronisation 
on modern cpus quickly take more time then any business processing you can 
program. In addition, short lived object cost nothing. The gc can easily handle 
millions per second.

In other words: don't add caching unless you are willing to measure the 
throughput gains (on the intended target systems).

Regards,
 Erik.

--
Erik van Oosten
http://day-to-day-stuff.blogspot.com

Op 17 okt. 2011, om 22:06 heeft Chris Colman het volgende geschreven:

 We have already discussed this problem before.
 I agree that caching will improve the performance and I'll try to
 implement it soon.
 
 Cool!
 
 Topicus' (Martijn's daily job) biggest application have ~ 700 mounted
 pages and this code is not a hotspot for them, that's why no one spend
 time on optimizing it so far.
 
 Wow that's big! If you had a variety of main and side bar menus on each page 
 that had links to say 40 or so Bookmarkable pages that would mean each page 
 render would result in building 40 weight/mount pair collections, each with 
 700 entries - and then throwing them away after each bookmarkable page link 
 has been created.
 
 I realize it may not be a hotspot but, intuitively at least, it sounds like 
 your new caching improvement will help reduce CPU load. It should also reduce 
 the workload of the garbage collector by not having, in the above example, 
 2800 objects allocated and then dereferenced with every page render.
 
 
 On Sun, Oct 16, 2011 at 1:27 PM, Chris Colman
 chr...@stepaheadsoftware.com wrote:
 I'll try to get some time to build a test to get some timings.
 
 -Original Message-
 From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
 Sent: Sunday, 16 October 2011 11:55 AM
 To: users@wicket.apache.org
 Subject: Re: Efficiency of 1.5 MountMapper weighted/matching algorithm
 
 On Sat, Oct 15, 2011 at 8:28 PM, Chris Colman
 chr...@stepaheadsoftware.comwrote:
 
 Obviously this isn't a problem during debug with a single user but
 when
 1000s of pages need to be rendered each minute the time spent
 performing
 the
 above operations may become significant. I haven't done any benchmark
 testing but from experience, the frequenct allocation and compiling
 of
 collections and sorting can get CPU expensive and switching to a
 caching
 alternative usually leads to significant performance
 improvements.
 
 
 It'd definitely be worth optimizing if we can prove it's a bottle-neck.
 But
 we try to avoid premature optimization.  Can you put together some
 numbers
 to see what kind of processing load we're talking about?  I'd be
 interested
 in seeing % of overall processing time under load.  Something like
 with X
 clients browsing Y pages per minute, each page render took an average R
 milliseconds, and Z milliseconds of this was in creating link URLs.
 Or
 something like that.
 
 --
 Jeremy Thomerson
 http://wickettraining.com
 *Need a CMS for Wicket?  Use Brix! http://brixcms.org*
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



wicket + jasper reports

2011-10-18 Thread Paul Szulc
Hi,

my recent webapp is supposed to generate PDF reports. Because I don't know
much about JasperReports, I've outsourced the functionality to a
freelancer.
He created separate module (jar) that provides desired functionality.

Part of maven structure of my project looks like this:

- ngo
   | ngo.pdf
  | src
  | resources
 | DOCOferta.jrxml
   | ngo.webapp

where ngo.pdf is this outsourced functionality and ngo.webapp is Wicket
webapplication.

Now the problem. Freelancer created this piece of code:

 public InputStream generate() throws GenerationException {
MapString, Object parameters = new HashMapString, Object();
// here parameters

JRProperties.setProperty(net.sf.jasperreports.default.pdf.encoding,
UTF8);
try {
URL resource =
getClass().getClassLoader().getResource(DOCOferta.jrxml);
InputStream inputStream = resource.openStream();
JasperDesign design = JRXmlLoader.load(inputStream);

This code works great when run in tests of ngo.pdf but when I try to run
generate() method from Wicket (as part of ResourceLink) I get
NullPointerException at

InputStream inputStream = resource.openStream();

So I get that that the resource DOCOferta.jrxml is not found. But the
question remains, how to get this work?

 What should I do to achieve this result:
- generate() will not throw NPE, it will generate pdf report [A MUST :)]
- all resources needed to create PDF (all the *.jrxml files) stay inside
inside ngo.pdf jar (inside the resource folder) [DESIRABLE]

I will appreciate any form of help.

Best regards,
Paul Szulc


RE: wicket + jasper reports

2011-10-18 Thread Wilhelmsen Tor Iver
URL resource =
getClass().getClassLoader().getResource(DOCOferta.jrxml);

An aside: This is the equivalent to getClass().getResource(/DOCOferta.jrxml); 
i.e. a resource on the classpath root.

Check your projects to see if the file is in the correct location to be 
included at runtime. If it works in tests but not otherwise, it can seem that 
the file is located in a project's src/test/resources (if you use Maven) 
instead of src/main/resources.

- Tor Iver


Re: wicket + jasper reports

2011-10-18 Thread Paul Szulc
Ok, to clarify:

1. DOCOferta.jrxml lies inside ngo.pdf module folder src/main/resources
2. When I run generate method inside of ngo.pdf modules all works fine, but
when I try to use it in webapplication (separate, differnet maven module) I
get this NPE. I know the issue is because probably different classloader is
used then the one it should, but I do not know how to fix this issue.
3. In other words, application is not able to get to resources defined in
different module (different jar).


On Tue, Oct 18, 2011 at 9:41 AM, Wilhelmsen Tor Iver toriv...@arrive.nowrote:

 URL resource =
 getClass().getClassLoader().getResource(DOCOferta.jrxml);

 An aside: This is the equivalent to
 getClass().getResource(/DOCOferta.jrxml); i.e. a resource on the classpath
 root.

 Check your projects to see if the file is in the correct location to be
 included at runtime. If it works in tests but not otherwise, it can seem
 that the file is located in a project's src/test/resources (if you use
 Maven) instead of src/main/resources.

 - Tor Iver




-- 
Best regards,
Paul Szulc

http://www.paulszulc.com


Re: wicket + jasper reports

2011-10-18 Thread Paul Szulc
yeah, ok, my bad

resources where under src/main/resource not src/main/resource*s*
*
*
thx Tor


Re: Using SubmitLink as a tree node ?

2011-10-18 Thread Martin Grigorov
You need to override
org.apache.wicket.markup.html.tree.BaseTree.newLink(String,
ILinkCallback)

On Tue, Oct 18, 2011 at 10:00 AM, rawe ralph.wey...@dachser.com wrote:
 I'm using a Tree with LinkTree components for the nodes.
 Is there a way to use SubmitLink instead of LinkTree components for the tree
 nodes ??
 My intention is to call a form submit each time when changing a node in the
 tree.

 Thanks for hints!

 Ralph

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Using-SubmitLink-as-a-tree-node-tp3914407p3914407.html
 Sent from the Users forum mailing list archive at Nabble.com.

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





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

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



Re: Validating in form returns always error but textfield has a value

2011-10-18 Thread manuelbarzi
at which point are you pretending to call validate, what logic fires
it? see no code

if defaultFormProcessing is true (default) on submitting components,
then all validation and form updating is executed automatically.


On Tue, Oct 18, 2011 at 8:52 AM, rawe ralph.wey...@dachser.com wrote:
 Here are some code snippets.

 When clicking on a tree node I validate the form..
 If no errors I update the form component models.
 The class MyMutableTreeNode extends DefaultMutableTreeNode.
 Each node references an own panel component.
 getNodeEntryDetail() returns the panel referenced by the node.

 Where is the difference to a SubmitLink call. If calling SubmitLink
 validation works fine and input values of the textfields in panel are
 filled.
 When calling validate() programmatic the input values are null.

 ??



 ralph

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Validating-in-form-returns-always-error-but-textfield-has-a-value-tp3912361p3914396.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



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



Re: Using SubmitLink as a tree node ?

2011-10-18 Thread rawe
Hi Martin,

thank you! This was the helping hint!
works perfectly!

Ralph

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-SubmitLink-as-a-tree-node-tp3914407p3914691.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: Validating in form returns always error but textfield has a value

2011-10-18 Thread rawe
Yes, I'm using the form default setting (DefaultFormProcessing = true).
But for form processing you have to use a submit button or a SubmitLink or
you can call the form validate() method programmatic.

See also Wicket API Doc of Form: (
http://wicket.apache.org/apidocs/1.4/org/apache/wicket/markup/html/form/Form.html
Wicket API Doc )
/If you want you can call validate() to execute form validation, hasError()
to find out whether validate() resulted in validation errors, and
updateFormComponentModels() to update the models of nested form
components./

the first two are working perfect, but not the programmatic way.
Nevertheless I found a solution for my problem. I'm using a SubmitLink in my
LinkTree component.
For that I had to override the newLink() method of LinkTree.


see also the thread: 
http://apache-wicket.1842946.n4.nabble.com/Using-SubmitLink-as-a-tree-node-tc3914407.html
SubmitLink in BaseTree 

Thanks for your hints!

Ralph

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Validating-in-form-returns-always-error-but-textfield-has-a-value-tp3912361p3914717.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: Validating in form returns always error but textfield has a value

2011-10-18 Thread manuelbarzi
 See also Wicket API Doc of Form: (
 http://wicket.apache.org/apidocs/1.4/org/apache/wicket/markup/html/form/Form.html
 Wicket API Doc )
 /If you want you can call validate() to execute form validation, hasError()
 to find out whether validate() resulted in validation errors, and
 updateFormComponentModels() to update the models of nested form
 components./

 the first two are working perfect, but not the programmatic way.

this already well-known form procedure would work if you were
submitting the form with a component implementing the
IFormSubmittingComponent interface.

 Nevertheless I found a solution for my problem. I'm using a SubmitLink in my
 LinkTree component.
 For that I had to override the newLink() method of LinkTree.

by default BaseTree.newLink is providing Link or AjaxLink, which
doesn't implement IFormSubmittingComponent, required for a component
that is able to submit a form. so, as guessed before, you were not
submitting the form each time you were clicking on each tree node.
now, using SubmitLink, it works, as it implements the mentioned
interface. got it?

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



Re: Validating in form returns always error but textfield has a value

2011-10-18 Thread rawe
Got it !
Thank you!

Ralph

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Validating-in-form-returns-always-error-but-textfield-has-a-value-tp3912361p3914841.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



wicket - form debug

2011-10-18 Thread nazeem
I have simple case, which worked for me in another project but failed in the
current one. Both use same set of libraries. I am doing something wrong,
could not trace it down. Please help to debug this.

I am designing a reusable form  textfield component, which will have
provision to show feedback beneath each text field and so on. The problem I
am facing is, MyTextField is a border which in turn contains TextField, this
text field is set as required = true, when i submit the form, onSubmit from
the submit button gets called instead of onError. 

But if I add a plain raw textfield directly to MyFormBorder it works as
expected, i.e onError is called when no value is entered. 

How do I debug this problem ? Please assist. I am using wicket 1.4.19

Code Below


public class MyFormBorder extends Border {

FeedbackPanel fbp;
Form form;

public MyFormBorder(String id, IModel model) {
super(id);
fbp = new FeedbackPanel(feedback);
fbp.setOutputMarkupId(true);
add(fbp);

form = new Form(form, model);
form.add(getBodyContainer());
add(form);
}

public void onError(AjaxRequestTarget target, Form form) {
if(form.hasFeedbackMessage()) {

fbp.info(form.getFeedbackMessage().getMessage().toString());
}
target.addComponent(fbp);
}

public Form getForm() {
return form;
}
}


Html
-
wicket:border
div wicket:id=feedback/div
form wicket:id=form class=form
wicket:body/
/form
/wicket:border


TextField
-
public class MyTextField extends Border {

ComponentFeedbackPanel cfbp;
TextField textField;
WebMarkupContainer cntr = new WebMarkupContainer(cntr);

public MyTextField(String id, String label, IModel model, boolean 
required)
{
super(id);
cntr.setOutputMarkupId(true);
cntr.add(new Label(label, label));

textField = new TextField(textfield, model);
textField.setLabel(new Model(label));
textField.setRequired(required);
cntr.add(textField);

cfbp = new ComponentFeedbackPanel(cfbp, textField);
cfbp.setOutputMarkupId(true);
cfbp.setVisible(false);
cntr.add(cfbp);

cntr.add(getBodyContainer());
add(cntr);
}


}

HTML
-
wicket:border
div wicket:id=cntr class=type-text
strong wicket:id=cfbp class=message/strong
label for= wicket:id=label/label
input wicket:id=textfield style= type=text/input
wicket:body/
wicket:child/
/div
/wicket:border


I am using these myformborder  mytextfield as below

Menu menu = new Menu();

MyFormBorder myFormBorder = new MyFormBorder(ffborder, new Model(menu));

MyTextField ftf = new MyTextField(name, Menu Name, new
PropertyModel(menu, name), true);
myFormBorder.add(ftf);

// Without the following textfield getting directly added, onError is not
called for the above text field 
TextField tf = new TextField(desc, new PropertyModel(menu,
description));
tf.setRequired(true);
forceFormBorder.add(tf);

AjaxSubmitButton submit = new AjaxSubmitButton(submit,
forceFormBorder.getForm()) {

@Override
protected void onSubmit(AjaxRequestTarget arg0, Form? arg1) {
System.out.println(onSubmit...);
}

@Override
protected void onError(AjaxRequestTarget target, Form? form) {
System.out.println(onError...);
}
};
forceFormBorder.add(submit);
add(forceFormBorder);

HTML
-
div wicket:id=ffborder
div wicket:id=name/div
input type=text wicket:id=desc/
 # Submit 
/div



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



Nested Forms in 1.4.x - order of calling onSubmit

2011-10-18 Thread Bruno Borges
After playing with Nested Forms in WIcket 1.4.18, I found out that the
onSubmit method of these forms is called at the end of the process.

If a parent form has a button and this button is submited, its onSubmit
method is called before anything.
Then, parent form's onSubmit method is called.
Then, it will navigate through all nested forms calling their onSubmit
method.
The problem is that I have a nested forms that changes a value in the model
that is associated with the parent form.

My usecase has an AddressPanel with a form inside that manipulates the
person.address object. This panel is created by informing two
IModelAddress objects.
One is to be used as the Person's address. The other one is to be used as
copy of, because of a CheckBox that states Use the same address as of
account holder.

On its onSubmit method, is where I clone the account holder address to the
actual person.address.

But because of the order of how Wicket calls onSubmit methods, this
implementation fails.

Any suggestion?

Should Wicket call all nested forms' onSubmit methods before calling the
Button's onSubmit (or the parent form onSubmit) ?

Thanks,

*Bruno Borges*
(21) 7672-7099
*www.brunoborges.com*


UrlRenderer [1.5]: Why is absolute of relative Url ending with a [dot]?

2011-10-18 Thread Per Newgro

Hi,

i try to add a sitemap for my app. When i add the loc node in 
sitemap-url this way to my ListView

code
item.add(new Label(locNode, 
RequestCycle.get().getUrlRenderer().renderFullUrl(Url.parse(String.valueOf(urlFor(homePageClass, 
homePageParameters));

/code

the generate xml looks like this
code
lochttp://localhost:8080/./loc
/code

I've debugged the code but don't get a real clue why this is adding a 
dot in relative url processing.


Can someone please give me a hint?
Thanks
Per

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



Weblogic deployment

2011-10-18 Thread Wolfgang Schreiner
Hi all,
 
I am having problems deploying my web application on Weblogic 10.3.2. 
Everything works fine on 10.3.5 but I am running into the following 
exception when deploying on 10.3.2 - see below
 
How can I resolve this? And when and where is wicket.properties loaded? 
Can't find references in the sources ...
 
Thanks!
 
 
18.10.2011 14:17 Uhr MESZ Error HTTP BEA-101165 Could not load 
user def
ined filter in web.xml: org.apache.wicket.protocol.http.WicketFilter.
org.apache.wicket.WicketRuntimeException: java.net.URISyntaxException: 
Illegal c
haracter in opaque part at index 16: zip:C:/Documents and 
Settings/schrewo3/Orac
le/Middleware/user_projects/domains/test1/servers/AdminServer/tmp/_WL_user/edoc-
web/11vfn0/war/WEB-INF/lib/wicket-core-1.5.0.jar!/wicket.properties
at 
org.apache.wicket.application.AbstractClassResolver.getResources(Abst
ractClassResolver.java:156)
at 
org.apache.wicket.Application.initializeComponents(Application.java:4
90)
at 
org.apache.wicket.Application.initApplication(Application.java:806)
at 
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:3
46)
at 
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:2
86)
Truncated. see log file for complete stacktrace
Caused By: java.net.URISyntaxException: Illegal character in opaque part 
at inde
x 16: zip:C:/Documents and 
Settings/schrewo3/Oracle/Middleware/user_projects/dom
ains/test1/servers/AdminServer/tmp/_WL_user/edoc-web/11vfn0/war/WEB-INF/lib/wick
et-core-1.5.0.jar!/wicket.properties
at java.net.URI$Parser.fail(URI.java:2809)
at java.net.URI$Parser.checkChars(URI.java:2982)
at java.net.URI$Parser.parse(URI.java:3019)
at java.net.URI.init(URI.java:578)
at java.net.URL.toURI(URL.java:918)
Truncated. see log file for complete stacktrace

Re: UrlRenderer [1.5]: Why is absolute of relative Url ending with a [dot]?

2011-10-18 Thread manuelbarzi
Component.urlFor  - calls - RequestCycle.urlFor - calls -
UrlRenderer.renderUrl - if relative url, calls -
UrlRenderer.renderRelativeUrl - which may append / return the
misterious .
.


On Tue, Oct 18, 2011 at 2:50 PM, Per Newgro per.new...@gmx.ch wrote:
 Hi,

 i try to add a sitemap for my app. When i add the loc node in sitemap-url
 this way to my ListView
 code
 item.add(new Label(locNode,
 RequestCycle.get().getUrlRenderer().renderFullUrl(Url.parse(String.valueOf(urlFor(homePageClass,
 homePageParameters));
 /code

 the generate xml looks like this
 code
 lochttp://localhost:8080/./loc
 /code

 I've debugged the code but don't get a real clue why this is adding a dot in
 relative url processing.

 Can someone please give me a hint?
 Thanks
 Per

 -
 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: UrlRenderer [1.5]: Why is absolute of relative Url ending with a [dot]?

2011-10-18 Thread Per Newgro

Thanks for reply manuel,

sorry for being not clear on this. While debugging i've found that already.
But why is this . be set. That's not clear to me.

Per

Am 18.10.2011 15:47, schrieb manuelbarzi:

Component.urlFor  - calls -  RequestCycle.urlFor - calls -
UrlRenderer.renderUrl - if relative url, calls -
UrlRenderer.renderRelativeUrl -  which may append / return the
misterious .
.


On Tue, Oct 18, 2011 at 2:50 PM, Per Newgroper.new...@gmx.ch  wrote:

Hi,

i try to add a sitemap for my app. When i add the loc node in sitemap-url
this way to my ListView
code
item.add(new Label(locNode,
RequestCycle.get().getUrlRenderer().renderFullUrl(Url.parse(String.valueOf(urlFor(homePageClass,
homePageParameters));
/code

the generate xml looks like this
code
lochttp://localhost:8080/./loc
/code

I've debugged the code but don't get a real clue why this is adding a dot in
relative url processing.

Can someone please give me a hint?
Thanks
Per

-
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: Weblogic deployment

2011-10-18 Thread manuelbarzi
Application.initializeComponents()

may you try running wl in non-blank-spaces path? (zip:C:/Documents[16
charater here])...)
.



On Tue, Oct 18, 2011 at 3:31 PM, Wolfgang Schreiner wschrei...@csc.com wrote:
 Hi all,

 I am having problems deploying my web application on Weblogic 10.3.2.
 Everything works fine on 10.3.5 but I am running into the following
 exception when deploying on 10.3.2 - see below

 How can I resolve this? And when and where is wicket.properties loaded?
 Can't find references in the sources ...

 Thanks!


 18.10.2011 14:17 Uhr MESZ Error HTTP BEA-101165 Could not load
 user def
 ined filter in web.xml: org.apache.wicket.protocol.http.WicketFilter.
 org.apache.wicket.WicketRuntimeException: java.net.URISyntaxException:
 Illegal c
 haracter in opaque part at index 16: zip:C:/Documents and
 Settings/schrewo3/Orac
 le/Middleware/user_projects/domains/test1/servers/AdminServer/tmp/_WL_user/edoc-
 web/11vfn0/war/WEB-INF/lib/wicket-core-1.5.0.jar!/wicket.properties
        at
 org.apache.wicket.application.AbstractClassResolver.getResources(Abst
 ractClassResolver.java:156)
        at
 org.apache.wicket.Application.initializeComponents(Application.java:4
 90)
        at
 org.apache.wicket.Application.initApplication(Application.java:806)
        at
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:3
 46)
        at
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:2
 86)
        Truncated. see log file for complete stacktrace
 Caused By: java.net.URISyntaxException: Illegal character in opaque part
 at inde
 x 16: zip:C:/Documents and
 Settings/schrewo3/Oracle/Middleware/user_projects/dom
 ains/test1/servers/AdminServer/tmp/_WL_user/edoc-web/11vfn0/war/WEB-INF/lib/wick
 et-core-1.5.0.jar!/wicket.properties
        at java.net.URI$Parser.fail(URI.java:2809)
        at java.net.URI$Parser.checkChars(URI.java:2982)
        at java.net.URI$Parser.parse(URI.java:3019)
        at java.net.URI.init(URI.java:578)
        at java.net.URL.toURI(URL.java:918)
        Truncated. see log file for complete stacktrace

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



Re: UrlRenderer [1.5]: Why is absolute of relative Url ending with a [dot]?

2011-10-18 Thread manuelbarzi
Matej, Igor?
.



On Tue, Oct 18, 2011 at 3:57 PM, Per Newgro per.new...@gmx.ch wrote:
 Thanks for reply manuel,

 sorry for being not clear on this. While debugging i've found that already.
 But why is this . be set. That's not clear to me.

 Per

 Am 18.10.2011 15:47, schrieb manuelbarzi:

 Component.urlFor  - calls -  RequestCycle.urlFor - calls -
 UrlRenderer.renderUrl - if relative url, calls -
 UrlRenderer.renderRelativeUrl -  which may append / return the
 misterious .
 .


 On Tue, Oct 18, 2011 at 2:50 PM, Per Newgroper.new...@gmx.ch  wrote:

 Hi,

 i try to add a sitemap for my app. When i add the loc node in sitemap-url
 this way to my ListView
 code
 item.add(new Label(locNode,

 RequestCycle.get().getUrlRenderer().renderFullUrl(Url.parse(String.valueOf(urlFor(homePageClass,
 homePageParameters));
 /code

 the generate xml looks like this
 code
 lochttp://localhost:8080/./loc
 /code

 I've debugged the code but don't get a real clue why this is adding a dot
 in
 relative url processing.

 Can someone please give me a hint?
 Thanks
 Per

 -
 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: Weblogic deployment

2011-10-18 Thread jcgarciam
Weblogic doesn't play well with classpath resouces having space on its path.

As Manuel, suggest try putting your domain in a path without space on it

On Tue, Oct 18, 2011 at 11:02 AM, manuelbarzi [via Apache Wicket] 
ml-node+s1842946n3915471...@n4.nabble.com wrote:

 Application.initializeComponents()

 may you try running wl in non-blank-spaces path? (zip:C:/Documents[16
 charater here])...)
 .



 On Tue, Oct 18, 2011 at 3:31 PM, Wolfgang Schreiner [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3915471i=0
 wrote:

  Hi all,
 
  I am having problems deploying my web application on Weblogic 10.3.2.
  Everything works fine on 10.3.5 but I am running into the following
  exception when deploying on 10.3.2 - see below
 
  How can I resolve this? And when and where is wicket.properties loaded?

  Can't find references in the sources ...
 
  Thanks!
 
 
  18.10.2011 14:17 Uhr MESZ Error HTTP BEA-101165 Could not load
  user def
  ined filter in web.xml: org.apache.wicket.protocol.http.WicketFilter.
  org.apache.wicket.WicketRuntimeException: java.net.URISyntaxException:
  Illegal c
  haracter in opaque part at index 16: zip:C:/Documents and
  Settings/schrewo3/Orac
 
 le/Middleware/user_projects/domains/test1/servers/AdminServer/tmp/_WL_user/edoc-

  web/11vfn0/war/WEB-INF/lib/wicket-core-1.5.0.jar!/wicket.properties
 at
  org.apache.wicket.application.AbstractClassResolver.getResources(Abst
  ractClassResolver.java:156)
 at
  org.apache.wicket.Application.initializeComponents(Application.java:4
  90)
 at
  org.apache.wicket.Application.initApplication(Application.java:806)
 at
  org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:3
  46)
 at
  org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:2
  86)
 Truncated. see log file for complete stacktrace
  Caused By: java.net.URISyntaxException: Illegal character in opaque part
  at inde
  x 16: zip:C:/Documents and
  Settings/schrewo3/Oracle/Middleware/user_projects/dom
 
 ains/test1/servers/AdminServer/tmp/_WL_user/edoc-web/11vfn0/war/WEB-INF/lib/wick

  et-core-1.5.0.jar!/wicket.properties
 at java.net.URI$Parser.fail(URI.java:2809)
 at java.net.URI$Parser.checkChars(URI.java:2982)
 at java.net.URI$Parser.parse(URI.java:3019)
 at java.net.URI.init(URI.java:578)
 at java.net.URL.toURI(URL.java:918)
 Truncated. see log file for complete stacktrace

 -
 To unsubscribe, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3915471i=1
 For additional commands, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3915471i=2



 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://apache-wicket.1842946.n4.nabble.com/How-to-update-a-palette-tp3859111p3915471.html
  To unsubscribe from Apache Wicket, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=.





-- 

JC


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-update-a-palette-tp3859111p3915574.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: UrlRenderer [1.5]: Why is absolute of relative Url ending with a [dot]?

2011-10-18 Thread Martin Grigorov
IIRC the '.' is set temporarily to overcome a bug in Tomcat(and
Jetty?!) which produced bad URL after passing http://localhost to
HttpServletResponse.encodeURL()
This bug has been fixed in 7.0.16, I think.

This code has been added by Peter Ertl, so maybe he remembers better the case.

On Tue, Oct 18, 2011 at 5:10 PM, manuelbarzi manuelba...@gmail.com wrote:
 Matej, Igor?
 .



 On Tue, Oct 18, 2011 at 3:57 PM, Per Newgro per.new...@gmx.ch wrote:
 Thanks for reply manuel,

 sorry for being not clear on this. While debugging i've found that already.
 But why is this . be set. That's not clear to me.

 Per

 Am 18.10.2011 15:47, schrieb manuelbarzi:

 Component.urlFor  - calls -  RequestCycle.urlFor - calls -
 UrlRenderer.renderUrl - if relative url, calls -
 UrlRenderer.renderRelativeUrl -  which may append / return the
 misterious .
 .


 On Tue, Oct 18, 2011 at 2:50 PM, Per Newgroper.new...@gmx.ch  wrote:

 Hi,

 i try to add a sitemap for my app. When i add the loc node in sitemap-url
 this way to my ListView
 code
 item.add(new Label(locNode,

 RequestCycle.get().getUrlRenderer().renderFullUrl(Url.parse(String.valueOf(urlFor(homePageClass,
 homePageParameters));
 /code

 the generate xml looks like this
 code
 lochttp://localhost:8080/./loc
 /code

 I've debugged the code but don't get a real clue why this is adding a dot
 in
 relative url processing.

 Can someone please give me a hint?
 Thanks
 Per

 -
 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





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

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



Re: Can not locate error messages from property messages

2011-10-18 Thread Erinc Arikan
Sorry for the late response, It does generate the valid key bundle, there
should be something I am missing and overlooking since I just started a
clean quickstart and it's also happening there.

Erinc

On Sat, Oct 15, 2011 at 9:05 AM, Andrea Del Bene an.delb...@gmail.comwrote:

 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 IValidatorString  {

 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(IValidatableString  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(IValidatableString  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-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: Weblogic deployment

2011-10-18 Thread Wolfgang Schreiner
Ok thanks, will give it a go

Is there another workaround? Like removing wicket.properties and calling 
the Initializers from code?




From:
jcgarciam jcgarc...@gmail.com
To:
users@wicket.apache.org
Date:
18.10.2011 16:26
Subject:
Re: Weblogic deployment



Weblogic doesn't play well with classpath resouces having space on its 
path.

As Manuel, suggest try putting your domain in a path without space on it

On Tue, Oct 18, 2011 at 11:02 AM, manuelbarzi [via Apache Wicket] 
ml-node+s1842946n3915471...@n4.nabble.com wrote:

 Application.initializeComponents()

 may you try running wl in non-blank-spaces path? (zip:C:/Documents[16
 charater here])...)
 .



 On Tue, Oct 18, 2011 at 3:31 PM, Wolfgang Schreiner [hidden email]
http://user/SendEmail.jtp?type=nodenode=3915471i=0
 wrote:

  Hi all,
 
  I am having problems deploying my web application on Weblogic 10.3.2.
  Everything works fine on 10.3.5 but I am running into the following
  exception when deploying on 10.3.2 - see below
 
  How can I resolve this? And when and where is wicket.properties 
loaded?

  Can't find references in the sources ...
 
  Thanks!
 
 
  18.10.2011 14:17 Uhr MESZ Error HTTP BEA-101165 Could not 
load
  user def
  ined filter in web.xml: org.apache.wicket.protocol.http.WicketFilter.
  org.apache.wicket.WicketRuntimeException: java.net.URISyntaxException:
  Illegal c
  haracter in opaque part at index 16: zip:C:/Documents and
  Settings/schrewo3/Orac
 
 
le/Middleware/user_projects/domains/test1/servers/AdminServer/tmp/_WL_user/edoc-

  web/11vfn0/war/WEB-INF/lib/wicket-core-1.5.0.jar!/wicket.properties
 at
  org.apache.wicket.application.AbstractClassResolver.getResources(Abst
  ractClassResolver.java:156)
 at
  org.apache.wicket.Application.initializeComponents(Application.java:4
  90)
 at
  org.apache.wicket.Application.initApplication(Application.java:806)
 at
  org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:3
  46)
 at
  org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:2
  86)
 Truncated. see log file for complete stacktrace
  Caused By: java.net.URISyntaxException: Illegal character in opaque 
part
  at inde
  x 16: zip:C:/Documents and
  Settings/schrewo3/Oracle/Middleware/user_projects/dom
 
 
ains/test1/servers/AdminServer/tmp/_WL_user/edoc-web/11vfn0/war/WEB-INF/lib/wick

  et-core-1.5.0.jar!/wicket.properties
 at java.net.URI$Parser.fail(URI.java:2809)
 at java.net.URI$Parser.checkChars(URI.java:2982)
 at java.net.URI$Parser.parse(URI.java:3019)
 at java.net.URI.init(URI.java:578)
 at java.net.URL.toURI(URL.java:918)
 Truncated. see log file for complete stacktrace

 -
 To unsubscribe, e-mail: [hidden email]
http://user/SendEmail.jtp?type=nodenode=3915471i=1
 For additional commands, e-mail: [hidden email]
http://user/SendEmail.jtp?type=nodenode=3915471i=2



 --
  If you reply to this email, your message will be added to the 
discussion
 below:

 
http://apache-wicket.1842946.n4.nabble.com/How-to-update-a-palette-tp3859111p3915471.html

  To unsubscribe from Apache Wicket, click here
http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=
.





-- 

JC


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-update-a-palette-tp3859111p3915574.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: page expire / ajax error

2011-10-18 Thread Martin Grigorov
For the problem with 1.5 see WICKET-4116.
Will be better in 1.5.2

On Tue, Oct 18, 2011 at 5:35 PM, Jonathan Locke
jonathan.lo...@gmail.com wrote:
 I have two wicket applications running on the same box (my laptop, for
 example) with one on port 8880 and one on port 8881. Each application does
 ajax-self-updating. Now, if I start the first application, all is well and
 will stay well forever as far as I can tell. But the exact moment i start up
 the second application, the first application suddenly gets either a page
 expired error (under wicket 1.4) or an error regarding behaviors (under
 wicket 1.5). I've tried this over and over and it's not a fluke. Anyone have
 any idea what's going on? My best guess is that somehow Tomcat is
 misconfigured (I'm starting it embedded)? But how might that be?

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/page-expire-ajax-error-tp3915594p3915594.html
 Sent from the Users forum mailing list archive at Nabble.com.

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





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

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



Re: Weblogic deployment

2011-10-18 Thread jcgarciam
Nop, this is a bug in the container no within the wicket framework.

On Tue, Oct 18, 2011 at 11:44 AM, Wolfgang Schreiner [via Apache Wicket] 
ml-node+s1842946n3915620...@n4.nabble.com wrote:

 Ok thanks, will give it a go

 Is there another workaround? Like removing wicket.properties and calling
 the Initializers from code?




 From:
 jcgarciam [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3915620i=0

 To:
 [hidden email] http://user/SendEmail.jtp?type=nodenode=3915620i=1
 Date:
 18.10.2011 16:26
 Subject:
 Re: Weblogic deployment



 Weblogic doesn't play well with classpath resouces having space on its
 path.

 As Manuel, suggest try putting your domain in a path without space on it

 On Tue, Oct 18, 2011 at 11:02 AM, manuelbarzi [via Apache Wicket] 
 [hidden email] http://user/SendEmail.jtp?type=nodenode=3915620i=2
 wrote:

  Application.initializeComponents()
 
  may you try running wl in non-blank-spaces path? (zip:C:/Documents[16
  charater here])...)
  .
 
 
 
  On Tue, Oct 18, 2011 at 3:31 PM, Wolfgang Schreiner [hidden email]
 http://user/SendEmail.jtp?type=nodenode=3915471i=0
  wrote:
 
   Hi all,
  
   I am having problems deploying my web application on Weblogic 10.3.2.
   Everything works fine on 10.3.5 but I am running into the following
   exception when deploying on 10.3.2 - see below
  
   How can I resolve this? And when and where is wicket.properties
 loaded?
 
   Can't find references in the sources ...
  
   Thanks!
  
  
   18.10.2011 14:17 Uhr MESZ Error HTTP BEA-101165 Could not
 load
   user def
   ined filter in web.xml: org.apache.wicket.protocol.http.WicketFilter.
   org.apache.wicket.WicketRuntimeException: java.net.URISyntaxException:
   Illegal c
   haracter in opaque part at index 16: zip:C:/Documents and
   Settings/schrewo3/Orac
  
 
 le/Middleware/user_projects/domains/test1/servers/AdminServer/tmp/_WL_user/edoc-


 
   web/11vfn0/war/WEB-INF/lib/wicket-core-1.5.0.jar!/wicket.properties
  at
   org.apache.wicket.application.AbstractClassResolver.getResources(Abst
   ractClassResolver.java:156)
  at
   org.apache.wicket.Application.initializeComponents(Application.java:4
   90)
  at
   org.apache.wicket.Application.initApplication(Application.java:806)
  at
   org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:3
   46)
  at
   org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:2
   86)
  Truncated. see log file for complete stacktrace
   Caused By: java.net.URISyntaxException: Illegal character in opaque
 part
   at inde
   x 16: zip:C:/Documents and
   Settings/schrewo3/Oracle/Middleware/user_projects/dom
  
 
 ains/test1/servers/AdminServer/tmp/_WL_user/edoc-web/11vfn0/war/WEB-INF/lib/wick


 
   et-core-1.5.0.jar!/wicket.properties
  at java.net.URI$Parser.fail(URI.java:2809)
  at java.net.URI$Parser.checkChars(URI.java:2982)
  at java.net.URI$Parser.parse(URI.java:3019)
  at java.net.URI.init(URI.java:578)
  at java.net.URL.toURI(URL.java:918)
  Truncated. see log file for complete stacktrace
 
  -
  To unsubscribe, e-mail: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=3915471i=1
  For additional commands, e-mail: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=3915471i=2
 
 
 
  --
   If you reply to this email, your message will be added to the
 discussion
  below:
 
 

 http://apache-wicket.1842946.n4.nabble.com/How-to-update-a-palette-tp3859111p3915471.html

   To unsubscribe from Apache Wicket, click here

 
 



 --

 JC


 --
 View this message in context:

 http://apache-wicket.1842946.n4.nabble.com/How-to-update-a-palette-tp3859111p3915574.html

 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3915620i=3
 For additional commands, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3915620i=4





 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://apache-wicket.1842946.n4.nabble.com/How-to-update-a-palette-tp3859111p3915620.html
  To unsubscribe from Apache Wicket, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=.





-- 

JC


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-update-a-palette-tp3859111p3915632.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: page expire / ajax error

2011-10-18 Thread manuelbarzi
it seems to be tomcat mixing/sharing user/session data/resources
somewhere and reseting it on second start :?
.



On Tue, Oct 18, 2011 at 4:35 PM, Jonathan Locke
jonathan.lo...@gmail.com wrote:
 I have two wicket applications running on the same box (my laptop, for
 example) with one on port 8880 and one on port 8881. Each application does
 ajax-self-updating. Now, if I start the first application, all is well and
 will stay well forever as far as I can tell. But the exact moment i start up
 the second application, the first application suddenly gets either a page
 expired error (under wicket 1.4) or an error regarding behaviors (under
 wicket 1.5). I've tried this over and over and it's not a fluke. Anyone have
 any idea what's going on? My best guess is that somehow Tomcat is
 misconfigured (I'm starting it embedded)? But how might that be?

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/page-expire-ajax-error-tp3915594p3915594.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



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



Re: wicket - form debug

2011-10-18 Thread Igor Vaynberg
myFormBorder.add(ftf);

this line adds the textfield outside the form, so your form stays
empty thus validation passes.

-igor

On Tue, Oct 18, 2011 at 5:00 AM, nazeem md.naz...@gmail.com wrote:
 I have simple case, which worked for me in another project but failed in the
 current one. Both use same set of libraries. I am doing something wrong,
 could not trace it down. Please help to debug this.

 I am designing a reusable form  textfield component, which will have
 provision to show feedback beneath each text field and so on. The problem I
 am facing is, MyTextField is a border which in turn contains TextField, this
 text field is set as required = true, when i submit the form, onSubmit from
 the submit button gets called instead of onError.

 But if I add a plain raw textfield directly to MyFormBorder it works as
 expected, i.e onError is called when no value is entered.

 How do I debug this problem ? Please assist. I am using wicket 1.4.19

 Code Below
 

 public class MyFormBorder extends Border {

        FeedbackPanel fbp;
        Form form;

        public MyFormBorder(String id, IModel model) {
                super(id);
                fbp = new FeedbackPanel(feedback);
                fbp.setOutputMarkupId(true);
                add(fbp);

                form = new Form(form, model);
                form.add(getBodyContainer());
                add(form);
        }

        public void onError(AjaxRequestTarget target, Form form) {
                if(form.hasFeedbackMessage()) {
                        
 fbp.info(form.getFeedbackMessage().getMessage().toString());
                }
                target.addComponent(fbp);
        }

        public Form getForm() {
                return form;
        }
 }


 Html
 -
 wicket:border
        div wicket:id=feedback/div
        form wicket:id=form class=form
                wicket:body/
        /form
 /wicket:border


 TextField
 -
 public class MyTextField extends Border {

        ComponentFeedbackPanel cfbp;
        TextField textField;
        WebMarkupContainer cntr = new WebMarkupContainer(cntr);

        public MyTextField(String id, String label, IModel model, boolean 
 required)
 {
                super(id);
                cntr.setOutputMarkupId(true);
                cntr.add(new Label(label, label));

                textField = new TextField(textfield, model);
                textField.setLabel(new Model(label));
                textField.setRequired(required);
                cntr.add(textField);

                cfbp = new ComponentFeedbackPanel(cfbp, textField);
                cfbp.setOutputMarkupId(true);
                cfbp.setVisible(false);
                cntr.add(cfbp);

                cntr.add(getBodyContainer());
                add(cntr);
        }


 }

 HTML
 -
 wicket:border
        div wicket:id=cntr class=type-text
                strong wicket:id=cfbp class=message/strong
                label for= wicket:id=label/label
                input wicket:id=textfield style= type=text/input
                wicket:body/
                wicket:child/
        /div
 /wicket:border


 I am using these myformborder  mytextfield as below

 Menu menu = new Menu();

 MyFormBorder myFormBorder = new MyFormBorder(ffborder, new Model(menu));

 MyTextField ftf = new MyTextField(name, Menu Name, new
 PropertyModel(menu, name), true);
 myFormBorder.add(ftf);

 // Without the following textfield getting directly added, onError is not
 called for the above text field
 TextField tf = new TextField(desc, new PropertyModel(menu,
 description));
 tf.setRequired(true);
 forceFormBorder.add(tf);

 AjaxSubmitButton submit = new AjaxSubmitButton(submit,
 forceFormBorder.getForm()) {

        @Override
        protected void onSubmit(AjaxRequestTarget arg0, Form? arg1) {
                System.out.println(onSubmit...);
        }

        @Override
        protected void onError(AjaxRequestTarget target, Form? form) {
                System.out.println(onError...);
        }
 };
 forceFormBorder.add(submit);
 add(forceFormBorder);

 HTML
 -
 div wicket:id=ffborder
        div wicket:id=name/div
        input type=text wicket:id=desc/
         # Submit
 /div



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/wicket-form-debug-tp3915041p3915041.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



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



Re: wicket - form debug

2011-10-18 Thread nazeem
Thanks Igor. I was mislead by seeing the generated html. In the rendered html
the textfield is inside, but from the code, I am adding the MyTextField to
the border and not to the form. 

In MyFormBorder I am adding the contents to the form, will this not solve ?

form.add(getBodyContainer()); 

I also tried this, but it gives me error saying name field not found.

myFormBorder.getForm().add(ftf);

Any other suggestions please.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-form-debug-tp3915041p3915794.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: wicket - form debug

2011-10-18 Thread Igor Vaynberg
myFormBorder.getBodyContainer().add(ftf) should do it.

-igor

On Tue, Oct 18, 2011 at 8:40 AM, nazeem md.naz...@gmail.com wrote:
 Thanks Igor. I was mislead by seeing the generated html. In the rendered html
 the textfield is inside, but from the code, I am adding the MyTextField to
 the border and not to the form.

 In MyFormBorder I am adding the contents to the form, will this not solve ?

 form.add(getBodyContainer());

 I also tried this, but it gives me error saying name field not found.

 myFormBorder.getForm().add(ftf);

 Any other suggestions please.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/wicket-form-debug-tp3915041p3915794.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



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



Re: wicket - form debug

2011-10-18 Thread nazeem
Wow ! it worked. Thank you so much. So i did not understand the borders
well.. :)

I am developing a component library on wicket and I enjoy doing it, and it
gives great productivity boost to the developers and helps to get the look
and feel consistent. Thank you so much for the support.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-form-debug-tp3915041p3915889.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: wicket + jasper reports

2011-10-18 Thread Jim Pinkham
Paul,

I am doing something very similar - I'd be interested to know more about how
you got this working - here is what I've got that works for now, but I'm not
real happy with it:

In my report forms, I have buttons like this:  (details about params omitted
- nothing fancy there)

add(new MyReportResourceButton(pdf, new
ReportResource(MyReport, new PdfResourceHandler()), paramsModel));
add(new MyReportResourceButton(xls, new
ReportResource(MyReport, new XlsResourceHandler()), paramsModel));

(So it will load MyReport.jasper that was compiled and put into resources
folder by maven plugin during build)

MyReportResourceButton has this:
@Override
public final void onResourceRequested() {
MapString,Object params = paramsModel.getObject();
resource.setReportParameters(params);
super.onResourceRequested();
}

and it's superclass MyResourceButton has this:
@Override
public void onSubmit() {
onResourceRequested();
}

/**
 * @see org.apache.wicket.IResourceListener#onResourceRequested()
 */
public void onResourceRequested()
{
Attributes a = new Attributes(RequestCycle.get().getRequest(),
RequestCycle.get()
.getResponse(), null);
resource.respond(a);
}


At runtime, it basically works, however, it gives me this annoying message
in my logs multiple times per report request after the report has been
served and it appears to be trying to just stay on the same page:

2011-10-13 15:22:42,381 [http-80-12] ERROR
org.apache.wicket.DefaultExceptionMapper - Unexpected error occurred
java.lang.IllegalStateException: Header was already written to response!
at
org.apache.wicket.protocol.http.HeaderBufferingWebResponse.checkHeader(HeaderBufferingWebResponse.java:64)
at
org.apache.wicket.protocol.http.HeaderBufferingWebResponse.sendRedirect(HeaderBufferingWebResponse.java:112)
at
org.apache.wicket.request.handler.render.WebPageRenderer.redirectTo(WebPageRenderer.java:136)
at
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:261)
at
org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:139)
at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:717)
at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)
at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:96)
at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253)
at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:160)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:216)

Could you tell me if there is some way this differs from how you (or your
contractor) are doing it?

Thanks,
-- Jim.

On Tue, Oct 18, 2011 at 3:58 AM, Paul Szulc paul.sz...@gmail.com wrote:

 yeah, ok, my bad

 resources where under src/main/resource not src/main/resource*s*
 *
 *
 thx Tor



RE: Efficiency of 1.5 MountMapper weighted/matching algorithm

2011-10-18 Thread Chris Colman
I will definitely try to get up to speed with WicketTester and see if
it's possible for it to run in a multi threaded way that can simulate a
massive load test.

Any suggestions as to which profiler to use while it's running? Would
need to be one that can measure the CPU usage of the GC, not just the
application.

I agree: having some metrics on it is preferable but in the given
example if a site is serving 100 pages per second then that makes for
280,000 objects that are created and thrown away every second. I know
that the GC could *probably* handle it but even in s C++ program with no
GC I still wouldn't want to perform 280,000 memory allocations
(new/malloc) per second if there was an easy way to avoid it - even if
it could handle it I'd much rather be devoting the CPU to other tasks
like rendering or performing database queries.

-Original Message-
From: Erik van Oosten [mailto:e.vanoos...@grons.nl]
Sent: Tuesday, 18 October 2011 6:06 PM
To: users@wicket.apache.org
Subject: Re: Efficiency of 1.5 MountMapper weighted/matching algorithm


 I realize it may not be a hotspot but, intuitively at least, it
sounds
like your new caching improvement will help reduce CPU load. It should
also
reduce the workload of the garbage collector by not having, in the
above
example, 2800 objects allocated and then dereferenced with every page
render.


Don't trust intuition, measure. CPUs and garbage collectors behave
different then you might think.

Introducing caching means introducing thread collaboration. Any
synchronisation on modern cpus quickly take more time then any business
processing you can program. In addition, short lived object cost
nothing.
The gc can easily handle millions per second.


In other words: don't add caching unless you are willing to measure the
throughput gains (on the intended target systems).

Regards,
 Erik.

--
Erik van Oosten
http://day-to-day-stuff.blogspot.com

Op 17 okt. 2011, om 22:06 heeft Chris Colman het volgende geschreven:

 We have already discussed this problem before.
 I agree that caching will improve the performance and I'll try to
 implement it soon.

 Cool!

 Topicus' (Martijn's daily job) biggest application have ~ 700
mounted
 pages and this code is not a hotspot for them, that's why no one
spend
 time on optimizing it so far.

 Wow that's big! If you had a variety of main and side bar menus on
each
page that had links to say 40 or so Bookmarkable pages that would mean
each
page render would result in building 40 weight/mount pair collections,
each
with 700 entries - and then throwing them away after each bookmarkable
page
link has been created.

 I realize it may not be a hotspot but, intuitively at least, it
sounds
like your new caching improvement will help reduce CPU load. It should
also
reduce the workload of the garbage collector by not having, in the
above
example, 2800 objects allocated and then dereferenced with every page
render.


 On Sun, Oct 16, 2011 at 1:27 PM, Chris Colman
 chr...@stepaheadsoftware.com wrote:
 I'll try to get some time to build a test to get some timings.

 -Original Message-
 From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
 Sent: Sunday, 16 October 2011 11:55 AM
 To: users@wicket.apache.org
 Subject: Re: Efficiency of 1.5 MountMapper weighted/matching
algorithm

 On Sat, Oct 15, 2011 at 8:28 PM, Chris Colman
 chr...@stepaheadsoftware.comwrote:

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


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

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


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





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


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


 -
 To 

Re: page expire / ajax error

2011-10-18 Thread Jonathan Locke
Yes, that's exactly it. Some weirdness with Tomcat sessions colliding
(although not resetting). I have a workaround for now... I simply mount each
application on a separate path and it all works. Strange.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/page-expire-ajax-error-tp3915594p3917439.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: wicket + jasper reports

2011-10-18 Thread jchappelle
I believe the way I have done this in the past is by putting the report file
at the root of the WEB-INF/classes folder when building the war file. I
don't use maven so I can't advise you on where to place the files in your
project before deployment.

I hope this helps.

Josh

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