DataView sort .properties file

2010-07-20 Thread always_rick

Hello all,

i'm using DataView to display html table with sorting feature. Thanks to
wicket example, Sorting DataView Example - builds on previous to
demonstrate sorting
http://www.wicket-library.com/wicket-examples/repeater/?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.SortingPage

The problem is:

one of fields' type is integer 1, 2, 3, 4 ..., which represents Very High,
High, Normal, Low... I use .properties file to display meaningful values to
table cells.

i can't sort the field properly, because it's always sorting by field's real
value (1, 2, 3), not displaying value.

Thanks in advance.

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DataView-sort-properties-file-tp2294973p2294973.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



validation and #updateModel

2010-07-20 Thread Ray Weidner
Hi all,

I have what I would think to be a fairly common usecase that I'd like to
solve.  I have a form with a model that is a LoadableDetachableModel wrapped
in a CompoundPropertyModel.  I wouldn't expect that to be unusual.  However,
when a form submit is failing validation for , all changes to the form are
lost.  I'm guessing that the LoadableDetachableModel, when combined with the
blocked update to the model, is causing this.

For the most part, I've been able to get around this by deferring most
validation checks until #onSubmit, at which point I manually run through
them and call #error on the appropriate components.

Two problems: First, I can't defer all validation.  Type conversions and the
size of uploaded files are validated automatically, and you wouldn't want to
have to rewrite that for yourself.  Second, I don't want to defer all the
validation.  In so doing, I lose the benefits of Wicket handling all that
stuff in the back end for me.

I'm wondering if there's a possible work-around.  What if, during the call
to #onError, I was to call #updateModel?  The javadoc gives a rather
significant warning against using this method, but I'm wondering if it has
some value here.  The point is, if I force the model to be updated despite
the validation failure, then changes will not be lost upon submission.

Any thoughts?


Re: validation and #updateModel

2010-07-20 Thread Jeremy Thomerson
On Tue, Jul 20, 2010 at 1:55 AM, Ray Weidner 
ray.weidner.develo...@gmail.com wrote:

 Hi all,

 I have what I would think to be a fairly common usecase that I'd like to
 solve.  I have a form with a model that is a LoadableDetachableModel
 wrapped
 in a CompoundPropertyModel.  I wouldn't expect that to be unusual.
  However,
 when a form submit is failing validation for , all changes to the form are
 lost.  I'm guessing that the LoadableDetachableModel, when combined with
 the
 blocked update to the model, is causing this.

 For the most part, I've been able to get around this by deferring most
 validation checks until #onSubmit, at which point I manually run through
 them and call #error on the appropriate components.

 Two problems: First, I can't defer all validation.  Type conversions and
 the
 size of uploaded files are validated automatically, and you wouldn't want
 to
 have to rewrite that for yourself.  Second, I don't want to defer all the
 validation.  In so doing, I lose the benefits of Wicket handling all that
 stuff in the back end for me.

 I'm wondering if there's a possible work-around.  What if, during the call
 to #onError, I was to call #updateModel?  The javadoc gives a rather
 significant warning against using this method, but I'm wondering if it has
 some value here.  The point is, if I force the model to be updated despite
 the validation failure, then changes will not be lost upon submission.

 Any thoughts?


Don't use a LoadableDetachableModel for a form.

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


Re: validation and #updateModel

2010-07-20 Thread Ray Weidner
That would certainly simplify things, but I find it indispensable when it
comes to handling persistent entities, which you wouldn't want to serialize
with the page.  Taking a step back, how can a form map to persistent
entities without resorting to LoadableDetachableModels?

Not that I'm necessarily in a position to perform such a drastic refactoring
at this stage in my project (I'm not).  I'm just curious.

But if anyone has an answer to my first problem, I'm still quite interested.
 Because I can't really replace LoadableDetachableModels at this stage of
development.


On Tue, Jul 20, 2010 at 2:59 AM, Jeremy Thomerson jer...@wickettraining.com
 wrote:

 On Tue, Jul 20, 2010 at 1:55 AM, Ray Weidner 
 ray.weidner.develo...@gmail.com wrote:

  Hi all,
 
  I have what I would think to be a fairly common usecase that I'd like to
  solve.  I have a form with a model that is a LoadableDetachableModel
  wrapped
  in a CompoundPropertyModel.  I wouldn't expect that to be unusual.
   However,
  when a form submit is failing validation for , all changes to the form
 are
  lost.  I'm guessing that the LoadableDetachableModel, when combined with
  the
  blocked update to the model, is causing this.
 
  For the most part, I've been able to get around this by deferring most
  validation checks until #onSubmit, at which point I manually run through
  them and call #error on the appropriate components.
 
  Two problems: First, I can't defer all validation.  Type conversions and
  the
  size of uploaded files are validated automatically, and you wouldn't want
  to
  have to rewrite that for yourself.  Second, I don't want to defer all the
  validation.  In so doing, I lose the benefits of Wicket handling all that
  stuff in the back end for me.
 
  I'm wondering if there's a possible work-around.  What if, during the
 call
  to #onError, I was to call #updateModel?  The javadoc gives a rather
  significant warning against using this method, but I'm wondering if it
 has
  some value here.  The point is, if I force the model to be updated
 despite
  the validation failure, then changes will not be lost upon submission.
 
  Any thoughts?
 

 Don't use a LoadableDetachableModel for a form.

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



wicketstuff down

2010-07-20 Thread Vytautas Čivilis
Hi.

As you might already noticed, http://wicketstuff.org is down.

Anyone have any ideas?

V


Re: Welcome Martin Grigorov as a core team member

2010-07-20 Thread Gareth Western
Congratulations Martin! And thanks for the help in the IRC chat the other
day (pointing me to this mailing list ;))

On Tue, Jul 20, 2010 at 3:00 AM, nicolas melendez nfmelen...@gmail.comwrote:


  
   2010/7/19 Jeremy Thomerson jer...@wickettraining.com
  
   The Wicket team is happy to announce that Martin Grigorov was invited
 to
   join the Wicket team as a committer and PMC member, and he accepted!
Martin's relentless patience, high quality patches and sustained
   energy haven't gone unnoticed.  He has continually provided valuable
   insights and put a lot of effort into the project.  He helps out many
 on
   the
   mailing lists and IRC channel.
  
   In Martin's first two days with access, he's already made 16 commits
 and
   closed several JIRA issues.  We look forward to his continued
   contributions.
  
   Please join me in welcoming Martin to the team!
  
   --
   Jeremy Thomerson
   http://www.wickettraining.com
  
  
 



Re: component .... not found on page for a Link colun in the Datatable after self refresh using the AjaxSelfUpdatingTimerBehavior

2010-07-20 Thread Fernando Wermus
Daniel,
It is better to return just a null. A null is translate it as ...the
page you already are

On Fri, Jul 2, 2010 at 8:39 AM, bjolletz daniel.akerl...@pagero.com wrote:


 Hi,

 My conclusion is that this is not really a wicket error, since we're
 clicking a link which no longer exists after the Ajax update.

 My solution to this has been to catch these exceptions in my
 WebRequestCycleProcessor, like this:

@Override
public IRequestTarget resolve(RequestCycle requestCycle,
 RequestParameters requestParameters) {
try {
return super.resolve(requestCycle, requestParameters);
} catch (InvalidUrlException e) {
if
 (requestCycle.getRequest().getURL().contains(ILinkListener)) {
return new
 PageRequestTarget(requestCycle.getRequest().getPage());
}
throw e;
}
}

 What happens is that if I get this exception and the request URL contains
 ILinkListener, I just return the page which the user is already at. For
 the user it will seem like nothing happens, which at least is better than
 that they get an exception.

 This is not a pretty solution, but the best I could think of. If someone
 knows of a better or more general soultion to this problem I would be happy
 to know.

 /Daniel
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/component-not-found-on-page-for-a-Link-colun-in-the-Datatable-after-self-refresh-using-the-AjaxSelfUr-tp1892913p2276328.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




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: validation and #updateModel

