Question about wicket validation

2009-09-29 Thread Martin Makundi
Hi!

If a form validator depends on a nested form's components, it will
assume they are valid because the nested form's components are
validated after the parent form?

**
Martin

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



[offtopic[ how to attach sources to wicket jars when debugging

2009-09-29 Thread Vladimir Kovalyuk
I believe it must be something extremely simple.
I set up a project in Eclipse Galileo using m2eclipse from Sonatype.
I'm trying to debug the wicket class. I set breakpoints and the execution
stops exactly at those points. The wicket sources are actually attached. I
can see the source code. But when the execution stops at breakpoint eclipse
says that there is no sources and variables panel does not show local
variables.

Could somebody give me a hint how I can debug wicket sources?


Re: [offtopic[ how to attach sources to wicket jars when debugging

2009-09-29 Thread Martin Grigorov
El mar, 29-09-2009 a las 11:47 +0400, Vladimir Kovalyuk escribió:
 I believe it must be something extremely simple.
 I set up a project in Eclipse Galileo using m2eclipse from Sonatype.
 I'm trying to debug the wicket class. I set breakpoints and the execution
 stops exactly at those points. The wicket sources are actually attached. I
 can see the source code. But when the execution stops at breakpoint eclipse
 says that there is no sources and variables panel does not show local
 variables.
 
 Could somebody give me a hint how I can debug wicket sources?
In Debug Configurations windows ('Run' menu - Debug
Configurations...) choose the configuration for your project and then in
the Source tab add the path to the sources (Add button - External
Archive)


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



Re: [WicketStuff] Iolite

2009-09-29 Thread richardwilko

Hi,

We have been developing a few useful archetypes for our own client projects
and courses.
Amongst others, we have

Wicket/Guice
Wicket/Guice/Warp/Hibernate
Wicket/Guice/Warp/JPA
Wicket/Spring/JPA
Spring/JPA/openJPA
Spring/JPA/EclipseLink
Spring/JDBC

All include a running sample application with correct dependencies.


We're currently deciding which jWeekend server to host these on (and their
catalog) and probably the source


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




nino martinez wael wrote:
 
 Hi Guys
 
 I've been using Guice for a while together with warp persist and dynamic
 finders. Would it be of any interest to switch Iolite to Guice? Please say
 if it has interest then I might do it, but won't if nobody uses it.
 
 
 http://www.wideplay.com/guicewebextensions2
 http://www.wideplay.com/dynamicfinders
 http://code.google.com/p/google-guice/
 
 Regards Nino
 
 


-
http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk 
-- 
View this message in context: 
http://www.nabble.com/-WicketStuff--Iolite-tp25652619p25659568.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: [WicketStuff] Iolite

2009-09-29 Thread nino martinez wael
Great! So should these be merged into Iolite? Anyhow the nice thing would
be to put it into wicketstuff..

regards Nino

2009/9/29 richardwilko richardjohnwilkin...@gmail.com


 Hi,

 We have been developing a few useful archetypes for our own client projects
 and courses.
 Amongst others, we have

 Wicket/Guice
 Wicket/Guice/Warp/Hibernate
 Wicket/Guice/Warp/JPA
 Wicket/Spring/JPA
 Spring/JPA/openJPA
 Spring/JPA/EclipseLink
 Spring/JDBC

 All include a running sample application with correct dependencies.


 We're currently deciding which jWeekend server to host these on (and their
 catalog) and probably the source


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




 nino martinez wael wrote:
 
  Hi Guys
 
  I've been using Guice for a while together with warp persist and dynamic
  finders. Would it be of any interest to switch Iolite to Guice? Please
 say
  if it has interest then I might do it, but won't if nobody uses it.
 
 
  http://www.wideplay.com/guicewebextensions2
  http://www.wideplay.com/dynamicfinders
  http://code.google.com/p/google-guice/
 
  Regards Nino
 
 


 -
 http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk
 --
 View this message in context:
 http://www.nabble.com/-WicketStuff--Iolite-tp25652619p25659568.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: [offtopic[ how to attach sources to wicket jars when debugging

2009-09-29 Thread John Krasnay
I don't use m2eclipse, but I have this in my pom.xml...

  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-eclipse-plugin/artifactId
configuration
  downloadSourcestrue/downloadSources
  downloadJavadocstrue/downloadJavadocs
/configuration
  /plugin

Seems to do the trick. I would look first at the m2eclipse settings first,
though.

jk

On Tue, Sep 29, 2009 at 11:47:23AM +0400, Vladimir Kovalyuk wrote:
 I believe it must be something extremely simple.
 I set up a project in Eclipse Galileo using m2eclipse from Sonatype.
 I'm trying to debug the wicket class. I set breakpoints and the execution
 stops exactly at those points. The wicket sources are actually attached. I
 can see the source code. But when the execution stops at breakpoint eclipse
 says that there is no sources and variables panel does not show local
 variables.
 
 Could somebody give me a hint how I can debug wicket sources?

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



Re: AttributeModifier relative path rendering in conflict

2009-09-29 Thread Pedro Santos
May help:
http://javathoughts.capesugarbird.com/2007/08/branding-wicket-application-take-2.html

On Tue, Sep 29, 2009 at 2:03 AM, pete swulius pswul...@gmail.com wrote:

 All,

 I am trying to use an AttributeModifier to change the stylesheet used on a
 Page of mine.

 WebComponent styleComponent = new WebComponent( style );
 styleComponent.add( new SimpleAttributeModifier( href, css/ +
 style.getName() + /stylesheet.css ) );
 add( styleComponent );

 The different stylesheets are located in sub-directories corresponding to
 style.getName().  The problem I have is that whatever code prepends all
 relative paths on the rendered page is not applying it to this 'modified
 attribute'.  For instance:

 I see this
 link rel=shortcut icon type=image/x-icon href=favicon.ico
 render as
 link rel=shortcut icon type=image/x-icon href=../../favicon.ico

 but my modified style just renders as such:
 link wicket:id=style rel=stylesheet type=text/css
 href=css/foobar/stylesheet.css/

 Obviously this relative path swipe happens before the attributes are
 modified.  Is there a better way to do what I'm trying to do?  Thank you!

 --pete




-- 
Pedro Henrique Oliveira dos Santos


Re: Attempt to set model object on null model of component

2009-09-29 Thread Pedro Santos
You need to find if the component who throw the exception is the same agent
constructed with lines you report and on what moment the component lost his
model.


On Mon, Sep 28, 2009 at 11:28 PM, Sam Barrow s...@sambarrow.com wrote:

 I'm getting this exception:
 java.lang.IllegalStateException: Attempt to set model object on null
 model of component: form:agent

 The only reason i can find is that the field has a null model, but i added
 a new Model() to the field and im still getting it

 DropDownChoiceAgent agent = new DropDownChoiceAgent(agent, new
 ModelAgent(), agentList);


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




-- 
Pedro Henrique Oliveira dos Santos


Re: Get converted value?

2009-09-29 Thread Pedro Santos
So sometimes validators will process formcomponents whose input has not been
converted??

Sometimes the form component validation method will test himself and
children for validations errors reported, before and after the user input
get converted.

On Tue, Sep 29, 2009 at 2:04 AM, Martin Makundi 
martin.maku...@koodaripalvelut.com wrote:

 Hi!

 formComponent.getValue() allways gives you the latest user input OR
 the model value. This is useful for validation purposes, but is there
 a bluilt-in get converted value method?

 There is getConvertedInput -method, but that will only give you the
 user-submitted value if it has already been converted. The validation
 sequence is a bit funny:

public void validate()
{
validateRequired();
if (isValid())  --- this validator will not receive
 converted input
{
convertInput();
if (isValid())

 So sometimes validators will process formcomponents whose input has
 not been converted?? How to deal with that properly?

 **
 Martin

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




-- 
Pedro Henrique Oliveira dos Santos


Re: Get converted value?

2009-09-29 Thread Martin Makundi
Ah yes, but it does not actually validate. Very funny results. Is this
ok or am I doing something wrong?

Principally what I have is:

parent form
nested form - one per row
 rowName

parentForm.add(duplicateRowValidator);

None of the rows is allowed to have duplicate names so what I do is:

duplicateRowValidator: foreach nestedRow if (!set.add(getLatestValue))
error(duplicate row);

Now I know I can get the latest value of the nested row using my own
helper method:
  @SuppressWarnings(unchecked)
  public static T T getConvertedValue(FormComponentT formComponent) {
return (T) 
formComponent.getConverter(formComponent.getType()).convertToObject(formComponent.getValue(),
Session.get().getLocale());
  }

BUT, is this necessary? Is there a framework method to do this for me?

**
Martin

2009/9/29 Pedro Santos pedros...@gmail.com:
 So sometimes validators will process formcomponents whose input has not been
 converted??

 Sometimes the form component validation method will test himself and
 children for validations errors reported, before and after the user input
 get converted.

 On Tue, Sep 29, 2009 at 2:04 AM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

 Hi!

 formComponent.getValue() allways gives you the latest user input OR
 the model value. This is useful for validation purposes, but is there
 a bluilt-in get converted value method?

 There is getConvertedInput -method, but that will only give you the
 user-submitted value if it has already been converted. The validation
 sequence is a bit funny:

        public void validate()
        {
                validateRequired();
                if (isValid())  --- this validator will not receive
 converted input
                {
                        convertInput();
                        if (isValid())

 So sometimes validators will process formcomponents whose input has
 not been converted?? How to deal with that properly?

 **
 Martin

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




 --
 Pedro Henrique Oliveira dos Santos


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



Re: Get converted value?

2009-09-29 Thread Pedro Santos
Hi Martin,

Ah yes, but it does not actually validate.
you refers to validate method from FormComponent right? The javadoc says:

Performs full validation of the form component, which consists of calling
validateRequired(),
convertInput(), and validateValidators(). This method should only be used if
the form
component needs to be fully validated outside the form process.

 @SuppressWarnings(unchecked)
 public static T T getConvertedValue(FormComponentT formComponent) {
   return (T)
formComponent.getConverter(formComponent.getType()).convertToObject(formComponent.getValue(),
Session.get().getLocale());
 }

BUT, is this necessary? Is there a framework method to do this for me?

http://static.ddpoker.com/javadoc/wicket/1.4-rc2/org/apache/wicket/markup/html/form/FormComponent.html#getConvertedInput%28%29


On Tue, Sep 29, 2009 at 8:26 AM, Martin Makundi 
martin.maku...@koodaripalvelut.com wrote:

 Ah yes, but it does not actually validate. Very funny results. Is this
 ok or am I doing something wrong?

 Principally what I have is:

 parent form
nested form - one per row
 rowName

 parentForm.add(duplicateRowValidator);

 None of the rows is allowed to have duplicate names so what I do is:

 duplicateRowValidator: foreach nestedRow if (!set.add(getLatestValue))
 error(duplicate row);

 Now I know I can get the latest value of the nested row using my own
 helper method:
  @SuppressWarnings(unchecked)
  public static T T getConvertedValue(FormComponentT formComponent) {
return (T)
 formComponent.getConverter(formComponent.getType()).convertToObject(formComponent.getValue(),
 Session.get().getLocale());
  }

 BUT, is this necessary? Is there a framework method to do this for me?

 **
 Martin

 2009/9/29 Pedro Santos pedros...@gmail.com:
  So sometimes validators will process formcomponents whose input has not
 been
  converted??
 
  Sometimes the form component validation method will test himself and
  children for validations errors reported, before and after the user input
  get converted.
 
  On Tue, Sep 29, 2009 at 2:04 AM, Martin Makundi 
  martin.maku...@koodaripalvelut.com wrote:
 
  Hi!
 
  formComponent.getValue() allways gives you the latest user input OR
  the model value. This is useful for validation purposes, but is there
  a bluilt-in get converted value method?
 
  There is getConvertedInput -method, but that will only give you the
  user-submitted value if it has already been converted. The validation
  sequence is a bit funny:
 
 public void validate()
 {
 validateRequired();
 if (isValid())  --- this validator will not
 receive
  converted input
 {
 convertInput();
 if (isValid())
 
  So sometimes validators will process formcomponents whose input has
  not been converted?? How to deal with that properly?
 
  **
  Martin
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  Pedro Henrique Oliveira dos Santos
 

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




-- 
Pedro Henrique Oliveira dos Santos


better way to strip wicket markup / tags per page?

2009-09-29 Thread Antoine van Wel
Hi,

on the wiki[1] it is described how to get rid of wicket markup such as
wicket:id attributes on a page basis.
The solution looks like a dirty hack to me which may go wrong when for
instance exceptions occur. Does anybody know of a better way?

For completeness sake, here is the code duplicated from the wiki:

private boolean stripTags;

public TestPage() {
stripTags =  Application.get().getMarkupSettings().getStripWicketTags();
}
@Override
protected void onBeforeRender() {
Application.get().getMarkupSettings().setStripWicketTags(true);
}
@Override
protected void onAfterRender() {
Application.get().getMarkupSettings().setStripWicketTags(stripTags);
}



Thanks in advance,

Antoine.


References:
[1]
http://cwiki.apache.org/WICKET/how-to-remove-wicket-markup-from-output.html


Re: Get converted value?

2009-09-29 Thread Martin Makundi
 BUT, is this necessary? Is there a framework method to do this for me?

 http://static.ddpoker.com/javadoc/wicket/1.4-rc2/org/apache/wicket/markup/html/form/FormComponent.html#getConvertedInput%28%29

That is not the same. This is convertedINPUT. It will not give
anything if input has not been converted (convertInput must be called
first). And furthermore, it might be null when the component is
disabled. So getValue() seems to be the only reliable one?

**
Martin


 On Tue, Sep 29, 2009 at 8:26 AM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

 Ah yes, but it does not actually validate. Very funny results. Is this
 ok or am I doing something wrong?

 Principally what I have is:

 parent form
    nested form - one per row
         rowName

 parentForm.add(duplicateRowValidator);

 None of the rows is allowed to have duplicate names so what I do is:

 duplicateRowValidator: foreach nestedRow if (!set.add(getLatestValue))
 error(duplicate row);

 Now I know I can get the latest value of the nested row using my own
 helper method:
 �...@suppresswarnings(unchecked)
  public static T T getConvertedValue(FormComponentT formComponent) {
    return (T)
 formComponent.getConverter(formComponent.getType()).convertToObject(formComponent.getValue(),
 Session.get().getLocale());
  }

 BUT, is this necessary? Is there a framework method to do this for me?

 **
 Martin

 2009/9/29 Pedro Santos pedros...@gmail.com:
  So sometimes validators will process formcomponents whose input has not
 been
  converted??
 
  Sometimes the form component validation method will test himself and
  children for validations errors reported, before and after the user input
  get converted.
 
  On Tue, Sep 29, 2009 at 2:04 AM, Martin Makundi 
  martin.maku...@koodaripalvelut.com wrote:
 
  Hi!
 
  formComponent.getValue() allways gives you the latest user input OR
  the model value. This is useful for validation purposes, but is there
  a bluilt-in get converted value method?
 
  There is getConvertedInput -method, but that will only give you the
  user-submitted value if it has already been converted. The validation
  sequence is a bit funny:
 
         public void validate()
         {
                 validateRequired();
                 if (isValid())  --- this validator will not
 receive
  converted input
                 {
                         convertInput();
                         if (isValid())
 
  So sometimes validators will process formcomponents whose input has
  not been converted?? How to deal with that properly?
 
  **
  Martin
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  Pedro Henrique Oliveira dos Santos
 

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




 --
 Pedro Henrique Oliveira dos Santos


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



Re: better way to strip wicket markup / tags per page?

2009-09-29 Thread Marat Radchenko

 In some situations during development...

With that in mind, this solution is absolutely ok.

2009/9/29 Antoine van Wel antoine.van@gmail.com

 Hi,

 on the wiki[1] it is described how to get rid of wicket markup such as
 wicket:id attributes on a page basis.
 The solution looks like a dirty hack to me which may go wrong when for
 instance exceptions occur. Does anybody know of a better way?

 For completeness sake, here is the code duplicated from the wiki:

 private boolean stripTags;

 public TestPage() {
stripTags =
  Application.get().getMarkupSettings().getStripWicketTags();
 }
 @Override
 protected void onBeforeRender() {
Application.get().getMarkupSettings().setStripWicketTags(true);
 }
 @Override
 protected void onAfterRender() {
Application.get().getMarkupSettings().setStripWicketTags(stripTags);
 }



 Thanks in advance,

 Antoine.


 References:
 [1]
 http://cwiki.apache.org/WICKET/how-to-remove-wicket-markup-from-output.html



wicket 1.4.2

2009-09-29 Thread Tomek Sniadach
Hi,
I found on https://issues.apache.org/jira/browse/WICKET a release 1.4.2 of
wicket, but it's not on the official page, nor on the mirror sites. Is it a
public release or are the sites just not updated yet?

regards
Tomek


Re: wicket 1.4.2

2009-09-29 Thread Ernesto Reinaldo Barreiro
Maybe this thread will explain why
http://www.nabble.com/-vote--release-1.4.2-td25636013.html
http://www.nabble.com/-vote--release-1.4.2-td25636013.html
Best,

Ernesto

On Tue, Sep 29, 2009 at 2:38 PM, Tomek Sniadach 
tomek.sniad...@googlemail.com wrote:

 Hi,
 I found on https://issues.apache.org/jira/browse/WICKET a release 1.4.2 of
 wicket, but it's not on the official page, nor on the mirror sites. Is it a
 public release or are the sites just not updated yet?

 regards
 Tomek



Re: wicket 1.4.2

2009-09-29 Thread Martijn Dashorst
A release is not done until officially announced at annou...@wicket.apache.org

Martijn

On Tue, Sep 29, 2009 at 2:38 PM, Tomek Sniadach
tomek.sniad...@googlemail.com wrote:
 Hi,
 I found on https://issues.apache.org/jira/browse/WICKET a release 1.4.2 of
 wicket, but it's not on the official page, nor on the mirror sites. Is it a
 public release or are the sites just not updated yet?

 regards
 Tomek




-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0

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



Re: better way to strip wicket markup / tags per page?

2009-09-29 Thread Antoine van Wel
Thanks for the lightning fast reply.

Yes it works fine under development. Still I don't like it - after all these
statements are also executed during production mode, and even though they
can't do any harm there, I'd rather not see them there at all. More a matter
of personal taste I guess.

Anyway I have something in mind to improve it according to my taste. Will
implement that when I got time... This is not really an urgent issue to me.
Thanks anyway for the reply - I'm assuming now there really is no other way
to do this than temporarily changing the global settings.


Antoine


On Tue, Sep 29, 2009 at 7:46 PM, Marat Radchenko 
slonopotamusor...@gmail.com wrote:

 
  In some situations during development...

 With that in mind, this solution is absolutely ok.

 2009/9/29 Antoine van Wel antoine.van@gmail.com

  Hi,
 
  on the wiki[1] it is described how to get rid of wicket markup such as
  wicket:id attributes on a page basis.
  The solution looks like a dirty hack to me which may go wrong when for
  instance exceptions occur. Does anybody know of a better way?
 
  For completeness sake, here is the code duplicated from the wiki:
 
  private boolean stripTags;
 
  public TestPage() {
 stripTags =
   Application.get().getMarkupSettings().getStripWicketTags();
  }
  @Override
  protected void onBeforeRender() {
 Application.get().getMarkupSettings().setStripWicketTags(true);
  }
  @Override
  protected void onAfterRender() {
 
  Application.get().getMarkupSettings().setStripWicketTags(stripTags);
  }
 
 
 
  Thanks in advance,
 
  Antoine.
 
 
  References:
  [1]
 
 http://cwiki.apache.org/WICKET/how-to-remove-wicket-markup-from-output.html
 




-- 

--8--8--
take your photos everywhere you go - http://www.memolio.com
--8--8--
We don't see things as they are, we see things as we are. - Anais Nin
Whether you think you can or whether you think you can't, you're right. -
Henry Ford
--8--8--


Re: wicket 1.4.2

2009-09-29 Thread Tomek Sniadach
Thanks Ernesto. :-)

2009/9/29 Ernesto Reinaldo Barreiro reier...@gmail.com

 Maybe this thread will explain why
 http://www.nabble.com/-vote--release-1.4.2-td25636013.html
 http://www.nabble.com/-vote--release-1.4.2-td25636013.html
 Best,

 Ernesto

 On Tue, Sep 29, 2009 at 2:38 PM, Tomek Sniadach 
 tomek.sniad...@googlemail.com wrote:

  Hi,
  I found on https://issues.apache.org/jira/browse/WICKET a release 1.4.2
 of
  wicket, but it's not on the official page, nor on the mirror sites. Is it
 a
  public release or are the sites just not updated yet?
 
  regards
  Tomek
 



RE: better way to strip wicket markup / tags per page?

2009-09-29 Thread Craig McIlwee
I don't see how this can work reliably when there is more than 1 user, AFAIK 
wicket has no synchronization in place that prevents 2 pages from going through 
the render phase at the same time.  So if one page finishes rendering and 
changes the setting to false while another page has just started rendering 
(e.g. the line immediately after change the setting to true) then that page 
will render with the wrong value.

Craig

-Original Message-
From: Antoine van Wel [mailto:antoine.van@gmail.com]
Sent: Tuesday, September 29, 2009 9:03 AM
To: users@wicket.apache.org
Subject: Re: better way to strip wicket markup / tags per page?

Thanks for the lightning fast reply.

Yes it works fine under development. Still I don't like it - after all these
statements are also executed during production mode, and even though they
can't do any harm there, I'd rather not see them there at all. More a matter
of personal taste I guess.

Anyway I have something in mind to improve it according to my taste. Will
implement that when I got time... This is not really an urgent issue to me.
Thanks anyway for the reply - I'm assuming now there really is no other way
to do this than temporarily changing the global settings.


Antoine


On Tue, Sep 29, 2009 at 7:46 PM, Marat Radchenko 
slonopotamusor...@gmail.com wrote:

 
  In some situations during development...

 With that in mind, this solution is absolutely ok.

 2009/9/29 Antoine van Wel antoine.van@gmail.com

  Hi,
 
  on the wiki[1] it is described how to get rid of wicket markup such as
  wicket:id attributes on a page basis.
  The solution looks like a dirty hack to me which may go wrong when for
  instance exceptions occur. Does anybody know of a better way?
 
  For completeness sake, here is the code duplicated from the wiki:
 
  private boolean stripTags;
 
  public TestPage() {
 stripTags =
   Application.get().getMarkupSettings().getStripWicketTags();
  }
  @Override
  protected void onBeforeRender() {
 Application.get().getMarkupSettings().setStripWicketTags(true);
  }
  @Override
  protected void onAfterRender() {
 
  Application.get().getMarkupSettings().setStripWicketTags(stripTags);
  }
 
 
 
  Thanks in advance,
 
  Antoine.
 
 
  References:
  [1]
 
 http://cwiki.apache.org/WICKET/how-to-remove-wicket-markup-from-output.html
 




--

--8--8--
take your photos everywhere you go - http://www.memolio.com
--8--8--
We don't see things as they are, we see things as we are. - Anais Nin
Whether you think you can or whether you think you can't, you're right. -
Henry Ford
--8--8--



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



Re: better way to strip wicket markup / tags per page?

2009-09-29 Thread Pedro Santos
on the wiki[1] it is described how to get rid of wicket markup such as
wicket:id attributes on a page basis
page basis is an specific page on your project, or you want to strip wicket
tags to all pages?

you can override application init method and put your configuration lines:
getMarkupSettings().setStripWicketTags(true);

or create your BasiPageParentWithoutWicketTagsSuperclass for those specific
pages extensions...

On Tue, Sep 29, 2009 at 8:40 AM, Antoine van Wel
antoine.van@gmail.comwrote:

 Hi,

 on the wiki[1] it is described how to get rid of wicket markup such as
 wicket:id attributes on a page basis.
 The solution looks like a dirty hack to me which may go wrong when for
 instance exceptions occur. Does anybody know of a better way?

 For completeness sake, here is the code duplicated from the wiki:

 private boolean stripTags;

 public TestPage() {
stripTags =
  Application.get().getMarkupSettings().getStripWicketTags();
 }
 @Override
 protected void onBeforeRender() {
Application.get().getMarkupSettings().setStripWicketTags(true);
 }
 @Override
 protected void onAfterRender() {
Application.get().getMarkupSettings().setStripWicketTags(stripTags);
 }



 Thanks in advance,

 Antoine.


 References:
 [1]
 http://cwiki.apache.org/WICKET/how-to-remove-wicket-markup-from-output.html




-- 
Pedro Henrique Oliveira dos Santos


AutoComplete textfield ignores visible property within hierarchy.

2009-09-29 Thread Ann Baert
When writing an autocomplete textfield on a form that is first visible,
and after an ajax call rendered invisible, the autocomplete textfields
on this form get rendered anyway in the ajax response.

The method renderAutocompleteHead in AbstractAutocompleteBehavior gets 
executed,
even if the AutoComplete component to which it is attached is not visible 
within the
component hierarchy. 

Below the snippet of code that solved it for us ...

In the class AbstractAutoCompleteBehavior, a test on the visibility was 
added.



public void renderHead(IHeaderResponse response) {
if(this.getComponent().isVisibleInHierarchy()) {
super.renderHead(response);
renderAutocompleteHead(response);
}
} 


The error becomes visible in the debug window on the webpage.

There is already a bug report filed within jira, and a demo application is 
included to simulate the problem.

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

Met vriendelijke groeten,

ANN BAERT
ICT-DEPARTMENT
Internet technologie: Software Engineer
Tel.:+32 56 43 42 11
Fax:+32 56 43 44 88
E-mail: ann.ba...@tvh.com
Contactsheet: ANN BAERT TVH FORKLIFT PARTS nv-sa -  BRABANTSTRAAT 15 - 
B-8790 WAREGEM 
Neem even pauze om onze website te bekijken en vertel ons hoe we u kunnen 
helpen: www.tvh.com/nl Vooraleer ik print, denk ik aan het milieu. 
 DISCLAIMER 
A HREF=http://www.tvh.be/newen/pages/emaildisclaimer.html;
http://www.tvh.be/newen/pages/emaildisclaimer.html /A

This message is delivered to all addressees subject to the conditions
set forth in the attached disclaimer, which is an integral part of this
message.


Re: Wicket in Italy

2009-09-29 Thread Emanuele Gesuato

Padova :)


Paolo Di Tommaso wrote:

Roma (~)


On Thu, Sep 24, 2009 at 8:46 AM, francesco dicarlo
evilsephir...@gmail.comwrote:


Hi, i've just worked on a project with wicket for a software house in Bari.

But now i'm in Rome.

Hope to see you in an event XD

2009/9/24 Luca Provenzani eufor...@gmail.com








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



Re: AutoComplete textfield ignores visible property within hierarchy.

2009-09-29 Thread Igor Vaynberg
please open a jira issue.

-igor

On Tue, Sep 29, 2009 at 7:59 AM, Ann Baert ann.ba...@tvh.be wrote:
 When writing an autocomplete textfield on a form that is first visible,
 and after an ajax call rendered invisible, the autocomplete textfields
 on this form get rendered anyway in the ajax response.

 The method renderAutocompleteHead in AbstractAutocompleteBehavior gets
 executed,
 even if the AutoComplete component to which it is attached is not visible
 within the
 component hierarchy.

 Below the snippet of code that solved it for us ...

 In the class AbstractAutoCompleteBehavior, a test on the visibility was
 added.



 public void renderHead(IHeaderResponse response) {
        if(this.getComponent().isVisibleInHierarchy()) {
            super.renderHead(response);
            renderAutocompleteHead(response);
        }
    }


 The error becomes visible in the debug window on the webpage.

 There is already a bug report filed within jira, and a demo application is
 included to simulate the problem.

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

 Met vriendelijke groeten,

 ANN BAERT
 ICT-DEPARTMENT
 Internet technologie: Software Engineer
 Tel.:    +32 56 43 42 11
 Fax:    +32 56 43 44 88
 E-mail: ann.ba...@tvh.com
 Contactsheet: ANN BAERT TVH FORKLIFT PARTS nv-sa -  BRABANTSTRAAT 15 -
 B-8790 WAREGEM
 Neem even pauze om onze website te bekijken en vertel ons hoe we u kunnen
 helpen: www.tvh.com/nl Vooraleer ik print, denk ik aan het milieu.
  DISCLAIMER 
 A HREF=http://www.tvh.be/newen/pages/emaildisclaimer.html;
 http://www.tvh.be/newen/pages/emaildisclaimer.html /A

 This message is delivered to all addressees subject to the conditions
 set forth in the attached disclaimer, which is an integral part of this
 message.


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



Re: AttributeModifier relative path rendering in conflict

2009-09-29 Thread pete swulius
Ah, thank you.  I will look into using HeaderContributor instead.  I have a
good feeling that will take care of my problem.  I will post back my
findings this afternoon.

--pete


Preventing Copy Pasting URL's In Same Browser Session

2009-09-29 Thread Carlo Camerino
Hi everyone,

We have this requirement in which we cannot allow the customer to copy
paste the url that's appearing in the address bar into the same
browser. For example in a different tab or in a new window. This can
easily be done in Wicket Framework since the url has a corresponding
page attached to it. For example if i get
http://localhost/wicket:interface=1 appearing in the address bar, I
can open anew tab paste the url and I could get into the same page.
The users don't want this behavior. Could I make it work in such a way
that I copy http://localhost/wicket:inteface=1, when i try to copy and
paste it, it will redirect me to an error page? This happens even
after the user has already logged in. Really need help on this
one.

Thanks

Carlo

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



Re: Preventing Copy Pasting URL's In Same Browser Session

2009-09-29 Thread Pedro Santos
We have this requirement in which we cannot allow the customer to copy
paste the url that's appearing in the address bar into the same
browser.
Crazy thing. How about to include an request counter to your url
encode/decode strategy?


On Tue, Sep 29, 2009 at 1:41 PM, Carlo Camerino carlo.camer...@gmail.comwrote:

 Hi everyone,

 We have this requirement in which we cannot allow the customer to copy
 paste the url that's appearing in the address bar into the same
 browser. For example in a different tab or in a new window. This can
 easily be done in Wicket Framework since the url has a corresponding
 page attached to it. For example if i get
 http://localhost/wicket:interface=1 appearing in the address bar, I
 can open anew tab paste the url and I could get into the same page.
 The users don't want this behavior. Could I make it work in such a way
 that I copy http://localhost/wicket:inteface=1, when i try to copy and
 paste it, it will redirect me to an error page? This happens even
 after the user has already logged in. Really need help on this
 one.

 Thanks

 Carlo

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




-- 
Pedro Henrique Oliveira dos Santos


Re: Preventing Copy Pasting URL's In Same Browser Session

2009-09-29 Thread Matej Knopp
On Tue, Sep 29, 2009 at 6:48 PM, Pedro Santos pedros...@gmail.com wrote:
 We have this requirement in which we cannot allow the customer to copy
 paste the url that's appearing in the address bar into the same
 browser.
 Crazy thing. How about to include an request counter to your url
 encode/decode strategy?

That wouldn't work. Or it would prevent refresh as well. This is not
really doable. If you need this kind of control web applications
simply aren't what you should be doing.

-Matej



 On Tue, Sep 29, 2009 at 1:41 PM, Carlo Camerino 
 carlo.camer...@gmail.comwrote:

 Hi everyone,

 We have this requirement in which we cannot allow the customer to copy
 paste the url that's appearing in the address bar into the same
 browser. For example in a different tab or in a new window. This can
 easily be done in Wicket Framework since the url has a corresponding
 page attached to it. For example if i get
 http://localhost/wicket:interface=1 appearing in the address bar, I
 can open anew tab paste the url and I could get into the same page.
 The users don't want this behavior. Could I make it work in such a way
 that I copy http://localhost/wicket:inteface=1, when i try to copy and
 paste it, it will redirect me to an error page? This happens even
 after the user has already logged in. Really need help on this
 one.

 Thanks

 Carlo

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




 --
 Pedro Henrique Oliveira dos Santos


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



Re: Preventing Copy Pasting URL's In Same Browser Session

2009-09-29 Thread nino martinez wael
could'nt he just have a page map with a size of 0? Of course reloads
would'nt work and probably a bunch of other stuff too.. Seems like at
strange thing to limit on though.

2009/9/29 Matej Knopp matej.kn...@gmail.com

 On Tue, Sep 29, 2009 at 6:48 PM, Pedro Santos pedros...@gmail.com wrote:
  We have this requirement in which we cannot allow the customer to copy
  paste the url that's appearing in the address bar into the same
  browser.
  Crazy thing. How about to include an request counter to your url
  encode/decode strategy?

 That wouldn't work. Or it would prevent refresh as well. This is not
 really doable. If you need this kind of control web applications
 simply aren't what you should be doing.

 -Matej

 
 
  On Tue, Sep 29, 2009 at 1:41 PM, Carlo Camerino 
 carlo.camer...@gmail.comwrote:
 
  Hi everyone,
 
  We have this requirement in which we cannot allow the customer to copy
  paste the url that's appearing in the address bar into the same
  browser. For example in a different tab or in a new window. This can
  easily be done in Wicket Framework since the url has a corresponding
  page attached to it. For example if i get
  http://localhost/wicket:interface=1 appearing in the address bar, I
  can open anew tab paste the url and I could get into the same page.
  The users don't want this behavior. Could I make it work in such a way
  that I copy http://localhost/wicket:inteface=1, when i try to copy and
  paste it, it will redirect me to an error page? This happens even
  after the user has already logged in. Really need help on this
  one.
 
  Thanks
 
  Carlo
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  Pedro Henrique Oliveira dos Santos
 

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




Re: Preventing Copy Pasting URL's In Same Browser Session

2009-09-29 Thread Carlo Camerino
ya it's sort of our requirement i don't think i would set my pagemap to 0.

i'm thinking of a control i could use in order to determine that this
page is accessed. i'm thinking of the best way to do it though.
i could maybe include a hidden field in each of my form that i have to
check each time and check each request.
i don't know if this is possible.

On Wed, Sep 30, 2009 at 1:29 AM, nino martinez wael
nino.martinez.w...@gmail.com wrote:
 could'nt he just have a page map with a size of 0? Of course reloads
 would'nt work and probably a bunch of other stuff too.. Seems like at
 strange thing to limit on though.

 2009/9/29 Matej Knopp matej.kn...@gmail.com

 On Tue, Sep 29, 2009 at 6:48 PM, Pedro Santos pedros...@gmail.com wrote:
  We have this requirement in which we cannot allow the customer to copy
  paste the url that's appearing in the address bar into the same
  browser.
  Crazy thing. How about to include an request counter to your url
  encode/decode strategy?

 That wouldn't work. Or it would prevent refresh as well. This is not
 really doable. If you need this kind of control web applications
 simply aren't what you should be doing.

 -Matej

 
 
  On Tue, Sep 29, 2009 at 1:41 PM, Carlo Camerino 
 carlo.camer...@gmail.comwrote:
 
  Hi everyone,
 
  We have this requirement in which we cannot allow the customer to copy
  paste the url that's appearing in the address bar into the same
  browser. For example in a different tab or in a new window. This can
  easily be done in Wicket Framework since the url has a corresponding
  page attached to it. For example if i get
  http://localhost/wicket:interface=1 appearing in the address bar, I
  can open anew tab paste the url and I could get into the same page.
  The users don't want this behavior. Could I make it work in such a way
  that I copy http://localhost/wicket:inteface=1, when i try to copy and
  paste it, it will redirect me to an error page? This happens even
  after the user has already logged in. Really need help on this
  one.
 
  Thanks
 
  Carlo
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  Pedro Henrique Oliveira dos Santos
 

 -
 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: Preventing Copy Pasting URL's In Same Browser Session

2009-09-29 Thread Clint Checketts
I'm guessing they are trying to limit users from taking a test in one window
and seeing the previous answers in another.

-Clint

On Tue, Sep 29, 2009 at 12:29 PM, nino martinez wael 
nino.martinez.w...@gmail.com wrote:

 could'nt he just have a page map with a size of 0? Of course reloads
 would'nt work and probably a bunch of other stuff too.. Seems like at
 strange thing to limit on though.

 2009/9/29 Matej Knopp matej.kn...@gmail.com

  On Tue, Sep 29, 2009 at 6:48 PM, Pedro Santos pedros...@gmail.com
 wrote:
   We have this requirement in which we cannot allow the customer to copy
   paste the url that's appearing in the address bar into the same
   browser.
   Crazy thing. How about to include an request counter to your url
   encode/decode strategy?
 
  That wouldn't work. Or it would prevent refresh as well. This is not
  really doable. If you need this kind of control web applications
  simply aren't what you should be doing.
 
  -Matej
 
  
  
   On Tue, Sep 29, 2009 at 1:41 PM, Carlo Camerino 
  carlo.camer...@gmail.comwrote:
  
   Hi everyone,
  
   We have this requirement in which we cannot allow the customer to copy
   paste the url that's appearing in the address bar into the same
   browser. For example in a different tab or in a new window. This can
   easily be done in Wicket Framework since the url has a corresponding
   page attached to it. For example if i get
   http://localhost/wicket:interface=1 appearing in the address bar, I
   can open anew tab paste the url and I could get into the same page.
   The users don't want this behavior. Could I make it work in such a way
   that I copy http://localhost/wicket:inteface=1, when i try to copy
 and
   paste it, it will redirect me to an error page? This happens even
   after the user has already logged in. Really need help on this
   one.
  
   Thanks
  
   Carlo
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
  
   --
   Pedro Henrique Oliveira dos Santos
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 



Re: Preventing Copy Pasting URL's In Same Browser Session

2009-09-29 Thread nino martinez wael
Ahh good example for usage :)

2009/9/29 Clint Checketts checke...@gmail.com

 I'm guessing they are trying to limit users from taking a test in one
 window
 and seeing the previous answers in another.

 -Clint

 On Tue, Sep 29, 2009 at 12:29 PM, nino martinez wael 
 nino.martinez.w...@gmail.com wrote:

  could'nt he just have a page map with a size of 0? Of course reloads
  would'nt work and probably a bunch of other stuff too.. Seems like at
  strange thing to limit on though.
 
  2009/9/29 Matej Knopp matej.kn...@gmail.com
 
   On Tue, Sep 29, 2009 at 6:48 PM, Pedro Santos pedros...@gmail.com
  wrote:
We have this requirement in which we cannot allow the customer to
 copy
paste the url that's appearing in the address bar into the same
browser.
Crazy thing. How about to include an request counter to your url
encode/decode strategy?
  
   That wouldn't work. Or it would prevent refresh as well. This is not
   really doable. If you need this kind of control web applications
   simply aren't what you should be doing.
  
   -Matej
  
   
   
On Tue, Sep 29, 2009 at 1:41 PM, Carlo Camerino 
   carlo.camer...@gmail.comwrote:
   
Hi everyone,
   
We have this requirement in which we cannot allow the customer to
 copy
paste the url that's appearing in the address bar into the same
browser. For example in a different tab or in a new window. This can
easily be done in Wicket Framework since the url has a corresponding
page attached to it. For example if i get
http://localhost/wicket:interface=1 appearing in the address bar, I
can open anew tab paste the url and I could get into the same page.
The users don't want this behavior. Could I make it work in such a
 way
that I copy http://localhost/wicket:inteface=1, when i try to copy
  and
paste it, it will redirect me to an error page? This happens even
after the user has already logged in. Really need help on this
one.
   
Thanks
   
Carlo
   
   
 -
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
   
   
   
   
--
Pedro Henrique Oliveira dos Santos
   
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
 



Re: Preventing Copy Pasting URL's In Same Browser Session

2009-09-29 Thread nino martinez wael
Okay in that case you should be able to use some of the stuff that are used
in apps that are supposed be *cross*-*site* request *forgery proof*, search
the list for that.

2009/9/29 Carlo Camerino carlo.camer...@gmail.com

 ya it's sort of our requirement i don't think i would set my pagemap to
 0.

 i'm thinking of a control i could use in order to determine that this
 page is accessed. i'm thinking of the best way to do it though.
 i could maybe include a hidden field in each of my form that i have to
 check each time and check each request.
 i don't know if this is possible.

 On Wed, Sep 30, 2009 at 1:29 AM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
  could'nt he just have a page map with a size of 0? Of course reloads
  would'nt work and probably a bunch of other stuff too.. Seems like at
  strange thing to limit on though.
 
  2009/9/29 Matej Knopp matej.kn...@gmail.com
 
  On Tue, Sep 29, 2009 at 6:48 PM, Pedro Santos pedros...@gmail.com
 wrote:
   We have this requirement in which we cannot allow the customer to copy
   paste the url that's appearing in the address bar into the same
   browser.
   Crazy thing. How about to include an request counter to your url
   encode/decode strategy?
 
  That wouldn't work. Or it would prevent refresh as well. This is not
  really doable. If you need this kind of control web applications
  simply aren't what you should be doing.
 
  -Matej
 
  
  
   On Tue, Sep 29, 2009 at 1:41 PM, Carlo Camerino 
  carlo.camer...@gmail.comwrote:
  
   Hi everyone,
  
   We have this requirement in which we cannot allow the customer to
 copy
   paste the url that's appearing in the address bar into the same
   browser. For example in a different tab or in a new window. This can
   easily be done in Wicket Framework since the url has a corresponding
   page attached to it. For example if i get
   http://localhost/wicket:interface=1 appearing in the address bar, I
   can open anew tab paste the url and I could get into the same page.
   The users don't want this behavior. Could I make it work in such a
 way
   that I copy http://localhost/wicket:inteface=1, when i try to copy
 and
   paste it, it will redirect me to an error page? This happens even
   after the user has already logged in. Really need help on this
   one.
  
   Thanks
  
   Carlo
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
  
   --
   Pedro Henrique Oliveira dos Santos
  
 
  -
  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: Preventing Copy Pasting URL's In Same Browser Session

2009-09-29 Thread Matej Knopp
Your options here are rather limited. Wicket or not, it is still a web
application. HTTP is a stateless protocol. There are ways/hacks to
detect opening page in new window/tab but they require javascript and
are not 100% bullet proof. If you need real solution for this forget
about web applications. Do it as java applet or flash or silverlight
or something similar.

-Matej

On Tue, Sep 29, 2009 at 7:55 PM, Carlo Camerino
carlo.camer...@gmail.com wrote:
 ya it's sort of our requirement i don't think i would set my pagemap to 0.

 i'm thinking of a control i could use in order to determine that this
 page is accessed. i'm thinking of the best way to do it though.
 i could maybe include a hidden field in each of my form that i have to
 check each time and check each request.
 i don't know if this is possible.

 On Wed, Sep 30, 2009 at 1:29 AM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 could'nt he just have a page map with a size of 0? Of course reloads
 would'nt work and probably a bunch of other stuff too.. Seems like at
 strange thing to limit on though.

 2009/9/29 Matej Knopp matej.kn...@gmail.com

 On Tue, Sep 29, 2009 at 6:48 PM, Pedro Santos pedros...@gmail.com wrote:
  We have this requirement in which we cannot allow the customer to copy
  paste the url that's appearing in the address bar into the same
  browser.
  Crazy thing. How about to include an request counter to your url
  encode/decode strategy?

 That wouldn't work. Or it would prevent refresh as well. This is not
 really doable. If you need this kind of control web applications
 simply aren't what you should be doing.

 -Matej

 
 
  On Tue, Sep 29, 2009 at 1:41 PM, Carlo Camerino 
 carlo.camer...@gmail.comwrote:
 
  Hi everyone,
 
  We have this requirement in which we cannot allow the customer to copy
  paste the url that's appearing in the address bar into the same
  browser. For example in a different tab or in a new window. This can
  easily be done in Wicket Framework since the url has a corresponding
  page attached to it. For example if i get
  http://localhost/wicket:interface=1 appearing in the address bar, I
  can open anew tab paste the url and I could get into the same page.
  The users don't want this behavior. Could I make it work in such a way
  that I copy http://localhost/wicket:inteface=1, when i try to copy and
  paste it, it will redirect me to an error page? This happens even
  after the user has already logged in. Really need help on this
  one.
 
  Thanks
 
  Carlo
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  Pedro Henrique Oliveira dos Santos
 

 -
 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: Question about wicket validation

2009-09-29 Thread Jonathan Locke

protected final void validate()
{
if (isEnabledInHierarchy()  isVisibleInHierarchy())
{
// since this method can be called directly by users, 
this additional
check is needed
validateComponents();
validateFormValidators();
onValidate();
validateNestedForms();
}
}


MartinM wrote:
 
 Hi!
 
 If a form validator depends on a nested form's components, it will
 assume they are valid because the nested form's components are
 validated after the parent form?
 
 **
 Martin
 
 -
 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/Question-about-wicket-validation-tp25657602p25669362.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: Selectively ignoring required fields

2009-09-29 Thread Phil Housley
I'm bringing up my old thread here, as I found something that works
well enough, and it might help someone to have it in the list
archive.)

2009/9/15 Pedro Santos pedros...@gmail.com:
 On the other hand, maybe that whole criteria panel is deselected, in
 which case I want to be able to stop the whole thing from doing any
 validation at all, so it won't even look at whether the check box is
 checked.

 disable panel don't work on that case?

Just overriding isEnabled didn't do the trick by itself, but I found a
rather nasty little hack.  The issue is that the individual panels
need to always be enabled for rendering, but only selectively enabled
at processing.  Also, the decision about which panel to enable is
based on incoming data, which isn't always ready when needed.  A
solution is to have each panel check whether it is enabled, by calling
up to the parent panel.  The parent does this:

public boolean isItMyTurn(Criteria panel) {
if (this.rendering) {
return true;
} else {
this.radios.inputChanged();
int index = Integer.parseInt(this.radios.getRawInput());
Criteria active = this.panels.get(index);
if (active == panel) {
return true;
}
}

return false;
}

Where rendering is set in before and after render methods, and the
radio buttons are partially processed out of sequence to get the input
when its needed.

I don't know how safe this is, but it seems to work.

Thanks everyone.

 On Tue, Sep 15, 2009 at 11:10 AM, Phil Housley 
 undeconstruc...@gmail.comwrote:

 2009/9/15 Bas Gooren b...@iswd.nl:
  The fact of the matter is that you will need extra logic _somewhere_.
 It's a
  matter of personal preference where you put it (overriden components,
 ajax,
  override form methods, ...).
 
  If what you're trying to accomplish is difficult given a certain set of
  tools, my experience is that it's good to rethink the problem.
 
  On the one hand you want isolation (components can have logic to say if
 they
  are required), and on the other hand you want to break outside of this
  isolation (form needs to control required flag on components). Having
 this
  logic in two different places is error-prone (at least from my
 experience).
  So why not have a single point in your code where you deal with the
 required
  flags of these components?
 
  Bas

 A good point, but I don't think it exactly applies in this case.  What
 I really want is for each component to know whether it is required
 within a very small context.  For example, a might have a criteria
 panel (one of the sub-parts of the searcher) set out as follows:

 [x] must be a foo called [_]

 In which case, the sub panel will be in total charge of whether the
 text field is required.

 On the other hand, maybe that whole criteria panel is deselected, in
 which case I want to be able to stop the whole thing from doing any
 validation at all, so it won't even look at whether the check box is
 checked.

 What I am thinking currently is to sadly discard the built in
 validation, and have each criteria panel report its errors manually
 when asked to by the parent to pass on its generated set of criteria
 (a map basically), which it has built out of its input.  I don't like
 it at all, as it lets bad data get too far into the system, but I
 think it will solve the immediate problem.

 Phil.

  - Original Message - From: Phil Housley
  undeconstruc...@gmail.com
  To: users@wicket.apache.org
  Sent: Tuesday, September 15, 2009 3:37 PM
  Subject: Re: Selectively ignoring required fields
 
 
  Several interesting ideas, but they all seem to involve more invasive
  changes than I really want to make - either changing component classes
  or changing values of components at process time, which would be hard
  to undo (and maybe not possible, as some components already have logic
  to say if they are required.)
 
  From hunting through the code, what would be about perfect would be to
  override org.apache.wicket.markup.html.form.Form#validateComponents(),
  but unfortunately that is final.  Even if I were to copy some of the
  code into my form class, there are some private methods of Form that I
  would need to call.
 
  Has anyone perhaps had a similar issue somewhere else?
 
  Thanks again,
 
  Phil.
 
  2009/9/15 Bas Gooren b...@iswd.nl:
 
  Phil,
 
  The way we deal with this is by using an ajax behavior on radiobuttons,
  and
  update the required flag on dependant fields from there.
 
  Another way (without ajax) could be to update the required flag on the
  form
  components on submit, prior to validation.
  E.g. by overriding Form.process() (or Form.validate(), since this is
  related
  to validation).
 
  E.g. something like
 
  Form form = new Form( id, ... ) {
  protected void validate() {
 

Re: AjaxPagingNavigation

2009-09-29 Thread Pedro Santos
I'm using the AjaxPagingNavigation component and it works well, but when I
click on one of the links, my url  is replaced with

/?wicket:interface=:3:4:::

You refers to html A tag generated by navigations links. What you got on
onclick tag attribute on your rendered page?

On Mon, Sep 28, 2009 at 9:57 PM, Douglas Ferguson 
doug...@douglasferguson.us wrote:

 I'm using the AjaxPagingNavigation component and it works well, but when I
 click on one of the links, my url  is replaced with

 /?wicket:interface=:3:4:::

 This is making me thing that the entire page is getting replaced and not
 using ajax.

 Is is possible to get IPagingNavigationIncrementLink to use href=#
 instead of updating the url?

 D/




-- 
Pedro Henrique Oliveira dos Santos


Re: AjaxPagingNavigation

2009-09-29 Thread Douglas Ferguson
Is anybody successfully using this and witnessing ajax calls?

I can't figure out why it isn't using Ajax as the name implies. I
tried overriding the onAjaxEvent method, but it is never called.

Douglas

On Sep 28, 2009, at 7:57 PM, Douglas Ferguson wrote:

 I'm using the AjaxPagingNavigation component and it works well, but
 when I click on one of the links, my url  is replaced with

 /?wicket:interface=:3:4:::

 This is making me thing that the entire page is getting replaced and
 not using ajax.

 Is is possible to get IPagingNavigationIncrementLink to use href=#
 instead of updating the url?

 D/



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



Complicated workflows

2009-09-29 Thread Phil Housley
Hello list,

I'm currently working on some ideas for building apps with fairly
complex workflows.  My aim is to find a nice pattern/framework for
building apps where each unit of work involves many panels, several
forms, lots of decisions and so on.  In particular I'm aiming at apps
where you need to be very confident about exactly what is happening,
so very strict control of actions, being careful of multiple
renderings of a page each trying to change the server data, and so on.
 Also, I'm wondering about some options for declarative building of
workflows out of existing tasks.

My current design involves running from a special page, which
maintains a stack of tasks.  One type of task is a Workflow, which can
be configured to automatically spawn subtasks as required, based on
the result of previous tasks.  Another type of task is based on a
panel, and is able to cause itself to be rendered.  The stack
processor makes sure that each task is invoked at the right time, that
a task can render if it is at the top of the stack, that only the top
of the stack can be invoked from a form and so on.

This is working ok for some silly demo cases, but there are various
issues.  For example, any task that is not also a component cannot
access dependency injection, or set error messages and so on.  I'm not
sure how to get around this at the moment, as I don't want to force
every task to be a component, when many will likely have no cause to
ever be rendered.

So, the reason I'm posting is to ask mainly two things:

1) Is this of interest to anyone else?  All the code is my own, so
I'll open source it if there seems to be some future in it.

2) If so, does anyone have any comments on my current design?  Clearly
there are problems with it, but should I carry on trying to find ways
to work around them, or does the whole thing sounds like so much
crack?

Thanks,

-- 
Phil Housley

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



Re: Complicated workflows

2009-09-29 Thread Dane Laverty
If you're using Spring, the dependency injection issue for
non-component items can be solved by adding the following line to the
object's constructor:

InjectorHolder.getInjector().inject(this);

where InjectorHolder is org.apache.wicket.injection.web.InjectorHolder
. I'm afraid I don't have any advice to offer you on the rest of it,
except that it sounds like a good work and I hope you can get it doing
what you need :)

Dane

On Tue, Sep 29, 2009 at 2:11 PM, Phil Housley undeconstruc...@gmail.com wrote:
 Hello list,

 I'm currently working on some ideas for building apps with fairly
 complex workflows.  My aim is to find a nice pattern/framework for
 building apps where each unit of work involves many panels, several
 forms, lots of decisions and so on.  In particular I'm aiming at apps
 where you need to be very confident about exactly what is happening,
 so very strict control of actions, being careful of multiple
 renderings of a page each trying to change the server data, and so on.
  Also, I'm wondering about some options for declarative building of
 workflows out of existing tasks.

 My current design involves running from a special page, which
 maintains a stack of tasks.  One type of task is a Workflow, which can
 be configured to automatically spawn subtasks as required, based on
 the result of previous tasks.  Another type of task is based on a
 panel, and is able to cause itself to be rendered.  The stack
 processor makes sure that each task is invoked at the right time, that
 a task can render if it is at the top of the stack, that only the top
 of the stack can be invoked from a form and so on.

 This is working ok for some silly demo cases, but there are various
 issues.  For example, any task that is not also a component cannot
 access dependency injection, or set error messages and so on.  I'm not
 sure how to get around this at the moment, as I don't want to force
 every task to be a component, when many will likely have no cause to
 ever be rendered.

 So, the reason I'm posting is to ask mainly two things:

 1) Is this of interest to anyone else?  All the code is my own, so
 I'll open source it if there seems to be some future in it.

 2) If so, does anyone have any comments on my current design?  Clearly
 there are problems with it, but should I carry on trying to find ways
 to work around them, or does the whole thing sounds like so much
 crack?

 Thanks,

 --
 Phil Housley

 -
 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: AttributeModifier relative path rendering in conflict

2009-09-29 Thread pete swulius
HeaderContributor is the answer.

add( CSSPackageResource.getHeaderContribution( css/ + style.getName() +
/promo.css ) );

The javadocs explicitly state that a css location that does not begin will a
leading / (slash) will be have it's relative path prepended to it.
http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/CSSPackageResource.html

Thank you for the help!

--pete


Re: Preventing Copy Pasting URL's In Same Browser Session

2009-09-29 Thread Andreas Petersson
I am not aware that Wicket has direct support for this kind of 
(mis-)behavior.
You can, however employ some kind of cheating here. if you set the http 
headers to no-cache with the help of a servlet filter, the browser will 
not allow the page to be copy-pasted from local cache, and will 
re-request the page. if you include a (crypted) counter as one of the 
page parameters, you can easily check if this page was already served 
(if the counter is lower or equal than the last served url) and redirect 
to an error page accordingly.


to fully disable the browser-cache use:
response.addHeader(“Pragma”, “no-cache”);
response.addHeader(“Cache-Control”, “no-cache”);
response.addHeader(“Cache-Control”, “must-revalidate”);
response.addHeader(“Expires”, “Mon, 8 Aug 2006 10:00:00 GMT”); // some 
date in the past


BR
Andreas

The users don't want this behavior. Could I make it work in such a way
that I copy http://localhost/wicket:inteface=1, when i try to copy and
paste it, it will redirect me to an error page? This happens even
after the user has already logged in. Really need help on this
one.
  



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



Re: Preventing Copy Pasting URL's In Same Browser Session

2009-09-29 Thread Matej Knopp
What happens if the user (perhaps accidentally) refreshes page?

-Matej

On Tue, Sep 29, 2009 at 11:43 PM, Andreas Petersson
andr...@petersson.at wrote:
 I am not aware that Wicket has direct support for this kind of
 (mis-)behavior.
 You can, however employ some kind of cheating here. if you set the http
 headers to no-cache with the help of a servlet filter, the browser will not
 allow the page to be copy-pasted from local cache, and will re-request the
 page. if you include a (crypted) counter as one of the page parameters, you
 can easily check if this page was already served (if the counter is lower or
 equal than the last served url) and redirect to an error page accordingly.

 to fully disable the browser-cache use:
 response.addHeader(“Pragma”, “no-cache”);
 response.addHeader(“Cache-Control”, “no-cache”);
 response.addHeader(“Cache-Control”, “must-revalidate”);
 response.addHeader(“Expires”, “Mon, 8 Aug 2006 10:00:00 GMT”); // some date
 in the past

 BR
 Andreas

 The users don't want this behavior. Could I make it work in such a way
 that I copy http://localhost/wicket:inteface=1, when i try to copy and
 paste it, it will redirect me to an error page? This happens even
 after the user has already logged in. Really need help on this
 one.



 -
 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: Preventing Copy Pasting URL's In Same Browser Session

2009-09-29 Thread Andreas Petersson

Matej Knopp schrieb:

What happens if the user (perhaps accidentally) refreshes page?

-Matej
he would get an error page using the described approach. clearly not 
what you would want in a general-purpose web app.

BR
Andreas

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



Re: Preventing Copy Pasting URL's In Same Browser Session

2009-09-29 Thread Phil Housley
2009/9/29 Carlo Camerino carlo.camer...@gmail.com:
 Hi everyone,

 We have this requirement in which we cannot allow the customer to copy
 paste the url that's appearing in the address bar into the same
 browser. For example in a different tab or in a new window. This can
 easily be done in Wicket Framework since the url has a corresponding
 page attached to it. For example if i get
 http://localhost/wicket:interface=1 appearing in the address bar, I
 can open anew tab paste the url and I could get into the same page.
 The users don't want this behavior. Could I make it work in such a way
 that I copy http://localhost/wicket:inteface=1, when i try to copy and
 paste it, it will redirect me to an error page? This happens even
 after the user has already logged in. Really need help on this
 one.


I've been playing with the ideas from
http://day-to-day-stuff.blogspot.com/2008/10/wicket-extreme-consistent-urls.html
for something of my own, which might fit the bill in a way.  Following
that you can convince wicket to serve up every instance of a mounted
page from exactly the same URL.  That means if you copy the url, you
get a brand new instance of the page.  You lose the ability to
refresh, but if you are being strict on that sort of thing, I guess
you will have a refresh button on the page when and only when it is
appropriate.

-- 
Phil Housley

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



Re: Complicated workflows

2009-09-29 Thread Scott Swank
Phil,

Would an event-centric approach simplify things?  I'm thinking that
you could then have multiple listeners for a given event and the
various listeners would not have to be aware of one another.  This
might reduce the task/sub-task interactions.  Adding errors, or
refreshing components could be handled by various listeners as needed.

I've gone that route with reasonable luck.  Of course I know precious
little about your specific application...

Cheers,
Scott


On Tue, Sep 29, 2009 at 2:11 PM, Phil Housley undeconstruc...@gmail.com wrote:
 Hello list,

 I'm currently working on some ideas for building apps with fairly
 complex workflows.  My aim is to find a nice pattern/framework for
 building apps where each unit of work involves many panels, several
 forms, lots of decisions and so on.  In particular I'm aiming at apps
 where you need to be very confident about exactly what is happening,
 so very strict control of actions, being careful of multiple
 renderings of a page each trying to change the server data, and so on.
  Also, I'm wondering about some options for declarative building of
 workflows out of existing tasks.

 My current design involves running from a special page, which
 maintains a stack of tasks.  One type of task is a Workflow, which can
 be configured to automatically spawn subtasks as required, based on
 the result of previous tasks.  Another type of task is based on a
 panel, and is able to cause itself to be rendered.  The stack
 processor makes sure that each task is invoked at the right time, that
 a task can render if it is at the top of the stack, that only the top
 of the stack can be invoked from a form and so on.

 This is working ok for some silly demo cases, but there are various
 issues.  For example, any task that is not also a component cannot
 access dependency injection, or set error messages and so on.  I'm not
 sure how to get around this at the moment, as I don't want to force
 every task to be a component, when many will likely have no cause to
 ever be rendered.

 So, the reason I'm posting is to ask mainly two things:

 1) Is this of interest to anyone else?  All the code is my own, so
 I'll open source it if there seems to be some future in it.

 2) If so, does anyone have any comments on my current design?  Clearly
 there are problems with it, but should I carry on trying to find ways
 to work around them, or does the whole thing sounds like so much
 crack?

 Thanks,

 --
 Phil Housley

 -
 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



RadioChoice and Ajax to display a panel of dropdowns

2009-09-29 Thread Jeffrey Schneller
I want to create a list of radio buttons [I have that working] and an
ajax event to fire whenever a radio button is clicked [I have this
working].  If the radio button matches the one I am interested in then I
want to display additional information that must be filled in.  A radio
button selection is required.

 

I cannot get the additional information to display when I add the
component back to the target.  I think it is because the additional
information is originally set to not visible so the output markup id is
not written out.  How would I go about doing this?  It seems pretty
standard.  Do I need to use panels and swap the appropriate panel [1 -
empty panel, 2 - panel with additional info] into the target when
needed?  That seems like a lot of code to do something fairly simple.

 

My code is below. 

 

Thanks.

 

Jeff

 

=

 

HTML:

  tr

 tdwicket:message key=userTypeType of
User:/wicket:message/td

 td

   span wicket:id=accountType

  input type=radio /option 1

   /span

 /td

  /tr

  tr

 td/td

 tdspan wicket:id=typeBoxThe additional
information/span/td

  /tr

 

Java Code:

 // Account Type sub box

 final WebMarkupContainer typeBox = new
WebMarkupContainer(typeBox);

 typeBox.setVisible(false);

 typeBox.setOutputMarkupId(true);

 add(typeBox);

 

 // Account Type Select

 List accountTypes = accountTypeDao.findAll();

 ChoiceRenderer accountTypeChoiceRenderer = new
ChoiceRenderer(name, code);

 RadioChoice accountTypeRadio = new
RadioChoice(accountType, accountTypes, accountTypeChoiceRenderer);

 //accountTypeRadio.setRequired(true);// THIS
SHOULD REALLY BE REQUIRED

 // add the on click to the radio button

 accountTypeRadio.add(new
AjaxFormChoiceComponentUpdatingBehavior () { 

   private static final long serialVersionUID = 1L; 

 

   @Override 

   protected void onUpdate(AjaxRequestTarget target) { 

 RadioChoice choice = (RadioChoice) getComponent();

 choice.updateModel();

 

 if (((AccountType)
choice.getModelObject()).getCode().equalsIgnoreCase(REP)) {

typeBox.setVisible(true);

 } else {

typeBox.setVisible(false); 

 }

 target.addComponent(typeBox);

   } 

   });

___ 

Jeffrey A. Schneller

 

Envisa

End-to-End E-Commerce for the Multi-Channel Merchant

 

281 Pleasant Street

Framingham, MA  01701

P: (508) 405-1220 x115

C: (508) 954-8044

F: (508) 405-1219

 



Re: Complicated workflows

2009-09-29 Thread Phil Housley
2009/9/29 Scott Swank scott.sw...@gmail.com:
 Phil,

 Would an event-centric approach simplify things?  I'm thinking that
 you could then have multiple listeners for a given event and the
 various listeners would not have to be aware of one another.  This
 might reduce the task/sub-task interactions.  Adding errors, or
 refreshing components could be handled by various listeners as needed.

I did consider that route, but one of the things I most want is to be
able to embed one workflow in another, so I can reuse common tasks -
hence the stack where a workflow is just like another task.  Having
listeners doesn't make much sense, I felt, when adding a new
task/workflow to the stack temporarily hides everything underneath.

Currently there really isn't much interaction between sibling tasks,
when the current task says it is complete, another task is prepared,
possibly showing a panel, or maybe just running and completing
immediately.  Events are simulated by having a task return a code, and
the wiring says what transition follows each code. e.g.

Task 1, on success - Task 2, on failure - Task X

 I've gone that route with reasonable luck.  Of course I know precious
 little about your specific application...

Really there is no specific application, I'm just trying to solve a
general problem.  The inspiration is my day job, for which I wrote a
tiny little workflow engine, which basically just gives some help
switching panels around.  I'm not allowed to do a version 2 there
though, so I'm doing it off my own back at home.

 Cheers,
 Scott


 On Tue, Sep 29, 2009 at 2:11 PM, Phil Housley undeconstruc...@gmail.com 
 wrote:
 Hello list,

 I'm currently working on some ideas for building apps with fairly
 complex workflows.  My aim is to find a nice pattern/framework for
 building apps where each unit of work involves many panels, several
 forms, lots of decisions and so on.  In particular I'm aiming at apps
 where you need to be very confident about exactly what is happening,
 so very strict control of actions, being careful of multiple
 renderings of a page each trying to change the server data, and so on.
  Also, I'm wondering about some options for declarative building of
 workflows out of existing tasks.

 My current design involves running from a special page, which
 maintains a stack of tasks.  One type of task is a Workflow, which can
 be configured to automatically spawn subtasks as required, based on
 the result of previous tasks.  Another type of task is based on a
 panel, and is able to cause itself to be rendered.  The stack
 processor makes sure that each task is invoked at the right time, that
 a task can render if it is at the top of the stack, that only the top
 of the stack can be invoked from a form and so on.

 This is working ok for some silly demo cases, but there are various
 issues.  For example, any task that is not also a component cannot
 access dependency injection, or set error messages and so on.  I'm not
 sure how to get around this at the moment, as I don't want to force
 every task to be a component, when many will likely have no cause to
 ever be rendered.

 So, the reason I'm posting is to ask mainly two things:

 1) Is this of interest to anyone else?  All the code is my own, so
 I'll open source it if there seems to be some future in it.

 2) If so, does anyone have any comments on my current design?  Clearly
 there are problems with it, but should I carry on trying to find ways
 to work around them, or does the whole thing sounds like so much
 crack?

 Thanks,

 --
 Phil Housley

 -
 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





