Re: Loading resources (CSS,JS) from JARs ?

2010-02-04 Thread Alex Objelean


Or you can use wro4j (http://code.google.com/p/wro4j/wiki/GettingStarted)
for this. It is a small framework which helps you organize your resources
(js  css) by loading from virtually anywhere (classpath, servletContext,
absolute location, disc location, etc). Also, it merge all the resources
into a single resource, thus limiting the number of requests and optimizing
the response time.

Regards,
Alex Objelean


Umanga wrote:
 
 Greetings,
 
 While playing around with wicket-stuffminis , I noticed that the Moontip 
 load its CSS,JavaScript from the class path (wicketstuff-minis.jar)
 eg: 
 http://localhost:8080/minis-examples/resources/org.wicketstuff.minis.mootipbehavior.MootipBehaviour/mootools.v1.11.js
 -which I couldnt find in the 'webapp' folder ,but in 
 'minis-1.4.2-SNAPSHOT-javadoc.jar' file.
 
 I was wondering,can I bundle my CSS,Js into JARs like this,without 
 copying into  'webapp' folder?
 How does wicket process this ? Is it the path 'resources/' ?
 
 Thanks
 umanga
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Loading-resources-%28CSS%2CJS%29-from-JARs---tp27446557p27449175.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Loading resources (CSS,JS) from JARs ?

2010-02-04 Thread Ernesto Reinaldo Barreiro
Hi,

It is very easy to achieve this. E.g.

public class MyPanel extends Panel {

private static final long serialVersionUID = 1L;

public static ResourceReference JS = new
ResourceReference(MyPanel.class, mypanel.js);
public static ResourceReference CSS = new
ResourceReference(MyPanel.class, main.css);

public MyPanel(String id) {
super(id);
add(CSSPackageResource.getHeaderContribution(CSS));
add(JavascriptPackageResource.getHeaderContribution(JS));
}
}

assuming place mypanel.js and main.css on same package as MyPanel Wicket
will serve then from the classpath. This will work also for images and so
on.

By the way at CSS level you could use

div.myclass {
background-image : url(picture.gif);
}

if picture.gif is on the same package as main.css: no need for the long
resource reference. IMHO this is one of the many nice features Wicket
provides as all you need to roll out reusable components is a jar file.
Additionally, if you use AJAX Wicket will dynamically add the CSS and JS
references to the page when the new component is loaded (if the page did not
contained those references already).

Best,

Ernesto

P.S. Other frameworks have added similar features e.g. Struts2 allows to
serve resources from withing jar files. This make easier to create and
distribute plugins.


On Thu, Feb 4, 2010 at 2:56 AM, Ashika Umanga Umagiliya 
auma...@biggjapan.com wrote:

 Greetings,

 While playing around with wicket-stuffminis , I noticed that the Moontip
 load its CSS,JavaScript from the class path (wicketstuff-minis.jar)
 eg:
 http://localhost:8080/minis-examples/resources/org.wicketstuff.minis.mootipbehavior.MootipBehaviour/mootools.v1.11.js
 -which I couldnt find in the 'webapp' folder ,but in
 'minis-1.4.2-SNAPSHOT-javadoc.jar' file.

 I was wondering,can I bundle my CSS,Js into JARs like this,without copying
 into  'webapp' folder?
 How does wicket process this ? Is it the path 'resources/' ?

 Thanks
 umanga

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




Re: Submit form with ajax on enter

2010-02-04 Thread MattyDE

Any other hints for this right now?

I want to submit an ajax-Form by hiting enter in Textfield, but i want
wicket to call the same Method as i defiend in AjaxButton ... any ideas? 

Thanks a lot in Advance





John Patterson wrote:
 
 It is being used indirectly through AjaxButton.  Unfortunately
 AjaxFormSubmitBehavior cannot be used directly on the form to listen for
 onsubmit
 
 
 Emanuele Gesuato-2 wrote:
 
 Why not using AjaxFormSubmitBehavior ?
 
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Submit-form-with-ajax-on-enter-tp24196732p27449961.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



link inside of a linked container

2010-02-04 Thread Douglas Ferguson
Hey,

I currently have a wicket container that has an onclick, now that container 
needs to have a link inside of it.

But when I click the link it also fires the onclick for the container.

How can I avoid this?

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



Re: link inside of a linked container

2010-02-04 Thread Douglas Ferguson
Just found this

http://markmail.org/message/2ps3auq3326zq3nq

On Feb 4, 2010, at 3:47 AM, Douglas Ferguson wrote:

 Hey,
 
 I currently have a wicket container that has an onclick, now that container 
 needs to have a link inside of it.
 
 But when I click the link it also fires the onclick for the container.
 
 How can I avoid this?
 
 D/
 -
 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



class/interface/enum containing string values for html tag attributes

2010-02-04 Thread haiko van der schaaf
Greetings, 

I am wondering if there is in wicket or another framework a
class/interface/enum containing string values for html tag attributes ? 

It would be great to use it for instance with SimpleAttributeModifier.

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



Re: class/interface/enum containing string values for html tag attributes

2010-02-04 Thread Erik van Oosten

Hi Haiko,

Jericho-parser contains a comprehensive set of all HTML elements, 
attributes etc. It also groups these constants per type (e.g. inline, 
open/close or not, etc. etc.).


Regards,
   Erik.


haiko van der schaaf wrote:
Greetings, 


I am wondering if there is in wicket or another framework a
class/interface/enum containing string values for html tag attributes ? 


It would be great to use it for instance with SimpleAttributeModifier.

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

  


--
Send from my SMTP compliant software
Erik van Oosten
http://day-to-day-stuff.blogspot.com/



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



Re: Submit form with ajax on enter

2010-02-04 Thread Daniel Stoch
I have the same problem today (what a coincidence :)).
This works ok for me in Firefox 3.5 and Opera 10, but does not work in
Chrome, Safari and IE.

PS. I'm using Wicket 1.4.4.

DS


On Thu, Feb 4, 2010 at 10:38 AM, MattyDE ufer.mar...@gmail.com wrote:

 Any other hints for this right now?

 I want to submit an ajax-Form by hiting enter in Textfield, but i want
 wicket to call the same Method as i defiend in AjaxButton ... any ideas?

 Thanks a lot in Advance


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



Easier using of FormComponentFeedbackIndicator for many fields?!

2010-02-04 Thread Martin U
Hi Folks,

i've to implement many form-pages with a lot of (more than 30) input fields,
and each of them should be validated at least of required or not.
but the request is to show the validation-errors behind the depeding
component.. so iam using FormComponentFeedbackIndicator now and everything
works fine with:

searchfield = new RequiredTextFieldString(seachfield, new
PropertyModelString(SearchPanel.this, searchString));
add(searchfield);

indicator = new FormComponentFeedbackIndicator(searchfield_indicator);
indicator.setIndicatorFor(searchfield);
indicator.setOutputMarkupId(true);
indicator.setOutputMarkupPlaceholderTag(true);
add(indicator);

this is an ajax-form so i have to add this to onSubmit too for each
validating field.

protected void onError(AjaxRequestTarget target, Form? form) {
   target.addComponent(indicator);
}


Is there any Hint to easier this implementation?

What i imagine is something like:

searchfield = new *RequiredValidatedTextField*String(seachfield, new
PropertyModelString(SearchPanel.this, searchString));

and inside this child class iam building a indicator

but how could i add the indicator-Span dynamically to the markup and how
could i do the target.addComponent than?


Thanks for any hints.

- Martin


Re: Easier using of FormComponentFeedbackIndicator for many fields?!

2010-02-04 Thread Bert
something along the lines [1] ?

[1] http://londonwicket.googlecode.com/files/LondonWicket-FormsWithFlair.pdf

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



RE: Easier using of FormComponentFeedbackIndicator for many fields?!

2010-02-04 Thread Bodis, Jerome
I did this with an IVisitor, that traverses all form components and adds an 
AbstractBehavior to each required inputfield. This Behavior writes an 
span*/span right after the component has been painted.

Watch this pdf for an example: 
http://code.google.com/p/londonwicket/downloads/list and than
LondonWicket-FormsWithFlair.pdf 

As setComponentBorder is deprecated in newer wicket versions i left the 
componentBorder part out, no need for it.