2010-07-20 Thread Jeremy Thomerson
On Tue, Jul 20, 2010 at 2:19 AM, Ray Weidner 
ray.weidner.develo...@gmail.com wrote:

 That would certainly simplify things, but I find it indispensable when it
 comes to handling persistent entities, which you wouldn't want to serialize
 with the page.  Taking a step back, how can a form map to persistent
 entities without resorting to LoadableDetachableModels?

 Not that I'm necessarily in a position to perform such a drastic
 refactoring
 at this stage in my project (I'm not).  I'm just curious.

 But if anyone has an answer to my first problem, I'm still quite
 interested.
  Because I can't really replace LoadableDetachableModels at this stage of
 development.


Typically, I use LDM's for every place that I am viewing data, and a regular
serializable model for places that I'm editing data.  You must be able to
persist changes across requests (without persisting to the long-term
storage), which means that you'll need to be able to serialize things.

Back to the original question, when you say all changes to the form are
lost - do you mean that the form rerenders with absolutely no values filled
out?  Only the fields that failed conversion or validation should be blank.
 Others should have their data still in them in an unconverted form even
though the converted / validated form has not been pushed to the model yet.
 If all the fields are truly blank, is it possible that you're somehow
reinitializing those fields?  Perhaps redirecting on error to a new instance
of the page?

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


Strange problem with I18N keys in xml resource bundle

2010-07-20 Thread Thomas Götz
I have a strange problem with an I18N key which is stored in an xml resource 
bundle. I try to set the following keys for a german translation:

- PagingNavigator.first
- PagingNavigator.previous
- PagingNavigator.next
- PagingNavigator.last
- PagingNavigator.page

I noticed that wicket already provides the translation for those keys in 
several languages in it's Application.properties bundle. Unfortunately, in 
Apllication_de.properties those keys are missing. Anyway, I put them in 
MyComponent_de.xml and everything works fine, only the last key 
(PagingNavigator.page) causes the problem of not beeing translated. Instead, 
the english (default) translation is used.

Here is the content of MyComponent_de.xml:

?xml version=1.0 encoding=UTF-8?
!DOCTYPE properties SYSTEM http://java.sun.com/dtd/properties.dtd;
properties
 entry key=PagingNavigator.firsterste Seite/entry
 entry key=PagingNavigator.previousvorherige Seite/entry
 entry key=PagingNavigator.nextnächste Seite/entry
 entry key=PagingNavigator.lastletzte Seite/entry
 entry key=PagingNavigator.pageSeite ${page}/entry
/properties

Is there something wrong with the syntax when using parameterized keys in xml?

 -Tom

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



Re: Strange problem with I18N keys in xml resource bundle

2010-07-20 Thread Ernesto Reinaldo Barreiro
Maybe because the key should be PagingNavigation.page?

Ernesto

On Tue, Jul 20, 2010 at 10:19 AM, Thomas Götz t...@richmountain.de wrote:
 I have a strange problem with an I18N key which is stored in an xml resource 
 bundle. I try to set the following keys for a german translation:

 - PagingNavigator.first
 - PagingNavigator.previous
 - PagingNavigator.next
 - PagingNavigator.last
 - PagingNavigator.page

 I noticed that wicket already provides the translation for those keys in 
 several languages in it's Application.properties bundle. Unfortunately, in 
 Apllication_de.properties those keys are missing. Anyway, I put them in 
 MyComponent_de.xml and everything works fine, only the last key 
 (PagingNavigator.page) causes the problem of not beeing translated. Instead, 
 the english (default) translation is used.

 Here is the content of MyComponent_de.xml:

 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE properties SYSTEM http://java.sun.com/dtd/properties.dtd;
 properties
  entry key=PagingNavigator.firsterste Seite/entry
  entry key=PagingNavigator.previousvorherige Seite/entry
  entry key=PagingNavigator.nextnächste Seite/entry
  entry key=PagingNavigator.lastletzte Seite/entry
  entry key=PagingNavigator.pageSeite ${page}/entry
 /properties

 Is there something wrong with the syntax when using parameterized keys in xml?

  -Tom

 -
 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: Welcome Martin Grigorov as a core team member

2010-07-20 Thread Ian Marshall

Many congratulations Martin!

(In my extremely limited experience with web application frameworks, Wicket
is just so excellent. Developing with Wicket really is fun, too.)
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Welcome-Martin-Grigorov-as-a-core-team-member-tp2294324p2295166.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: Strange problem with I18N keys in xml resource bundle

2010-07-20 Thread Thomas Götz

On 20.07.2010 10:53, Ernesto Reinaldo Barreiro wrote:

Maybe because the key should be PagingNavigation.page?


Ha! Nice one, thanks ;-)
The naming is a little bit inconsistent IMHO.

   -Tom

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



Re: Strange problem with I18N keys in xml resource bundle

2010-07-20 Thread Ernesto Reinaldo Barreiro
Tomas,

It might be because PagingNavigation.page is read from within
PagingNavigation component. Maybe it is consistent in the sense that
it refers to the component using the resource. I don't know if a
convention is followed for these things on core components? By the
way... Would it be a good idea to create a JIRA issue (with a patch)
for adding those keys/values to Application_de.properties?

Regards,

Ernesto

 Ha! Nice one, thanks ;-)
 The naming is a little bit inconsistent IMHO.

   -Tom

 -
 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: Strange problem with I18N keys in xml resource bundle

2010-07-20 Thread Thomas Götz

On 20.07.2010 12:40, Ernesto Reinaldo Barreiro wrote:

Tomas,

It might be because PagingNavigation.page is read from within
PagingNavigation component. Maybe it is consistent in the sense that
it refers to the component using the resource. I don't know if a
convention is followed for these things on core components? By the
way... Would it be a good idea to create a JIRA issue (with a patch)
for adding those keys/values to Application_de.properties?


It definitely would! I'll have a look at that asap.

   -Tom

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



Re: Welcome Martin Grigorov as a core team member

2010-07-20 Thread Martin Grigorov
Thanks a lot for the voted trust in me, team!

As a big open source believer it is an honour for me to be a part of
the team that made such a great framework!

Looking forward to make 1.5 production ready !


2010/7/20 Ian Marshall ianmarshall...@gmail.com


 Many congratulations Martin!

 (In my extremely limited experience with web application frameworks, Wicket
 is just so excellent. Developing with Wicket really is fun, too.)
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Welcome-Martin-Grigorov-as-a-core-team-member-tp2294324p2295166.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




HowTo inject FeedbackPanel

2010-07-20 Thread Martin Makundi
Hi!

I don't like passing feedbackpanel to subpanels and I don't like the
idea using visitors/component-search for looking it up in page
hierarchy because of its potential volatility...

Has some of you pals come up with a nice way of injecting
feedbackpanel references to children or something? Or even better some
direct refrence? Should I only allow one (particular) feedbackpanel
per session and re-use it from session?

**
Martin

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



Re: HowTo inject FeedbackPanel

2010-07-20 Thread James Carman
I've struggled with this myself in the context of AJAX events that are
handled completely by subpanels.  I want only one feedback panel on
the page, but the subpanels need to be able to add them to their
AjaxRequestTarget.  Perhaps you could override the default ajax
request cycle handling in some way that looks at the page for an
interface (FeedbackContainer) or something.  If there are any
messages, then it adds the feedback panel to the target automatically?

On Tue, Jul 20, 2010 at 8:44 AM, Martin Makundi
martin.maku...@koodaripalvelut.com wrote:
 Hi!

 I don't like passing feedbackpanel to subpanels and I don't like the
 idea using visitors/component-search for looking it up in page
 hierarchy because of its potential volatility...

 Has some of you pals come up with a nice way of injecting
 feedbackpanel references to children or something? Or even better some
 direct refrence? Should I only allow one (particular) feedbackpanel
 per session and re-use it from session?

 **
 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: HowTo inject FeedbackPanel

2010-07-20 Thread Martin Makundi
Hey, sounds nice! Maybe Martin will commit it soon to wicket core ;)

2010/7/20 James Carman ja...@carmanconsulting.com:
 I've struggled with this myself in the context of AJAX events that are
 handled completely by subpanels.  I want only one feedback panel on
 the page, but the subpanels need to be able to add them to their
 AjaxRequestTarget.  Perhaps you could override the default ajax
 request cycle handling in some way that looks at the page for an
 interface (FeedbackContainer) or something.  If there are any
 messages, then it adds the feedback panel to the target automatically?

 On Tue, Jul 20, 2010 at 8:44 AM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 Hi!

 I don't like passing feedbackpanel to subpanels and I don't like the
 idea using visitors/component-search for looking it up in page
 hierarchy because of its potential volatility...

 Has some of you pals come up with a nice way of injecting
 feedbackpanel references to children or something? Or even better some
 direct refrence? Should I only allow one (particular) feedbackpanel
 per session and re-use it from session?

 **
 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



Submitting form via AJAX over SSL - RESEND

2010-07-20 Thread Jeffrey Schneller

How can I submit a form via AJAX over SSL?  I have a login form that
appears via Ajax and I want the form submission to be under SSL when it
is submitted via AJAX.  How can I go about doing this?

 

