Re: Adding multiple ajax behavious on same event

2009-02-17 Thread rag...@directi

I guess minis is part of wicketstuff-corei did not find any
CompoundBehavior in minis project. 


martin-g wrote:
> 
> see CompoundBehavior in wicketstuff-minis
> 
> El lun, 16-02-2009 a las 03:06 -0800, rag...@directi escribió:
>> I am using an AjaxLink which has a javascript for onclick event now i
>> want to
>> add AjaxFormValidatingBehavior  to this link on the same event "onclick"
>> ...i tried adding the same...but the link does not  work properly...i
>> think
>> the actual javascript is replacedcan any one please help me how to do
>> this...
>> 
>> I had a look at IAjaxCallDecorator  also.. If i hv understood
>> IAjaxCallDecorator  correctly i can use it to append to the
>> javascriptso
>> one way could be to have a look at the javascript generated by
>> AjaxFormValidatingBehavior   and append it to the javascript of
>> ajaxlink.but is there a cleaner way to do this..
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Adding-multiple-ajax-behaviour-on-same-event-tp22035278p22073547.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: Validation From A Custom Component

2009-02-17 Thread nino martinez wael
Hehe, I knew there were some reason.. Just looked a bit odd.

2009/2/17 Jeremy Thomerson 

> Because there's a compile error if you don't "The method
> error(IValidationError) is ambiguous for the type new
> TextField(){}".
>
> I thought the same, and didn't care to look further since this was just a
> quick example.  Take a look for yourself:
>
>new TextField("", new Model("")) {
>private static final long serialVersionUID = 1L;
>
>public void updateModel() {
>try {
>super.updateModel();
>} catch(Exception ex) {
>ValidationError error = new ValidationError();
>error.setMessage(ex.getMessage());
>/* or you could do this:
> * error.addMessageKey("MaximumValidator");
> * error.setVariable("maximum", 1);
> */
> error(error);
>}
>}
>};
>
>
> On Tue, Feb 17, 2009 at 2:56 PM, Nino Martinez <
> nino.martinez.w...@gmail.com
> > wrote:
>
> > Jeremy Thomerson wrote:
> >
> >> I, too, agree that this may not be the best way of doing things.  But,
> >> anyway, there is a solution that will work:
> >>
> >> Use ValidationError rather than just a string
> >>
> >>public void updateModel() {
> >>try {
> >>super.updateModel();
> >>} catch(Exception ex) {
> >>ValidationError error = new ValidationError();
> >>error.setMessage(ex.getMessage());
> >>/* or you could do this:
> >> * error.addMessageKey("MaximumValidator");
> >> * error.setVariable("maximum", 1);
> >> */
> >>error((IValidationError) error);
> >>
> >>
> > why the cast? ValidationError implements IValidationError right?
> >
> > }
> >>}
> >>
> >>
> >>
> >>
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>


Re: Yet another Wicket quick start application...

2009-02-17 Thread nino martinez wael
I wish that some of these frameworks would join existing ones.. To put more
momentum in those..

I know we would be happy to have more people on wicketopia, which does
something similar..

regards Nino

2009/2/18 Patrick Angeles 

>
> For anyone interested, I've made public yet another quick start application
> that brings together Wicket, Spring 2.5 and Hibernate.
>
> The app features a basic CRUD framework based on wicketstuff-crud. The CRUD
> framework uses bean annotations to define CRUD properties. It also uses the
> excellent InMethod Grid component for the list view.
>
> Link:
>
> http://apptizer.googlecode.com/
>
> Cheers,
>
> - P
> --
> View this message in context:
> http://www.nabble.com/Yet-another-Wicket-quick-start-application...-tp22068362p22068362.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: @SpringBean vs getApplication().getDao()

2009-02-17 Thread Sergey Podatelev
Thanks for your insight, Patrick.

But I'm stuck in my dumbness: "setting the component's fields" -- does this
mean a new instance of that particular annotated bean is created, or that
singleton is accessed somehow (proxy)?
Also, it's not the injected beans that are null, it's their dependencies,
and I assume that is because new instances of those beans are created.


On Wed, Feb 18, 2009 at 9:13 AM, Patrick Angeles wrote:

>
>
> To answer your question, yes spring beans are singleton by default. The
> @SpringBean annotation works roughly like this: in your Application class,
> you set a ComponentInstantiationListener which gets called every time a
> Wicket page/component is instantiated. The particular listener that gets
> set
> (SpringComponentInjector) takes care of setting the component's fields that
> are annotated with @SpringBean with the appropriate beans found in the
> spring context.
>
> My guess is that the Listener isn't being configured properly, and that is
> why your @SpringBeans are null...
>
>
>
> Sergey Podatelev wrote:
> >
> > Okay, this question might actually be more related to Spring, but I'm
> > completely lost here, and my question on Spring forums usually don't get
> > any
> > replies, so I hope Wicket community might help as it usually does.
> >
> > I'm using JCR, and have a RepositoryDao bean configured in
> > applicationContext.xml.
> > RepositoryDao has a "template" property which points to an instance of
> > JcrTemplate in applicationContext.xml, all repository access is performed
> > through that template.
> >
> > I have an AccessPage which has a RepositoryDao injected via @SpringBean.
> > There is an inner class Form on that page, it has a default submit button
> > and three submit buttons that skip default processing and perform their
> > own
> > operations onSubmit(). Both default button and skip-default-processing
> > buttons use the same repositoryDao property of AccessPage to perform
> > certain
> > operations on repository.
> >
> > I noticed that when I actually open that AccessPage, there's a new
> > RepositoryDao object created, and it's "template" property is null. When
> I
> > press any of those non-default submit buttons of the form, everything
> > works
> > fine. But on default button onSubmit(), I see that there's yet another
> > insance of RepositoryDao created, and it's "template" is also null, which
> > leads to NullPointerException.
> >
> > I assumed that beans configured in applicationContext.xml are actually
> > singletons, so there won't be any new instances of such nodes upon
> > pages-with-injections instantiation.
> >
> > Regardless of whether that assumption is correct/incorrect/my-god-rtfm, I
> > still won't understand why default submit button reaction is NPE as it
> > uses
> > same partnershipDao property of AccessPage.
> >
> > Could someone please elaborate some internal differences of the
> > annotation-based approach as opposed to storing DAOs in Application
> > object.
> > In the latter case it's quite clear that there's a single instance of
> > RepositoryDao as a property of MyApplication which is pulled on
> > ((MyApplication) Application.get()).getRepositoryDao().
> >
> > Thanks.
> >
> > --
> > sp
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/%40SpringBean-vs-getApplication%28%29.getDao%28%29-tp22061472p22072806.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
>
>


-- 
sp


Re: @SpringBean vs getApplication().getDao()

2009-02-17 Thread Patrick Angeles


To answer your question, yes spring beans are singleton by default. The
@SpringBean annotation works roughly like this: in your Application class,
you set a ComponentInstantiationListener which gets called every time a
Wicket page/component is instantiated. The particular listener that gets set
(SpringComponentInjector) takes care of setting the component's fields that
are annotated with @SpringBean with the appropriate beans found in the
spring context.

My guess is that the Listener isn't being configured properly, and that is
why your @SpringBeans are null...



Sergey Podatelev wrote:
> 
> Okay, this question might actually be more related to Spring, but I'm
> completely lost here, and my question on Spring forums usually don't get
> any
> replies, so I hope Wicket community might help as it usually does.
> 
> I'm using JCR, and have a RepositoryDao bean configured in
> applicationContext.xml.
> RepositoryDao has a "template" property which points to an instance of
> JcrTemplate in applicationContext.xml, all repository access is performed
> through that template.
> 
> I have an AccessPage which has a RepositoryDao injected via @SpringBean.
> There is an inner class Form on that page, it has a default submit button
> and three submit buttons that skip default processing and perform their
> own
> operations onSubmit(). Both default button and skip-default-processing
> buttons use the same repositoryDao property of AccessPage to perform
> certain
> operations on repository.
> 
> I noticed that when I actually open that AccessPage, there's a new
> RepositoryDao object created, and it's "template" property is null. When I
> press any of those non-default submit buttons of the form, everything
> works
> fine. But on default button onSubmit(), I see that there's yet another
> insance of RepositoryDao created, and it's "template" is also null, which
> leads to NullPointerException.
> 
> I assumed that beans configured in applicationContext.xml are actually
> singletons, so there won't be any new instances of such nodes upon
> pages-with-injections instantiation.
> 
> Regardless of whether that assumption is correct/incorrect/my-god-rtfm, I
> still won't understand why default submit button reaction is NPE as it
> uses
> same partnershipDao property of AccessPage.
> 
> Could someone please elaborate some internal differences of the
> annotation-based approach as opposed to storing DAOs in Application
> object.
> In the latter case it's quite clear that there's a single instance of
> RepositoryDao as a property of MyApplication which is pulled on
> ((MyApplication) Application.get()).getRepositoryDao().
> 
> Thanks.
> 
> -- 
> sp
> 
> 

-- 
View this message in context: 
http://www.nabble.com/%40SpringBean-vs-getApplication%28%29.getDao%28%29-tp22061472p22072806.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: Validation From A Custom Component

2009-02-17 Thread Igor Vaynberg
We designed our domain to use wicket's ivalidator for validation, so
we get to reuse our validation in the frontend components.

-Igor

On 2/17/09, walnutmon  wrote:
>
> My solution was a combination of the ideas here, let me know what you think
> :)  While I don't particularly love the idea of using domain exceptions to
> render feedback on the front end, I don't have any control over certain
> decisions; still, being able to use a strict domain and have it interact
> with the UI is still a very interesting, and potentially useful example...
> All of the logic in reporting an error is done within the custom component.
>
> public class DomainTextField extends TextField
> {
>
> public DomainTextField(String id)
> {
> super(id);
> add(new AbstractValidator()
> {
> protected void onValidate(IValidatable arg0)
> {
> checkAgainstModelObject(arg0);
> }
> });
> }
>
> private void checkAgainstModelObject(IValidatable validatableInput)
> {
> //I don't want to lose the initial value
> Object tmp = getDefaultModelObject();
> try
> {
> setDefaultModelObject(getConvertedInput());
> } catch (final Exception ex)
> {//This is the worst part IMHO, I should be checking a specific
> exception
> validatableInput.error(new IValidationError()
> {
> public String getErrorMessage(
> IErrorMessageSource messageSource)
> {
> return ex.getCause().getMessage();
> }
> });
> } finally
> {//if possible, set back to the inital value
> if (tmp != null)
> {
> setDefaultModelObject(tmp);
> }
> }
> }
> }
>
> --
> View this message in context:
> http://www.nabble.com/Validation-From-A-Custom-Component-tp22060300p22070136.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Add a surrounding component to itself