For making it work with ajax, i had also to implement 
AbstractBehavior.isTemporary()
and to add the forms parent as a target oft he calling button

Jerome

-Original Message-
From: Martin U [mailto:ufer.mar...@googlemail.com] 
Sent: Thursday, February 04, 2010 1:14 PM
To: users@wicket.apache.org
Subject: Easier using of FormComponentFeedbackIndicator for many fields?!

Hi Folks,

i've to implement many form-pages with a lot of (more than 30) input fields,
and each of them should be validated at least of required or not.
but the request is to show the validation-errors behind the depeding
component.. so iam using FormComponentFeedbackIndicator now and everything
works fine with:

searchfield = new RequiredTextFieldString(seachfield, new
PropertyModelString(SearchPanel.this, searchString));
add(searchfield);

indicator = new FormComponentFeedbackIndicator(searchfield_indicator);
indicator.setIndicatorFor(searchfield);
indicator.setOutputMarkupId(true);
indicator.setOutputMarkupPlaceholderTag(true);
add(indicator);

this is an ajax-form so i have to add this to onSubmit too for each
validating field.

protected void onError(AjaxRequestTarget target, Form? form) {
   target.addComponent(indicator);
}


Is there any Hint to easier this implementation?

What i imagine is something like:

searchfield = new *RequiredValidatedTextField*String(seachfield, new
PropertyModelString(SearchPanel.this, searchString));

and inside this child class iam building a indicator

but how could i add the indicator-Span dynamically to the markup and how
could i do the target.addComponent than?


Thanks for any hints.

- Martin

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



setResponsePage in the beggining of a constructor does not work

2010-02-04 Thread Martin Asenov
Hello guys!

I've got three pages, where I do certain check in the beginning and if the 
criteria is not met, I redirect to home page. I make it that way:

public MyPageClass {

if (something) {
system.out.println(mypageclass - we're in);
setResponsePage(getApplication().getHomePage());
}

 page initialization afterwards
}

The strange thing is that it works for one of the pages, for another two - it 
does not - there is no redirection at all; it goes on with further 
initializing. The criteria check block is the very same one in each of the 
pages.

Appreciate if someone helps!

Regards,
Martin


Re: setResponsePage in the beggining of a constructor does not work

2010-02-04 Thread Major Péter
Hi,

the setresponsepage only marks, that the pagetarget is something else on
the end of the cycle, but it isn't stopping the execution of the current
page. If you want that, then use:
throw new RestartResponseException(getApplication().getHomePage());

Regards,
Peter

2010-02-04 14:16 keltezéssel, Martin Asenov írta:
 Hello guys!
 
 I've got three pages, where I do certain check in the beginning and if the 
 criteria is not met, I redirect to home page. I make it that way:
 
 public MyPageClass {
 
 if (something) {
 system.out.println(mypageclass - we're in);
 setResponsePage(getApplication().getHomePage());
 }
 
  page initialization afterwards
 }
 
 The strange thing is that it works for one of the pages, for another two - it 
 does not - there is no redirection at all; it goes on with further 
 initializing. The criteria check block is the very same one in each of the 
 pages.
 
 Appreciate if someone helps!
 
 Regards,
 Martin

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



RE: setResponsePage in the beggining of a constructor does not work

2010-02-04 Thread Martin Asenov
Thanks friend! Works great! You saved me a lot of time!

Best regards,
Martin

-Original Message-
From: Major Péter [mailto:majorpe...@sch.bme.hu] 
Sent: Thursday, February 04, 2010 3:21 PM
To: users@wicket.apache.org
Subject: Re: setResponsePage in the beggining of a constructor does not work

Hi,

the setresponsepage only marks, that the pagetarget is something else on
the end of the cycle, but it isn't stopping the execution of the current
page. If you want that, then use:
throw new RestartResponseException(getApplication().getHomePage());

Regards,
Peter

2010-02-04 14:16 keltezéssel, Martin Asenov írta:
 Hello guys!
 
 I've got three pages, where I do certain check in the beginning and if the 
 criteria is not met, I redirect to home page. I make it that way:
 
 public MyPageClass {
 
 if (something) {
 system.out.println(mypageclass - we're in);
 setResponsePage(getApplication().getHomePage());
 }
 
  page initialization afterwards
 }
 
 The strange thing is that it works for one of the pages, for another two - it 
 does not - there is no redirection at all; it goes on with further 
 initializing. The criteria check block is the very same one in each of the 
 pages.
 
 Appreciate if someone helps!
 
 Regards,
 Martin

-
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: Submit form with ajax on enter

2010-02-04 Thread John Patterson



MattyDE wrote:
 
 Any other hints for this right now?
 
 I want to submit an ajax-Form by hiting enter in Textfield, but i want
 wicket to call the same Method as i defiend in AjaxButton ... any ideas? 
 
 Thanks a lot in Advance
 

If I remember correctly, my patch was applied so you can now attach the
AjaxFormSubmitBehavior directly to the form and listen for onsubmit.  This
handles both enter and click.

-- 
View this message in context: 
http://old.nabble.com/Submit-form-with-ajax-on-enter-tp24196732p27452212.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: webapp authentication

2010-02-04 Thread Les Hazlewood
Hi Martin,

Thanks for the feedback!

To clarify for other users, it is (now) pretty clear how to perform
configuration and configure Realms via the link I sent in my last mail
- please read it if you want to give it a try again.  Maybe this was
written after you tried Shiro, but at least it is well documented now
for everyone :)

Best regards,

Les

On Thu, Feb 4, 2010 at 2:32 AM, Martin Asenov mase...@velti.com wrote:
 Hi again , Les!

 Well, here my recommendations come. By saying simple setup I mean creating a 
 single realm that extends AuthorizingRealm and configuring a web security 
 manager that uses that realm. That's all I need. I found nowhere in the 
 sample projects such thing, even in the spring-hibernate project. For me it 
 looks like the configuration of the realm there is not entirely written.

 Appreciate your interest!

 Best Regards,
 Martin

 -Original Message-
 From: les.hazlew...@anjinllc.com [mailto:les.hazlew...@anjinllc.com] On 
 Behalf Of Les Hazlewood
 Sent: Wednesday, February 03, 2010 6:56 PM
 To: users@wicket.apache.org
 Subject: Re: webapp authentication

 Hi Martin,

 What do you mean by you couldn't set Shiro up?  Did you mean
 shiro-wicket in wicketstuff?  Or just Shiro's out-of-the-box web
 support?

 Setting up Shiro for any webapp is as painless as possible:

 http://cwiki.apache.org/confluence/display/SHIRO/Web

 Of course, any recommendations are appreciated.

 Cheers,

 Les

 On Wed, Feb 3, 2010 at 10:25 AM, Martin Asenov mase...@velti.com wrote:
 Hello guys!

 I want to ask you which security frameworks you use when it comes to 
 authenticating users through JPA.
 I relied on JSecurity/Shiro but I can't set it up. I'm looking for a simple 
 framework but secure enough (not looking for extraordinary security), which 
 I can set pretty easily with my database that holds my custom User objects.

 Please give me some suggestions.

 Thanks!

 Regards,
 Martin



 -
 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



document onkeypress onkeydown

2010-02-04 Thread Gatos
  Hello,

How is it possible to add event behavior for the document?

I tried this one, but it didn't work:

add(new AjaxEventBehavior(onkeypress){
  @Override
  protected void onEvent(final AjaxRequestTarget target) {
  LOG.debug(keypress);
  }
  });


Re: wicket enclosure not finding child!?

2010-02-04 Thread Roman Uhlig

I just upgraded from 1.4.1 to 1.4.6 and now I'm getting this error too
without changing anything else in my source code:

04 Feb 2010 16:01:20,352 ERROR [org.apache.wicket.RequestCycle:1521] Could
not find child with id: object_title_classification_prefix in the
wicket:enclosure
org.apache.wicket.WicketRuntimeException: Could not find child with id:
object_title_classification_prefix in the wicket:enclosure
at
org.apache.wicket.markup.html.internal.Enclosure.checkChildComponent(Enclosure.java:220)
at
org.apache.wicket.markup.html.internal.Enclosure.ensureAllChildrenPresent(Enclosure.java:262)
at
org.apache.wicket.markup.html.internal.Enclosure.onComponentTagBody(Enclosure.java:169)
at org.apache.wicket.Component.renderComponent(Component.java:2619)
at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
at org.apache.wicket.Component.render(Component.java:2450)
at
org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229)
at
org.apache.wicket.markup.resolver.EnclosureResolver.resolve(EnclosureResolver.java:61)
at
org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:81)
at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1577)
at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1501)
at org.apache.wicket.Component.renderComponent(Component.java:2619)
at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
at org.apache.wicket.Component.render(Component.java:2450)
at
org.apache.wicket.markup.repeater.AbstractRepeater.renderChild(AbstractRepeater.java:122)
at
org.apache.wicket.markup.repeater.AbstractRepeater.onRender(AbstractRepeater.java:103)
at org.apache.wicket.Component.render(Component.java:2450)
at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1577)
at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1501)
at org.apache.wicket.Component.renderComponent(Component.java:2619)
at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
at org.apache.wicket.Component.render(Component.java:2450)
at
org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229)
at
org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(MarkupInheritanceResolver.java:66)
at
org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:81)
at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1577)
at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1501)
at org.apache.wicket.Component.renderComponent(Component.java:2619)
at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
at org.apache.wicket.Component.render(Component.java:2450)
at
org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229)
at
org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(MarkupInheritanceResolver.java:73)
at
org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:81)
at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418)
at
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1528)
at org.apache.wicket.Page.onRender(Page.java:1565)
at org.apache.wicket.Component.render(Component.java:2450)
at org.apache.wicket.Page.renderPage(Page.java:914)
at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:261)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown
Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown
Source)
at 