Thanks.

 

 

 


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



Re: Welcome Martin Grigorov as a core team member

2010-07-20 Thread Maarten Bosteels
Congratulations Martin !

On Tue, Jul 20, 2010 at 1:21 PM, Martin Grigorov
martin.grigo...@gmail.comwrote:

 Thanks a lot for the voted trust in me, team!

 As a big open source believer it is an honour for me to be a part of
 the team that made such a great framework!

 Looking forward to make 1.5 production ready !


 2010/7/20 Ian Marshall ianmarshall...@gmail.com

 
  Many congratulations Martin!
 
  (In my extremely limited experience with web application frameworks,
 Wicket
  is just so excellent. Developing with Wicket really is fun, too.)
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Welcome-Martin-Grigorov-as-a-core-team-member-tp2294324p2295166.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 down

2010-07-20 Thread Johan Compagner
works fine for me (except that Confluence  is taken down i think on purpose)

2010/7/20 Vytautas Čivilis cvl...@gmail.com:
 Hi.

 As you might already noticed, http://wicketstuff.org is down.

 Anyone have any ideas?

 V


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



Re: Welcome Martin Grigorov as a core team member

2010-07-20 Thread Johan Compagner
welcome!

hope you happily merge even more stuff ;)

johan


On Tue, Jul 20, 2010 at 13:21, Martin Grigorov
martin.grigo...@gmail.com wrote:
 Thanks a lot for the voted trust in me, team!

 As a big open source believer it is an honour for me to be a part of
 the team that made such a great framework!

 Looking forward to make 1.5 production ready !


 2010/7/20 Ian Marshall ianmarshall...@gmail.com


 Many congratulations Martin!

 (In my extremely limited experience with web application frameworks, Wicket
 is just so excellent. Developing with Wicket really is fun, too.)
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Welcome-Martin-Grigorov-as-a-core-team-member-tp2294324p2295166.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



rules declaration for form valdation

2010-07-20 Thread Jan Juno
How can I avoid if hell?

and declare rules for my form validation. I have project which has an
extensive form on which when you check on chceck box than this and this will
be disabled this is enabled, and so on. In the end you end up with huge if
else if else.

How can I avoid it in wicket?


Re: validation and #updateModel

2010-07-20 Thread Igor Vaynberg
On Tue, Jul 20, 2010 at 12:53 AM, Jeremy Thomerson
jer...@wickettraining.com wrote:
 Typically, I use LDM's for every place that I am viewing data, and a regular
 serializable model for places that I'm editing data.  You must be able to
 persist changes across requests (without persisting to the long-term
 storage), which means that you'll need to be able to serialize things.

this is not true :) the formcomponents themselves preserve the state
so using an LDM for a form is feasible. the sequence is basically

* load entity - model
* call setters - form component models
* flush/close session - somewhere

-igor

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



Re: Welcome Martin Grigorov as a core team member

2010-07-20 Thread Igor Vaynberg
not working on wicket has made you lazy johan! :)

-igor

On Tue, Jul 20, 2010 at 7:46 AM, Johan Compagner jcompag...@gmail.com wrote:
 welcome!

 hope you happily merge even more stuff ;)

 johan


 On Tue, Jul 20, 2010 at 13:21, Martin Grigorov
 martin.grigo...@gmail.com wrote:
 Thanks a lot for the voted trust in me, team!

 As a big open source believer it is an honour for me to be a part of
 the team that made such a great framework!

 Looking forward to make 1.5 production ready !


 2010/7/20 Ian Marshall ianmarshall...@gmail.com


 Many congratulations Martin!

 (In my extremely limited experience with web application frameworks, Wicket
 is just so excellent. Developing with Wicket really is fun, too.)
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Welcome-Martin-Grigorov-as-a-core-team-member-tp2294324p2295166.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: HowTo inject FeedbackPanel

2010-07-20 Thread Igor Vaynberg
there is already IFeedback interface that tags all components like
feedbackpanel.

-igor

On Tue, Jul 20, 2010 at 5:52 AM, James Carman
ja...@carmanconsulting.com wrote:
 I've struggled with this myself in the context of AJAX events that are
 handled completely by subpanels.  I want only one feedback panel on
 the page, but the subpanels need to be able to add them to their
 AjaxRequestTarget.  Perhaps you could override the default ajax
 request cycle handling in some way that looks at the page for an
 interface (FeedbackContainer) or something.  If there are any
 messages, then it adds the feedback panel to the target automatically?

 On Tue, Jul 20, 2010 at 8:44 AM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 Hi!

 I don't like passing feedbackpanel to subpanels and I don't like the
 idea using visitors/component-search for looking it up in page
 hierarchy because of its potential volatility...

 Has some of you pals come up with a nice way of injecting
 feedbackpanel references to children or something? Or even better some
 direct refrence? Should I only allow one (particular) feedbackpanel
 per session and re-use it from session?

 **
 Martin

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



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



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



Re: HowTo inject FeedbackPanel

2010-07-20 Thread Igor Vaynberg
On Tue, Jul 20, 2010 at 5:44 AM, Martin Makundi
martin.maku...@koodaripalvelut.com wrote:
 and I don't like the
 idea using visitors/component-search for looking it up in page
 hierarchy because of its potential volatility...

how so?

-igor


 Has some of you pals come up with a nice way of injecting
 feedbackpanel references to children or something? Or even better some
 direct refrence? Should I only allow one (particular) feedbackpanel
 per session and re-use it from session?

 **
 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: Submitting form via AJAX over SSL - RESEND

2010-07-20 Thread Igor Vaynberg
see HttpsRequestCycleProcessor

-igor

On Tue, Jul 20, 2010 at 7:12 AM, Jeffrey Schneller
jeffrey.schnel...@envisa.com wrote:

 How can I submit a form via AJAX over SSL?  I have a login form that
 appears via Ajax and I want the form submission to be under SSL when it
 is submitted via AJAX.  How can I go about doing this?



 Thanks.








 -
 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: rules declaration for form valdation

2010-07-20 Thread jcgarciam

if you can just avoid push operation (if. setThatcomponentEnabled ...else
setThatComponentDisable).

Use a Pull approach, override the isEnabled of your component and make it
query the boolean value of your model.

i.e::

form.add(new TextField(myId){
public boolean isEnabled(){
 return ((MyObject)getModelObject()).getMyBooleanProperty();
}
});


On Tue, Jul 20, 2010 at 12:01 PM, Jan Juno [via Apache Wicket] 
ml-node+2295636-518553383-229...@n4.nabble.comml-node%2b2295636-518553383-229...@n4.nabble.com
 wrote:

 How can I avoid if hell?

 and declare rules for my form validation. I have project which has an
 extensive form on which when you check on chceck box than this and this
 will
 be disabled this is enabled, and so on. In the end you end up with huge if
 else if else.

 How can I avoid it in wicket?


 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/rules-declaration-for-form-valdation-tp2295636p2295636.html
 To unsubscribe from Apache Wicket, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/subscriptions/Unsubscribe.jtp?code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDExOTE5MDc4OTQ=.





-- 
Sincerely,
JC

Work smarter, not harder!.

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/rules-declaration-for-form-valdation-tp2295636p2295697.html
Sent from the Wicket - User mailing list archive at Nabble.com.


Re: Welcome Martin Grigorov as a core team member

2010-07-20 Thread Matej Knopp
Welcome Martin!

-Matej

On Tue, Jul 20, 2010 at 5:21 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 not working on wicket has made you lazy johan! :)

 -igor

 On Tue, Jul 20, 2010 at 7:46 AM, Johan Compagner jcompag...@gmail.com wrote:
 welcome!

 hope you happily merge even more stuff ;)

 johan


 On Tue, Jul 20, 2010 at 13:21, Martin Grigorov
 martin.grigo...@gmail.com wrote:
 Thanks a lot for the voted trust in me, team!

 As a big open source believer it is an honour for me to be a part of
 the team that made such a great framework!

 Looking forward to make 1.5 production ready !


 2010/7/20 Ian Marshall ianmarshall...@gmail.com


 Many congratulations Martin!

 (In my extremely limited experience with web application frameworks, Wicket
 is just so excellent. Developing with Wicket really is fun, too.)
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Welcome-Martin-Grigorov-as-a-core-team-member-tp2294324p2295166.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



Re: wicketstuff down

2010-07-20 Thread Martijn Dashorst
http://wicketstuff.org/confluence/dashboard.action