2009-02-17 Thread Willis Blackburn

Prag,

It would be tough to write a component that could "replace" itself,  
and I think that it's impossible to have a component that's visible  
when its parent is invisible.


What you want to do is create a Panel that either displays the link  
with the product within it, or just displays the product.  You'll  
probably want to use Fragment within the Panel, which will let you use  
a different bit of markup for each case while still keeping it in one  
HTML file.  You could also just create the components for both cases  
(a standalone Label and a Link containing a second Label) and just  
show one or the other.


W


On Feb 17, 2009, at 5:37 PM, Prag wrote:



For a component (A) I would like to be able to add a surrounding  
component

(B) (a link) in some cases. Component A itself should be able to add
surrounding component B.

Example:
A product component in some cases has detailed info. If this is the  
case,

the product component should be linkable to the detailed page. If it's
linkable, the product component should add a surrounding link to  
itself to

the detailed page.


So the product component should be able to hide/add its parent without
itself become hidden.

How can I achieve this?
--
View this message in context: 
http://www.nabble.com/Add-a-surrounding-component-to-itself-tp22067906p22067906.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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




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



Re: Validation From A Custom Component

2009-02-17 Thread walnutmon

My solution was a combination of the ideas here, let me know what you think
:)  While I don't particularly love the idea of using domain exceptions to
render feedback on the front end, I don't have any control over certain
decisions; still, being able to use a strict domain and have it interact
with the UI is still a very interesting, and potentially useful example... 
All of the logic in reporting an error is done within the custom component.

public class DomainTextField extends TextField
{

public DomainTextField(String id)
{
super(id);
add(new AbstractValidator()
{
protected void onValidate(IValidatable arg0)
{
checkAgainstModelObject(arg0);
}
});
}

private void checkAgainstModelObject(IValidatable validatableInput)
{
//I don't want to lose the initial value
Object tmp = getDefaultModelObject();
try
{
setDefaultModelObject(getConvertedInput());
} catch (final Exception ex)
{//This is the worst part IMHO, I should be checking a specific
exception
validatableInput.error(new IValidationError()
{
public String getErrorMessage(
IErrorMessageSource messageSource)
{
return ex.getCause().getMessage();
}
});
} finally
{//if possible, set back to the inital value
if (tmp != null)
{
setDefaultModelObject(tmp);
}
}
}
}

-- 
View this message in context: 
http://www.nabble.com/Validation-From-A-Custom-Component-tp22060300p22070136.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



How can override calendar formatting at initialization using DatePicker? getAdditionalJavascript not always working...

2009-02-17 Thread Jen Van Orman
I am overriding the DatePicker class in order to limit the calendar to 3
months, and I also want to disable the 1st through 4th of each month.

My override of getAdditionalJavascript does the following adds a renderer to
these dates as an OutOfBoundsDate:
*

for*( *int* i = minCal.get(Calendar.*MONTH*); i <= maxCal.get(Calendar.*
MONTH*); i++){

javascript += "${calendar}.addRenderer(\"" + (i + 1) + "/1\",
${calendar}.renderOutOfBoundsDate);";

javascript += "${calendar}.addRenderer(\"" + (i + 1) + "/2\",
${calendar}.renderOutOfBoundsDate);";

javascript += "${calendar}.addRenderer(\"" + (i + 1) + "/3\",
${calendar}.renderOutOfBoundsDate);";

javascript += "${calendar}.addRenderer(\"" + (i + 1) + "/4\",
${calendar}.renderOutOfBoundsDate);";

...

However, the renderer doesn't work when the calendar is initially shown.
For example, if the pageDate of the calendar is set to 03/2009, the 1st
through the 4th will be enabled, but the 1st through the 4th of April and
May will be disabled, as expected.  When navigating back to March, the 1st
through the 4th are then disabled.  Also, closing the calendar and reopening
it disables the 1st through the 4th.

With appendToInit being deprecated, how can these renderers be added to the
initialization of the calendar?

Any help is greatly appreciate.

Thanks,

Jen Van Orman






-- 
Quis custodiet ipsos custodes?


Re: Yet another Wicket quick start application...

2009-02-17 Thread Sergey Podatelev
Will definitely check that out, thanks.

On Wed, Feb 18, 2009 at 2:41 AM, Patrick Angeles wrote:

>
> For anyone interested, I've made public yet another quick start application
> that brings together Wicket, Spring 2.5 and Hibernate.
>
> The app features a basic CRUD framework based on wicketstuff-crud. The CRUD
> framework uses bean annotations to define CRUD properties. It also uses the
> excellent InMethod Grid component for the list view.
>
> Link:
>
> http://apptizer.googlecode.com/
>
> Cheers,
>
> - P
> --
> View this message in context:
> http://www.nabble.com/Yet-another-Wicket-quick-start-application...-tp22068362p22068362.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
>
>


-- 
sp


Yet another Wicket quick start application...

2009-02-17 Thread Patrick Angeles

For anyone interested, I've made public yet another quick start application
that brings together Wicket, Spring 2.5 and Hibernate.

The app features a basic CRUD framework based on wicketstuff-crud. The CRUD
framework uses bean annotations to define CRUD properties. It also uses the
excellent InMethod Grid component for the list view.

Link:

http://apptizer.googlecode.com/

Cheers,

- P
-- 
View this message in context: 
http://www.nabble.com/Yet-another-Wicket-quick-start-application...-tp22068362p22068362.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



inmethod datagrid with a DropDownChoice cell

2009-02-17 Thread Will Jaynes
I'm working with the inmethod datagrid. The grid is editable, and I have it
working just as the examples show, with a couple of cells that contain text.
As in the examples, clicking on a row changes some cells into TextField
components that can be edited.

Now I would like to create a cell that displays text, but when the row is
clicked the cell turns into a DropDownChoice component. I've tried to mimic
the EditablePropertyColumn and the TextFieldPanel with my own
EditableDropDownPropertyColumn and a DropDownPanel. These render fine and
let me select from the dropdown, but things go wrong when I press the submit
icon. I get an exception: "Attempt to set model object on null model of
component"

If/When I have time I will make a quickstart, but If anyone already has this
kind of thing working I would appreciate very much seeing the code.

Will


Re: Add a surrounding component to itself

2009-02-17 Thread Jeremy Thomerson
One option: Use a panel that contains both.  Rather than adding B, add the
panel, which knows to display one or both.


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

On Tue, Feb 17, 2009 at 4:37 PM, Prag  wrote:

>
> For a component (A) I would like to be able to add a surrounding component
> (B) (a link) in some cases. Component A itself should be able to add
> surrounding component B.
>
> Example:
> A product component in some cases has detailed info. If this is the case,
> the product component should be linkable to the detailed page. If it's
> linkable, the product component should add a surrounding link to itself to
> the detailed page.
>
>
> So the product component should be able to hide/add its parent without
> itself become hidden.
>
> How can I achieve this?
> --
> View this message in context:
> http://www.nabble.com/Add-a-surrounding-component-to-itself-tp22067906p22067906.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
>
>


Add a surrounding component to itself

2009-02-17 Thread Prag

For a component (A) I would like to be able to add a surrounding component
(B) (a link) in some cases. Component A itself should be able to add
surrounding component B.

Example:
A product component in some cases has detailed info. If this is the case,
the product component should be linkable to the detailed page. If it's
linkable, the product component should add a surrounding link to itself to
the detailed page.


So the product component should be able to hide/add its parent without
itself become hidden.

How can I achieve this?
-- 
View this message in context: 
http://www.nabble.com/Add-a-surrounding-component-to-itself-tp22067906p22067906.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: @SpringBean vs getApplication().getDao()

2009-02-17 Thread Sergey Podatelev
Okay, thanks for you replies, my question was poorly formulated. There are
two issues here.

First problem is that I apparently don't understand some very basic
principles behind Spring-configured beans handling.

I assume that a DAO configured in Spring are created on application
deployment, specifically, application context initialization. This DAO is
also configured in applicationContext.xml to have as a property whatever
data source it needs like a JcrTemplate in case of JCR DAO or something like
JndiObjectFactoryBean in case of database.

When I have MyApplication configured to have reference to MyDao bean in
applicationContext.xml, upon app context initialization that myDao property
of MyApp is set to a reference of an instance of MyDao class, which is a
singleton. Then, on my pages, I actually access that myDao property of MyApp
via ((MyApp) Application.get()).getMyDao() and in case I follow that
proxy-based approach described on Wicket+Spring wiki page, I get a reference
to that singleton through some sort of proxy.

When I use annotation-based approach, however, I can actually see that MyDao
is instantiated several times (well, at least MyDao() constructor is called
several times), specifically, once on MyApp initialization, once when page,
that has that DAO injected, is created and in certain cases, once when I
actually call some method of that DAO.

Now here's the second part of the problem:

I have a RepositoryDao:

class RepositoryDao {
  private JcrTemplate template;

  public void setTemplate(JcrTemplate template) {
this.template = template;
  }
}

...configured in spring's appContext.xml (jcrSessionFactory and jcrTemplate
beans are ommited here):


  



  
true
  
  
  

  PROPAGATION_REQUIRED
  PROPAGATION_REQUIRED, readOnly

  



  



  


And an AccessPage:

class AccessPage {

  @SpringBean(name="repositoryDao")
  RepositoryDao repositoryDao;

  public AccessPage() {
add(new MyForm());
  }

  class MyForm extends Form {
public MyForm() {
  ...
  Button button2 = new Button("button2") {
@Override public void onSubmit() {
  repositoryDao.doB();
}
  }
  button2.setDefaultFormProcessing(false);
  add(button2);

  Button button3 = new Button("button3") {
@Override public void onSubmit() {
  repositoryDao.doC();
}
  }
  button3.setDefaultFormProcessing(false);
  add(button3);
}

public void onSubmit() {
  repositoryDao.doA();
}
  }
}