Re: wicket enclosure not finding child!?

2010-02-04 Thread Roman Uhlig Maxity.de

I just upgraded from 1.4.1 to 1.4.6 and now I'm getting this error too
without changing anything else in my source code:

04 Feb 2010 16:01:20,352 ERROR [org.apache.wicket.RequestCycle:1521]
Could not find child with id: object_title_classification_prefix in the
wicket:enclosure
org.apache.wicket.WicketRuntimeException: Could not find child with id:
object_title_classification_prefix in the wicket:enclosure
at
org.apache.wicket.markup.html.internal.Enclosure.checkChildComponent(Enc
losure.java:220)
at
org.apache.wicket.markup.html.internal.Enclosure.ensureAllChildrenPresen
t(Enclosure.java:262)
at
org.apache.wicket.markup.html.internal.Enclosure.onComponentTagBody(Encl
osure.java:169)
at
org.apache.wicket.Component.renderComponent(Component.java:2619)
at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
at org.apache.wicket.Component.render(Component.java:2450)
at
org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229)
at
org.apache.wicket.markup.resolver.EnclosureResolver.resolve(EnclosureRes
olver.java:61)
at
org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentRe
solvers.java:81)
at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer
.java:1577)
at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav
a:1501)
at
org.apache.wicket.Component.renderComponent(Component.java:2619)
at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
at org.apache.wicket.Component.render(Component.java:2450)
at
org.apache.wicket.markup.repeater.AbstractRepeater.renderChild(AbstractR
epeater.java:122)
at
org.apache.wicket.markup.repeater.AbstractRepeater.onRender(AbstractRepe
ater.java:103)
at org.apache.wicket.Component.render(Component.java:2450)
at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer
.java:1577)
at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav
a:1501)
at
org.apache.wicket.Component.renderComponent(Component.java:2619)
at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
at org.apache.wicket.Component.render(Component.java:2450)
at
org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229)
at
org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(Mark
upInheritanceResolver.java:66)
at
org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentRe
solvers.java:81)
at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer
.java:1577)
at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav
a:1501)
at
org.apache.wicket.Component.renderComponent(Component.java:2619)
at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
at org.apache.wicket.Component.render(Component.java:2450)
at
org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229)
at
org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(Mark
upInheritanceResolver.java:73)
at
org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentRe
solvers.java:81)
at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418)
at
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1528)
at org.apache.wicket.Page.onRender(Page.java:1565)
at org.apache.wicket.Component.render(Component.java:2450)
at org.apache.wicket.Page.renderPage(Page.java:914)
at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget
.respond(BookmarkablePageRequestTarget.java:261)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(Abstract
RequestCycleProcessor.java:105)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java
:1258)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479
)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:
312)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown
Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown
Source)
at 

Re: Bookmarkable link url is broken in 1.4.6 after ajax update

2010-02-04 Thread Vladimir K

It seems that problem prepending resource URLs resurrected again.
https://issues.apache.org/jira/browse/WICKET-2491


vineet semwal wrote:
 
 i have opened the jira issue for the same problem,
 https://issues.apache.org/jira/browse/WICKET-2717
 
 On Thu, Feb 4, 2010 at 1:07 AM, vineet semwal
 vineetsemwal1...@gmail.comwrote:
 
 I noticed the same problem after moving to 1.4.6 ,
 I am creating a new bookmarkablepagelink on ajax submit ,
  current page mounted path is prefixed in my case,
 i checked it with 1.4.5,it doesn't have that problem.

 for eg. bookmarkablepagelink created is
 http://foo/currentpagemountedpath/destinationpagemountedpath



 On Wed, Feb 3, 2010 at 10:44 PM, Objelean Alex
 alex.objel...@gmail.comwrote:

 The wicket-1.4.6 release contains a fix for WICKET-2312, which is a
 great
 thing. But apparently it breaks Bookmarkable link url in situation when
 it
 is updated by ajax. I'm not sure if this description is enough for fast
 reproduction, but I will try to add a quickstart asap and will open a
 JIRA
 issue.

 This issue is pretty critical. I cannot migrate the application to
 wicket-1.4.6 because of it.

 Thank you!




 --
 regards,
 Vineet Semwal

 
 
 
 -- 
 regards,
 Vineet Semwal
 
 

-- 
View this message in context: 
http://old.nabble.com/Bookmarkable-link-url-is-broken-in-1.4.6-after-ajax-update-tp27439970p27453809.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: document onkeypress onkeydown

2010-02-04 Thread Stefan Fussenegger

Add a WebMarkupContainer to body, i.e.

body wicket:id=body.../body

add(new WebMarkupContainer(body)
.add(new AjaxEventBehavior(onkeypress){
protected void onEvent(final AjaxRequestTarget target) {
LOG.debug(keypress);
}
}));


Gatos wrote:

  Hello,

How is it possible to add event behavior for the document?

I tried this one, but it didn't work:

add(new AjaxEventBehavior(onkeypress){
  @Override
  protected void onEvent(final AjaxRequestTarget target) {
  LOG.debug(keypress);
  }
  });



--

Stefan Fußenegger
Molindo GmbH
http://techblog.molindo.at/

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



PagingNavigator css tags

2010-02-04 Thread Andreas Lüdtke
Hi,

I've just started with css and I would like to know the tag names of the
paging navigator. I had a look in the wicket source code, but my css file
doesn't work. I mean the area in the upper right corner like

1  2  3  4  5

I don't like the italic font-weight. Any help is much appreciated.

Andreas


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



Re: PagingNavigator css tags

2010-02-04 Thread Igor Vaynberg
see imarkupsettings#setDefault(Before|After)DisabledLink()

-igor

On Thu, Feb 4, 2010 at 8:29 AM, Andreas Lüdtke sam.lued...@t-online.de wrote:
 Hi,

 I've just started with css and I would like to know the tag names of the
 paging navigator. I had a look in the wicket source code, but my css file
 doesn't work. I mean the area in the upper right corner like

            1  2  3  4  5    

 I don't like the italic font-weight. Any help is much appreciated.

 Andreas


 -
 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



Result of tester.assertResultPage(..) depends on JRE?

2010-02-04 Thread Stefan Fussenegger
I've just found out that the outcome of a JUnit test using WicketTester 
(v1.3.7) depends on the JVM version. This test


public void testRender_deployment() throws Exception
{
WicketTester tester = doRender(DEPLOYMENT);
tester.assertResultPage(
ResourceMountTest.class,
ResourceMountTestPage-deployment-expected.html
);
}

from http://j.mp/ResourceMountTest_java works with Java 1.5.0_22 but 
fails using 1.6.0_17 as the order of attributes is different:


expected: form 
action=?wicket:interface=:0:panel:myForm::IFormSubmitListener:: 
onclick=var wcall=wicketSubmitFormById('id1', 
'?wicket:interface=:0:panel:myForm::IActivePageBehaviorListener:3:wicket:ignoreIfNotActive=true', 
null,null,null, function() {return 
Wicket.$$(this)amp;amp;Wicket.$$('id1')}.bind(this));; 
onsubmit=return validateMyForm() id=id1 method=post
actual: form id=id1 
action=?wicket:interface=:0:panel:myForm::IFormSubmitListener:: 
onclick=var wcall=wicketSubmitFormById('id1', 
'?wicket:interface=:0:panel:myForm::IActivePageBehaviorListener:3:wicket:ignoreIfNotActive=true', 
null,null,null, function() {return 
Wicket.$$(this)amp;amp;Wicket.$$('id1')}.bind(this));; method=post 
onsubmit=return validateMyForm()


After digging through the code, I've found out that attributes are 
stored in a ValueMap (i.e. in a HashMap) in 
org.apache.wicket.markup.parser.XmlTag. The iteration order of HashMaps 
isn't strictly defined though (HashMap JavaDoc: This class makes no 
guarantees as to the order of the map; in particular, it does not 
guarantee that the order will remain constant over time.).


Is there anything I miss here? Or does tester.assertResultPage(..) 
really depend on the JRE and is therefore (slightly?) flawed?


Cheers, Stefan

--

Stefan Fußenegger
Molindo GmbH
http://techblog.molindo.at/

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



Re: Result of tester.assertResultPage(..) depends on JRE?

2010-02-04 Thread Igor Vaynberg
i believe we fixed this in 1.4.x using a linkedhashmap

-igor

On Thu, Feb 4, 2010 at 8:53 AM, Stefan Fussenegger s...@molindo.at wrote:
 I've just found out that the outcome of a JUnit test using WicketTester
 (v1.3.7) depends on the JVM version. This test

    public void testRender_deployment() throws Exception
    {
        WicketTester tester = doRender(DEPLOYMENT);
        tester.assertResultPage(
                        ResourceMountTest.class,
            ResourceMountTestPage-deployment-expected.html
        );
    }

 from http://j.mp/ResourceMountTest_java works with Java 1.5.0_22 but fails
 using 1.6.0_17 as the order of attributes is different:

 expected: form
 action=?wicket:interface=:0:panel:myForm::IFormSubmitListener::
 onclick=var wcall=wicketSubmitFormById('id1',
 '?wicket:interface=:0:panel:myForm::IActivePageBehaviorListener:3:wicket:ignoreIfNotActive=true',
 null,null,null, function() {return
 Wicket.$$(this)amp;amp;Wicket.$$('id1')}.bind(this));; onsubmit=return
 validateMyForm() id=id1 method=post
 actual: form id=id1
 action=?wicket:interface=:0:panel:myForm::IFormSubmitListener::
 onclick=var wcall=wicketSubmitFormById('id1',
 '?wicket:interface=:0:panel:myForm::IActivePageBehaviorListener:3:wicket:ignoreIfNotActive=true',
 null,null,null, function() {return
 Wicket.$$(this)amp;amp;Wicket.$$('id1')}.bind(this));; method=post
 onsubmit=return validateMyForm()

 After digging through the code, I've found out that attributes are stored in
 a ValueMap (i.e. in a HashMap) in org.apache.wicket.markup.parser.XmlTag.
 The iteration order of HashMaps isn't strictly defined though (HashMap
 JavaDoc: This class makes no guarantees as to the order of the map; in
 particular, it does not guarantee that the order will remain constant over
 time.).

 Is there anything I miss here? Or does tester.assertResultPage(..) really
 depend on the JRE and is therefore (slightly?) flawed?

 Cheers, Stefan

 --

 Stefan Fußenegger
 Molindo GmbH
 http://techblog.molindo.at/

 -
 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: Where is the full client filename during FileUpload?

2010-02-04 Thread nytrus

Yes you are right, file full path file is never send. In fact exploring DOM
I've found no property to fetch it. Thank you! So I use a simple TextField.

@kinabalu
getClinetFilename() does not return the full path, while temp file path is
the path on the server where the file is phisically copied, while I was
lookin for the original path of the file on the clinet filesystem.

Thank you all!



ananthakumaran wrote:
 
 Technically you cann't get the full path of the file using javascript. you
 are allowed the access the relative name of the file
 only.it is also read only (security reason). otherwise you could upload a
 file without the knowledge of the user.
 
 see http://www.cs.tut.fi/~jkorpela/forms/file.html for reference
 
 2010/2/3 Nicola Tucci nytrus...@gmail.com
 
 Hi all,
 I'm using a FIleUpload form component in order to save the full client
 filename (path + filename, i.e.
 /home/jdoe/myfiles/MyUploadableDocument.pdf), but for what I can see, I
 can
 retrieve only the filename using FileItem.getName().
 I've tried to deeply debug wicket code to find the full path, but I only
 find client filename, server temp name, content-type, size.

 Someone on this forum states that browsers often send only the filename,
 not
 the full path (security reason??), but how can servers bind the source
 file
 without the full name? It must be somewhere, maybe in the servlet
 request...

 Besides, there is a smarter way to retrieve the full name (the one that
 appears in the input component!) without perform the upload? My use case
 oblige me to use FileUpload form component because the user use browser's
 popup search dialog.

 Thanks to all,
 BYE!

 
 
 
 -- 
 
 Anantha Kumaran
 
 

-- 
View this message in context: 
http://old.nabble.com/Where-is-the-full-client-filename-during-FileUpload--tp27439835p27456734.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Highlight invalid field

2010-02-04 Thread Anna Simbirtsev
Hi,

I am validating a field(user presses validation button) and if its invalid I
highlight the field in the following way:

AjaxSubmitLink checkName = new AjaxSubmitLink(check_name, form) {

 public void onSubmit(AjaxRequestTarget target, Form? form) {
 if (name.length()  5) {
  name.add(new SimpleAttributeModifier( style,
color:red;border-color:red;));
  target.addComponent(domain_name);
 }
 }
}

Then when the user modifies the name field, I need to remove the red color
from the field.
Is it better to do it with behaviour and look for onchange event? If yes,
which one?

Thank you
Anna


Re: Highlight invalid field

2010-02-04 Thread James Carman
It's better to use a validator for this.  And, you can add a behavior
(look at forms with flair presentation) to change the class (I would
do that instead of in-lining the style) of the components in error.

On Thu, Feb 4, 2010 at 2:05 PM, Anna Simbirtsev asimbirt...@gmail.com wrote:
 Hi,

 I am validating a field(user presses validation button) and if its invalid I
 highlight the field in the following way:

 AjaxSubmitLink checkName = new AjaxSubmitLink(check_name, form) {

     public void onSubmit(AjaxRequestTarget target, Form? form) {
                         if (name.length()  5) {
                              name.add(new SimpleAttributeModifier( style,
 color:red;border-color:red;));
                              target.addComponent(domain_name);
                         }
     }
 }

 Then when the user modifies the name field, I need to remove the red color
 from the field.
 Is it better to do it with behaviour and look for onchange event? If yes,
 which one?

 Thank you
 Anna


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



Re: Highlight invalid field

2010-02-04 Thread Anna Simbirtsev
Can you give an example please?
Actually I am validating uniqueness of the name, i just put the length as an
example.
But if you could give me an example of how to change the class using a
behaviour, that would be nice.

On Thu, Feb 4, 2010 at 2:20 PM, James Carman
jcar...@carmanconsulting.comwrote:

 It's better to use a validator for this.  And, you can add a behavior
 (look at forms with flair presentation) to change the class (I would
 do that instead of in-lining the style) of the components in error.

 On Thu, Feb 4, 2010 at 2:05 PM, Anna Simbirtsev asimbirt...@gmail.com
 wrote:
  Hi,
 
  I am validating a field(user presses validation button) and if its
 invalid I
  highlight the field in the following way:
 
  AjaxSubmitLink checkName = new AjaxSubmitLink(check_name, form) {
 
  public void onSubmit(AjaxRequestTarget target, Form? form) {
  if (name.length()  5) {
   name.add(new SimpleAttributeModifier(
 style,
  color:red;border-color:red;));
   target.addComponent(domain_name);
  }
  }
  }
 
  Then when the user modifies the name field, I need to remove the red
 color
  from the field.
  Is it better to do it with behaviour and look for onchange event? If yes,
  which one?
 
  Thank you
  Anna
 

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