On Tue, Jul 20, 2010 at 4:44 PM, Johan Compagner jcompag...@gmail.com wrote:
 works fine for me (except that Confluence  is taken down i think on purpose)

 2010/7/20 Vytautas Čivilis cvl...@gmail.com:
 Hi.

 As you might already noticed, http://wicketstuff.org is down.

 Anyone have any ideas?

 V


 -
 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.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.8

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



Re: HowTo inject FeedbackPanel

2010-07-20 Thread James Carman
Perhaps we could just register a AjaxRequestTarget.IListener and
implement the onBeforeRespond() method?  You would check to see if
there are any messages to be shown (still looking for how to ask that
question in the API).  If there are, you'd make sure the requested
page's (requestTarget.getPage()) feedback panel component gets added
to the AjaxRequestTarget that's passed in.

On Tue, Jul 20, 2010 at 11:23 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 there is already IFeedback interface that tags all components like
 feedbackpanel.

 -igor

 On Tue, Jul 20, 2010 at 5:52 AM, James Carman
 ja...@carmanconsulting.com wrote:
 I've struggled with this myself in the context of AJAX events that are
 handled completely by subpanels.  I want only one feedback panel on
 the page, but the subpanels need to be able to add them to their
 AjaxRequestTarget.  Perhaps you could override the default ajax
 request cycle handling in some way that looks at the page for an
 interface (FeedbackContainer) or something.  If there are any
 messages, then it adds the feedback panel to the target automatically?

 On Tue, Jul 20, 2010 at 8:44 AM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 Hi!

 I don't like passing feedbackpanel to subpanels and I don't like the
 idea using visitors/component-search for looking it up in page
 hierarchy because of its potential volatility...

 Has some of you pals come up with a nice way of injecting
 feedbackpanel references to children or something? Or even better some
 direct refrence? Should I only allow one (particular) feedbackpanel
 per session and re-use it from session?

 **
 Martin

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



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



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



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



Re: HowTo inject FeedbackPanel

2010-07-20 Thread Igor Vaynberg
yes, you are on the right track. i just described this to someone in
irc not a few days ago...

override application.newajaxrequesttarget
register your listener
in listener onbeforerespond check if there are any messages -
getsession().getfeedbackmessages().size()0
visit all components in the page and look for IFeedback and add them
to the target if they have setoutputmarkupid(true) - too late to force
it to true at this point.

-igor

On Tue, Jul 20, 2010 at 8:34 AM, James Carman
ja...@carmanconsulting.com wrote:
 Perhaps we could just register a AjaxRequestTarget.IListener and
 implement the onBeforeRespond() method?  You would check to see if
 there are any messages to be shown (still looking for how to ask that
 question in the API).  If there are, you'd make sure the requested
 page's (requestTarget.getPage()) feedback panel component gets added
 to the AjaxRequestTarget that's passed in.

 On Tue, Jul 20, 2010 at 11:23 AM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 there is already IFeedback interface that tags all components like
 feedbackpanel.

 -igor

 On Tue, Jul 20, 2010 at 5:52 AM, James Carman
 ja...@carmanconsulting.com wrote:
 I've struggled with this myself in the context of AJAX events that are
 handled completely by subpanels.  I want only one feedback panel on
 the page, but the subpanels need to be able to add them to their
 AjaxRequestTarget.  Perhaps you could override the default ajax
 request cycle handling in some way that looks at the page for an
 interface (FeedbackContainer) or something.  If there are any
 messages, then it adds the feedback panel to the target automatically?

 On Tue, Jul 20, 2010 at 8:44 AM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 Hi!

 I don't like passing feedbackpanel to subpanels and I don't like the
 idea using visitors/component-search for looking it up in page
 hierarchy because of its potential volatility...

 Has some of you pals come up with a nice way of injecting
 feedbackpanel references to children or something? Or even better some
 direct refrence? Should I only allow one (particular) feedbackpanel
 per session and re-use it from session?

 **
 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



Re: Welcome Martin Grigorov as a core team member

2010-07-20 Thread Martin Grigorov
Just feed me with patches for 1.4 ;-)

2010/7/20 Johan Compagner jcompag...@gmail.com

 welcome!

 hope you happily merge even more stuff ;)

 johan


 On Tue, Jul 20, 2010 at 13:21, Martin Grigorov
 martin.grigo...@gmail.com wrote:
  Thanks a lot for the voted trust in me, team!
 
  As a big open source believer it is an honour for me to be a part of
  the team that made such a great framework!
 
  Looking forward to make 1.5 production ready !
 
 
  2010/7/20 Ian Marshall ianmarshall...@gmail.com
 
 
  Many congratulations Martin!
 
  (In my extremely limited experience with web application frameworks,
 Wicket
  is just so excellent. Developing with Wicket really is fun, too.)
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Welcome-Martin-Grigorov-as-a-core-team-member-tp2294324p2295166.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 and #updateModel

2010-07-20 Thread Jeremy Thomerson
On Tue, Jul 20, 2010 at 10:20 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 On Tue, Jul 20, 2010 at 12:53 AM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
  Typically, I use LDM's for every place that I am viewing data, and a
 regular
  serializable model for places that I'm editing data.  You must be able to
  persist changes across requests (without persisting to the long-term
  storage), which means that you'll need to be able to serialize things.

 this is not true :) the formcomponents themselves preserve the state
 so using an LDM for a form is feasible. the sequence is basically

 * load entity - model
 * call setters - form component models
 * flush/close session - somewhere


Right, which is why I said in the second paragraph:

 Only the fields that failed conversion or validation should be blank.
  Others should have their data still in them in an unconverted form even
 though the converted / validated form has not been pushed to the model yet



In the first paragraph I should have been more clear - I use serializable
models for where I'm editing data and passing it to other pages (i.e.
multi-step wizards).  But, in this case, he seems to be in a single form, so
the components should still have state unless he's reinitializing them
somehow (redirecting to new page, etc).

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


Re: HowTo inject FeedbackPanel

2010-07-20 Thread Martin Grigorov
What
about org.apache.wicket.ajax.AjaxRequestTarget.addChildren(MarkupContainer,
Class?)

I.e.: target.addChildren(getPage(), IFeedback.class) ?


2010/7/20 Igor Vaynberg igor.vaynb...@gmail.com

 yes, you are on the right track. i just described this to someone in
 irc not a few days ago...

 override application.newajaxrequesttarget
 register your listener
 in listener onbeforerespond check if there are any messages -
 getsession().getfeedbackmessages().size()0
 visit all components in the page and look for IFeedback and add them
 to the target if they have setoutputmarkupid(true) - too late to force
 it to true at this point.

 -igor

 On Tue, Jul 20, 2010 at 8:34 AM, James Carman
 ja...@carmanconsulting.com wrote:
  Perhaps we could just register a AjaxRequestTarget.IListener and
  implement the onBeforeRespond() method?  You would check to see if
  there are any messages to be shown (still looking for how to ask that
  question in the API).  If there are, you'd make sure the requested
  page's (requestTarget.getPage()) feedback panel component gets added
  to the AjaxRequestTarget that's passed in.
 
  On Tue, Jul 20, 2010 at 11:23 AM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
  there is already IFeedback interface that tags all components like
  feedbackpanel.
 
  -igor
 
  On Tue, Jul 20, 2010 at 5:52 AM, James Carman
  ja...@carmanconsulting.com wrote:
  I've struggled with this myself in the context of AJAX events that are
  handled completely by subpanels.  I want only one feedback panel on
  the page, but the subpanels need to be able to add them to their
  AjaxRequestTarget.  Perhaps you could override the default ajax
  request cycle handling in some way that looks at the page for an
  interface (FeedbackContainer) or something.  If there are any
  messages, then it adds the feedback panel to the target automatically?
 
  On Tue, Jul 20, 2010 at 8:44 AM, Martin Makundi
  martin.maku...@koodaripalvelut.com wrote:
  Hi!
 
  I don't like passing feedbackpanel to subpanels and I don't like the
  idea using visitors/component-search for looking it up in page
  hierarchy because of its potential volatility...
 
  Has some of you pals come up with a nice way of injecting
  feedbackpanel references to children or something? Or even better some
  direct refrence? Should I only allow one (particular) feedbackpanel
  per session and re-use it from session?
 
  **
  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




Re: HowTo inject FeedbackPanel

2010-07-20 Thread James Carman
On Tue, Jul 20, 2010 at 11:47 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 yes, you are on the right track. i just described this to someone in
 irc not a few days ago...

 override application.newajaxrequesttarget
 register your listener
 in listener onbeforerespond check if there are any messages -
 getsession().getfeedbackmessages().size()0
 visit all components in the page and look for IFeedback and add them
 to the target if they have setoutputmarkupid(true) - too late to force
 it to true at this point.