doA(), doB() and doC() all start from calling template.execute().

The problem is, when I hit button2 or button3, everything works fine, doB()
and doC() do work.
Default form submit button, however, leads to NPE as template is null.

Again, I'm sorry if this is off the topic, but I'd really like to find out
how these things actually work, and digging through all the code seems to be
a bit hardcore in this case.


On Tue, Feb 17, 2009 at 8:42 PM, James Perry
wrote:

> As far as I am aware, the main internal differential is that annotations
> provides a quick, safe way to access your spring beans and ensure that the
> whole container does not get serialized via a proxy. However the magic
> comes
> at a cost that it will serial the bean id (as a string) - which can be
> costly if used a lot in your components. On the other side of the coin,
> using the other option does not have any serialization cost but its very
> vulnerable to accidentally serializing the bean and, potentially, the whole
> application context.
>
> Personally I use the latter option where I access my service facade bean by
> a static import. I prefer this route as I am paranoid about memory usage
> but
> each their own.
>
> Best,
> James.
>
> On Tue, Feb 17, 2009 at 4:55 PM, Sergey Podatelev <
> brightnesslev...@gmail.com> wrote:
>
> > Okay, this question might actually be more related to Spring, but I'm
> > completely lost here, and my question on Spring forums usually don't get
> > any
> > replies, so I hope Wicket community might help as it usually does.
> >
> > I'm using JCR, and have a RepositoryDao bean configured in
> > applicationContext.xml.
> > RepositoryDao has a "template" property which points to an instance of
> > JcrTemplate in applicationContext.xml, all repository access is performed
> > through that template.
> >
> > I have an AccessPage which has a RepositoryDao injected via @SpringBean.
> > There is an inner class Form on that page, it has a default submit button
> > and three submit buttons that skip default processing and perform their
> own
> > operations onSubmit(). Both default button and skip-default-processing
> > buttons use the same repositoryDao property of AccessPage to perform
> > certain
> > operations on repository.
> >
> > I noticed that when I actually open that AccessPage, there's a new
> > RepositoryDao object created, and it's "template" prope

Re: Validation From A Custom Component

2009-02-17 Thread Jeremy Thomerson
Because there's a compile error if you don't "The method
error(IValidationError) is ambiguous for the type new
TextField(){}".

I thought the same, and didn't care to look further since this was just a
quick example.  Take a look for yourself:

new TextField("", new Model("")) {
private static final long serialVersionUID = 1L;

public void updateModel() {
try {
super.updateModel();
} catch(Exception ex) {
ValidationError error = new ValidationError();
error.setMessage(ex.getMessage());
/* or you could do this:
 * error.addMessageKey("MaximumValidator");
 * error.setVariable("maximum", 1);
 */
error(error);
}
}
};


On Tue, Feb 17, 2009 at 2:56 PM, Nino Martinez  wrote:

> Jeremy Thomerson wrote:
>
>> I, too, agree that this may not be the best way of doing things.  But,
>> anyway, there is a solution that will work:
>>
>> Use ValidationError rather than just a string
>>
>>public void updateModel() {
>>try {
>>super.updateModel();
>>} catch(Exception ex) {
>>ValidationError error = new ValidationError();
>>error.setMessage(ex.getMessage());
>>/* or you could do this:
>> * error.addMessageKey("MaximumValidator");
>> * error.setVariable("maximum", 1);
>> */
>>error((IValidationError) error);
>>
>>
> why the cast? ValidationError implements IValidationError right?
>
> }
>>}
>>
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


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


Re: How exactly does RestartResponseAtInterceptPageException work?

2009-02-17 Thread Jeremy Levy
David,

To my knowledge, the onClick will not be rerun.  I would do getPage() in
that onClick and send them to the page (passing the getPage()) that does
something, then send them back after doing some work.  When they click on
the link again, in theory, token shouldn't be null again...

Jeremy

On Mon, Feb 16, 2009 at 2:27 AM, David Leangen  wrote:

> Hi!
>
> Just wondering how this works, precisely, since I've been having some
> intermittent problems.
>
> I have a link that has an onClick() method that looks something like
> this (in principle):
>
> public void onClick()
> {
>  String token = checkForToken();
>  if( token == null )
>// Do something that will cause token to be non-null next time
>throw new RestartResponseAtInterceptPageException( SomePage.class );
>
>  doSomething( token );
> }
>
> During the process of doSomething(), I make the call to
> continueToOriginalDestination. This returns to the URL that includes the
> ITargetListener, so my expectation is that the onClick() above will be
> called again. Since this time checkForToken() returns the token, I can
> continue processing normally.
>
> This is working intermittently for me, so I believe that the way I
> _think_ things work is correct, but it would be really nice for somebody
> to confirm this for me.
>
>
> Thank you!
> =David
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Jeremy Levy

See my location in real-time:
http://seemywhere.com/jeremy


Re: Validation From A Custom Component

2009-02-17 Thread Nino Martinez

Jeremy Thomerson wrote:

I, too, agree that this may not be the best way of doing things.  But,
anyway, there is a solution that will work:

Use ValidationError rather than just a string

public void updateModel() {
try {
super.updateModel();
} catch(Exception ex) {
ValidationError error = new ValidationError();
error.setMessage(ex.getMessage());
/* or you could do this:
 * error.addMessageKey("MaximumValidator");
 * error.setVariable("maximum", 1);
 */
error((IValidationError) error);
  

why the cast? ValidationError implements IValidationError right?

}
}


  



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



Re: Stackoverflow running Wicket application on JBOSS cluster

2009-02-17 Thread Jeremy Levy
We have seen the same issue with virtually the same set up.  You may want to
try running it in a profiler and pinpoint directly where it's having an
issue.

I was able to get it to work if I didn't use  in web.xml.
But then of course there is no session replication.

Tomcat session replication isn't that efficient anyhow especially after you
add a couple of different nodes in the cluster.

We are looking at using terracotta as a replacement.

Jeremy

On Tue, Feb 17, 2009 at 3:42 AM, behrica wrote:

>
> Hi,
>
> I setup our wicket application on a simple JBoss cluster with session
> replication.
>
> Doing that I get more or less immediately the following track trace: (I
> paste only the upper part, but the same message gets repeated over and over
> in the stack trace)
>
> I use wicket 1.3.4, but it's the same with 1.3.5. I did not try yet any of
> the 1.4 versions.
>
> JBOSS version is 4.2.2 with JDK 1.5.11
>
> Did somebody has an idea what could be the problem ?
>
> 2009-02-16 19:00:46,755 DEBUG
> [org.jboss.web.tomcat.service.session.JBossCacheManager] loadSession(): id=
> waZCv4eBljwIL84w97q+EA**, session=SessionBasedClusteredSession[id:
> waZCv4eBljwIL84w97q+EA** lastAccessedTime: 1234807244931 version: 24
> lastOutdated: 0]
> 2009-02-16 19:00:48,438 ERROR
>
> [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/raw-war].[default]]
> Servlet.service() for servlet default threw exception
> java.lang.StackOverflowError
>at
> java.io.ObjectInputStream$HandleTable.grow(ObjectInputStream.java:3361)
>at
> java.io.ObjectInputStream$HandleTable.assign(ObjectInputStream.java:3171)
>at java.io.ObjectInputStream.readString(ObjectInputStream.java:1577)
>at
> java.io.ObjectInputStream.readTypeString(ObjectInputStream.java:1375)
>at
> java.io.ObjectStreamClass.readNonProxy(ObjectStreamClass.java:634)
>at
> java.io.ObjectInputStream.readClassDescriptor(ObjectInputStream.java:789)
>at
> java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1534)
>at
> java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
>at
> java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
>at
> java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
>at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
>at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
>at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
>at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
>at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
>at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
>at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
>at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
>at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
>at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
>at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
>at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
>at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
>at
> java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:479)
>at org.apache.wicket.Component.readObject(Component.java:4228)
>at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
>at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>at java.lang.reflect.Method.invoke(Method.java:585)
>at
> java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
>at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
>at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
>at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
>at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
>at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
>at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
>at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
>at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
>at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
>at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
>at
> org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:393)
>at
>
> org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:228)
>at
>
> org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStor

Re: Validation From A Custom Component

2009-02-17 Thread Jeremy Thomerson
I, too, agree that this may not be the best way of doing things.  But,
anyway, there is a solution that will work:

Use ValidationError rather than just a string

public void updateModel() {
try {
super.updateModel();
} catch(Exception ex) {
ValidationError error = new ValidationError();
error.setMessage(ex.getMessage());
/* or you could do this:
 * error.addMessageKey("MaximumValidator");
 * error.setVariable("maximum", 1);
 */
error((IValidationError) error);
}
}


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

On Tue, Feb 17, 2009 at 11:23 AM, Eduardo Nunes  wrote:

> I'm a little bit out of what you are doing, but validate information
> directly in setter methods usually isn't a good option...
>
> my 50c
>
> On Tue, Feb 17, 2009 at 2:19 PM, walnutmon 
> wrote:
> >
> > That's a fantastic idea, I'll definitely do that.
> >
> > There is one problem, because the validation is actualy coming from the
> > domain objects "setters", I don't know if there was a problem until the
> > "updateModel" method is called... I don't know if I like calling
> > "updateModel" from the validator, since I'm not sure whether that will
> break
> > other things down the road, I'll try it and report back.
> >
> > Is there a way that I can retrieve the setter, so that I can set it, and
> > then return it to it's initial state before the form calls 'updateModel'
> on
> > it's children?  Perhaps the component can only take PropertyModels?
> >
> >
> > Jeremy Thomerson-5 wrote:
> >>
> >> in the custom component's constructor, why don't you do:
> >>
> >> add(new IValidator() {
> >> ...
> >> });
> >>
> >> Or create a custom validator class and just add it to your custom
> >> components.
> >>
> >> On Tue, Feb 17, 2009 at 10:04 AM, walnutmon
> >> wrote:
> >>
> >>>
> >>> All,
> >>>
> >>> I have custom components which know if they have a validation error
> when
> >>> they call "updateModel()", the domain is where validation happens, I'm
> >>> using
> >>> this to post error messages which are rendered like a validation error:
> >>>
> >>>@Override
> >>>public void updateModel()
> >>>{
> >>>try
> >>>{
> >>>super.updateModel();
> >>>} catch (Exception ex)
> >>>{
> >>>error(ex.getCause().getMessage());
> >>>}
> >>>}
> >>>
> >>> however, unlike a wicket validation error, it still finishes the form
> >>> submission, is there a way for a component to add a validation error,
> so
> >>> that it behaves as if it were a MaximumLengthValidator() error, or
> >>> something
> >>> similar?  Or do I need to extend IValidator, and pass it the
> component's
> >>> domain object in order to do the check and use wicket's validation form
> >>> processing procedure.
> >>>
> >>> Thanks!
> >>> Justin
> >>> --
> >>> View this message in context:
> >>>
> http://www.nabble.com/Validation-From-A-Custom-Component-tp22060300p22060300.html
> >>> Sent from the Wicket - User mailing list archive at Nabble.com.
> >>>
> >>>
> >>> -
> >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >>> For additional commands, e-mail: users-h...@wicket.apache.org
> >>>
> >>>
> >>
> >>
> >> --
> >> Jeremy Thomerson
> >> http://www.wickettraining.com
> >>
> >>
> >
> > --
> > View this message in context:
> http://www.nabble.com/Validation-From-A-Custom-Component-tp22060300p22061961.html
> > Sent from the Wicket - User mailing list archive at Nabble.com.
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