-- 
Anna Simbirtsev
(416) 729-7331


Re: Highlight invalid field

2010-02-04 Thread James Carman
That's the one.  That's where I borrowed my code from. :)

On Thu, Feb 4, 2010 at 2:30 PM, Riyad Kalla rka...@gmail.com wrote:
 Anna, I think James literally meant this presentation, it's got the code
 snippets you want:
 http://londonwicket.googlecode.com/files/LondonWicket-FormsWithFlair.pdf

 -R

 On Thu, Feb 4, 2010 at 12:25 PM, Anna Simbirtsev asimbirt...@gmail.comwrote:

 Can you give an example please?
 Actually I am validating uniqueness of the name, i just put the length as
 an
 example.
 But if you could give me an example of how to change the class using a
 behaviour, that would be nice.

 On Thu, Feb 4, 2010 at 2:20 PM, James Carman
 jcar...@carmanconsulting.comwrote:

  It's better to use a validator for this.  And, you can add a behavior
  (look at forms with flair presentation) to change the class (I would
  do that instead of in-lining the style) of the components in error.
 
  On Thu, Feb 4, 2010 at 2:05 PM, Anna Simbirtsev asimbirt...@gmail.com
  wrote:
   Hi,
  
   I am validating a field(user presses validation button) and if its
  invalid I
   highlight the field in the following way:
  
   AjaxSubmitLink checkName = new AjaxSubmitLink(check_name, form) {
  
       public void onSubmit(AjaxRequestTarget target, Form? form) {
                           if (name.length()  5) {
                                name.add(new SimpleAttributeModifier(
  style,
   color:red;border-color:red;));
                                target.addComponent(domain_name);
                           }
       }
   }
  
   Then when the user modifies the name field, I need to remove the red
  color
   from the field.
   Is it better to do it with behaviour and look for onchange event? If
 yes,
   which one?
  
   Thank you
   Anna
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 


 --
 Anna Simbirtsev
 (416) 729-7331



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



Re: Highlight invalid field

2010-02-04 Thread Riyad Kalla
Anna, I think James literally meant this presentation, it's got the code
snippets you want:
http://londonwicket.googlecode.com/files/LondonWicket-FormsWithFlair.pdf

-R

On Thu, Feb 4, 2010 at 12:25 PM, Anna Simbirtsev asimbirt...@gmail.comwrote:

 Can you give an example please?
 Actually I am validating uniqueness of the name, i just put the length as
 an
 example.
 But if you could give me an example of how to change the class using a
 behaviour, that would be nice.

 On Thu, Feb 4, 2010 at 2:20 PM, James Carman
 jcar...@carmanconsulting.comwrote:

  It's better to use a validator for this.  And, you can add a behavior
  (look at forms with flair presentation) to change the class (I would
  do that instead of in-lining the style) of the components in error.
 
  On Thu, Feb 4, 2010 at 2:05 PM, Anna Simbirtsev asimbirt...@gmail.com
  wrote:
   Hi,
  
   I am validating a field(user presses validation button) and if its
  invalid I
   highlight the field in the following way:
  
   AjaxSubmitLink checkName = new AjaxSubmitLink(check_name, form) {
  
   public void onSubmit(AjaxRequestTarget target, Form? form) {
   if (name.length()  5) {
name.add(new SimpleAttributeModifier(
  style,
   color:red;border-color:red;));
target.addComponent(domain_name);
   }
   }
   }
  
   Then when the user modifies the name field, I need to remove the red
  color
   from the field.
   Is it better to do it with behaviour and look for onchange event? If
 yes,
   which one?
  
   Thank you
   Anna
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 


 --
 Anna Simbirtsev
 (416) 729-7331



Override a method in wicket-autocomplete.js

2010-02-04 Thread Craig McIlwee
Hello,

This is more a JavaScript problem than wicket, but I'm encountering it in the 
context of a wicket component so maybe others have had the same issue and can 
offer some guidance.  I'm having some trouble with Wicket.AutoComplete's 
getOffsetParentZIndex definition, in IE 7 it's returning 0 even though the div 
that my text field lives on has a z index of 3.  This causes the auto complete 
popup to be invisible.  I have a suspicion that this is some kind of dojo 
compatibility issue (the div that the component lives on is a dijit tab), but 
haven't had much luck on the dojo side.  My next step was to try and override 
the wicket function and always return a large number.  I'm having problems with 
this approach also due to the way that the functions are defined within the 
Wicket.AutoComplete 'class':

Wicket.AutoComplete=function(...){
  function getOffsetParentZIndex(...) {
...
  }
}

As you can see, the functions are not named properties of a Wicket.AutoComplete 
object so even if I can get a reference to the object created by a call to 
'new' I can't replace the function's definition.  Any suggestions on how to get 
at the Wicket.AutoComplete function definitions without overriding the entire 
thing?

And on a side note, is there any reason that the class isn't defined with this 
style:

Wicket.AutoComplete=function(...){
  this.getOffsetParentZIndex = function(...) {
...
  }
}


Thanks,
Craig
 

RE: wicket enclosure not finding child!?

2010-02-04 Thread Chris Colman
I've found the problem with any version after 1.4.2. With 1.4.2 I seem
to be able to use enclosures just fine - even when the children are
supplied by a component resolver - but any 1.4.3, 1.4.4 and 1.4.5 cause
problems. I haven't yet tried 1.4.6 but from what you're saying it
probably has the same problem.

Chris Colman
Step Ahead Software
http://develop.stepaheadsoftware.com

 -Original Message-
 From: Roman Uhlig Maxity.de [mailto:roman.uh...@maxity.de]
 Sent: Friday, 5 February 2010 2:23 AM
 To: users@wicket.apache.org
 Subject: Re: wicket enclosure not finding child!?
 
 
 I just upgraded from 1.4.1 to 1.4.6 and now I'm getting this error too
 without changing anything else in my source code:
 
 04 Feb 2010 16:01:20,352 ERROR [org.apache.wicket.RequestCycle:1521]
 Could not find child with id: object_title_classification_prefix in
the
 wicket:enclosure
 org.apache.wicket.WicketRuntimeException: Could not find child with
id:
 object_title_classification_prefix in the wicket:enclosure
 at

org.apache.wicket.markup.html.internal.Enclosure.checkChildComponent(Enc
 losure.java:220)
 at

org.apache.wicket.markup.html.internal.Enclosure.ensureAllChildrenPresen
 t(Enclosure.java:262)
 at

org.apache.wicket.markup.html.internal.Enclosure.onComponentTagBody(Encl
 osure.java:169)
 at
 org.apache.wicket.Component.renderComponent(Component.java:2619)
 at
 org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
 at org.apache.wicket.Component.render(Component.java:2450)
 at
 org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229)
 at

org.apache.wicket.markup.resolver.EnclosureResolver.resolve(EnclosureRes
 olver.java:61)
 at

org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentRe
 solvers.java:81)
 at

org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418)
 at

org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer
 .java:1577)
 at

org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav
 a:1501)
 at
 org.apache.wicket.Component.renderComponent(Component.java:2619)
 at
 org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
 at org.apache.wicket.Component.render(Component.java:2450)
 at

org.apache.wicket.markup.repeater.AbstractRepeater.renderChild(AbstractR
 epeater.java:122)
 at

org.apache.wicket.markup.repeater.AbstractRepeater.onRender(AbstractRepe
 ater.java:103)
 at org.apache.wicket.Component.render(Component.java:2450)
 at

org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414)
 at

org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer
 .java:1577)
 at

org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav
 a:1501)
 at
 org.apache.wicket.Component.renderComponent(Component.java:2619)
 at
 org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
 at org.apache.wicket.Component.render(Component.java:2450)
 at
 org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229)
 at

org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(Mark
 upInheritanceResolver.java:66)
 at

org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentRe
 solvers.java:81)
 at

org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418)
 at

org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer
 .java:1577)
 at

org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav
 a:1501)
 at
 org.apache.wicket.Component.renderComponent(Component.java:2619)
 at
 org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
 at org.apache.wicket.Component.render(Component.java:2450)
 at
 org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229)
 at

org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(Mark
 upInheritanceResolver.java:73)
 at