Very cool!  This will clean up some of my code.  Guess I should have
dug a bit more when I wrote it the first time. :)  Then again, I was
probably just a young (er) Wicketeer way back then.

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



Re: HowTo inject FeedbackPanel

2010-07-20 Thread James Carman
On Tue, Jul 20, 2010 at 11:57 AM, Martin Grigorov mgrigo...@apache.org wrote:
 What
 about org.apache.wicket.ajax.AjaxRequestTarget.addChildren(MarkupContainer,
 Class?)

 I.e.: target.addChildren(getPage(), IFeedback.class) ?

Even cooler!

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



Wicketstuff Push Assistance request

2010-07-20 Thread Rodolfo Hansen
Hi all, 

Anyone willing to lend me a hand on the wicketstuff-push project?

I have some pretty good ideas, but can't find the time to implement
them.

If anyone is interested please write me directly.


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



Re: HowTo inject FeedbackPanel

2010-07-20 Thread Fernando Wermus
Martin,
  I would like to learn a little. Which is the use case? Why do you need
to inject feedback panels? I don't get a case for this situation.

thanks in advance.

On Tue, Jul 20, 2010 at 9:44 AM, Martin Makundi 
martin.maku...@koodaripalvelut.com wrote:

 Hi!

 I don't like passing feedbackpanel to subpanels and I don't like the
 idea using visitors/component-search for looking it up in page
 hierarchy because of its potential volatility...

 Has some of you pals come up with a nice way of injecting
 feedbackpanel references to children or something? Or even better some
 direct refrence? Should I only allow one (particular) feedbackpanel
 per session and re-use it from session?

 **
 Martin

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




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Wicketstuff Push Assistance request

2010-07-20 Thread Martin Grigorov
Hi Rodolfo,

I still want to upgrade this project to Dojo and Wicket (both versions 1.5).
Please describe your idea with HTML5 WebSocket implementation here (in
users@) and I guess someone else can also join.
I also invest in html5 (svn .../wicket-stuff/trunk/wicket15-html5-parent)
;-)

2010/7/20 Rodolfo Hansen kry...@gmail.com

 Hi all,

 Anyone willing to lend me a hand on the wicketstuff-push project?

 I have some pretty good ideas, but can't find the time to implement
 them.

 If anyone is interested please write me directly.


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




Re: HowTo inject FeedbackPanel

2010-07-20 Thread jcgarciam

I guess what Martin and James talk about is having a FeedbackPanel at the
top and a lot component (panels) ajaxified which only update the
FeedbackPanel  on their callbacks. Therefore they pass the FeedbackPanel on
every Panel constructor.

Martin, James am i right?

On Tue, Jul 20, 2010 at 1:08 PM, Fernando Wermus-3 [via Apache Wicket] 
ml-node+2295772-688142619-229...@n4.nabble.comml-node%2b2295772-688142619-229...@n4.nabble.com
 wrote:

 Martin,
   I would like to learn a little. Which is the use case? Why do you
 need
 to inject feedback panels? I don't get a case for this situation.

 thanks in advance.

 On Tue, Jul 20, 2010 at 9:44 AM, Martin Makundi 
 [hidden email] http://user/SendEmail.jtp?type=nodenode=2295772i=0
 wrote:

  Hi!
 
  I don't like passing feedbackpanel to subpanels and I don't like the
  idea using visitors/component-search for looking it up in page
  hierarchy because of its potential volatility...
 
  Has some of you pals come up with a nice way of injecting
  feedbackpanel references to children or something? Or even better some
  direct refrence? Should I only allow one (particular) feedbackpanel
  per session and re-use it from session?
 
  **
  Martin
 
  -
  To unsubscribe, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2295772i=1
  For additional commands, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2295772i=2
 
 


 --
 Fernando Wermus.

 www.linkedin.com/in/fernandowermus


 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/HowTo-inject-FeedbackPanel-tp2295430p2295772.html
 To unsubscribe from Apache Wicket, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/subscriptions/Unsubscribe.jtp?code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDExOTE5MDc4OTQ=.





-- 
Sincerely,
JC

Work smarter, not harder!.

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/HowTo-inject-FeedbackPanel-tp2295430p2295809.html
Sent from the Wicket - User mailing list archive at Nabble.com.


Re: HowTo inject FeedbackPanel

2010-07-20 Thread James Carman
On Tue, Jul 20, 2010 at 12:29 PM, jcgarciam jcgarc...@gmail.com wrote:

 I guess what Martin and James talk about is having a FeedbackPanel at the
 top and a lot component (panels) ajaxified which only update the
 FeedbackPanel  on their callbacks. Therefore they pass the FeedbackPanel on
 every Panel constructor.

 Martin, James am i right?


You're exactly right for my specific usecase.  Consider this example.
I've got a Person class which contains an address property of type
Address.  Now, Address is re-used in my domain model in a lot of
places (Vendor, Customer, etc.).  So, everywhere we want to edit an
Address, we want it to use the same interface.  So, I create an
AddressEditorPanel which to re-use on any form which contains an
Address object.  So, now consider a page which is for editing a Person
object.  I create a FormPerson and on that I put an
AddressEditorPanel which will be used to edit the person's address
(new AddressEditorPanel(address) if using a CPM).  Let's say the
AddressEditorPanel does some AJAX-based validation (for the zip code
perhaps).  I want all my errors on that page to show up on the
FeedbackPanel located at the top of the page.  If I have a validation
error on the zip code, I need to tell the AjaxRequestTarget that I
want the feedback panel updated via AJAX, but how do I do that?  I
need a reference to the FeedbackPanel.  Where do I get it?  Well, I
either have it passed in to me or I look up my hierarchy and do it
that way.  Using the auto-add feature (with a listener), it's handled
for me automagically!

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



Re: HowTo inject FeedbackPanel

2010-07-20 Thread Martin Makundi
Yes!

Igor's solution sounds very generic... could it be a
swith/setting/option in the framework that can simply be turned on?

**
Martin

2010/7/20 jcgarciam jcgarc...@gmail.com:

 I guess what Martin and James talk about is having a FeedbackPanel at the
 top and a lot component (panels) ajaxified which only update the
 FeedbackPanel  on their callbacks. Therefore they pass the FeedbackPanel on
 every Panel constructor.

 Martin, James am i right?


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



Re: Wicketstuff Push Assistance request

2010-07-20 Thread Rodolfo Hansen
Cool, 

Well right now, if you checkout my branch in github, you'll see I
actually stripped out the Dojo dependency and classes as the bayuex
people have cleanly separated cometd from the dojo codebase.

I also implemented an automatic copy of their cometd-javascript-common
artifact into ours. 

What I haven't gotten around to doing is re-assembling everything. There
should be some javascript and java code needed after the dojo strip.

Thanks to your latest changes, we got up to HTML5 and servlet 3.0
support, what I was aiming at is a leaner codebase, without dojo extras.

Also any ideas on where to setup a web-front?

On Tue, 2010-07-20 at 18:12 +0200, Martin Grigorov wrote:
 Hi Rodolfo,
 
 I still want to upgrade this project to Dojo and Wicket (both versions 1.5).
 Please describe your idea with HTML5 WebSocket implementation here (in
 users@) and I guess someone else can also join.
 I also invest in html5 (svn .../wicket-stuff/trunk/wicket15-html5-parent)
 ;-)
 
 2010/7/20 Rodolfo Hansen kry...@gmail.com
 
  Hi all,
 
  Anyone willing to lend me a hand on the wicketstuff-push project?
 
  I have some pretty good ideas, but can't find the time to implement
  them.
 
  If anyone is interested please write me directly.
 
 
  -
  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: HowTo inject FeedbackPanel

2010-07-20 Thread James Carman
On Tue, Jul 20, 2010 at 12:38 PM, Martin Makundi
martin.maku...@koodaripalvelut.com wrote:
 Yes!

 Igor's solution sounds very generic... could it be a
 swith/setting/option in the framework that can simply be turned on?


I'm sure it could, very easily.  But it'd have to be added to one of
the settings objects (PageSettings, perhaps).  What would the property
be called automaticAjaxFeedback?  I wouldn't mind putting together
the patch if we can agree on the naming of the setting and where it
would go (and of course if this sort of thing belongs in core or
not).  Perhaps we just create a listener implementation and let folks
add it to the AjaxRequestTarget manually if they want?

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



Re: HowTo inject FeedbackPanel