-- 
Phil Housley

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



Re: Complicated workflows

2009-09-29 Thread Igor Vaynberg
there is really no point in having your tasks be components. why not simply

repeatingview rv=..

for (task t:tasks) {
  if (t.hasUIComponent()) {
 rv.add(t.getUIComponent());
  }
}

-igor

On Tue, Sep 29, 2009 at 2:11 PM, Phil Housley undeconstruc...@gmail.com wrote:
 Hello list,

 I'm currently working on some ideas for building apps with fairly
 complex workflows.  My aim is to find a nice pattern/framework for
 building apps where each unit of work involves many panels, several
 forms, lots of decisions and so on.  In particular I'm aiming at apps
 where you need to be very confident about exactly what is happening,
 so very strict control of actions, being careful of multiple
 renderings of a page each trying to change the server data, and so on.
  Also, I'm wondering about some options for declarative building of
 workflows out of existing tasks.

 My current design involves running from a special page, which
 maintains a stack of tasks.  One type of task is a Workflow, which can
 be configured to automatically spawn subtasks as required, based on
 the result of previous tasks.  Another type of task is based on a
 panel, and is able to cause itself to be rendered.  The stack
 processor makes sure that each task is invoked at the right time, that
 a task can render if it is at the top of the stack, that only the top
 of the stack can be invoked from a form and so on.

 This is working ok for some silly demo cases, but there are various
 issues.  For example, any task that is not also a component cannot
 access dependency injection, or set error messages and so on.  I'm not
 sure how to get around this at the moment, as I don't want to force
 every task to be a component, when many will likely have no cause to
 ever be rendered.

 So, the reason I'm posting is to ask mainly two things:

 1) Is this of interest to anyone else?  All the code is my own, so
 I'll open source it if there seems to be some future in it.

 2) If so, does anyone have any comments on my current design?  Clearly
 there are problems with it, but should I carry on trying to find ways
 to work around them, or does the whole thing sounds like so much
 crack?

 Thanks,

 --
 Phil Housley

 -
 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: Complicated workflows