org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentRe
 solvers.java:81)
 at

org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418)
 at
 org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1528)
 at org.apache.wicket.Page.onRender(Page.java:1565)
 at org.apache.wicket.Component.render(Component.java:2450)
 at org.apache.wicket.Page.renderPage(Page.java:914)
 at

org.apache.wicket.request.target.component.BookmarkablePageRequestTarget
 .respond(BookmarkablePageRequestTarget.java:261)
 at

org.apache.wicket.request.AbstractRequestCycleProcessor.respond(Abstract
 RequestCycleProcessor.java:105)
 at

org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java
 :1258)
 at 

dojo 1.4

2010-02-04 Thread Josh Chappelle
I've searched everywhere and can't find the wicket 1.4 compatible dojo jar
file. There isn't one in the maven repository.

 

Has one been developed? If so can someone point me in the right direction?

 

Thanks,

 

Josh



Re: SwfObject integration with wicket

2010-02-04 Thread Fernando Wermus
Yes. There is the component. It is in the wiki, and you have to copy and
paste it. It works fine.

On Wed, Feb 3, 2010 at 12:17 AM, Mathias Nilsson 
wicket.program...@gmail.com wrote:

 Hi,

 I was wondering if anyone has  built swfobject ( javascript ) integration
 to
 wicket? What I want to do is to be able to add a flash swf file and if the
 flash isn't detected by the browser have an ajax callback and be able to
 hide the component, other resources or add other data to the output.




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


RE: setResponsePage in the beggining of a constructor does not work

2010-02-04 Thread Chris Colman
Could I use RestartResponseException to redirect to a URL instead of a 
bookmarkable page?

My problem is that all of my pages require a parameter (even the home page but 
that's fine because the Tomcat container server.xml configures the appropriate 
redirection for me - users never have to enter the parameters in the address 
bar) but the Expired Page page contains a link that does not contain any 
parameters.

When a session expires the page that appears attempts to go to the 'home' page 
without any parameters. If I could either change the expired page's link or do 
a redirect in the home page's constructor that redirect's to / then this 
would work fine.