2010-07-20 Thread James Carman
On Tue, Jul 20, 2010 at 11:59 AM, James Carman
ja...@carmanconsulting.com wrote:
 On Tue, Jul 20, 2010 at 11:57 AM, Martin Grigorov mgrigo...@apache.org 
 wrote:
 What
 about org.apache.wicket.ajax.AjaxRequestTarget.addChildren(MarkupContainer,
 Class?)

 I.e.: target.addChildren(getPage(), IFeedback.class) ?

 Even cooler!


The only problem with this approach is there is no check in
addChildren() to see if setOutputMarkupId() is turned on or not.
Should that be part of the functionality?

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



wicket hell

2010-07-20 Thread Brown, Berlin [GCG-PFS]
There is a css hell, html hell, java web app hell.
 
Is there a wicket hell or issues that are specific to wicket?  Because I
do believe web application development is wicket is pretty unique.  I am
still new to wicket but there are two gripes that get me every time.
And maybe over time, I will get used to the problem.
 
1. Hierarchy issues - The hierarchy is very strict and not like the Java
hierarchy.  If you want to reference a component, it must be added
properly in the markup and in the java code.  This can be caught at
compile time, but it is still takes time getting used to.
 
2. Unexpected behavior with the markup - Sometimes I expect a particular
attribute or piece of code to get output but some tags I add in the
markup get replaced by wicket.  (E.g. I added class= to a div and
the class attribute was removed)
 
Note: I am not saying wicket is hell, or css or html is.  But I was just
pointing out that even wicket can have some quirks.  Am I wrong here?
 
Berlin Brown
 


RE: Welcome Martin Grigorov as a core team member

2010-07-20 Thread Brown, Berlin [GCG-PFS]
Cool, he has been helping me on IRC/Freenode 

-Original Message-
From: Maarten Bosteels [mailto:mbosteels@gmail.com] 
Sent: Tuesday, July 20, 2010 10:16 AM
To: users@wicket.apache.org
Subject: Re: Welcome Martin Grigorov as a core team member

Congratulations Martin !

On Tue, Jul 20, 2010 at 1:21 PM, Martin Grigorov
martin.grigo...@gmail.comwrote:

 Thanks a lot for the voted trust in me, team!

 As a big open source believer it is an honour for me to be a part of 
 the team that made such a great framework!

 Looking forward to make 1.5 production ready !


 2010/7/20 Ian Marshall ianmarshall...@gmail.com

 
  Many congratulations Martin!
 
  (In my extremely limited experience with web application frameworks,
 Wicket
  is just so excellent. Developing with Wicket really is fun, too.)
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Welcome-Martin-Grigorov-as-
 a-core-team-member-tp2294324p2295166.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: Change from development to deployment mode in maven2

2010-07-20 Thread Gustavo Henrique
Hi!
Now it is ok!

// web.xml
context-param
param-nameconfiguration/param-name
param-valuedevelopment/param-value
/context-param


// add plugin in pom.xml
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-antrun-plugin/artifactId
executions
execution
phaseprocess-classes/phase
configuration
tasks
replace file=${basedir}/target/web.xml
token=development value=deployment/
/tasks
/configuration
goals
goalrun/goal
/goals
/execution
/executions
/plugin


Thanks!


2010/7/19 Brian Topping topp...@codehaus.org

 Setting the JVM property is great because you can do it on your deployment
 server, so the same WAR runs in debug mode on all but the deployment
 machines.

 If you want Maven to fix the setting on a build, you can create a
 properties file:

wicket.configuration = ${deploy.type}

 Then create one or more profiles in your pom, one of them set as a default
 profile.  In them, have Maven do a substitution on deploy.type for either
 'development' or 'deployment'.

 Profiles are great for automated builds since the profile can be specified
 on the command line in the CI system.

 Brian


 On Jul 19, 2010, at 1:14 PM, Major Péter wrote:

  Hi,
 
  you could configure the wicket.configuration with JVM properties too, so
  you can have always enabled the production mode in web.xml, and override
  it with your dev server JVM property. See the JavaDoc for
  Application#getConfigurationType.
 
  Regards,
  Peter
 
  2010-07-19 19:10 keltezéssel, Gustavo Henrique írta:
  Hi!
  I'm using wicket in development mode but I need to change to deployment
 mode
  when maven is called. How I configure maven to change that mode when it
 is
  to generate war file?
 
  thanks!
 
  -
  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




-- 
Gustavo Henrique
blog.gustavohenrique.net


Re: wicket hell

2010-07-20 Thread Pedro Santos
Hi Brown, I think it is unfair say that Wicket present an unexpected
behavior with the markup, because every functionality are well documented. I
saw some situations where some one complain that the id tag attribute
value was changed. But the Component documentation is clear saying that this
attribute is generated.
If you have some case where you did read some component documentation and
the generated markup was unexpected, you can report the problem, with sure
some one will to improve the component documentation or solve the problem.


On Tue, Jul 20, 2010 at 2:38 PM, Brown, Berlin [GCG-PFS] 
berlin.br...@primerica.com wrote:

 There is a css hell, html hell, java web app hell.

 Is there a wicket hell or issues that are specific to wicket?  Because I
 do believe web application development is wicket is pretty unique.  I am
 still new to wicket but there are two gripes that get me every time.
 And maybe over time, I will get used to the problem.

 1. Hierarchy issues - The hierarchy is very strict and not like the Java
 hierarchy.  If you want to reference a component, it must be added
 properly in the markup and in the java code.  This can be caught at
 compile time, but it is still takes time getting used to.

 2. Unexpected behavior with the markup - Sometimes I expect a particular
 attribute or piece of code to get output but some tags I add in the
 markup get replaced by wicket.  (E.g. I added class= to a div and
 the class attribute was removed)

 Note: I am not saying wicket is hell, or css or html is.  But I was just
 pointing out that even wicket can have some quirks.  Am I wrong here?

 Berlin Brown




-- 
Pedro Henrique Oliveira dos Santos


Re: wicket hell

2010-07-20 Thread Martin Makundi
Hi!

 1. Hierarchy issues - The hierarchy is very strict and not like the Java
 hierarchy.  If you want to reference a component, it must be added
 properly in the markup and in the java code.  This can be caught at
 compile time, but it is still takes time getting used to.
 Note: I am not saying wicket is hell, or css or html is.  But I was just
 pointing out that even wicket can have some quirks.  Am I wrong here?

You are welcome to join the club of Wicket MashUp components!

http://code.google.com/p/wicket-mashup/

It allows you to arrange everything on the fly!!

**
Martin


 Berlin Brown



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



Re: HowTo inject FeedbackPanel

2010-07-20 Thread James Carman
This really does save me quite a bit of code!  Everywhere that I was
saving off a FeedbackPanel field to my page/component so that I could
later use it to add to an AjaxRequestTarget, GONE!

On Tue, Jul 20, 2010 at 1:49 PM, James Carman
ja...@carmanconsulting.com wrote:
 Here's the actual code (it works in our application)...

   �...@override
    public AjaxRequestTarget newAjaxRequestTarget(Page page)
    {
        AjaxRequestTarget target = super.newAjaxRequestTarget(page);
        target.addListener(new AjaxRequestTarget.IListener()
        {
           �...@override
            public void onBeforeRespond(MapString, Component map,
 final AjaxRequestTarget target)
            {
                if (!Session.get().getFeedbackMessages().isEmpty())
                {
                    target.getPage().visitChildren(IFeedback.class,
 new Component.IVisitorComponent()
                    {
                        public Object component(Component component)
                        {
                            if(component.getOutputMarkupId())
                            {
                                target.addComponent(component);
                            }
                            return CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER;
                        }
                    });
                }
            }

           �...@override
            public void onAfterRespond(MapString, Component map,
 AjaxRequestTarget.IJavascriptResponse response)
            {
                // Do nothing.
            }
        });
        return target;
    }

 On Tue, Jul 20, 2010 at 11:47 AM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 yes, you are on the right track. i just described this to someone in
 irc not a few days ago...

 override application.newajaxrequesttarget
 register your listener
 in listener onbeforerespond check if there are any messages -
 getsession().getfeedbackmessages().size()0
 visit all components in the page and look for IFeedback and add them
 to the target if they have setoutputmarkupid(true) - too late to force
 it to true at this point.

 -igor

 On Tue, Jul 20, 2010 at 8:34 AM, James Carman
 ja...@carmanconsulting.com wrote:
 Perhaps we could just register a AjaxRequestTarget.IListener and
 implement the onBeforeRespond() method?  You would check to see if
 there are any messages to be shown (still looking for how to ask that
 question in the API).  If there are, you'd make sure the requested
 page's (requestTarget.getPage()) feedback panel component gets added
 to the AjaxRequestTarget that's passed in.

 On Tue, Jul 20, 2010 at 11:23 AM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 there is already IFeedback interface that tags all components like
 feedbackpanel.

 -igor

 On Tue, Jul 20, 2010 at 5:52 AM, James Carman
 ja...@carmanconsulting.com wrote:
 I've struggled with this myself in the context of AJAX events that are
 handled completely by subpanels.  I want only one feedback panel on
 the page, but the subpanels need to be able to add them to their
 AjaxRequestTarget.  Perhaps you could override the default ajax
 request cycle handling in some way that looks at the page for an
 interface (FeedbackContainer) or something.  If there are any
 messages, then it adds the feedback panel to the target automatically?

 On Tue, Jul 20, 2010 at 8:44 AM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 Hi!

 I don't like passing feedbackpanel to subpanels and I don't like the
 idea using visitors/component-search for looking it up in page
 hierarchy because of its potential volatility...

 Has some of you pals come up with a nice way of injecting
 feedbackpanel references to children or something? Or even better some
 direct refrence? Should I only allow one (particular) feedbackpanel
 per session and re-use it from session?

 **
 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




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