2009-09-29 Thread Randy S.
Have you thought about using Spring Web Flow for this? I'm not a SWF expert,
but it sounds like something well-tailored to your needs. For example, a
flow can have steps that don't have UIs.

Our group at work is looking into Wicket  SWF integration. I have a seen a
few comments on the web from folks like Peter Thomas who conclude that you
don't need to use SWF with Wicket. We need to externalize the flow of some
applications so we have discussed shallow integration (where, for example, a
button.onClick explicitly calls SWF to determine what to do next), as well
as deep(er) integration (perhaps at the RequestCycleProcessor. At the
moment, we are leaning toward the shallow/lightweight integration which
gives lots of flexibility to each application to respond to a flow's
response in different ways (show a new page, update components via Ajax,
redirect to another URL, etc.).

In case anyone is interested, reasons we need to externalize flow on some
apps are things like: Complex business rules, business unit authoring of
flow (via a controlled UI), and delegation to a business process manager
layer.



On Tue, Sep 29, 2009 at 4:11 PM, Phil Housley undeconstruc...@gmail.comwrote:

 Hello list,

 I'm currently working on some ideas for building apps with fairly
 complex workflows.  My aim is to find a nice pattern/framework for
 building apps where each unit of work involves many panels, several
 forms, lots of decisions and so on.  In particular I'm aiming at apps
 where you need to be very confident about exactly what is happening,
 so very strict control of actions, being careful of multiple
 renderings of a page each trying to change the server data, and so on.
  Also, I'm wondering about some options for declarative building of
 workflows out of existing tasks.

 My current design involves running from a special page, which
 maintains a stack of tasks.  One type of task is a Workflow, which can
 be configured to automatically spawn subtasks as required, based on
 the result of previous tasks.  Another type of task is based on a
 panel, and is able to cause itself to be rendered.  The stack
 processor makes sure that each task is invoked at the right time, that
 a task can render if it is at the top of the stack, that only the top
 of the stack can be invoked from a form and so on.

 This is working ok for some silly demo cases, but there are various
 issues.  For example, any task that is not also a component cannot
 access dependency injection, or set error messages and so on.  I'm not
 sure how to get around this at the moment, as I don't want to force
 every task to be a component, when many will likely have no cause to
 ever be rendered.

 So, the reason I'm posting is to ask mainly two things:

 1) Is this of interest to anyone else?  All the code is my own, so
 I'll open source it if there seems to be some future in it.

 2) If so, does anyone have any comments on my current design?  Clearly
 there are problems with it, but should I carry on trying to find ways
 to work around them, or does the whole thing sounds like so much
 crack?

 Thanks,

 --
 Phil Housley

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




Re: Question about wicket validation

2009-09-29 Thread Martin Makundi
So validateComponents() validates also nested components if current
form depends on them?

**
Martin

2009/9/29 Jonathan Locke jonathan.lo...@gmail.com:

        protected final void validate()
        {
                if (isEnabledInHierarchy()  isVisibleInHierarchy())
                {
                        // since this method can be called directly by users, 
 this additional
 check is needed
                        validateComponents();
                        validateFormValidators();
                        onValidate();
                        validateNestedForms();
                }
        }


 MartinM wrote:

 Hi!

 If a form validator depends on a nested form's components, it will
 assume they are valid because the nested form's components are
 validated after the parent form?

 **
 Martin

 -
 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/Question-about-wicket-validation-tp25657602p25669362.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