Unfortunately the RestartResponseException seems to only want to redirect to 
bookmarkable pages. Is there an alternative I could use to redirect to the / 
URL?

 -Original Message-
 From: Martin Asenov [mailto:mase...@velti.com]
 Sent: Friday, 5 February 2010 12:30 AM
 To: users@wicket.apache.org
 Subject: RE: setResponsePage in the beggining of a constructor does not
 work
 
 Thanks friend! Works great! You saved me a lot of time!
 
 Best regards,
 Martin
 
 -Original Message-
 From: Major Péter [mailto:majorpe...@sch.bme.hu]
 Sent: Thursday, February 04, 2010 3:21 PM
 To: users@wicket.apache.org
 Subject: Re: setResponsePage in the beggining of a constructor does not
 work
 
 Hi,
 
 the setresponsepage only marks, that the pagetarget is something else on
 the end of the cycle, but it isn't stopping the execution of the current
 page. If you want that, then use:
 throw new RestartResponseException(getApplication().getHomePage());
 
 Regards,
 Peter
 
 2010-02-04 14:16 keltezéssel, Martin Asenov írta:
  Hello guys!
 
  I've got three pages, where I do certain check in the beginning and if
 the criteria is not met, I redirect to home page. I make it that way:
 
  public MyPageClass {
 
  if (something) {
  system.out.println(mypageclass - we're in);
  setResponsePage(getApplication().getHomePage());
  }
 
   page initialization afterwards
  }
 
  The strange thing is that it works for one of the pages, for another two
 - it does not - there is no redirection at all; it goes on with further
 initializing. The criteria check block is the very same one in each of the
 pages.
 
  Appreciate if someone helps!
 
  Regards,
  Martin
 
 -
 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: setResponsePage in the beggining of a constructor does not work

2010-02-04 Thread Major Péter
Just write this in WebApplication#init:
getApplicationSettings().setPageExpiredErrorPage(PageExpiredError.class);
This should solve your problem.

Regards,
Peter

2010-02-05 00:59 keltezéssel, Chris Colman írta:
 Could I use RestartResponseException to redirect to a URL instead of a 
 bookmarkable page?
 
 My problem is that all of my pages require a parameter (even the home page 
 but that's fine because the Tomcat container server.xml configures the 
 appropriate redirection for me - users never have to enter the parameters in 
 the address bar) but the Expired Page page contains a link that does not 
 contain any parameters.
 
 When a session expires the page that appears attempts to go to the 'home' 
 page without any parameters. If I could either change the expired page's link 
 or do a redirect in the home page's constructor that redirect's to / then 
 this would work fine.
 
 Unfortunately the RestartResponseException seems to only want to redirect to 
 bookmarkable pages. Is there an alternative I could use to redirect to the 
 / URL?
 
 -Original Message-
 From: Martin Asenov [mailto:mase...@velti.com]
 Sent: Friday, 5 February 2010 12:30 AM
 To: users@wicket.apache.org
 Subject: RE: setResponsePage in the beggining of a constructor does not
 work

 Thanks friend! Works great! You saved me a lot of time!

 Best regards,
 Martin

 -Original Message-
 From: Major Péter [mailto:majorpe...@sch.bme.hu]
 Sent: Thursday, February 04, 2010 3:21 PM
 To: users@wicket.apache.org
 Subject: Re: setResponsePage in the beggining of a constructor does not
 work

 Hi,

 the setresponsepage only marks, that the pagetarget is something else on
 the end of the cycle, but it isn't stopping the execution of the current
 page. If you want that, then use:
 throw new RestartResponseException(getApplication().getHomePage());

 Regards,
 Peter

 2010-02-04 14:16 keltezéssel, Martin Asenov írta:
 Hello guys!

 I've got three pages, where I do certain check in the beginning and if
 the criteria is not met, I redirect to home page. I make it that way:

 public MyPageClass {

 if (something) {
 system.out.println(mypageclass - we're in);
 setResponsePage(getApplication().getHomePage());
 }

  page initialization afterwards
 }

 The strange thing is that it works for one of the pages, for another two
 - it does not - there is no redirection at all; it goes on with further
 initializing. The criteria check block is the very same one in each of the
 pages.

 Appreciate if someone helps!

 Regards,
 Martin

 -
 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: Loading resources (CSS,JS) from JARs ?

2010-02-04 Thread Ashika Umanga Umagiliya

Thanks Ernesto,

That is very useful.


Hi,

It is very easy to achieve this. E.g.

public class MyPanel extends Panel {

private static final long serialVersionUID = 1L;

public static ResourceReference JS = new
ResourceReference(MyPanel.class, mypanel.js);
public static ResourceReference CSS = new
ResourceReference(MyPanel.class, main.css);

public MyPanel(String id) {
super(id);
add(CSSPackageResource.getHeaderContribution(CSS));
add(JavascriptPackageResource.getHeaderContribution(JS));
}
}

assuming place mypanel.js and main.css on same package as MyPanel Wicket
will serve then from the classpath. This will work also for images and so
on.

By the way at CSS level you could use

div.myclass {
background-image : url(picture.gif);
}

if picture.gif is on the same package as main.css: no need for the long
resource reference. IMHO this is one of the many nice features Wicket
provides as all you need to roll out reusable components is a jar file.
Additionally, if you use AJAX Wicket will dynamically add the CSS and JS
references to the page when the new component is loaded (if the page did not
contained those references already).

Best,

Ernesto

P.S. Other frameworks have added similar features e.g. Struts2 allows to
serve resources from withing jar files. This make easier to create and
distribute plugins.


On Thu, Feb 4, 2010 at 2:56 AM, Ashika Umanga Umagiliya 
auma...@biggjapan.com wrote:

  

Greetings,

While playing around with wicket-stuffminis , I noticed that the Moontip
load its CSS,JavaScript from the class path (wicketstuff-minis.jar)
eg:
http://localhost:8080/minis-examples/resources/org.wicketstuff.minis.mootipbehavior.MootipBehaviour/mootools.v1.11.js
-which I couldnt find in the 'webapp' folder ,but in
'minis-1.4.2-SNAPSHOT-javadoc.jar' file.

I was wondering,can I bundle my CSS,Js into JARs like this,without copying
into  'webapp' folder?
How does wicket process this ? Is it the path 'resources/' ?

Thanks
umanga

-
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: DataTable : Setting the Column with from Java ?

2010-02-04 Thread Ashika Umanga Umagiliya

Hi nino,

I just use
   table wicket:id=table cellspacing=0 width=100% class=grid

to display my datatable.
I dont want to change the CSS style for the class.I want the change the 
width of each Column ,according to the value read from XML.

Something like:

int colWidth=vcol.getColumnWidth();

IColumn col;
..
..
col.someMethod().editAttribute(width,colWidth);
..



nino martinez wael wrote:

I susspect you should add the attribute modifier to your LinkoutColumn
telling what css class you want to use.. I would have to see the html aswell
to help further..

2010/2/4 Ashika Umanga Umagiliya auma...@biggjapan.com

  

Hi nino,

To which component I should add an attribute-modifier. In IColumn ,i should
add the 'width' to the headers ,i assume.
any tips to do this?


nino martinez wael wrote:



use a attribute modifier


2010/2/4 Ashika Umanga Umagiliya auma...@biggjapan.com



  

Greetings,

For my DataTable ,I create 'IColumn's using data from an XML file.

In the code-snippet below, the 'vcol' instance has information about
Column-title,bean property field,visible or not..etc.
Now I want to set the column width using the same way.How can I change
the
CSS property from Java ?
Any tips how I can do this?



ListIColumn columns;
//For each Column in Table
for (Column vcol : table.getColumns()) {
 if (!vcol.isVisible()) {
 continue;
 }

 if (vcol.getId().equals(id)) {
   AbstractColumnE linkcolumnModel=null;
 if(vcol.isSort()){
 linkcolumnModel=new SortableIdColumn(new
Model(vcol.getTitle()),vcol.getValue());
 }else{
 linkcolumnModel=new SortableIdColumn(new
Model(vcol.getTitle()));
 }

 columns.add(linkcolumnModel);

 } else if (vcol.isLinkout()) {
 LinkoutColumn linkoutCol = new LinkoutColumn(new Model(vcol
 .getTitle()), vcol.getValue());
   columns.add(linkoutCol);
 } else {
 //Add normal datacolumn
 if(vcol.isSort()){
 columns.add(new PropertyColumnString(new
Model(vcol.getTitle()),
  vcol.getValue(),vcol.getValue()));
   }else{
 columns.add(new PropertyColumnString(new
Model(vcol.getTitle()),
  vcol.getValue()));
   }
 }

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







  



  




Re: property file location feature request (ComponentStringResourceLoader)

2010-02-04 Thread pete swulius
For future reference.
https://issues.apache.org/jira/browse/WICKET-2713


Re: DataTable : Setting the Column with from Java ?

2010-02-04 Thread Ashika Umanga Umagiliya

Thanks for the tips,

I found the solution:

public void populateItem(ItemICellPopulatorE cellitem,
   String id, IModelE model) {
  cellitem.add(new 
SimpleAttributeModifier(style,width:+width+px));

}

regards
umanga
nino martinez wael wrote:

I susspect you should add the attribute modifier to your LinkoutColumn
telling what css class you want to use.. I would have to see the html aswell
to help further..

2010/2/4 Ashika Umanga Umagiliya auma...@biggjapan.com

  

Hi nino,

To which component I should add an attribute-modifier. In IColumn ,i should
add the 'width' to the headers ,i assume.
any tips to do this?


nino martinez wael wrote:



use a attribute modifier


2010/2/4 Ashika Umanga Umagiliya auma...@biggjapan.com



  

Greetings,

For my DataTable ,I create 'IColumn's using data from an XML file.

In the code-snippet below, the 'vcol' instance has information about
Column-title,bean property field,visible or not..etc.
Now I want to set the column width using the same way.How can I change
the
CSS property from Java ?
Any tips how I can do this?



ListIColumn columns;
//For each Column in Table
for (Column vcol : table.getColumns()) {
 if (!vcol.isVisible()) {
 continue;
 }

 if (vcol.getId().equals(id)) {
   AbstractColumnE linkcolumnModel=null;
 if(vcol.isSort()){
 linkcolumnModel=new SortableIdColumn(new
Model(vcol.getTitle()),vcol.getValue());
 }else{
 linkcolumnModel=new SortableIdColumn(new
Model(vcol.getTitle()));
 }

 columns.add(linkcolumnModel);

 } else if (vcol.isLinkout()) {
 LinkoutColumn linkoutCol = new LinkoutColumn(new Model(vcol
 .getTitle()), vcol.getValue());
   columns.add(linkoutCol);
 } else {
 //Add normal datacolumn
 if(vcol.isSort()){
 columns.add(new PropertyColumnString(new
Model(vcol.getTitle()),
  vcol.getValue(),vcol.getValue()));
   }else{
 columns.add(new PropertyColumnString(new
Model(vcol.getTitle()),
  vcol.getValue()));
   }
 }

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







  



  




Fix super(new CompoundPropertyModel(this)) error in the WIA book

2010-02-04 Thread David Chang
Hello, I am learning Wicket by reading Wicket in Action. I am using Wicket 
1.4.5 and Java 6. 

On page 244, the sample code is as follows:

private int counter = 0;
public MyPage() {
  super(new CompoundPropertyModel(this));
  final Label counterLabel = new Label(counter);
  add(counterLabel);
  counterLabel.setOutputMarkupId(true);
  add(new AjaxLink(counterLabelLink)
@Override
public void onClick(AjaxRequestTarget target) {
counter++;
target.addComponent(counterLabel);
}
});
}

The line has super(new CompoundPropertyModel(this)); gives a compiler error. I 
replaced it with the following:

super();
setDefaultModel(new CompoundPropertyModel(this));

and it works. 

My question is: 

1. Am I doing the right thing?
2. Any better or more elegant way?
3. How much of WIA remains true as far as Wicket 1.4.5 concerned?

Thanks!






  

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



Re: setResponsePage in the beggining of a constructor does not work

2010-02-04 Thread Steve Swinsburg
They don't need to be bookmarkable. You can call specific constructors of a 
class if you want:
throw new RestartResponseException(new MyClass(something));

cheers,
Steve


On 05/02/2010, at 10:59 AM, Chris Colman wrote:

 Could I use RestartResponseException to redirect to a URL instead of a 
 bookmarkable page?
 
 My problem is that all of my pages require a parameter (even the home page 
 but that's fine because the Tomcat container server.xml configures the 
 appropriate redirection for me - users never have to enter the parameters in 
 the address bar) but the Expired Page page contains a link that does not 
 contain any parameters.
 
 When a session expires the page that appears attempts to go to the 'home' 
 page without any parameters. If I could either change the expired page's link 
 or do a redirect in the home page's constructor that redirect's to / then 
 this would work fine.
 
 Unfortunately the RestartResponseException seems to only want to redirect to 
 bookmarkable pages. Is there an alternative I could use to redirect to the 
 / URL?
 
 -Original Message-
 From: Martin Asenov [mailto:mase...@velti.com]
 Sent: Friday, 5 February 2010 12:30 AM
 To: users@wicket.apache.org
 Subject: RE: setResponsePage in the beggining of a constructor does not
 work
 
 Thanks friend! Works great! You saved me a lot of time!
 
 Best regards,
 Martin
 
 -Original Message-
 From: Major Péter [mailto:majorpe...@sch.bme.hu]
 Sent: Thursday, February 04, 2010 3:21 PM
 To: users@wicket.apache.org
 Subject: Re: setResponsePage in the beggining of a constructor does not
 work
 
 Hi,
 
 the setresponsepage only marks, that the pagetarget is something else on
 the end of the cycle, but it isn't stopping the execution of the current
 page. If you want that, then use:
 throw new RestartResponseException(getApplication().getHomePage());
 
 Regards,
 Peter
 
 2010-02-04 14:16 keltezéssel, Martin Asenov írta:
 Hello guys!
 
 I've got three pages, where I do certain check in the beginning and if
 the criteria is not met, I redirect to home page. I make it that way:
 
 public MyPageClass {
 
if (something) {
system.out.println(mypageclass - we're in);
setResponsePage(getApplication().getHomePage());
}
 
  page initialization afterwards
 }
 
 The strange thing is that it works for one of the pages, for another two
 - it does not - there is no redirection at all; it goes on with further
 initializing. The criteria check block is the very same one in each of the
 pages.
 
 Appreciate if someone helps!
 
 Regards,
 Martin
 
 -
 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
 



smime.p7s
Description: S/MIME cryptographic signature


[1.4.6] WicketURLDecoder - No current Application found - defaulting encoding to UTF-8

2010-02-04 Thread smallufo
After upgrading to 1.4.6 , it always pops up this warning :

WARN  http.WicketURLDecoder - No current Application found - defaulting
encoding to UTF-8

It is ok in 1.4.5 , but I don't know why it has such warning in 1.4.6 .
How to get rid of it ?

Thanks ...


Bring Panel into View in Browser

2010-02-04 Thread Corbin, James
Hi,

 

I am dynamically adding panel components to my display and eventually
the list of panels grows big enough that the most recently added is not
visible (not in visible scroll region) in the browser.

 

I am looking for an approach to force the last panel added to scroll
into view if it's out of the visible browser view.

 

All my panels derive from a common panel implementation.  I thought I
might be able to have the base panel implementation implement
IHeaderContributor and then in the renderHead method, try to do the
following similar to the following:

 

  public void renderHead(IHeaderResponse response) {

...

String js =
document.getElementById('+getMarkupId()+').focus();;

response.renderOnLoadJavascript(js);

  }

 

This does not work, but my hope was that by setting the panel to have
focus after its created, that it would scroll into view if it wasn't
already.

Assuming setting focus on a panel would even work, which I'm not sure it
would, I noticed that I am getting Debug errors in the Javascript Debug
window that the result of the document.getElementById('objectid')
call is null.

 

I've thought of using the following javascript functions,
window.scrollBy or window.scrollTo, but haven't had any luck with those.

 

Is it possible in wicket to do this?

 

Thanks,
J



Re: Fix super(new CompoundPropertyModel(this)) error in the WIA book

2010-02-04 Thread Andrew Lombardi
WiA covers 1.3, there's a wiki page that covers the differences here: 
http://cwiki.apache.org/WICKET/migrating-to-wicket-14.html

95% of WiA is going to work just fine though, aside from the changes mentioned 
in the migration link above

On Feb 4, 2010, at 7:51 PM, David Chang wrote:

 Hello, I am learning Wicket by reading Wicket in Action. I am using 
 Wicket 1.4.5 and Java 6. 
 
 On page 244, the sample code is as follows:
 
 private int counter = 0;
 public MyPage() {
  super(new CompoundPropertyModel(this));
  final Label counterLabel = new Label(counter);
  add(counterLabel);
  counterLabel.setOutputMarkupId(true);
  add(new AjaxLink(counterLabelLink)
@Override
public void onClick(AjaxRequestTarget target) {
counter++;
 target.addComponent(counterLabel);
 }
 });
 }
 
 The line has super(new CompoundPropertyModel(this)); gives a compiler error. 
 I replaced it with the following:
 
 super();
 setDefaultModel(new CompoundPropertyModel(this));
 
 and it works. 
 
 My question is: 
 
 1. Am I doing the right thing?
 2. Any better or more elegant way?
 3. How much of WIA remains true as far as Wicket 1.4.5 concerned?
 
 Thanks!
 
 
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 


To our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | and...@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 714-816-4488
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.


This message is for the named person's use only. You must not, directly or 
indirectly, use,
 disclose, distribute, print, or copy any part of this message if you are not 
the intended recipient.




Re: [1.4.6] WicketURLDecoder - No current Application found - defaulting encoding to UTF-8

2010-02-04 Thread Igor Vaynberg
disable it in your logging configuration

-igor

On Thu, Feb 4, 2010 at 8:13 PM, smallufo small...@gmail.com wrote:
 After upgrading to 1.4.6 , it always pops up this warning :

 WARN  http.WicketURLDecoder - No current Application found - defaulting
 encoding to UTF-8

 It is ok in 1.4.5 , but I don't know why it has such warning in 1.4.6 .
 How to get rid of it ?

 Thanks ...


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



Re: dojo 1.4

2010-02-04 Thread Ernesto Reinaldo Barreiro
I think there is a dojo project on wicketstuf

http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-dojo-1.1

http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-dojo-1.1but
it seems it is 1.1 Unless documentation is outdated?

Best,

Ernesto

On Thu, Feb 4, 2010 at 11:08 PM, Josh Chappelle jchappe...@4redi.comwrote:

 I've searched everywhere and can't find the wicket 1.4 compatible dojo jar
 file. There isn't one in the maven repository.



 Has one been developed? If so can someone point me in the right direction?



 Thanks,



 Josh




Re: AbstractAjaxTimerBehaviour sets Transient object to null when same page in opened in new tab

2010-02-04 Thread LinaTomy

Thanks a lot Igor. This works!!


igor.vaynberg wrote:
 
 if you keep working on the same page instance it is kept in http
 sessison and is not serialized. when you go to a new page it pushes
 the old instance out, forcing serialization, and setting the transient
 field to null.
 
 a proper way to do this would be to have an application-wide task
 manager. the code may look something like this:
 
 BackgroundTask bt=Application.get().getTaskManager().start(new
 runnable(){});
 taskId=bt.getId(); == task id is a simple string that you can pass
 around, usually a UUID
 
 then later when you want to poll status
 BackgroundTask bt=Application.get().getTaskManager().get(taskid);
 bt.getFuture().
 
 -igor
 
 On Tue, Feb 2, 2010 at 7:25 PM, Lina Thomas ltho...@taxcient.com wrote:
 Hi

        I have a Page on which I am have to execute a long running task
 when
 a form is submitted.  This is what I do


   1. I have a transient FutureTask member variable in the page
   2. On submit of the form i create a callable and instantiate
   the FutureTask
   3. I start the AbstractAjaxTimerBehaviour which keeps checking if
   the FutureTask is done before it can update a panel in the page with
 the
   result of the execution.
      - This works fine when I'm on the same page
      - Now if I submit the form and while the AbstractAjaxTimerBehaviour
 is
      still polling I open the same page *in a new tab* *within the same
      session* then the reference to the FutureTask in the first page
      (previous tab) becomes null.

 I couldn't find any solution to this problem. Any help would be greatly
 appreciated.

 Thanks
 -Lina

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

-- 
View this message in context: 
http://old.nabble.com/AbstractAjaxTimerBehaviour-sets-Transient-object-to-null-when-same--page-in-opened-in-new-tab-tp27430960p27464133.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: setResponsePage in the beggining of a constructor does not work

2010-02-04 Thread Erik van Oosten
In Wicket it usually helps to look at the classes that are near in the 
class hierarchy. In this case RestartResponseException extends from 
AbstractRestartResponseException. Another subclass of 
AbstractRestartResponseException is RedirectToUrlException, which does 
exactly what you ask.


Regards,
   Erik.

Chris Colman wrote:

Could I use RestartResponseException to redirect to a URL instead of a 
bookmarkable page?

My problem is that all of my pages require a parameter (even the home page but that's 
fine because the Tomcat container server.xml configures the appropriate redirection for 
me - users never have to enter the parameters in the address bar) but the Expired 
Page page contains a link that does not contain any parameters.

When a session expires the page that appears attempts to go to the 'home' page without 
any parameters. If I could either change the expired page's link or do a redirect in the 
home page's constructor that redirect's to / then this would work fine.

Unfortunately the RestartResponseException seems to only want to redirect to bookmarkable 
pages. Is there an alternative I could use to redirect to the / URL?
  


--
Send from my SMTP compliant software
Erik van Oosten
http://day-to-day-stuff.blogspot.com/



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



How to add and remove css classes the right way?

2010-02-04 Thread Martin U
Hi Folks,

I'am getting totally confused how to add and remove css classes to and form
my text-input-fields on ajax-form-validation.

At first i try to add two css classes step by step:

IteratorFeedbackMessage iter =
Session.get().getFeedbackMessages().messages(getFeedbackMessageFilter()).iterator();
if(iter.hasNext()){
indicatorFor.add(new SimpleAttributeModifier(class,validation_error));
indicatorFor.add(new SimpleAttributeModifier(class, test));
}

But gets the Markup only with class='test' 

How can i add more than one value to class?

And how can i remove one special css-class from an component if the
validation is okay to this field?


Thanks in Advance for any help.

- Martin