Re: validation and #updateModel

2010-07-20 Thread Ray Weidner

 Back to the original question, when you say all changes to the form
 are lost - do you mean that the form rerenders with absolutely no values
 filled out?  Only the fields that failed conversion or validation should be
 blank.


See, that throws me off, too.  Yes, the supposedly valid fields are not
being preserved after submit and fail validation.  I would have thought that
they should have been preserved, LDM be damned, but they aren't, so that was
my theory as to what was causing this.

So if that's not causing it, what could be causing such a thing?  I'd
including source code here, but I'm not even sure what part is causing the
problem, so that would be a lot of code.  Any ideas?


On Tue, Jul 20, 2010 at 11:55 AM, Jeremy Thomerson 
jer...@wickettraining.com wrote:

 On Tue, Jul 20, 2010 at 10:20 AM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:

  On Tue, Jul 20, 2010 at 12:53 AM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
   Typically, I use LDM's for every place that I am viewing data, and a
  regular
   serializable model for places that I'm editing data.  You must be able
 to
   persist changes across requests (without persisting to the long-term
   storage), which means that you'll need to be able to serialize things.
 
  this is not true :) the formcomponents themselves preserve the state
  so using an LDM for a form is feasible. the sequence is basically
 
  * load entity - model
  * call setters - form component models
  * flush/close session - somewhere
 

 Right, which is why I said in the second paragraph:

  Only the fields that failed conversion or validation should be blank.
   Others should have their data still in them in an unconverted form even
  though the converted / validated form has not been pushed to the model
 yet
 


 In the first paragraph I should have been more clear - I use serializable
 models for where I'm editing data and passing it to other pages (i.e.
 multi-step wizards).  But, in this case, he seems to be in a single form,
 so
 the components should still have state unless he's reinitializing them
 somehow (redirecting to new page, etc).

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



Re: HowTo inject FeedbackPanel

2010-07-20 Thread Igor Vaynberg
no, if you are adding children you should already know that their ids are set

-igor

On Tue, Jul 20, 2010 at 10:03 AM, James Carman
ja...@carmanconsulting.com wrote:
 On Tue, Jul 20, 2010 at 11:59 AM, James Carman
 ja...@carmanconsulting.com wrote:
 On Tue, Jul 20, 2010 at 11:57 AM, Martin Grigorov mgrigo...@apache.org 
 wrote:
 What
 about org.apache.wicket.ajax.AjaxRequestTarget.addChildren(MarkupContainer,
 Class?)

 I.e.: target.addChildren(getPage(), IFeedback.class) ?

 Even cooler!


 The only problem with this approach is there is no check in
 addChildren() to see if setOutputMarkupId() is turned on or not.
 Should that be part of the functionality?

 -
 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



show modal window on cometd event using IChannelTarget

2010-07-20 Thread fachhoch

I am using wicket  cometd.
in the onEvent method of IChannelListner , I  want to show a  ModalWIndow , 

to show a modaWindow we have to call method show which takes
AjaxRequestTarget, bu in I channleListner I get   IChannelTarget  , please
suggest me how can I open   modal window in onEvent method using 
IChannelTarget   ? 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/show-modal-window-on-cometd-event-using-IChannelTarget-tp2296068p2296068.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: wicket hell

2010-07-20 Thread Igor Vaynberg
wicket does not remove class attributes. perhaps you added an
attributemodifier instead of an attributeappender.

-igor

On Tue, Jul 20, 2010 at 10:38 AM, Brown, Berlin [GCG-PFS]
berlin.br...@primerica.com wrote:
 There is a css hell, html hell, java web app hell.

 Is there a wicket hell or issues that are specific to wicket?  Because I
 do believe web application development is wicket is pretty unique.  I am
 still new to wicket but there are two gripes that get me every time.
 And maybe over time, I will get used to the problem.

 1. Hierarchy issues - The hierarchy is very strict and not like the Java
 hierarchy.  If you want to reference a component, it must be added
 properly in the markup and in the java code.  This can be caught at
 compile time, but it is still takes time getting used to.

 2. Unexpected behavior with the markup - Sometimes I expect a particular
 attribute or piece of code to get output but some tags I add in the
 markup get replaced by wicket.  (E.g. I added class= to a div and
 the class attribute was removed)

 Note: I am not saying wicket is hell, or css or html is.  But I was just
 pointing out that even wicket can have some quirks.  Am I wrong here?

 Berlin Brown



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



Re: HowTo inject FeedbackPanel

2010-07-20 Thread James Carman
I'm talking about that check you suggested, Igor, to see if the user
has called setOuputMarkupId(true) on the IFeedback component.  Should
that be part of the AjaxRequestTarget.addChildren() method's
implementation?

On Tue, Jul 20, 2010 at 2:56 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 no, if you are adding children you should already know that their ids are set

 -igor

 On Tue, Jul 20, 2010 at 10:03 AM, James Carman
 ja...@carmanconsulting.com wrote:
 On Tue, Jul 20, 2010 at 11:59 AM, James Carman
 ja...@carmanconsulting.com wrote:
 On Tue, Jul 20, 2010 at 11:57 AM, Martin Grigorov mgrigo...@apache.org 
 wrote:
 What
 about org.apache.wicket.ajax.AjaxRequestTarget.addChildren(MarkupContainer,
 Class?)

 I.e.: target.addChildren(getPage(), IFeedback.class) ?

 Even cooler!


 The only problem with this approach is there is no check in
 addChildren() to see if setOutputMarkupId() is turned on or not.
 Should that be part of the functionality?

 -
 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



Wicket Problem: Ajax request encoding

2010-07-20 Thread Ronaldo Cisneiros Veras
Hi,

We're using Wicket framework (Version 1.4.9) on our systems. Our problem occurs 
when there is a submission of ajax request in text fields. When you type the 
word descrição for example by submitting the text by ajax event the word is 
modified to descrição. This problem only occurs in Internet Explorer and 
does not occur in Firefox. 

We are overriding the init () method of WebApplication class and add the 
following lines for the encoding:

getMarkupSettings().setDefaultMarkupEncoding(ISO-8859-1);
((Settings) getMarkupSettings()).setResponseRequestEncoding(ISO-8859-1);

Could you tell us a solution for this issue?

Systems informations:

Windows XP SP2
Windows encoding: UTF-8 

Regards, Ronaldo.


Re: HowTo inject FeedbackPanel

2010-07-20 Thread Igor Vaynberg
right, like i said, no. if you try to add something and it doesnt have
output markup id set to true it should throw an exception just like if
you wouldve used addcomponent()

-igor

On Tue, Jul 20, 2010 at 11:59 AM, James Carman
ja...@carmanconsulting.com wrote:
 I'm talking about that check you suggested, Igor, to see if the user
 has called setOuputMarkupId(true) on the IFeedback component.  Should
 that be part of the AjaxRequestTarget.addChildren() method's
 implementation?

 On Tue, Jul 20, 2010 at 2:56 PM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 no, if you are adding children you should already know that their ids are set

 -igor

 On Tue, Jul 20, 2010 at 10:03 AM, James Carman
 ja...@carmanconsulting.com wrote:
 On Tue, Jul 20, 2010 at 11:59 AM, James Carman
 ja...@carmanconsulting.com wrote:
 On Tue, Jul 20, 2010 at 11:57 AM, Martin Grigorov mgrigo...@apache.org 
 wrote:
 What
 about 
 org.apache.wicket.ajax.AjaxRequestTarget.addChildren(MarkupContainer,
 Class?)

 I.e.: target.addChildren(getPage(), IFeedback.class) ?

 Even cooler!


 The only problem with this approach is there is no check in
 addChildren() to see if setOutputMarkupId() is turned on or not.
 Should that be part of the functionality?

 -
 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: validation and #updateModel