RE: Inconsistent Model Binding on Form Submit

2009-02-17 Thread Dane Laverty
In order to see what's going on here, I added this line to my TestPage
class:

System.out.println("*** Form Test: " + user.getTest().toString());
add(new TestForm("testForm", new
CompoundPropertyModel(user.getTest(;

and then I went into FormComponent.java and added a similar line to
updateModel():

public void updateModel()
{
if (getConvertedInput() instanceof Answer) {
System.out.println("*** Updated Test: " +
this.getParent().getParent().getParent().getModelObject().toString());
}

setModelObject(getConvertedInput());
}

I've found that most of the time, the toString() values are the same,
like this:

*** Form Test: edu.chemeketa.foodhandler.objects.t...@daa75c
*** Updated Test: edu.chemeketa.foodhandler.objects.t...@daa75c

But on the instances when the Form's onSubmit() gives null for its
object models, the Test addresses are different:

*** Form Test: edu.chemeketa.foodhandler.objects.t...@12979a1
*** Updated Test: edu.chemeketa.foodhandler.objects.t...@1ec9fdc

I'll keep working on it, but if anyone has any idea why the ModelObject
would change, please let me know.

-Original Message-
From: Dane Laverty [mailto:danelave...@chemeketa.edu] 
Sent: Tuesday, February 10, 2009 4:56 PM
To: users@wicket.apache.org
Subject: Inconsistent Model Binding on Form Submit

I have a test form based on a CompoundPropertyModel. Usually it works
great, but for some users, their answers are lost when they submit the
form. The problem is user-dependent, i.e. it always breaks for certain
users and it never breaks for the other users. If a user calls us with
this problem, we haven't been able to find anyway to get around it. I
haven't been able to replicate the problem on my computer. I posted
about this a few months ago, thinking it was a session problem, but now
I see that the problem happens right when the test is submitted. This is
with Wicket 1.3.4. Any ideas what would cause the model to lose the
information for certain users?

 

public class TestPage

{

 

public TestPage() {

add(new TestForm("testForm", new
CompoundPropertyModel(getSession().getUser().getTest(;

}

  

public TestForm(final String id, CompoundPropertyModel testModel) {

super(id, testModel);

  

add(new ListView("questions") {



  @Override

  public boolean getReuseItems() {

return true;

  }

 

  protected void populateItem(ListItem item) {

 

final Question question = (Question)
item.getModelObject();

  

FoodHandlerRadioChoice answersRadioChoice = new
FoodHandlerRadioChoice("answers", 

  new
PropertyModel(question, "markedAnswer"), 

 
question.getAnswers());

answersRadioChoice.setRequired(true);


item.add(answersRadioChoice);   

   

}   

});

  }



  protected void onSubmit() {

// The following should return an object. Usually it does,
but sometimes

// it just returns null. Oh why, oh why? 

 
getSession().getUser().getTest().getQuestions().get(0).getMarkedAnswer()
;

setResponsePage(TestResultsPage.class);

  }

} 




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



Re: @SpringBean vs getApplication().getDao()

2009-02-17 Thread James Perry
As far as I am aware, the main internal differential is that annotations
provides a quick, safe way to access your spring beans and ensure that the
whole container does not get serialized via a proxy. However the magic comes
at a cost that it will serial the bean id (as a string) - which can be
costly if used a lot in your components. On the other side of the coin,
using the other option does not have any serialization cost but its very
vulnerable to accidentally serializing the bean and, potentially, the whole
application context.

Personally I use the latter option where I access my service facade bean by
a static import. I prefer this route as I am paranoid about memory usage but
each their own.

Best,
James.

On Tue, Feb 17, 2009 at 4:55 PM, Sergey Podatelev <
brightnesslev...@gmail.com> wrote:

> Okay, this question might actually be more related to Spring, but I'm
> completely lost here, and my question on Spring forums usually don't get
> any
> replies, so I hope Wicket community might help as it usually does.
>
> I'm using JCR, and have a RepositoryDao bean configured in
> applicationContext.xml.
> RepositoryDao has a "template" property which points to an instance of
> JcrTemplate in applicationContext.xml, all repository access is performed
> through that template.
>
> I have an AccessPage which has a RepositoryDao injected via @SpringBean.
> There is an inner class Form on that page, it has a default submit button
> and three submit buttons that skip default processing and perform their own
> operations onSubmit(). Both default button and skip-default-processing
> buttons use the same repositoryDao property of AccessPage to perform
> certain
> operations on repository.
>
> I noticed that when I actually open that AccessPage, there's a new
> RepositoryDao object created, and it's "template" property is null. When I
> press any of those non-default submit buttons of the form, everything works
> fine. But on default button onSubmit(), I see that there's yet another
> insance of RepositoryDao created, and it's "template" is also null, which
> leads to NullPointerException.
>
> I assumed that beans configured in applicationContext.xml are actually
> singletons, so there won't be any new instances of such nodes upon
> pages-with-injections instantiation.
>
> Regardless of whether that assumption is correct/incorrect/my-god-rtfm, I
> still won't understand why default submit button reaction is NPE as it uses
> same partnershipDao property of AccessPage.
>
> Could someone please elaborate some internal differences of the
> annotation-based approach as opposed to storing DAOs in Application object.
> In the latter case it's quite clear that there's a single instance of
> RepositoryDao as a property of MyApplication which is pulled on
> ((MyApplication) Application.get()).getRepositoryDao().
>
> Thanks.
>
> --
> sp
>


Re: Validation From A Custom Component

2009-02-17 Thread Eduardo Nunes
I'm a little bit out of what you are doing, but validate information
directly in setter methods usually isn't a good option...

my 50c

On Tue, Feb 17, 2009 at 2:19 PM, walnutmon  wrote:
>
> That's a fantastic idea, I'll definitely do that.
>
> There is one problem, because the validation is actualy coming from the
> domain objects "setters", I don't know if there was a problem until the
> "updateModel" method is called... I don't know if I like calling
> "updateModel" from the validator, since I'm not sure whether that will break
> other things down the road, I'll try it and report back.
>
> Is there a way that I can retrieve the setter, so that I can set it, and
> then return it to it's initial state before the form calls 'updateModel' on
> it's children?  Perhaps the component can only take PropertyModels?
>
>
> Jeremy Thomerson-5 wrote:
>>
>> in the custom component's constructor, why don't you do:
>>
>> add(new IValidator() {
>> ...
>> });
>>
>> Or create a custom validator class and just add it to your custom
>> components.
>>
>> On Tue, Feb 17, 2009 at 10:04 AM, walnutmon
>> wrote:
>>
>>>
>>> All,
>>>
>>> I have custom components which know if they have a validation error when
>>> they call "updateModel()", the domain is where validation happens, I'm
>>> using
>>> this to post error messages which are rendered like a validation error:
>>>
>>>@Override
>>>public void updateModel()
>>>{
>>>try
>>>{
>>>super.updateModel();
>>>} catch (Exception ex)
>>>{
>>>error(ex.getCause().getMessage());
>>>}
>>>}
>>>
>>> however, unlike a wicket validation error, it still finishes the form
>>> submission, is there a way for a component to add a validation error, so
>>> that it behaves as if it were a MaximumLengthValidator() error, or
>>> something
>>> similar?  Or do I need to extend IValidator, and pass it the component's
>>> domain object in order to do the check and use wicket's validation form
>>> processing procedure.
>>>
>>> Thanks!
>>> Justin
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Validation-From-A-Custom-Component-tp22060300p22060300.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>>
>> --
>> Jeremy Thomerson
>> http://www.wickettraining.com
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Validation-From-A-Custom-Component-tp22060300p22061961.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Validation From A Custom Component

2009-02-17 Thread walnutmon

That's a fantastic idea, I'll definitely do that.

There is one problem, because the validation is actualy coming from the
domain objects "setters", I don't know if there was a problem until the
"updateModel" method is called... I don't know if I like calling
"updateModel" from the validator, since I'm not sure whether that will break
other things down the road, I'll try it and report back.

Is there a way that I can retrieve the setter, so that I can set it, and
then return it to it's initial state before the form calls 'updateModel' on
it's children?  Perhaps the component can only take PropertyModels?


Jeremy Thomerson-5 wrote:
> 
> in the custom component's constructor, why don't you do:
> 
> add(new IValidator() {
> ...
> });
> 
> Or create a custom validator class and just add it to your custom
> components.
> 
> On Tue, Feb 17, 2009 at 10:04 AM, walnutmon
> wrote:
> 
>>
>> All,
>>
>> I have custom components which know if they have a validation error when
>> they call "updateModel()", the domain is where validation happens, I'm
>> using
>> this to post error messages which are rendered like a validation error:
>>
>>@Override
>>public void updateModel()
>>{
>>try
>>{
>>super.updateModel();
>>} catch (Exception ex)
>>{
>>error(ex.getCause().getMessage());
>>}
>>}
>>
>> however, unlike a wicket validation error, it still finishes the form
>> submission, is there a way for a component to add a validation error, so
>> that it behaves as if it were a MaximumLengthValidator() error, or
>> something
>> similar?  Or do I need to extend IValidator, and pass it the component's
>> domain object in order to do the check and use wicket's validation form
>> processing procedure.
>>
>> Thanks!
>> Justin
>> --
>> View this message in context:
>> http://www.nabble.com/Validation-From-A-Custom-Component-tp22060300p22060300.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> 
> 
> -- 
> Jeremy Thomerson
> http://www.wickettraining.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Validation-From-A-Custom-Component-tp22060300p22061961.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: @SpringBean vs getApplication().getDao()

2009-02-17 Thread Martijn Reuvers
Hello,

I am not entirely sure if I understand your question correctly. But I
usually use Spring like this:

YourDao (either defined in applicationContext.xml or in separate
spring-config files, or annotation-driven e.g. with @Repository. The
template you mention I usually autowire into the dao so basically it
looks like (this example is annotation-driven):

@Repository (value="myDao")
class YourDao {

   @Autowired
   private YourTemplate yourTemplate;


   public void xxx() {
 // use your template here
   }
}

In Wicket you can then use :

@SpringBean (name="myDao")
private YourDao yourDao;

You can do the same using wiring through xml files, the idea is the
same nevertheless. If you need 'larger' services I'd advice to use a
service layer (which uses multiple dao's or whatever is needed to do
the work in a single transaction), the latter is just a matter of
taste.

Martijn

On Tue, Feb 17, 2009 at 5:55 PM, Sergey Podatelev
 wrote:
> Okay, this question might actually be more related to Spring, but I'm
> completely lost here, and my question on Spring forums usually don't get any
> replies, so I hope Wicket community might help as it usually does.
>
> I'm using JCR, and have a RepositoryDao bean configured in
> applicationContext.xml.
> RepositoryDao has a "template" property which points to an instance of
> JcrTemplate in applicationContext.xml, all repository access is performed
> through that template.
>
> I have an AccessPage which has a RepositoryDao injected via @SpringBean.
> There is an inner class Form on that page, it has a default submit button
> and three submit buttons that skip default processing and perform their own
> operations onSubmit(). Both default button and skip-default-processing
> buttons use the same repositoryDao property of AccessPage to perform certain
> operations on repository.
>
> I noticed that when I actually open that AccessPage, there's a new
> RepositoryDao object created, and it's "template" property is null. When I
> press any of those non-default submit buttons of the form, everything works
> fine. But on default button onSubmit(), I see that there's yet another
> insance of RepositoryDao created, and it's "template" is also null, which
> leads to NullPointerException.
>
> I assumed that beans configured in applicationContext.xml are actually
> singletons, so there won't be any new instances of such nodes upon
> pages-with-injections instantiation.
>
> Regardless of whether that assumption is correct/incorrect/my-god-rtfm, I
> still won't understand why default submit button reaction is NPE as it uses
> same partnershipDao property of AccessPage.
>
> Could someone please elaborate some internal differences of the
> annotation-based approach as opposed to storing DAOs in Application object.
> In the latter case it's quite clear that there's a single instance of
> RepositoryDao as a property of MyApplication which is pulled on
> ((MyApplication) Application.get()).getRepositoryDao().
>
> Thanks.
>
> --
> sp
>

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



@SpringBean vs getApplication().getDao()

2009-02-17 Thread Sergey Podatelev
Okay, this question might actually be more related to Spring, but I'm
completely lost here, and my question on Spring forums usually don't get any
replies, so I hope Wicket community might help as it usually does.

I'm using JCR, and have a RepositoryDao bean configured in
applicationContext.xml.
RepositoryDao has a "template" property which points to an instance of
JcrTemplate in applicationContext.xml, all repository access is performed
through that template.

I have an AccessPage which has a RepositoryDao injected via @SpringBean.
There is an inner class Form on that page, it has a default submit button
and three submit buttons that skip default processing and perform their own
operations onSubmit(). Both default button and skip-default-processing
buttons use the same repositoryDao property of AccessPage to perform certain
operations on repository.

I noticed that when I actually open that AccessPage, there's a new
RepositoryDao object created, and it's "template" property is null. When I
press any of those non-default submit buttons of the form, everything works
fine. But on default button onSubmit(), I see that there's yet another
insance of RepositoryDao created, and it's "template" is also null, which
leads to NullPointerException.

I assumed that beans configured in applicationContext.xml are actually
singletons, so there won't be any new instances of such nodes upon
pages-with-injections instantiation.

Regardless of whether that assumption is correct/incorrect/my-god-rtfm, I
still won't understand why default submit button reaction is NPE as it uses
same partnershipDao property of AccessPage.

Could someone please elaborate some internal differences of the
annotation-based approach as opposed to storing DAOs in Application object.
In the latter case it's quite clear that there's a single instance of
RepositoryDao as a property of MyApplication which is pulled on
((MyApplication) Application.get()).getRepositoryDao().

Thanks.

-- 
sp


Re: Validation From A Custom Component

2009-02-17 Thread Jeremy Thomerson
in the custom component's constructor, why don't you do:

add(new IValidator() {
...
});

Or create a custom validator class and just add it to your custom
components.

On Tue, Feb 17, 2009 at 10:04 AM, walnutmon wrote:

>
> All,
>
> I have custom components which know if they have a validation error when
> they call "updateModel()", the domain is where validation happens, I'm
> using
> this to post error messages which are rendered like a validation error:
>
>@Override
>public void updateModel()
>{
>try
>{
>super.updateModel();
>} catch (Exception ex)
>{
>error(ex.getCause().getMessage());
>}
>}
>
> however, unlike a wicket validation error, it still finishes the form
> submission, is there a way for a component to add a validation error, so
> that it behaves as if it were a MaximumLengthValidator() error, or
> something
> similar?  Or do I need to extend IValidator, and pass it the component's
> domain object in order to do the check and use wicket's validation form
> processing procedure.
>
> Thanks!
> Justin
> --
> View this message in context:
> http://www.nabble.com/Validation-From-A-Custom-Component-tp22060300p22060300.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


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


Re: Wicket Geronimo debugging??

2009-02-17 Thread Jeremy Thomerson
You can try a couple of things - turning the logging level for
org.apache.wicket.* down to debug, for example.  You can also put you app in
development mode with web.xml, but I don't think that's going to help you
here.

Hoenstly, a blank screen to me would mean that it may *not* be Wicket, since
with a Wicket error, you'll get by default an internal error page.


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

On Tue, Feb 17, 2009 at 4:11 AM, Edwin Ansicodd wrote:

>
> Deploying my wicket web app on Geronimo, I'm getting errors that seem to be
> somewhere in the wicket.  Is there a way to turn on Wicket debugging?
>
> I know there are errors because when I click the submit button, my response
> page is blank.  Not how it's supposed to be.  No exceptions or error
> messages.   I want to see what is happening at the wicket level.  Is there
> some type of screen that shows on the web page that can give debug info for
> what's happening in the wicket layer?
> --
> View this message in context:
> http://www.nabble.com/Wicket-Geronimo-debugging---tp22054182p22054182.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: Modal window from modal window

2009-02-17 Thread dtoffe

Yes it's possible, see the examples here:

  http://www.wicket-library.com/wicket-examples/ajax/modal-window.2

You can also create a BasePage containing a ModalWindow and use it as a
base for all the pages you want to show in a modal window, so you can open a
modal window from any other modal window in a somewhat more reusable
fashion.

Hth,

Daniel



Michal Hybler wrote:
> 
> Hi,
> is there possibility to open modal window from modal window in wicket? I
> have form in modal window and i want to implement button that opens next
> modal window with some user options.
> 
> Thnx for your answers.
> with regards Michal
> 

-- 
View this message in context: 
http://www.nabble.com/Modal-window-from-modal-window-tp22059941p22060770.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: Modal window from modal window

2009-02-17 Thread Michal Hybler

solved sorry for spam :(


Michal Hybler wrote:
> 
> Hi,
> is there possibility to open modal window from modal window in wicket? I
> have form in modal window and i want to implement button that opens next
> modal window with some user options.
> 
> Thnx for your answers.
> with regards Michal
> 

-- 
View this message in context: 
http://www.nabble.com/Modal-window-from-modal-window-tp22059941p22060768.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How to make wicket text in a td bold?

2009-02-17 Thread Jonas
Agreed, I personally would also prefer the stylesheet solution, but I figured
he wanted to use the [b]-tag...

On Tue, Feb 17, 2009 at 5:04 PM, James Carman
 wrote:
> Styling the markup in-line is frowned upon, though.  It's better to
> use stylesheets for this.  However, for a quick and dirty solution,
> this will work quite well! :)
>
>
> On Tue, Feb 17, 2009 at 11:01 AM, Jonas  wrote:
>> or like this:
>>
>> [td width="20%"][b wicket:id="personname"]Person Name[/b][/td]
>>
>> with '<' and '>' instead of the '[' and ']' of course...
>>
>> On Tue, Feb 17, 2009 at 4:54 PM, Edwin Ansicodd  
>> wrote:
>>>
>>> have info in a table, want to make the text from wicket bold.  How do I do
>>> this?
>>>
>>>Person Name
>>>
>>> The above doesn't work.  It's not bold with wicket.  How do I make it bold?
>>>
>>>
>>> --
>>> View this message in context: 
>>> http://www.nabble.com/How-to-make-wicket-text-in-a-td-bold--tp22060100p22060100.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> -
> 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



Validation From A Custom Component

2009-02-17 Thread walnutmon

All, 

I have custom components which know if they have a validation error when
they call "updateModel()", the domain is where validation happens, I'm using
this to post error messages which are rendered like a validation error: 

@Override
public void updateModel()
{
try
{
super.updateModel();
} catch (Exception ex)
{
error(ex.getCause().getMessage());
}
}

however, unlike a wicket validation error, it still finishes the form
submission, is there a way for a component to add a validation error, so
that it behaves as if it were a MaximumLengthValidator() error, or something
similar?  Or do I need to extend IValidator, and pass it the component's
domain object in order to do the check and use wicket's validation form
processing procedure.

Thanks!
Justin
-- 
View this message in context: 
http://www.nabble.com/Validation-From-A-Custom-Component-tp22060300p22060300.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How to make wicket text in a td bold?

2009-02-17 Thread James Carman
Styling the markup in-line is frowned upon, though.  It's better to
use stylesheets for this.  However, for a quick and dirty solution,
this will work quite well! :)


On Tue, Feb 17, 2009 at 11:01 AM, Jonas  wrote:
> or like this:
>
> [td width="20%"][b wicket:id="personname"]Person Name[/b][/td]
>
> with '<' and '>' instead of the '[' and ']' of course...
>
> On Tue, Feb 17, 2009 at 4:54 PM, Edwin Ansicodd  
> wrote:
>>
>> have info in a table, want to make the text from wicket bold.  How do I do
>> this?
>>
>>Person Name
>>
>> The above doesn't work.  It's not bold with wicket.  How do I make it bold?
>>
>>
>> --
>> View this message in context: 
>> http://www.nabble.com/How-to-make-wicket-text-in-a-td-bold--tp22060100p22060100.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: How to make wicket text in a td bold?

2009-02-17 Thread Jonas
or like this:

[td width="20%"][b wicket:id="personname"]Person Name[/b][/td]

with '<' and '>' instead of the '[' and ']' of course...

On Tue, Feb 17, 2009 at 4:54 PM, Edwin Ansicodd  wrote:
>
> have info in a table, want to make the text from wicket bold.  How do I do
> this?
>
>Person Name
>
> The above doesn't work.  It's not bold with wicket.  How do I make it bold?
>
>
> --
> View this message in context: 
> http://www.nabble.com/How-to-make-wicket-text-in-a-td-bold--tp22060100p22060100.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: How to make wicket text in a td bold?

2009-02-17 Thread James Carman
It's not supposed to be bold.  In no way did you tell it to be bold.
What you can do is add a class attribute to the  element (using
AttributeAppender behavior) to set a css class and then you use a
stylesheet to style your text as bold.

On Tue, Feb 17, 2009 at 10:54 AM, Edwin Ansicodd
 wrote:
>
> have info in a table, want to make the text from wicket bold.  How do I do
> this?
>
>Person Name
>
> The above doesn't work.  It's not bold with wicket.  How do I make it bold?
>
>
> --
> View this message in context: 
> http://www.nabble.com/How-to-make-wicket-text-in-a-td-bold--tp22060100p22060100.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: How to make wicket text in a td bold?

2009-02-17 Thread John Krasnay
  Person Name

...somewhere in your CSS...

  td.personname { font-weight: bold; }

jk

On Tue, Feb 17, 2009 at 07:54:36AM -0800, Edwin Ansicodd wrote:
> 
> have info in a table, want to make the text from wicket bold.  How do I do
> this?
> 
>   Person Name
> 
> The above doesn't work.  It's not bold with wicket.  How do I make it bold?
> 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/How-to-make-wicket-text-in-a-td-bold--tp22060100p22060100.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

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



How to make wicket text in a td bold?

2009-02-17 Thread Edwin Ansicodd

have info in a table, want to make the text from wicket bold.  How do I do
this?

Person Name

The above doesn't work.  It's not bold with wicket.  How do I make it bold?


-- 
View this message in context: 
http://www.nabble.com/How-to-make-wicket-text-in-a-td-bold--tp22060100p22060100.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



Modal window from modal window

2009-02-17 Thread Michal Hybler

Hi,
is there possibility to open modal window from modal window in wicket? I
have form in modal window and i want to implement button that opens next
modal window with some user options.

Thnx for your answers.
with regards Michal
-- 
View this message in context: 
http://www.nabble.com/Modal-window-from-modal-window-tp22059941p22059941.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: Abstract Header JavaScript Behavior

2009-02-17 Thread Martijn Dashorst
Since when does a Label, Link, Image, WebMarkupContainer contribute to
the  section of a page?

It definitely is not obvious to me that such should be the case.

Martijn

On Sun, Feb 15, 2009 at 8:15 PM, Martin Makundi
 wrote:
> Tnx. :) Why don't the component implement iheadercontributor already?
> It would be more obvious then..
>
> **
> Martin
>
> 2009/2/15 Igor Vaynberg :
>> yep, thats how it works. any component can implement iheadercontributor.
>>
>> -igor
>>
>> On Sat, Feb 14, 2009 at 11:29 PM, Martin Makundi
>>  wrote:
 unless you are planning to reuse such snippets it is cleaner to let
 your component implement IHeaderContributor.
>>>
>>> So if I make a Panel implement IHeaderContributor, the renderHead will
>>> automatically be called? This would be very nice. Maybe it should be
>>> more apparent from the framework?
>>>
>>> **
>>> Martin
>>>

 -igor

 On Sat, Feb 14, 2009 at 2:52 AM, Martin Makundi
  wrote:
> Hi!
>
> Does Wicket have this functionality built-in? Would it make sense?
> public abstract class AbstractHeaderJavaScriptBehavior extends 
> AbstractBehavior
>implements IHeaderContributor {
>
>  /**
>   * @see 
> org.apache.wicket.behavior.AbstractBehavior#renderHead(org.apache.wicket.markup.html.IHeaderResponse)
>   */
>  @Override
>  public void renderHead(IHeaderResponse response) {
>super.renderHead(response);
>response.renderJavascript(getHeaderJavaScript(), getScriptId());
>  }
>
>  /**
>   * @return default null
>   */
>  public String getScriptId() {
>return null;
>  }
>
>  /**
>   * @return Javascript wanted for header contribution.
>   */
>  public abstract CharSequence getHeaderJavaScript();
> }
>
> **
> 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
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



Re: FeedbackMessage of Level "Error", isInfo() returns True

2009-02-17 Thread Matthew Hanlon
The javadoc on isInfo() says "Gets whether the current level is INFO or up."
 So, since the info level is above the error level, isInfo() returns true
for error messages.

So, since info is a less granular level than error, a feedback message using
error("foo") is at the error level and the info level (and warning and
debug, too).  I would expect if you check a feedback message using
info("foo") you would find that it is at the info level, but not at the
error level.
The message levels are debug -> info -> warning -> error -> fatal.

If you want a filter for only and explicitly info messages, then you
probably want something more like:

boolean accept(FeedbackMessage  message)
{
return message.getLevel() == FeedbackMessage.INFO;
}

Regards,
Matthew.

On Tue, Feb 17, 2009 at 08:24, walnutmon  wrote:

>
> I created a filter that does this:
>
> boolean accept(message)
> {
> return message.isInfo();
> }
>
> This returns true for messages created using "error("asdf")"
>
> To make sure I wasn't mistaken I added this:
>
> if(message.isError() && message.isInfo()){throw new
> RuntimeException("something");}
>
> That was triggered when I user "error(message)" too.  Is this expected
> behavior? and why?
>
> Thanks!
> Justin
> --
> View this message in context:
> http://www.nabble.com/FeedbackMessage-of-Level-%22Error%22%2C-isInfo%28%29-returns-True-tp22058333p22058333.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
>
>


-- 
Matthew Rollins Hanlon
http://squareoftwo.org
_
Hanlon's Razor:
"Never attribute to malice that which can be adequately explained by
stupidity."
http://wikipedia.org/wiki/Hanlon's_razor


Re: Feedback message isn't displayed

2009-02-17 Thread Cristiano Kliemann
Maybe you are calling the error method of a wrong component. Can you send
some code snippet?

-- Cristiano

On Tue, Feb 17, 2009 at 9:59 AM, Jakub Srba  wrote:

>
> Hi
>
> I have LoadableDetachableModel model1. In load method it calls
> error(String). When I put model1 into Label, the error message is displayed
> in my FeedbackPanel. Then I have PropertyModel model2, that wraps model1.
> This time, when I put model2 into Label, the error message isn't displayed.
>
> Do you have any idea what do I do wrong?
>
> Jakub Srba
>
> --
> View this message in context:
> http://www.nabble.com/Feedback-message-isn%27t-displayed-tp22056824p22056824.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
>
>


FeedbackMessage of Level "Error", isInfo() returns True

2009-02-17 Thread walnutmon

I created a filter that does this:

boolean accept(message)
{
return message.isInfo();
}

This returns true for messages created using "error("asdf")"

To make sure I wasn't mistaken I added this:

if(message.isError() && message.isInfo()){throw new
RuntimeException("something");}

That was triggered when I user "error(message)" too.  Is this expected
behavior? and why?

Thanks!
Justin
-- 
View this message in context: 
http://www.nabble.com/FeedbackMessage-of-Level-%22Error%22%2C-isInfo%28%29-returns-True-tp22058333p22058333.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



Wicket VoiceXML framework?

2009-02-17 Thread nino martinez wael
Hi Guys

Would any of you be interested in creating a VoiceXML framework based on
wicket with me? I dont have much knowledge on vxml (im new to the domain)
but I have a little on wicket :) Im just thinking aloud right now, so theres
no scope or anything defined.


regards Nino


Re: Wicket source code using Maven

2009-02-17 Thread John Krasnay
I usually put this in my pom.xml so that I don't have to always remember
the command line parameter:

  
org.apache.maven.plugins
maven-eclipse-plugin

  true
  true
  1.5
  blah

  

jk


On Mon, Feb 16, 2009 at 11:30:54PM -0300, Daniel Ferreira Castro wrote:
> Thanks
> 
> On Mon, Feb 16, 2009 at 10:43 PM, Igor Vaynberg 
> wrote:
> 
> > mvn eclipse:eclipse -DdownloadSources=true
> >
> > -igor
> >
> > On Mon, Feb 16, 2009 at 5:38 PM, Daniel Ferreira Castro
> >  wrote:
> > > How to do to be able to download the source code of Wicket throught
> > Maven?
> > >
> > >
> > > I tried to insert it on my project pom, but didn't have success
> > >
> > >
> > >
> > >wicket-snaps
> > >http://wicketstuff.org/maven/repository
> > >
> > >true
> > >
> > >
> > >true
> > >
> > >Wicket
> > >
> > >
> > > --
> > > "Two rules to succeed in life:
> > > 1 - don´t tell people everything you know."
> > > 
> > > We shall go on to the end.
> > > We shall fight in France
> > > We shall fightover the seas and oceans.
> > > We shall fight with growing confidence and growing strength in the air.
> > > We shall defend our island whatever the cost may be
> > > We shall fight on beaches, we shall fight on the landing grounds,
> > > We shall fight in the fields and in the streets,
> > > We shall fight on the hills.
> > > We shall never surrender.
> > > Winston Churchill
> > >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
> 
> 
> -- 
> "Two rules to succeed in life:
> 1 - don´t tell people everything you know."
> 
> We shall go on to the end.
> We shall fight in France
> We shall fightover the seas and oceans.
> We shall fight with growing confidence and growing strength in the air.
> We shall defend our island whatever the cost may be
> We shall fight on beaches, we shall fight on the landing grounds,
> We shall fight in the fields and in the streets,
> We shall fight on the hills.
> We shall never surrender.
> Winston Churchill

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



automatic Page Flow diagrams?

2009-02-17 Thread nino martinez wael
Hi Guys

Are there anyone which has done something like a pageflow diagram generator
for wicket, would be wonderfull if it were a maven plugin?


regards Nino


Feedback message isn't displayed

2009-02-17 Thread Jakub Srba

Hi

I have LoadableDetachableModel model1. In load method it calls
error(String). When I put model1 into Label, the error message is displayed
in my FeedbackPanel. Then I have PropertyModel model2, that wraps model1.
This time, when I put model2 into Label, the error message isn't displayed.

Do you have any idea what do I do wrong?

Jakub Srba

-- 
View this message in context: 
http://www.nabble.com/Feedback-message-isn%27t-displayed-tp22056824p22056824.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: Problem in Wicket Stuff - Jquery - DatePicker

2009-02-17 Thread Dipu
Cheers

Dipu



On Tue, Feb 17, 2009 at 12:30 PM, Martin Grigorov  wrote:
> Ok, I see. The JS library works with lower case formats.
> Fixed with r4575.
>
> Additionally I think you are using the old jquery. The one I fixed is at
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/jquery-parent/jquery/src/main/java/org/wicketstuff/jquery/datepicker
>
>
> El mar, 17-02-2009 a las 11:21 +, Dipu escribió:
>> if i supply the date pattern "dd/MM/"
>> the date picker will print wrong date like 10/MM/2009
>>
>>  i noticed sdf.toPattern().toLowerCase() and i thought some one missed
>> to call toLowerCase()  on
>> format_ = ((ITextFormatProvider) component).getTextFormat();
>>
>> i called toLowerCase()  and it solved the issue, i didn't dig deep into it.
>>
>> regards
>> dipu
>>
>> On Tue, Feb 17, 2009 at 10:57 AM, Martin Grigorov  
>> wrote:
>> > I could do it but why it should be lower cased ?
>> > What will happen with months (MM)? They will become minutes (mm). Is
>> > this correct ?
>> >
>> > I see there is sdf.toPattern().toLowerCase() below but this seems like a
>> > bug to me.
>> >
>> > Can you give more details because I'm not using this behavior.
>> >
>> > El lun, 16-02-2009 a las 10:00 +, Dipu escribió:
>> >> In Wicket Stuff - Jquery - DatePicker - DatePickerBehavior
>> >>
>> >> the following line in the onBind() method
>> >>
>> >>  if (component instanceof ITextFormatProvider) {
>> >>   format_ = ((ITextFormatProvider) component).getTextFormat();
>> >>
>> >> should be
>> >>
>> >>  if (component instanceof ITextFormatProvider) {
>> >>   format_ = ((ITextFormatProvider)
>> >> component).getTextFormat().toLowerCase();
>> >>
>> >>
>> >> i have created a patch, can some one apply the patch please.
>> >>
>> >>
>> >> regards
>> >> dipu
>> >> -
>> >> 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
>
>

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



Re: XMLBeanFactory not serializable - what to do??

2009-02-17 Thread Martin Grigorov
use wicket-spring to get references to your beans

El mar, 17-02-2009 a las 03:43 -0800, Edwin Ansicodd escribió:
> have a Serializable object on a Wicket page.  This object in turn has a
> reference to an XMLBeanFactory.  Wicket is giving me an error because
> XMLBeanFactory is not serializable.  What do I do??


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



Re: Problem in Wicket Stuff - Jquery - DatePicker

2009-02-17 Thread Martin Grigorov
Ok, I see. The JS library works with lower case formats.
Fixed with r4575.

Additionally I think you are using the old jquery. The one I fixed is at
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/jquery-parent/jquery/src/main/java/org/wicketstuff/jquery/datepicker


El mar, 17-02-2009 a las 11:21 +, Dipu escribió:
> if i supply the date pattern "dd/MM/"
> the date picker will print wrong date like 10/MM/2009
> 
>  i noticed sdf.toPattern().toLowerCase() and i thought some one missed
> to call toLowerCase()  on
> format_ = ((ITextFormatProvider) component).getTextFormat();
> 
> i called toLowerCase()  and it solved the issue, i didn't dig deep into it.
> 
> regards
> dipu
> 
> On Tue, Feb 17, 2009 at 10:57 AM, Martin Grigorov  wrote:
> > I could do it but why it should be lower cased ?
> > What will happen with months (MM)? They will become minutes (mm). Is
> > this correct ?
> >
> > I see there is sdf.toPattern().toLowerCase() below but this seems like a
> > bug to me.
> >
> > Can you give more details because I'm not using this behavior.
> >
> > El lun, 16-02-2009 a las 10:00 +, Dipu escribió:
> >> In Wicket Stuff - Jquery - DatePicker - DatePickerBehavior
> >>
> >> the following line in the onBind() method
> >>
> >>  if (component instanceof ITextFormatProvider) {
> >>   format_ = ((ITextFormatProvider) component).getTextFormat();
> >>
> >> should be
> >>
> >>  if (component instanceof ITextFormatProvider) {
> >>   format_ = ((ITextFormatProvider)
> >> component).getTextFormat().toLowerCase();
> >>
> >>
> >> i have created a patch, can some one apply the patch please.
> >>
> >>
> >> regards
> >> dipu
> >> -
> >> 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: XMLBeanFactory not serializable - what to do??

2009-02-17 Thread Sébastien Piller

transient field + lazy init method?

Edwin Ansicodd wrote:

have a Serializable object on a Wicket page.  This object in turn has a
reference to an XMLBeanFactory.  Wicket is giving me an error because
XMLBeanFactory is not serializable.  What do I do??
  



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



Re: IResourceStream.close

2009-02-17 Thread Adriano dos Santos Fernandes

https://issues.apache.org/jira/browse/WICKET-2109


Johan Compagner escreveu:

as far as i know it is called all over the place
For example WicketFilter.getLastModified()

But you are right about the RSRT that one should call close on detach as far
as i can see
can you make a jira issue?

On Tue, Feb 17, 2009 at 12:44, Adriano dos Santos Fernandes <
adrian...@gmail.com> wrote:

  

Hi!

Why does IResourceStream have a close() method? I don't see it being called
in 1.4-RC2.

Shouldn't ResourceStreamRequestTarget.detach call it?


Adriano


-
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: XMLBeanFactory not serializable - what to do??

2009-02-17 Thread Thomas Mäder
LoadableDetachableModel?

Thomas

On Tue, Feb 17, 2009 at 12:43 PM, Edwin Ansicodd wrote:

>
> have a Serializable object on a Wicket page.  This object in turn has a
> reference to an XMLBeanFactory.  Wicket is giving me an error because
> XMLBeanFactory is not serializable.  What do I do??
> --
> View this message in context:
> http://www.nabble.com/XMLBeanFactory-not-serializable---what-to-do---tp22055512p22055512.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
>
>


-- 
Thomas Mäder
Wicket & Eclipse Consulting
www.devotek-it.ch


Re: IResourceStream.close

2009-02-17 Thread Johan Compagner
as far as i know it is called all over the place
For example WicketFilter.getLastModified()

But you are right about the RSRT that one should call close on detach as far
as i can see
can you make a jira issue?

On Tue, Feb 17, 2009 at 12:44, Adriano dos Santos Fernandes <
adrian...@gmail.com> wrote:

> Hi!
>
> Why does IResourceStream have a close() method? I don't see it being called
> in 1.4-RC2.
>
> Shouldn't ResourceStreamRequestTarget.detach call it?
>
>
> Adriano
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


XMLBeanFactory not serializable - what to do??

2009-02-17 Thread Edwin Ansicodd

have a Serializable object on a Wicket page.  This object in turn has a
reference to an XMLBeanFactory.  Wicket is giving me an error because
XMLBeanFactory is not serializable.  What do I do??
-- 
View this message in context: 
http://www.nabble.com/XMLBeanFactory-not-serializable---what-to-do---tp22055512p22055512.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



IResourceStream.close

2009-02-17 Thread Adriano dos Santos Fernandes

Hi!

Why does IResourceStream have a close() method? I don't see it being 
called in 1.4-RC2.


Shouldn't ResourceStreamRequestTarget.detach call it?


Adriano


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



Re: Problem in Wicket Stuff - Jquery - DatePicker

2009-02-17 Thread Dipu
if i supply the date pattern "dd/MM/"
the date picker will print wrong date like 10/MM/2009

 i noticed sdf.toPattern().toLowerCase() and i thought some one missed
to call toLowerCase()  on
format_ = ((ITextFormatProvider) component).getTextFormat();

i called toLowerCase()  and it solved the issue, i didn't dig deep into it.

regards
dipu

On Tue, Feb 17, 2009 at 10:57 AM, Martin Grigorov  wrote:
> I could do it but why it should be lower cased ?
> What will happen with months (MM)? They will become minutes (mm). Is
> this correct ?
>
> I see there is sdf.toPattern().toLowerCase() below but this seems like a
> bug to me.
>
> Can you give more details because I'm not using this behavior.
>
> El lun, 16-02-2009 a las 10:00 +, Dipu escribió:
>> In Wicket Stuff - Jquery - DatePicker - DatePickerBehavior
>>
>> the following line in the onBind() method
>>
>>  if (component instanceof ITextFormatProvider) {
>>   format_ = ((ITextFormatProvider) component).getTextFormat();
>>
>> should be
>>
>>  if (component instanceof ITextFormatProvider) {
>>   format_ = ((ITextFormatProvider)
>> component).getTextFormat().toLowerCase();
>>
>>
>> i have created a patch, can some one apply the patch please.
>>
>>
>> regards
>> dipu
>> -
>> 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: Adding multiple ajax behavious on same event

2009-02-17 Thread Martin Grigorov
see CompoundBehavior in wicketstuff-minis

El lun, 16-02-2009 a las 03:06 -0800, rag...@directi escribió:
> I am using an AjaxLink which has a javascript for onclick event now i want to
> add AjaxFormValidatingBehavior  to this link on the same event "onclick"
> ...i tried adding the same...but the link does not  work properly...i think
> the actual javascript is replacedcan any one please help me how to do
> this...
> 
> I had a look at IAjaxCallDecorator  also.. If i hv understood
> IAjaxCallDecorator  correctly i can use it to append to the javascriptso
> one way could be to have a look at the javascript generated by
> AjaxFormValidatingBehavior   and append it to the javascript of
> ajaxlink.but is there a cleaner way to do this..


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



Re: Problem in Wicket Stuff - Jquery - DatePicker

2009-02-17 Thread Martin Grigorov
I could do it but why it should be lower cased ?
What will happen with months (MM)? They will become minutes (mm). Is
this correct ?

I see there is sdf.toPattern().toLowerCase() below but this seems like a
bug to me.

Can you give more details because I'm not using this behavior.

El lun, 16-02-2009 a las 10:00 +, Dipu escribió:
> In Wicket Stuff - Jquery - DatePicker - DatePickerBehavior
> 
> the following line in the onBind() method
> 
>  if (component instanceof ITextFormatProvider) {
>   format_ = ((ITextFormatProvider) component).getTextFormat();
> 
> should be
> 
>  if (component instanceof ITextFormatProvider) {
>   format_ = ((ITextFormatProvider)
> component).getTextFormat().toLowerCase();
> 
> 
> i have created a patch, can some one apply the patch please.
> 
> 
> regards
> dipu
> -
> 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 Geronimo debugging??

2009-02-17 Thread Edwin Ansicodd

Deploying my wicket web app on Geronimo, I'm getting errors that seem to be
somewhere in the wicket.  Is there a way to turn on Wicket debugging?  

I know there are errors because when I click the submit button, my response
page is blank.  Not how it's supposed to be.  No exceptions or error
messages.   I want to see what is happening at the wicket level.  Is there
some type of screen that shows on the web page that can give debug info for
what's happening in the wicket layer?
-- 
View this message in context: 
http://www.nabble.com/Wicket-Geronimo-debugging---tp22054182p22054182.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: .html-templates compiler

2009-02-17 Thread Andreas Petersson
well, that is not really what wicket does right now.

i think it would be interesting to tie the markup + code more tightly
together, to have the compiler already check for correctness, instead of
runtime.
for example warp-widgets ( http://code.google.com/p/warp-core/ ) does this
in an elegant way at compile-time, using MVEL ( http://mvel.codehaus.org/ )


*i have not thought it through*, but it may be possible to annotate the
html like warp-widgets does, to tie the wicket ids to constants/enums and
keep everything else(pages/panels) in java code the same.
this could be a typesave alternative to wicket:id, so you will not be able
to compile if you didn't supply the enum.

@Wicket(id=MyWebPage.BLA)
Some dummy labelText

or ...

@WicketRemove
additional BulletPoint

i should do a proof-of-concept when my project is finished :)
best regards
andreas

On Tue, 17 Feb 2009 08:52:01 +, kan  wrote:
> I mean if you have a wicket:id="abc", it will generate class with...
> emm... not sure, say method "getAbc()" which will return an object
> which represents an element, so it can be bound to a Component. So, in
> java-code you can use only elements which are actually exist in
> html-markup.
> Maybe something similar then set of java classes are generated for wsdl
or
> xsd.
> 


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



Re: RadioGroup, differences between FireFox and Internet Explorer?

2009-02-17 Thread Swanthe Lindgren
I still have the same problem and as the project where it occurred is 
"on ice" I left it for what is is. I haven't even filed a JIRA, but 
please go ahead and do so since it still doesn't work in 
wicket-1.4-SNAPSHOT.


//Swanthe

metalotus wrote:

I have the same issue. Some places in my application, adding
AjaxFormChoiceComponentUpdatingBehavior to a RadioChoice simply does not
work under IE7. The ajax response is invoked, but the browser does not
actually select the new radio button.

For example, in one place I have such behavior and it works fine, in another
it does not work under IE7 only. I noticed the POST looks different. Here is
a comparison of the POST:

POST from a place where it works:

ChartTypeForm95_hf_0

utilChartRadioButtonsId 

BAR


POST from a place where it is broken:

view:wizardpanel:hostAddressEditorWindow:mainPanel:contentsPanelID:modalDialogForm:contentsPanelID:tabpanel:panel:emtabpanel:panel:panel:form:matchOptions
  

RESERVED


On, the "not working post", why does it not look more similar to the working
post, such as:


formXYZ

matchOptions

RESERVED



My guess is this that when there are nested form elements, the POST is
different, and that breaks under IE7.

  




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



Re: .html-templates compiler

2009-02-17 Thread kan
I mean if you have a wicket:id="abc", it will generate class with...
emm... not sure, say method "getAbc()" which will return an object
which represents an element, so it can be bound to a Component. So, in
java-code you can use only elements which are actually exist in
html-markup.
Maybe something similar then set of java classes are generated for wsdl or xsd.

2009/2/16 Igor Vaynberg :
> sorry, what are you trying to do with this?
>
> if we preparse the markup and break it up into tags at compile time we
> still have to store it somehow and load it at runtime. so that format
> would need to be more efficient at storing markup than xml already is,
> but the parser is a very tinny percentage of the request and it only
> happens on the first load of markup - we cache the parsed structure.
> so you would have a very small gain at the high price of introducing a
> compilation step into the build process...
>
> is it worth it?
>
> -igor
>
> On Mon, Feb 16, 2009 at 9:46 AM, kan  wrote:
>> But html-template just is a regular file, a class resource compiled in
>> jar, you cannot change/generate it dynamically in run-time.
>> Dynamic markup allows to build a component-tree in run-time, but
>> doesn't allow to change html-template or assigned java-class itself.
>>
>> 2009/2/16 Igor Vaynberg :
>>> the point of all those wicket:ids is to generate dynamic markup.
>>> dynamic meaning runtime.
>>>
>>> -igor
>>>
>>> On Mon, Feb 16, 2009 at 8:22 AM, kan  wrote:
 Just random thought...
 Has anybody thought to make wicket html-template compiler? I think it
 could be quite useful - it can check all wicket:id, all hrefs and so
 on checked at compile-time. And also it can gain some performance,
 because it will not require to parse html at run-time.

 --
 WBR, kan.

 -
 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
>>>
>>>
>>
>>
>>
>> --
>> WBR, kan.
>>
>> -
>> 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
>
>



-- 
WBR, kan.

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



Stackoverflow running Wicket application on JBOSS cluster

2009-02-17 Thread behrica

Hi,

I setup our wicket application on a simple JBoss cluster with session
replication.

Doing that I get more or less immediately the following track trace: (I
paste only the upper part, but the same message gets repeated over and over
in the stack trace)

I use wicket 1.3.4, but it's the same with 1.3.5. I did not try yet any of
the 1.4 versions.

JBOSS version is 4.2.2 with JDK 1.5.11

Did somebody has an idea what could be the problem ?

2009-02-16 19:00:46,755 DEBUG
[org.jboss.web.tomcat.service.session.JBossCacheManager] loadSession(): id=
waZCv4eBljwIL84w97q+EA**, session=SessionBasedClusteredSession[id:
waZCv4eBljwIL84w97q+EA** lastAccessedTime: 1234807244931 version: 24
lastOutdated: 0]
2009-02-16 19:00:48,438 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/raw-war].[default]]
Servlet.service() for servlet default threw exception
java.lang.StackOverflowError
at 
java.io.ObjectInputStream$HandleTable.grow(ObjectInputStream.java:3361)
at
java.io.ObjectInputStream$HandleTable.assign(ObjectInputStream.java:3171)
at java.io.ObjectInputStream.readString(ObjectInputStream.java:1577)
at java.io.ObjectInputStream.readTypeString(ObjectInputStream.java:1375)
at java.io.ObjectStreamClass.readNonProxy(ObjectStreamClass.java:634)
at
java.io.ObjectInputStream.readClassDescriptor(ObjectInputStream.java:789)
at 
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1534)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
at 
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
at 
java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:479)
at org.apache.wicket.Component.readObject(Component.java:4228)
at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at 
java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at 
org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:393)
at
org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:228)
at
org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:707)
at
org.apache.wicket.protocol.http.pagestore.DiskPageStore.convertToPage(DiskPageStore.java:1234)
at
org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.getLastPage(SecondLevelCacheSessionStore.java:228)
at
org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:296)
at org.apache.wicket.Session.getPage(Session.java:751)
at
org.apache.wicket.protocol.http.pagestore.AbstractPageStore$PageHolder.readResolve(AbstractPageStore.java:363)
at sun.reflect.GeneratedMethodAccessor129.invoke(Unknown Sourc

Re: WicketURLEncoder.QUERY_INSTANCE result not (even near) same as java.net.URLEncoder?

2009-02-17 Thread Martin Makundi
Then maybe java.net.URLEncoder is more strict than the 'spec'... ok.

**
Martin

2009/2/17 Johan Compagner :
> as far as i know it does follow the spec specially for query portion and the
> path portions.
>
>
>
> On Tue, Feb 17, 2009 at 08:26, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
>> Hi!
>>
>> The constructor WicketURLEncoder(Type type) explains a whole lot about
>> the compatibility of QUERY_INSTANCE and java.net.URLEncoder.
>>
>> However, the results differ significantly. Specifically the
>> "dontNeedEncoding" characters. We had a bit of a surprise integrating
>> our app with another app expecting more strict encoding.
>>
>> Does this difference remain intentional?
>>
>> **
>> 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: WicketURLEncoder.QUERY_INSTANCE result not (even near) same as java.net.URLEncoder?

2009-02-17 Thread Johan Compagner
as far as i know it does follow the spec specially for query portion and the
path portions.



On Tue, Feb 17, 2009 at 08:26, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> Hi!
>
> The constructor WicketURLEncoder(Type type) explains a whole lot about
> the compatibility of QUERY_INSTANCE and java.net.URLEncoder.
>
> However, the results differ significantly. Specifically the
> "dontNeedEncoding" characters. We had a bit of a surprise integrating
> our app with another app expecting more strict encoding.
>
> Does this difference remain intentional?
>
> **
> Martin
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>