2010-07-20 Thread Jeremy Thomerson
On Tue, Jul 20, 2010 at 1:22 PM, Ray Weidner 
ray.weidner.develo...@gmail.com wrote:

 
  Back to the original question, when you say all changes to the form
  are lost - do you mean that the form rerenders with absolutely no values
  filled out?  Only the fields that failed conversion or validation should
 be
  blank.


 See, that throws me off, too.  Yes, the supposedly valid fields are not
 being preserved after submit and fail validation.  I would have thought
 that
 they should have been preserved, LDM be damned, but they aren't, so that
 was
 my theory as to what was causing this.

 So if that's not causing it, what could be causing such a thing?  I'd
 including source code here, but I'm not even sure what part is causing the
 problem, so that would be a lot of code.  Any ideas?


Best thing to do is try to create a quickstart that reproduces it.
 Typically, you find your error while doing this.  If not, you have
something you can give us that we can quickly run to debug your problem.

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


OnChangeAjaxBehavior() - problem with id

2010-07-20 Thread lucky

Hi Colleagues, 
  
I have listView where in TextArea I have used onChangeAjaxBehavior. 
In update() I set edited text to the object. 
Finally in saveButton (this button is required) via savingMethod() I add
changes to database and then refresh form. 
The problem is that when text is edited in given row (item) at the ListView
after refresh action the edited text is assigned to the last item at the
list. 
I know that probably I must use in any way id but I don’t know exactly how
to do it. 
Generally saying in my application I must have one saveButton that will be
common for all items at the list. 
This button is also used to save new added item via separate text field in
the form. This works fine.   
Can you suggest please solution. This is very urgent for me. 
Please also eventually suggest solution without OnChangeAjaxBehavior.
Below is my code. 



Regards, 
Rafal 

  

…… 
saveButton.add(new AjaxFormComponentUpdatingBehavior(onclick){ 
protected void onUpdate(AjaxRequestTarget target) { 
object.savingMethod(st);  //Saving changes to database 
target.addComponent(form); 
} 
form.add(saveButton); 

….. 

final ListView list = new ListView(stListing, ListTekst) { 
@Override 
protected void populateItem(final ListItemStandardTekst item) { 
  
TextClass st = new TextClass(); 
st = item.getModelObject(); 

final TextArea  tekst  = new TextArea (stTekst,new PropertyModel(st,
tekst)); 
tekst.add(new OnChangeAjaxBehavior() { 
  @Override 
  protected void onUpdate(AjaxRequestTarget target) { 
String editedText = (String) tekst.getModelObject(); 
st.setTekst(editedText); 
} 

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/OnChangeAjaxBehavior-problem-with-id-tp2296313p2296313.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: HowTo inject FeedbackPanel

2010-07-20 Thread James Carman
Ok, cool.  Just checking.  So, I can't use that code because I need to
conditionally check to see if it's ajaxified.  No big deal.  It's
already written and working.  Thanks for the pointers.

On Tue, Jul 20, 2010 at 4:24 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 right, like i said, no. if you try to add something and it doesnt have
 output markup id set to true it should throw an exception just like if
 you wouldve used addcomponent()

 -igor

 On Tue, Jul 20, 2010 at 11:59 AM, James Carman
 ja...@carmanconsulting.com wrote:
 I'm talking about that check you suggested, Igor, to see if the user
 has called setOuputMarkupId(true) on the IFeedback component.  Should
 that be part of the AjaxRequestTarget.addChildren() method's
 implementation?

 On Tue, Jul 20, 2010 at 2:56 PM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 no, if you are adding children you should already know that their ids are 
 set

 -igor

 On Tue, Jul 20, 2010 at 10:03 AM, James Carman
 ja...@carmanconsulting.com wrote:
 On Tue, Jul 20, 2010 at 11:59 AM, James Carman
 ja...@carmanconsulting.com wrote:
 On Tue, Jul 20, 2010 at 11:57 AM, Martin Grigorov mgrigo...@apache.org 
 wrote:
 What
 about 
 org.apache.wicket.ajax.AjaxRequestTarget.addChildren(MarkupContainer,
 Class?)

 I.e.: target.addChildren(getPage(), IFeedback.class) ?

 Even cooler!


 The only problem with this approach is there is no check in
 addChildren() to see if setOutputMarkupId() is turned on or not.
 Should that be part of the functionality?

 -
 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



new feature in trunk and branch: Component#onConfigure()

2010-07-20 Thread Igor Vaynberg
another new callback added to 1.4/trunk that is aimed at making life
easier when managing component states such as visibility, enabled,
etc.

/**
 * Called once per request on components before they are about to be
rendered. This method
 * should be used to configure such things as visibility and enabled 
flags.
 * p
 * Overrides must call {...@code super.onInitialize()}, usually before
any other code
 * /p
 * p
 * NOTE: Component hierarchy should not be modified inside this
method, instead it should be
 * done in {...@link #onBeforeRender()}
 * /p
 * p
 * NOTE: Why this method is preferrable to directly overriding {...@link
#isVisible()} and
 * {...@link #isEnabled()}? Because those methods are called multiple
times even for processing of
 * a single request. If they contain expensive logic they can slow
down the response time of the
 * entire page. Further, overriding those methods directly on form
components may lead to
 * inconsistent or unexpected state depending on when those methods
are called in the form
 * processing workflow. It is a better practice to push changes to
state rather than pull.
 * /p
 * p
 * NOTE: If component's visibility or another property depends on
another component you may call
 * {...@code other.configure()} followed by {...@code 
other.isVisible()} as
mentioned in
 * {...@link #configure()} javadoc.
 * /p
 * p
 * NOTE: Why should {...@link #onBeforeRender()} not be used for this?
Because if visibility of a
 * component is toggled inside {...@link #onBeforeRender()} another
method needs to be overridden
 * to make sure {...@link #onBeforeRender()} will be invoked on ivisible
components:
 *
 * pre
 * class MyComponent extends WebComponent
 * {
 *  protected void onBeforeRender()
 *  {
 *  setVisible(Math.rand() gt; 0.5f);
 *  super.onBeforeRender();
 *  }
 *
 *  // if this override is forgotten, once invisible component will
never become visible
 *  protected boolean callOnBeforeRenderIfNotVisible()
 *  {
 *  return true;
 *  }
 * }
 * /pre
 *
 * VS
 *
 * pre
 * class MyComponent extends WebComponent
 * {
 *  protected void onConfigure()
 *  {
 *  setVisible(Math.rand() gt; 0.5f);
 *  super.onConfigure();
 *  }
 * }
 * /pre
 */
protected void onConfigure()
{

}

/**
 * Triggers {...@link #onConfigure()} to be invoked on this component if
it has not already during
 * this request.
 * p
 * This method should be invoked before any calls to {...@link 
#isVisible()} or
 * {...@link #isEnabled()}. Usually this method will be called by the
framework before the
 * component is rendered and so users should not need to call it;
however, in cases where
 * visibility or enabled or other state of one component depends on
the state of another this
 * method should be manually invoked on the other component by the
user. EG to link visiliby of
 * two markup containers the following should be done:
 *
 * pre
 * final WebMarkupContainer source=new WebMarkupContainer(a) {
 *  protected void onConfigure() {
 *setVisible(Math.rand()0.5f);
 *  }
 * };
 *
 * WebMarkupContainer linked=new WebMarkupContainer(b) {
 *  protected void onConfigure() {
 *  source.configure(); // make sure source is configured
 *  setVisible(source.isVisible());
 *  }
 * }
 * /pre
 *
 * /p
 */
public final void configure()
{
if (!getFlag(FLAG_CONFIGURED))
{
onConfigure();
setFlag(FLAG_CONFIGURED, true);
}
}

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



Re: new feature in trunk and branch: Component#onConfigure()

2010-07-20 Thread Ernesto Reinaldo Barreiro
Igor,

Thanks for the new feature!


        /**
         * Called once per request on components before they are about to be
 rendered. This method
         * should be used to configure such things as visibility and enabled 
 flags.
         * p
         * Overrides must call {...@code super.onInitialize()}, usually before
 any other code
         * /p

Should not this be{...@code super.onConfigure()}?

Cheers,

Ernesto

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