Validate, Navigate Wizards

2009-05-04 Thread Wolfgang . Schele

Hi,

when I validate the data of a WizardStep after pressing Next, I
navigate within the validate method to the WizardStep.previous()
step in the false case.

Works fine! But calling the method WizardStep.previous() works
not for the first Wizard step. That's ok, there is no previous
one.
But how can I do it right?

Is there in general a way to navigate programmatically the
wizards? Depending to the user input the order of the wizards is
different.

Is it possible to override any method before a Wizard Step is
called on the client. What I found was a onNext() Method. But
this method is not existing anymore in the v1.4.

best regards
- jk



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



Validate, Navigate Wizards

2009-05-04 Thread Wolfgang . Schele

Hi,

when I validate the data of a WizardStep after pressing Next, I
navigate within the validate method to the WizardStep.previous()
step in the false case.

Works fine! But calling the method WizardStep.previous() works
not for the first Wizard step. That's ok, there is no previous
one.
But how can I do it right?

Is there in general a way to navigate programmatically the
wizards? Depending to the user input the order of the wizards is
different.

Is it possible to override any method before a Wizard Step is
called on the client. What I found was a onNext() Method. But
this method is not existing anymore in the v1.4.

best regards
- jk



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



Re: Validate, Navigate Wizards

2009-05-04 Thread Matthias Keller

wolfgang.sch...@dachser.com wrote:

Hi,

when I validate the data of a WizardStep after pressing Next, I
navigate within the validate method to the WizardStep.previous()
step in the false case.

Works fine! But calling the method WizardStep.previous() works
not for the first Wizard step. That's ok, there is no previous
one.
But how can I do it right?
  

Hi

Not sure why you even want to call next or previous at all manually?
I'm using 1.3.5 so that may make a difference but we're just adding 
validators to the WizardStep which takes care of everything. We never 
have to manually call previous() or next() ?


We're just doing:

   add(new FormValidator() {
   public FormComponent[] getDependentFormComponents() {
   return new FormComponent[] { radioGroup, checkbox };
   }
   public void validate (Form form) {
   if (isSelected(radioGroup, radio1)) {
   if (isChecked(checkbox)) {
   error(checkbox, our.error);
   }
   }
   }
   });

Note that FormValidator is our implementation of AbstractFormValidator 
which is just there to provide some helper methods like the isSelected() 
and isChecked() plus some optimizations.

Now when the error() is called, the wizard won't go to the next step.

Matt

--
matthias.kel...@ergon.ch  +41 44 268 83 98
Ergon Informatik AG, Kleinstrasse 15, CH-8008 Zürich
http://www.ergon.ch
__
e r g o nsmart people - smart software

Ergon ist im Final für den Fairnesspreis 2009 - Online-Abstimmung bis 6. Mai 2009 unter www.fairnesspreis.ch 





smime.p7s
Description: S/MIME Cryptographic Signature


Re: wicket-jasper UI

2009-05-04 Thread freak182


you checkout this project:  http://code.google.com/p/wicket-jasper-ui/


raviJPYADAV wrote:
 
 Hi , can you please share some sample code how to integrate this api with
 our code?
 
 --Ravi
 
 freak182 wrote:
 
 Hello,
 
 I just wanna share this simple project called wicket-jasper. It is
 basically jasperreports embeded in wicket. If you wanna share your idea
 or added some features,please do so. Anyway, our company is already using
 it please see the attached files. 
 
 Thanks. Cheers
 
  http://www.nabble.com/file/p22634657/wicket-jasper.tar wicket-jasper.tar 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/wicket-jasper-UI-tp22634657p23364548.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: Validate, Navigate Wizards

2009-05-04 Thread jackkilian

Hi Matthias,

thanks! I used error(), but the wizard didn't stop. I will check it, maybe I
use a ref-Object to call error().

regards
- jk


Matthias Keller wrote:
 
 wolfgang.sch...@dachser.com wrote:
 Hi,

 when I validate the data of a WizardStep after pressing Next, I
 navigate within the validate method to the WizardStep.previous()
 step in the false case.

 Works fine! But calling the method WizardStep.previous() works
 not for the first Wizard step. That's ok, there is no previous
 one.
 But how can I do it right?
   
 Hi
 
 Not sure why you even want to call next or previous at all manually?
 I'm using 1.3.5 so that may make a difference but we're just adding 
 validators to the WizardStep which takes care of everything. We never 
 have to manually call previous() or next() ?
 
 We're just doing:
 
 add(new FormValidator() {
 public FormComponent[] getDependentFormComponents() {
 return new FormComponent[] { radioGroup, checkbox };
 }
 public void validate (Form form) {
 if (isSelected(radioGroup, radio1)) {
 if (isChecked(checkbox)) {
 error(checkbox, our.error);
 }
 }
 }
 });
 
 Note that FormValidator is our implementation of AbstractFormValidator 
 which is just there to provide some helper methods like the isSelected() 
 and isChecked() plus some optimizations.
 Now when the error() is called, the wizard won't go to the next step.
 
 Matt
 
 -- 
 matthias.kel...@ergon.ch  +41 44 268 83 98
 Ergon Informatik AG, Kleinstrasse 15, CH-8008 Zürich
 http://www.ergon.ch
 __
 e r g o nsmart people - smart software
 
 Ergon ist im Final für den Fairnesspreis 2009 - Online-Abstimmung bis 6.
 Mai 2009 unter www.fairnesspreis.ch 
 
 
 
  
 

-- 
View this message in context: 
http://www.nabble.com/Validate%2C-Navigate-Wizards-tp23364393p23364909.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How to test AjaxFormChoiceComponentUpdatingBehavior for Radio Button

2009-05-04 Thread Marat Radchenko
That's what we are using here:

public static void selectAjaxRadio(final WicketTester tester, final
String radioPath) {
final Radio radio = (Radio)
tester.getComponentFromLastRenderedPage(radioPath);
final RadioGroup radioGroup = radio.findParent(RadioGroup.class);
AjaxFormChoiceComponentUpdatingBehavior behavior = null;
for (final IBehavior b : radioGroup.getBehaviors()) {
  if (b instanceof AjaxFormChoiceComponentUpdatingBehavior) {
behavior = (AjaxFormChoiceComponentUpdatingBehavior) b;
break;
  }
}
assert behavior != null;
final CharSequence url = behavior.getCallbackUrl(false);
final WebRequestCycle cycle = tester.setupRequestAndResponse(true);
tester.getServletRequest().setRequestToRedirectString(url.toString());
tester.getServletRequest().setParameter(
radioGroup.getInputName(),
radio.getValue()
);
tester.processRequestCycle(cycle);
  }

Yep, it looks weird. But works. If you have less hacky solutions,
please, tell us.

2009/4/30 Jeffrey S. Schwartz jschwa...@citytechinc.com:
 I have the same question as the reader from this email:
 http://www.nabble.com/How-to-test-AjaxFormChoiceComponentUpdatingBehavior-for-Radio-Button-p21833782.html

 I scoured the mailing lists, wiki and the javadoc for a possible
 solution.  I have attached a quick-start application that shows the
 problem.  When I run the application the
 AjaxFormChoiceComponentUpdatingBehavior works as expected!  However,
 when I run the unit test and use the tester.executeBehavior method to
 call the AjaxFormChoiceComponentUpdatingBehavior, the model is always
 null.  A snippet of my unit test is below:

        FormTester form = tester.newFormTester(form);
        System.out.println(form.modelObject= +
 form.getForm().getModelObject());
        form.select(radioButtons, 1);
        form.submit();
        System.out.println(form.modelObject= +
 form.getForm().getModelObject());

        Component comp = form.getForm().get(radioButtons);

        ListIBehavior behaviors = comp.getBehaviors();
        for (IBehavior i: behaviors) {
            if (i instanceof AjaxFormChoiceComponentUpdatingBehavior) {
                AjaxFormChoiceComponentUpdatingBehavior a =
 (AjaxFormChoiceComponentUpdatingBehavior)i;
                //executes the behavior, but clears the object's model
                tester.executeBehavior(a);
            }
        }


 Any suggestions would be very helpful.

 I am using wicket 1.4-rc2.

 Thanks in advance.

 -Jeff


 -
 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: Automatically adding a parameter to every link?

2009-05-04 Thread Martin Funk

maybe automatic multi window support might help you

this can be turned on like this in the init method of your Application.

/**
 * @see org.apache.wicket.protocol.http.WebApplication#init()
 */
@Override
protected void init()
{
super.init();
getPageSettings().setAutomaticMultiWindowSupport(true);
}

mf

Am 03.05.2009 um 15:00 schrieb Matthew Welch:

The data in the application that I'm working on is divided in any  
number of
different contexts. The pages displayed for each context are the  
same but
the data shown on those pages will be different depending on the  
specific
context. A logged in user might might have multiple pages (browser  
windows)
open at one time from any one of these contexts, otherwise I would  
store the
context in their session. As it stands I need to pass the context  
around

from page to page as a parameter. Is there an easy way to have this
parameter automatically appended to all links on page as they are  
rendered

or generated?

I suppose I could build my own set of Link components that look for  
the
existing context of a page and append that to themselves, and use  
those

links instead of the built in ones. Any other options?

-Matt




Re: Validate, Navigate Wizards

2009-05-04 Thread Matthias Keller

Hi

Just one note - I just had another look at our FormValidator class - you 
might wonder why you won't find the method  error (FormComponent fc, 
String resourceKey)  provided in my example. The reason is, we wrapped 
this to provide a direct access to localized error messages in our 
custom FormValidator:


   /**
* Reports an error against the validatable using the given literal 
resource key. This means, no

* class prefix is prepended to the resource key.
*
* @param fc form component against which the error is reported
* @param resourceKey The resource key to use
*/
   @Override
   public void error (FormComponent fc, String resourceKey) {
   fc.error(fc.getLocalizer().getString(resourceKey, fc));
   }


Just calling   error (Serializable message)  inside your form validator 
implementation will of course report the error against the FormValidator 
and not the failing component.
So make sure you callmyTextFieldThatFailed.error(...)   instead of   
error(...)


The Wizard will later test, if all contained components were successful 
and only advance if none of them had its  FormComponent.error() method 
invoked.


Good luck

Matt

jackkilian wrote:

Hi Matthias,

thanks! I used error(), but the wizard didn't stop. I will check it, maybe I
use a ref-Object to call error().

regards
- jk


Matthias Keller wrote:
  

wolfgang.sch...@dachser.com wrote:


Hi,

when I validate the data of a WizardStep after pressing Next, I
navigate within the validate method to the WizardStep.previous()
step in the false case.

Works fine! But calling the method WizardStep.previous() works
not for the first Wizard step. That's ok, there is no previous
one.
But how can I do it right?
  
  

Hi

Not sure why you even want to call next or previous at all manually?
I'm using 1.3.5 so that may make a difference but we're just adding 
validators to the WizardStep which takes care of everything. We never 
have to manually call previous() or next() ?


We're just doing:

add(new FormValidator() {
public FormComponent[] getDependentFormComponents() {
return new FormComponent[] { radioGroup, checkbox };
}
public void validate (Form form) {
if (isSelected(radioGroup, radio1)) {
if (isChecked(checkbox)) {
error(checkbox, our.error);
}
}
}
});

Note that FormValidator is our implementation of AbstractFormValidator 
which is just there to provide some helper methods like the isSelected() 
and isChecked() plus some optimizations.

Now when the error() is called, the wizard won't go to the next step.

Matt

--
matthias.kel...@ergon.ch  +41 44 268 83 98
Ergon Informatik AG, Kleinstrasse 15, CH-8008 Zürich
http://www.ergon.ch
__
e r g o nsmart people - smart software

Ergon ist im Final für den Fairnesspreis 2009 - Online-Abstimmung bis 6.
Mai 2009 unter www.fairnesspreis.ch 




 




  



--
matthias.kel...@ergon.ch  +41 44 268 83 98
Ergon Informatik AG, Kleinstrasse 15, CH-8008 Zürich
http://www.ergon.ch
__
e r g o nsmart people - smart software

Ergon ist im Final für den Fairnesspreis 2009 - Online-Abstimmung bis 6. Mai 2009 unter www.fairnesspreis.ch 





smime.p7s
Description: S/MIME Cryptographic Signature


Re: Validate, Navigate Wizards

2009-05-04 Thread jackkilian

Hi,

my intention is to check if special mandatory fields are filled.
What I found in the examples is the RequiredTextField... within the Wicket
lib.

I use a RadioBtnGroup with RadioBtn's, the user has to select one!
Thats all what I validate.

But no matter, with your hint I can solve that problem. Maybe I implement an
own RadioBtnGroup-Komponent who can check this in general, like the
RequiredTextField... :-)

regards
- jk



Matthias Keller wrote:
 
 Hi
 
 Just one note - I just had another look at our FormValidator class - you 
 might wonder why you won't find the method  error (FormComponent fc, 
 String resourceKey)  provided in my example. The reason is, we wrapped 
 this to provide a direct access to localized error messages in our 
 custom FormValidator:
 
 /**
  * Reports an error against the validatable using the given literal 
 resource key. This means, no
  * class prefix is prepended to the resource key.
  *
  * @param fc form component against which the error is reported
  * @param resourceKey The resource key to use
  */
 @Override
 public void error (FormComponent fc, String resourceKey) {
 fc.error(fc.getLocalizer().getString(resourceKey, fc));
 }
 
 
 Just calling   error (Serializable message)  inside your form validator 
 implementation will of course report the error against the FormValidator 
 and not the failing component.
 So make sure you callmyTextFieldThatFailed.error(...)   instead of   
 error(...)
 
 The Wizard will later test, if all contained components were successful 
 and only advance if none of them had its  FormComponent.error() method 
 invoked.
 
 Good luck
 
 Matt
 
 jackkilian wrote:
 Hi Matthias,

 thanks! I used error(), but the wizard didn't stop. I will check it,
 maybe I
 use a ref-Object to call error().

 regards
 - jk


 Matthias Keller wrote:
   
 wolfgang.sch...@dachser.com wrote:
 
 Hi,

 when I validate the data of a WizardStep after pressing Next, I
 navigate within the validate method to the WizardStep.previous()
 step in the false case.

 Works fine! But calling the method WizardStep.previous() works
 not for the first Wizard step. That's ok, there is no previous
 one.
 But how can I do it right?
   
   
 Hi

 Not sure why you even want to call next or previous at all manually?
 I'm using 1.3.5 so that may make a difference but we're just adding 
 validators to the WizardStep which takes care of everything. We never 
 have to manually call previous() or next() ?

 We're just doing:

 add(new FormValidator() {
 public FormComponent[] getDependentFormComponents() {
 return new FormComponent[] { radioGroup, checkbox };
 }
 public void validate (Form form) {
 if (isSelected(radioGroup, radio1)) {
 if (isChecked(checkbox)) {
 error(checkbox, our.error);
 }
 }
 }
 });

 Note that FormValidator is our implementation of AbstractFormValidator 
 which is just there to provide some helper methods like the isSelected() 
 and isChecked() plus some optimizations.
 Now when the error() is called, the wizard won't go to the next step.

 Matt

 -- 
 matthias.kel...@ergon.ch  +41 44 268 83 98
 Ergon Informatik AG, Kleinstrasse 15, CH-8008 Zürich
 http://www.ergon.ch
 __
 e r g o nsmart people - smart software

 Ergon ist im Final für den Fairnesspreis 2009 - Online-Abstimmung bis 6.
 Mai 2009 unter www.fairnesspreis.ch 



  

 

   
 
 
 -- 
 matthias.kel...@ergon.ch  +41 44 268 83 98
 Ergon Informatik AG, Kleinstrasse 15, CH-8008 Zürich
 http://www.ergon.ch
 __
 e r g o nsmart people - smart software
 
 Ergon ist im Final für den Fairnesspreis 2009 - Online-Abstimmung bis 6.
 Mai 2009 unter www.fairnesspreis.ch 
 
 
 
  
 

-- 
View this message in context: 
http://www.nabble.com/Validate%2C-Navigate-Wizards-tp23364393p23366599.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: ChoiceFilteredPropertyColumn and FilterToolbar examples

2009-05-04 Thread Linda van der Pal
I found what I did wrong. I tried to let the filter-state be a Publisher 
as well. That should have been a BookListData object. The filterstate 
object should be the same type of object as the table contains, so you 
can filter on all variables. I hadn't understood that yet.


Thanks for the help anyway!

Regards,
Linda

Jeremy Thomerson wrote:

Shouldn't the line below have name rather than publisher?  I
haven't used this filtered thing in a while, but from your error,
that's what it sounds like the problem is.  You're passing it a
Publisher, and it's saying that it doesn't have a publisher field on
it - because you told it to use the publisher field.

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




On Fri, May 1, 2009 at 2:31 AM, Linda van der Pal
lvd...@heritageagenturen.nl wrote:
  

  columns[3] = new ChoiceFilteredPropertyColumn(new
ModelString(Publisher), name, publisher, createPublisherModel());



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




No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.325 / Virus Database: 270.12.16/2094 - Release Date: 05/03/09 16:51:00


  



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



Re: Validate, Navigate Wizards

2009-05-04 Thread Matthias Keller

Hi

If you only want to require that a radio button is selected, then  
myRadioGroup.setRequired(true)  already does that job. No need to 
implement a custom form validator then.
BTW: RequiredTextField is nothing other than a TextField which calls  
setRequired(true)  in the constructor.. It's only here for convenience 
since it is used very often.
so,  .setRequired(true)  is your friend as long as you only want to 
check if a radio button has been selected.


Matt

jackkilian wrote:

Hi,

my intention is to check if special mandatory fields are filled.
What I found in the examples is the RequiredTextField... within the Wicket
lib.

I use a RadioBtnGroup with RadioBtn's, the user has to select one!
Thats all what I validate.

But no matter, with your hint I can solve that problem. Maybe I implement an
own RadioBtnGroup-Komponent who can check this in general, like the
RequiredTextField... :-)

regards
- jk



Matthias Keller wrote:
  

Hi

Just one note - I just had another look at our FormValidator class - you 
might wonder why you won't find the method  error (FormComponent fc, 
String resourceKey)  provided in my example. The reason is, we wrapped 
this to provide a direct access to localized error messages in our 
custom FormValidator:


/**
 * Reports an error against the validatable using the given literal 
resource key. This means, no

 * class prefix is prepended to the resource key.
 *
 * @param fc form component against which the error is reported
 * @param resourceKey The resource key to use
 */
@Override
public void error (FormComponent fc, String resourceKey) {
fc.error(fc.getLocalizer().getString(resourceKey, fc));
}


Just calling   error (Serializable message)  inside your form validator 
implementation will of course report the error against the FormValidator 
and not the failing component.
So make sure you callmyTextFieldThatFailed.error(...)   instead of   
error(...)


The Wizard will later test, if all contained components were successful 
and only advance if none of them had its  FormComponent.error() method 
invoked.


Good luck

Matt

jackkilian wrote:


Hi Matthias,

thanks! I used error(), but the wizard didn't stop. I will check it,
maybe I
use a ref-Object to call error().

regards
- jk


Matthias Keller wrote:
  
  

wolfgang.sch...@dachser.com wrote:



Hi,

when I validate the data of a WizardStep after pressing Next, I
navigate within the validate method to the WizardStep.previous()
step in the false case.

Works fine! But calling the method WizardStep.previous() works
not for the first Wizard step. That's ok, there is no previous
one.
But how can I do it right?
  
  
  

Hi

Not sure why you even want to call next or previous at all manually?
I'm using 1.3.5 so that may make a difference but we're just adding 
validators to the WizardStep which takes care of everything. We never 
have to manually call previous() or next() ?


We're just doing:

add(new FormValidator() {
public FormComponent[] getDependentFormComponents() {
return new FormComponent[] { radioGroup, checkbox };
}
public void validate (Form form) {
if (isSelected(radioGroup, radio1)) {
if (isChecked(checkbox)) {
error(checkbox, our.error);
}
}
}
});

Note that FormValidator is our implementation of AbstractFormValidator 
which is just there to provide some helper methods like the isSelected() 
and isChecked() plus some optimizations.

Now when the error() is called, the wizard won't go to the next step.

Matt

--
matthias.kel...@ergon.ch  +41 44 268 83 98
Ergon Informatik AG, Kleinstrasse 15, CH-8008 Zürich
http://www.ergon.ch
__
e r g o nsmart people - smart software

Ergon ist im Final für den Fairnesspreis 2009 - Online-Abstimmung bis 6.
Mai 2009 unter www.fairnesspreis.ch 




 



  
  

--
matthias.kel...@ergon.ch  +41 44 268 83 98
Ergon Informatik AG, Kleinstrasse 15, CH-8008 Zürich
http://www.ergon.ch
__
e r g o nsmart people - smart software

Ergon ist im Final für den Fairnesspreis 2009 - Online-Abstimmung bis 6.
Mai 2009 unter www.fairnesspreis.ch 




 




  



--
matthias.kel...@ergon.ch  +41 44 268 83 98
Ergon Informatik AG, Kleinstrasse 15, CH-8008 Zürich
http://www.ergon.ch
__
e r g o nsmart people - smart software

Ergon ist im Final für den Fairnesspreis 2009 - Online-Abstimmung bis 6. Mai 2009 unter www.fairnesspreis.ch 





smime.p7s
Description: S/MIME Cryptographic Signature


Re: Putting HTML files in src/main/webapp

2009-05-04 Thread Richard Allen
If you are using packagingwar/packaging, then the maven-war-plugin will
automatically pick up the resources in src/main/webapp, which means you do
not have to configure that directory as a resource. Additionally, the
maven-resources-plugin automatically picks up resources in
src/main/resources, so you don't have to explicitly configure that either.
Try removing that configuration and see what happens.

-Richard

On Sun, May 3, 2009 at 7:19 AM, Alan Garfield a...@fromorbit.com wrote:

 Hi all,

 Just a quick question, I'd like to move all the .html files so my
 directory layout will be :-

 .
 |-- pom.xml
 \-- src
|-- main
||-- java
||\-- com
||\-- foo
|||-- WicketApplication.java
||\-- bar.java
||-- resources
|\-- webapp
||-- com
||\-- foo
||\-- bar.html
|\-- WEB-INF
\-- test

 I've setup my pom.xml like :-

build
resources
resource
directorysrc/main/resources/directory
/resource
resource
directorysrc/main/webapp/directory
includes
include**/*.html/include
/includes
/resource
  [..]
/resources
/build

 Which works, but I end up with duplicate html files and directories in
 the root of the war. I've not found an easy way to change this default.
 Anyone else have an idea?

 Many thanks!

 Alan.


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




Re: DnDSortableHandler + modal window problems?

2009-05-04 Thread Marcus Popetz
On Mon, May 4, 2009 at 9:44 AM, Serkan Camurcuoglu
serkan.camurcuo...@telenity.com wrote:
 though I've never used DnDSortableHandler, I guess you need to append some
 javascript to the ajaxrequesttarget to convert the items you've added into
 draggable items.. In my experience most jquery plugins work by initializing
 the selected elements during document's onload() or domready(), and you may
 need to do the same for the elements that you've just added to the
 document..

Not a jquery expert, so my apologies if I didn't understand that, but
It's actually not adding a new item.   I'm just editing properties of
existing items and rerendering the row so that the label shows the
refreshed data so they're already controlled and registered with
jquery...

-mp

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



Re: Weird DatePicker / DateTextField off by one hour

2009-05-04 Thread mallet

I'm using 1.4 RC2.  It was a daylight savings time issue... but one in my
IDE's JRE rather than in Wicket.  I patched it up and things are behaving as
expected now.  Thanks for the additional info about the timezone issue.
-- 
View this message in context: 
http://www.nabble.com/Weird-DatePicker---DateTextField-off-by-one-hour-tp23304596p23369989.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



DnDSortableHandler + modal window problems?

2009-05-04 Thread Marcus Popetz
Anyone out there run into problems using DnDSortableHandler (Jquery's
sortable list) and opening a modal window causing further dragging to
fail?

The problem I'm seeing:

DnDSortableHandler works fine until I edit one of the items in the
sortable list in a modal window.

Upon close of the modal window, Anything I add to the target to be
rerendered upon close ends up no longer draggable. (ie:  if I rerender
just the row in the list that was edited, that one can't be moved but
the others can, if I rerender the whole sortable list that contained
the edited item, nothing is the list is draggable but other lists on
the page are.  If I add the entire form to the target for rerendering,
nothing is draggable in my other lists either.

By not draggable, I mean  you click and drag and it selects the text
instead of moving the item.

In the case of rerendering the one list or one row, if I then drag
something else that wasn't rerendered and then go back and try the
stubborn items again...it all works fine.

Anyone seen this?

Sorry, no public url on this one as it requires login.  Happy to
provide more info though, just let me know what.

-mp

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



Re: best way to add tooltips in wicket

2009-05-04 Thread RoyBatty

OK folks, regarding this tooltip business

we've ended up using prototip for a while now, and while it works, we're not
very happy with some of the quirks.

More specifically, there are two odd things i'd label as bugs if i was sure
that i hadn't done something wrong myself... 

1. When you hover over a prototip-configured div and do an alt-tab, the
tooltip stays and doesn't go away unless you tab back into the browser,
hover the mouse over the div again and then move out.

2. Same thing happens when you have a prototip for an image link and click
on it, the tooltip stays even though the window the div belongs to loses
focus.


Anybody has experienced anything similar? Any way around it? Input
appreciated... 
-- 
View this message in context: 
http://www.nabble.com/best-way-to-add-tooltips-in-wicket-tp22697930p23367856.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: EmptyAjaxRequestTarget invokes failurescript when link is pressed on page

2009-05-04 Thread Mikko Pukki
Hi,

It seems that there are not yet any commits made to snapshot regarding this.

- Mikko

-Original Message-
From: Mikko Pukki [mailto:mikko.pu...@syncrontech.com] 
Sent: 8. huhtikuuta 2009 11:04
To: users@wicket.apache.org
Subject: RE: EmptyAjaxRequestTarget invokes failurescript when link is pressed 
on page

Hi,

I attached a patch (for 1.3.x snapshot) to jira 1971.

- Mikko

-Original Message-
From: Matej Knopp [mailto:matej.kn...@gmail.com] 
Sent: 7. huhtikuuta 2009 20:17
To: users@wicket.apache.org
Subject: Re: EmptyAjaxRequestTarget invokes failurescript when link is pressed 
on page

Please open jira issue - or assign the code you posted to existing
one. I'll apply it.

-Matej

On Tue, Apr 7, 2009 at 3:30 PM, Mikko Pukki mikko.pu...@syncrontech.com wrote:
 Hi,

 We just noticed that if user is on a page and ajax request is
 executing, pressing a link can cause AbstractDefaultAjaxBehavior's
 failurescript to be executed on the browser.

 We noticed that this happens at least in cases where pressing a link
 forwards user to other page by setting a different response page.

 Content of ajax debug is same as in the jira issue I have posted before
 (JIRA 1971):

    INFO: Initiating Ajax POST request on ? 
 wicket:interface=:1:inputForm:back::IActivePageBehaviorListener:0:wicket:ignoreIfNotActive=truerandom=0.6741350924814413
    INFO: Invoking pre-call handler(s)...
    INFO: Received ajax response (31 characters)
    INFO:
    ajax-response/ajax-response
    ERROR: Error while parsing response: Could not find root ajax-response 
 element
    INFO: Invoking post-call handler(s)...

 Content of the ajax response is problem at least on ie6,ie7,ff2 and ff3. It 
 seems
 to fail, because xml reply does not contain doctype.

 This is annoying, because the invoker of the ajax request is in our case 
 inherited from the
 AbstractAjaxTimerBehavior and we would like to do a page reload in the 
 failurescript in case
 that request fails so that page would still be updated even if there are some 
 network problems.
 Now pressing any link that forwards to other pages can force a reload to the
 page, if some request is already executing. In this particular application 
 this is wery common,
 partly because of bad network connection from the client's site (request can 
 take some time)
 and partly because of very frequent ajax requests.

 We tried to modify 
 org.apache.wicket.request.target.basic.EmptyAjaxRequestTarget's
 respond method so that it puts doctype to the respond as does the normal ajax 
 target

 we replaced this:
        public void respond(RequestCycle requestCycle)
        {
                
 requestCycle.getResponse().write(ajax-response/ajax-response);
        }

 with this:
        public void respond(RequestCycle requestCycle)
        {
                final WebResponse response = 
 (WebResponse)requestCycle.getResponse();
                final Application app = Application.get();
                final String encoding = 
 app.getRequestCycleSettings().getResponseRequestEncoding();

                // Set content type based on markup type for page
                response.setCharacterEncoding(encoding);
                response.setContentType(text/xml; charset= + encoding);

                // Make sure it is not cached by a client
                response.setHeader(Expires, Mon, 26 Jul 1997 05:00:00 GMT);
                response.setHeader(Cache-Control, no-cache, 
 must-revalidate);
                response.setHeader(Pragma, no-cache);

                response.write(?xml version=\1.0\ encoding=\);
                response.write(encoding);
                response.write(\?);
                response.write(ajax-response/ajax-response);
        }

 And it works now. Should I open a jira issue for this?

 Regards,
 Mikko

 --
 Mikko Pukki
 Syncron Tech Oy
 Laserkatu 6
 53850 Lappeenranta
 +358 400 757 178


 -
 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



Wizard Tabs

2009-05-04 Thread Vidhya Kailash
Hi
I would like to know if there is a way to re-use panels of the WizardSteps as 
tabs of TabbedPanel. More precisely, I have a scenario where I lead the user 
thru product creation using Wizard (basically inputting product details). I 
want to re-use some of the wizard steps as tabs for editing the product. That 
way I dont have to repeat the product attributes...
Any help/thoughts much appreciated.
thanks



  

Re: best way to add tooltips in wicket

2009-05-04 Thread Mathias Nilsson

yes I have the same exact problem. Tried all settings there is in ProtoTip.
The only thing that worked was to have onclick to show the tip and close
button but this is of course not the way we want it.

If you come up with a solution please post it here. Do you experience the
same bug with MooTip?
-- 
View this message in context: 
http://www.nabble.com/best-way-to-add-tooltips-in-wicket-tp22697930p23371425.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



Tomcat Publishing and Hot-Swapping with Wicket (solved)

2009-05-04 Thread Kaspar Fischer
I intended to post the following questions but found the answer  
myself, finally.


I post it anyway in the hope that it helps others.

Kaspar Fischer almost posted the following:

My app takes quite some time to start up, so I don't want changes to  
my Wicket HTML or Wicket Java files to cause Tomcat to completely  
reload the web app. Is it (at all) possible that only the changed  
Wicket HTML/Java/.properties file get reloaded and the rest (Spring  
beans, etc.) stays?


Yes. It is working for HTML, Java, and .properties files under Eclipse  
with WTP and Tomcat.


I am a little confused about the terms used in this context. Here's  
how I see; please correct me if I am wrong.


- Hotswapping means replacing a given class implementation with  
another one.
- Publishing (as seen in the server configuration panel in Eclipse  
when clicking on a Tomcat server in the Servers view) means  
shutting a webapp down and restarting it, hithout actually shutting  
Tomcat down.


I can't answer myself on this. But I guess it's more or less fine ;-)

There is also an option Update context paths in the Tomcat Server  
configuration panel (under Publishing). Is it related?


It is checked in my set up but I don't know whether it is related.

Finally, *how* can I get Tomcat/Eclipse/Wicket to only reload Wicket  
HTML/Java/.properties files that changed? In particular, I am unsure  
whether I have to:


- Debug instead of Run the server (i.e., click Debug in the  
Eclipse Servers view)?


With Debug it works.

- Should the server have Automatically publish when resources  
change selected (in the server's configuration panel in Eclipse)?


I have this checkbox checked.

- What Tomcat Context configuration must I use? I currently have  
something like:


Context docBase=myproject path=/myproject  
reloadable=true source=org.eclipse.jst.j2ee.server:myproject/


This works for me.

- In the server's configuration panel, in tab Modules, should I  
check Auto reloading enabled?


No. Otherwise Tomcat reloads the *whole* webapp.


I know that Wicket must be running in development mode.


I think so, too ;-)


Many thanks for any pointers and sharing your settings!


Kaspar, you're welcome.


Kaspar


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



Full integration Wicket - Blazeds. Is it possible?

2009-05-04 Thread Fernando Wermus
Hi all,
 I am working with flex and wicket and I would like to get a full
integration. What I mean is that a wicket's model page will be updated in
case someone uses a flex component that called a blazeds service. I run
succesfuly http://ryangravener.com/wordpress/?p=21, which I would like to
improve.

My problem is how to get wicket session, for getting the model's page which
I would like to update.

Some ideas that come up to my mind are:

a. using cookie JSESSIONID to get wicket session.
b. getting HttpSession through FlexContext to get Wicket Session after:
HttpSession session = FlexContext.getHttpRequest().getSession(true);

Is this possible? This is the web.xml file config according ryangravener:

  !-- WICKET FILTER --
filter
filter-namewicket.miApp/filter-name

filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
init-param
  param-nameapplicationClassName/param-name
  param-valuecom.miApp.MiAppApplication/param-value
/init-param
  /filter
filter-mapping
filter-namewicket.MiAppfilter-name
url-pattern/*/url-pattern
  /filter-mapping

!-- BLAZE  --
  servlet
servlet-nameMessageBrokerServlet/servlet-name
servlet-class
flex.messaging.MessageBrokerServlet
/servlet-class
init-param
param-nameservices.configuration.file/param-name
param-value/WEB-INF/flex/services-config.xml/param-value
  /init-param
init-param
param-nameflex.write.path/param-name
param-value/WEB-INF/flex/param-value
  /init-param
load-on-startup1/load-on-startup
/servlet

servlet-mapping
servlet-nameMessageBrokerServlet/servlet-name
url-pattern/messagebroker/*/url-pattern
/servlet-mapping

filter-mapping
filter-namewicket.myApp/filter-name
url-pattern/messagebroker/*/url-pattern
/filter-mapping


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus
http://mientretiempo.blogspot.com/


Re: Get tag type?

2009-05-04 Thread nino martinez wael
Ohh ok thanks :)

My memory are rusty:) I've done this before :)


2009/5/3 Johan Compagner jcompag...@gmail.com:
 You only can know then when it is getting rendered so not before.

 So for example the onComponentTag methods of component/behavior

 On 03/05/2009, nino martinez wael nino.martinez.w...@gmail.com wrote:
 Hi

 How do I get the underlying tag type of a component (the tag the
 component are bound to)..

 For example

 div wicket:id=mycomponent/div

 I want to pickup div...

 -
 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: Automatically adding a parameter to every link?

2009-05-04 Thread nino martinez wael
I think I would use Martins idea + markup inheritance (pages that are
aware of the required parameters etc)...

2009/5/3 Matthew Welch matt...@welchkin.net:
 The data in the application that I'm working on is divided in any number of
 different contexts. The pages displayed for each context are the same but
 the data shown on those pages will be different depending on the specific
 context. A logged in user might might have multiple pages (browser windows)
 open at one time from any one of these contexts, otherwise I would store the
 context in their session. As it stands I need to pass the context around
 from page to page as a parameter. Is there an easy way to have this
 parameter automatically appended to all links on page as they are rendered
 or generated?

 I suppose I could build my own set of Link components that look for the
 existing context of a page and append that to themselves, and use those
 links instead of the built in ones. Any other options?

 -Matt


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



Wicketstuff-core issue

2009-05-04 Thread Kaspar Fischer
I have a minor issue with wicket-stuff core. I don't know where to  
report it to, so I hope it's fine if I post here. (Wicket JIRA  
probably isn't the right place and Wicketstuff JIRA does not contain a  
project 'wicketstuff-core'.)


The pom.xml does not work for me with Maven 2.1.0. If I change

   plugin
  groupIdorg.mortbay.jetty/groupId
  artifactIdmaven-jetty-plugin/artifactId
   /plugin

to

   plugin
  groupIdorg.mortbay.jetty/groupId
  artifactIdmaven-jetty-plugin/artifactId
  version6.1.10/version
   /plugin

it works.

Kaspar

P.S. Just to be sure: I found no JAR in the maven repository [1], so  
assume that there are no nightly builds for this project and I have to  
compile myself, right?


[1] 
http://wicketstuff.org/maven/repository/org/wicketstuff/wicketstuff-core/1.4-SNAPSHOT/

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



Re: Wicketstuff-core issue

2009-05-04 Thread Jeremy Thomerson
Regarding jetty - not sure - hopefully one of the Maven mavens will speak up.

Regarding jar - It's not a jar project, it's a pom project.  There
won't be a jar.  There are nightly builds, but the TeamCity server
always has vcs connection issues - so sometimes the builds don't work.
 If you search the list, you will see where I have posted links in the
past to my own build server on wickettraining.com that you are welcome
to use if necessary.

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




On Mon, May 4, 2009 at 12:17 PM, Kaspar Fischer h...@rapsak.com wrote:
 I have a minor issue with wicket-stuff core. I don't know where to report it
 to, so I hope it's fine if I post here. (Wicket JIRA probably isn't the
 right place and Wicketstuff JIRA does not contain a project
 'wicketstuff-core'.)

 The pom.xml does not work for me with Maven 2.1.0. If I change

   plugin
      groupIdorg.mortbay.jetty/groupId
      artifactIdmaven-jetty-plugin/artifactId
   /plugin

 to

   plugin
      groupIdorg.mortbay.jetty/groupId
      artifactIdmaven-jetty-plugin/artifactId
      version6.1.10/version
   /plugin

 it works.

 Kaspar

 P.S. Just to be sure: I found no JAR in the maven repository [1], so assume
 that there are no nightly builds for this project and I have to compile
 myself, right?

 [1]
 http://wicketstuff.org/maven/repository/org/wicketstuff/wicketstuff-core/1.4-SNAPSHOT/

 -
 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



Internationalized titles

2009-05-04 Thread Shelah Horvitz
I want to internationalize the title of my application, so that I would get its 
value from a properties file, and the HTML would look something like:

head
  titlespan wicket:id=appTitle/span/title
/head

It doesn't look like I can use a header contributor to do this sort of thing, 
so how is it done?

Thanks for your help.

Shelah


Re: Internationalized titles

2009-05-04 Thread Jeremy Thomerson
add(new Label(appTitle, new ResourceModel(your.title.key));

also, change your html:
title wicket:id=appTitlethis will be replaced/title

Of course, if you don't use markup inheritance, you'll need to repeat
this throughout each page.

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




On Mon, May 4, 2009 at 1:02 PM, Shelah Horvitz
shelah.horv...@blackwave.tv wrote:
 I want to internationalize the title of my application, so that I would get 
 its value from a properties file, and the HTML would look something like:

 head
  titlespan wicket:id=appTitle/span/title
 /head

 It doesn't look like I can use a header contributor to do this sort of thing, 
 so how is it done?

 Thanks for your help.

 Shelah


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



RE: Internationalized titles

2009-05-04 Thread Shelah Horvitz
Many thanks!


From: Jeremy Thomerson [jer...@wickettraining.com]
Sent: Monday, May 04, 2009 2:08 PM
To: users@wicket.apache.org
Subject: Re: Internationalized titles

add(new Label(appTitle, new ResourceModel(your.title.key));

also, change your html:
title wicket:id=appTitlethis will be replaced/title

Of course, if you don't use markup inheritance, you'll need to repeat
this throughout each page.

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




On Mon, May 4, 2009 at 1:02 PM, Shelah Horvitz
shelah.horv...@blackwave.tv wrote:
 I want to internationalize the title of my application, so that I would get 
 its value from a properties file, and the HTML would look something like:

 head
  titlespan wicket:id=appTitle/span/title
 /head

 It doesn't look like I can use a header contributor to do this sort of thing, 
 so how is it done?

 Thanks for your help.

 Shelah


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



Re: wicket-jasper UI

2009-05-04 Thread Juha Palomäki
Here are some rough instructions. If you for example want to embed the
HTML report on a web page, you need:
- instance of JRResource (there are several implementations, depending
on what kind of output you want to have)
- a  report (either as File or as InputStream)
- datasource

1. Instantiate new JRHtmlResource, pass the File or InputStream to the
constructor, depending on where you compiled report-file is coming
from.

2. Use the setConnectionProvider to pass in an implementation of
IDatabaseConnectionProvider that will return a JDBC connection to the
database

3. Specify report parameters with setReportParameters method. At least
some older versions require you to do this even if you don't have
parameters to pass (you can use an empty map).

4. In order to render the report, you just use EmbeddedHtmlReport
component, which takes in the JRResource reference and otherwise acts
as a normal label.

If you want to provide links to the reports, you can use
JRResourceLink component which takes in JRResource.

Br,
Juha

On Mon, May 4, 2009 at 8:42 AM, raviJPYADAV ravijpya...@yahoo.co.in wrote:

 Hi , can you please share some sample code how to integrate this api with our
 code?

 --Ravi

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



Re: Get tag type?

2009-05-04 Thread nino martinez wael
So no way to make this a little more pretty?:

public void onRendered(final Component component) {
super.onRendered(component);
HeaderResponse headerResponse=new HeaderResponse(){

@Override
protected Response getRealResponse() {
return component.getResponse();
}
};
headerResponse.renderOnDomReadyJavascript(getNiftyJS(tagName));
}

What I had before was essentially this:

@Override
public void renderHead(IHeaderResponse response) {
response.renderOnLoadJavascript(getNiftyJS(tagName));
}




2009/5/4 nino martinez wael nino.martinez.w...@gmail.com:
 Ohh ok thanks :)

 My memory are rusty:) I've done this before :)


 2009/5/3 Johan Compagner jcompag...@gmail.com:
 You only can know then when it is getting rendered so not before.

 So for example the onComponentTag methods of component/behavior

 On 03/05/2009, nino martinez wael nino.martinez.w...@gmail.com wrote:
 Hi

 How do I get the underlying tag type of a component (the tag the
 component are bound to)..

 For example

 div wicket:id=mycomponent/div

 I want to pickup div...

 -
 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



DropDownChoice with ChoiceRender problem

2009-05-04 Thread Phillip Rhodes
Hi everyone,
Sorry for posting this problem but I have been stuck for far too many hours on 
this.  Using wicket 1.4  Appreciate any help on this very very much.

I have a pojo object called address that has a property of handicapAccess
I am trying to bind this property to a dropdown list with 3 choices (formated 
as name/value)
Yes/Y
No/N
Unknown/U

If I use the constructor of ChoiceRenderer(String displayExpression), No error, 
but my property is bound as 
com.reffects.dmi.admin.wicket.address.detail.selectopt...@9aa8fd
If I use the constructor of ChoiceRenderer(java.lang.String displayExpression, 
java.lang.String idExpression), I get an error 
org.apache.wicket.WicketRuntimeException: No get method defined for class: 
class java.lang.String expression: id
Although my SelectOption class has getId/setId


ListSelectOption options = new ArrayListSelectOption();
options.add(new SelectOption(Yes, Y));
options.add(new SelectOption(No, N));
options.add(new SelectOption(Unknown, U));

//org.apache.wicket.WicketRuntimeException: No get method defined for class: 
class java.lang.String expression: id
ChoiceRenderer choiceRenderer = new ChoiceRenderer(name,id);

//this choice render gives it a
// 
handicapAccesscom.reffects.dmi.admin.wicket.address.detail.selectopt...@9aa8fd/handicapAccess
//ChoiceRenderer choiceRenderer = new ChoiceRenderer(name);
PropertyModel model = new PropertyModel(address, handicapAccess);

DropDownChoice ddc = new DropDownChoice(dropDownChoice, 
model,options,choiceRenderer);


//Here's my SelectOption
public class SelectOption implements Serializable {
/**
 * 
 */
private static final long serialVersionUID = 1L;
private String name;
private String id;

public SelectOption(String name, String id) {
this.name = name;
this.id = id;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getId() {
return id;
}

public void setId(String id) {
this.id = id;
}

}






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



Re: DropDownChoice with ChoiceRender problem

2009-05-04 Thread James Carman
The handicapAccess property is of type?

On Mon, May 4, 2009 at 2:29 PM, Phillip Rhodes
spamsu...@rhoderunner.com wrote:
 Hi everyone,
 Sorry for posting this problem but I have been stuck for far too many hours 
 on this.  Using wicket 1.4  Appreciate any help on this very very much.

 I have a pojo object called address that has a property of handicapAccess
 I am trying to bind this property to a dropdown list with 3 choices (formated 
 as name/value)
 Yes/Y
 No/N
 Unknown/U

 If I use the constructor of ChoiceRenderer(String displayExpression), No 
 error, but my property is bound as 
 com.reffects.dmi.admin.wicket.address.detail.selectopt...@9aa8fd
 If I use the constructor of ChoiceRenderer(java.lang.String 
 displayExpression, java.lang.String idExpression), I get an error 
 org.apache.wicket.WicketRuntimeException: No get method defined for class: 
 class java.lang.String expression: id
 Although my SelectOption class has getId/setId


 ListSelectOption options = new ArrayListSelectOption();
 options.add(new SelectOption(Yes, Y));
 options.add(new SelectOption(No, N));
 options.add(new SelectOption(Unknown, U));

 //org.apache.wicket.WicketRuntimeException: No get method defined for class: 
 class java.lang.String expression: id
 ChoiceRenderer choiceRenderer = new ChoiceRenderer(name,id);

 //this choice render gives it a
 // 
 handicapAccesscom.reffects.dmi.admin.wicket.address.detail.selectopt...@9aa8fd/handicapAccess
 //ChoiceRenderer choiceRenderer = new ChoiceRenderer(name);
 PropertyModel model = new PropertyModel(address, handicapAccess);

 DropDownChoice ddc = new DropDownChoice(dropDownChoice, 
 model,options,choiceRenderer);


 //Here's my SelectOption
 public class SelectOption implements Serializable {
        /**
         *
         */
        private static final long serialVersionUID = 1L;
        private String name;
        private String id;

        public SelectOption(String name, String id) {
                this.name = name;
                this.id = id;
        }

        public String getName() {
                return name;
        }

        public void setName(String name) {
                this.name = name;
        }

        public String getId() {
                return id;
        }

        public void setId(String id) {
                this.id = id;
        }

 }






 -
 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: Internationalized titles

2009-05-04 Thread Martijn Dashorst
why not use a wicket:message ?

Martijn

On Mon, May 4, 2009 at 8:08 PM, Jeremy Thomerson
jer...@wickettraining.com wrote:
 add(new Label(appTitle, new ResourceModel(your.title.key));

 also, change your html:
 title wicket:id=appTitlethis will be replaced/title

 Of course, if you don't use markup inheritance, you'll need to repeat
 this throughout each page.

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




 On Mon, May 4, 2009 at 1:02 PM, Shelah Horvitz
 shelah.horv...@blackwave.tv wrote:
 I want to internationalize the title of my application, so that I would get 
 its value from a properties file, and the HTML would look something like:

 head
  titlespan wicket:id=appTitle/span/title
 /head

 It doesn't look like I can use a header contributor to do this sort of 
 thing, so how is it done?

 Thanks for your help.

 Shelah


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





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

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



Re: Internationalized titles

2009-05-04 Thread James Carman
One reason would be to let subclasses actually override it with a more
complex model, if need be.  The method in the superclass (assuming
you're using markup inheritance) would be like this:

public IModelString getTitleModel()
{
  return new ResourceModel(page.title, [TITLE]);
}

But, subclasses could override this in case they have something else
they want to display in the title (with other information from the
current page for example).

On Mon, May 4, 2009 at 3:33 PM, Martijn Dashorst
martijn.dasho...@gmail.com wrote:
 why not use a wicket:message ?

 Martijn

 On Mon, May 4, 2009 at 8:08 PM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
 add(new Label(appTitle, new ResourceModel(your.title.key));

 also, change your html:
 title wicket:id=appTitlethis will be replaced/title

 Of course, if you don't use markup inheritance, you'll need to repeat
 this throughout each page.

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




 On Mon, May 4, 2009 at 1:02 PM, Shelah Horvitz
 shelah.horv...@blackwave.tv wrote:
 I want to internationalize the title of my application, so that I would get 
 its value from a properties file, and the HTML would look something like:

 head
  titlespan wicket:id=appTitle/span/title
 /head

 It doesn't look like I can use a header contributor to do this sort of 
 thing, so how is it done?

 Thanks for your help.

 Shelah


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





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

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



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



Re: Wicketstuff-core issue

2009-05-04 Thread Martin Funk


Am 04.05.2009 um 19:32 schrieb Jeremy Thomerson:

Regarding jetty - not sure - hopefully one of the Maven mavens will  
speak up.




hmmm..
how about beeing a little more specific about the 'does not work for  
me' part.

which command is issued on which codebase?

svn info

comes in hand for that

also which error message is seen?

for maven version issues the
mvn help:effective-pom
is quite helpful

mf


Regarding jar - It's not a jar project, it's a pom project.  There
won't be a jar.  There are nightly builds, but the TeamCity server
always has vcs connection issues - so sometimes the builds don't work.
If you search the list, you will see where I have posted links in the
past to my own build server on wickettraining.com that you are welcome
to use if necessary.

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




On Mon, May 4, 2009 at 12:17 PM, Kaspar Fischer h...@rapsak.com  
wrote:
I have a minor issue with wicket-stuff core. I don't know where to  
report it
to, so I hope it's fine if I post here. (Wicket JIRA probably isn't  
the

right place and Wicketstuff JIRA does not contain a project
'wicketstuff-core'.)

The pom.xml does not work for me with Maven 2.1.0. If I change

  plugin
 groupIdorg.mortbay.jetty/groupId
 artifactIdmaven-jetty-plugin/artifactId
  /plugin

to

  plugin
 groupIdorg.mortbay.jetty/groupId
 artifactIdmaven-jetty-plugin/artifactId
 version6.1.10/version
  /plugin

it works.

Kaspar

P.S. Just to be sure: I found no JAR in the maven repository [1],  
so assume
that there are no nightly builds for this project and I have to  
compile

myself, right?

[1]
http://wicketstuff.org/maven/repository/org/wicketstuff/wicketstuff-core/1.4-SNAPSHOT/

-
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: Automatically adding a parameter to every link?

2009-05-04 Thread Matt Welch

I'm not worried about the multiple window thing. FWIW I believe that value is
set to true by default anyway. I'm just wondering if there's a way to add a
parameter to each link on page to ensure that the next page stays in the
same context. 

For instance, when I was trying to solve an unrelated problem, the servlet
filter I was working with tied itself directly into the response.encodeUrl()
method so that each call to that method would also use the filter's specific
instructions as well. 

I was hoping that there might be something similar for links in Wicket where
every link, no matter how it's generated (except manually in HTML, of
course) would be handled by a particular method that I could put a hook into
to make sure my context specific request parameter got added.

-Matt





Martin Funk-3 wrote:
 
 maybe automatic multi window support might help you
 
 this can be turned on like this in the init method of your Application.
 
   /**
* @see org.apache.wicket.protocol.http.WebApplication#init()
*/
   @Override
   protected void init()
   {
   super.init();
   getPageSettings().setAutomaticMultiWindowSupport(true);
   }
 
 mf
 
 Am 03.05.2009 um 15:00 schrieb Matthew Welch:
 
 The data in the application that I'm working on is divided in any  
 number of
 different contexts. The pages displayed for each context are the  
 same but
 the data shown on those pages will be different depending on the  
 specific
 context. A logged in user might might have multiple pages (browser  
 windows)
 open at one time from any one of these contexts, otherwise I would  
 store the
 context in their session. As it stands I need to pass the context  
 around
 from page to page as a parameter. Is there an easy way to have this
 parameter automatically appended to all links on page as they are  
 rendered
 or generated?

 I suppose I could build my own set of Link components that look for  
 the
 existing context of a page and append that to themselves, and use  
 those
 links instead of the built in ones. Any other options?

 -Matt
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Automatically-adding-a-parameter-to-every-link--tp2338p23376936.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: Automatically adding a parameter to every link?

2009-05-04 Thread Igor Vaynberg
you can provide your own subclass of webresponse and override
encodeurl the same way. see WebApplication#newWebResponse

-igor

On Mon, May 4, 2009 at 2:25 PM, Matt Welch matt...@welchkin.net wrote:

 I'm not worried about the multiple window thing. FWIW I believe that value is
 set to true by default anyway. I'm just wondering if there's a way to add a
 parameter to each link on page to ensure that the next page stays in the
 same context.

 For instance, when I was trying to solve an unrelated problem, the servlet
 filter I was working with tied itself directly into the response.encodeUrl()
 method so that each call to that method would also use the filter's specific
 instructions as well.

 I was hoping that there might be something similar for links in Wicket where
 every link, no matter how it's generated (except manually in HTML, of
 course) would be handled by a particular method that I could put a hook into
 to make sure my context specific request parameter got added.

 -Matt





 Martin Funk-3 wrote:

 maybe automatic multi window support might help you

 this can be turned on like this in the init method of your Application.

       /**
        * @see org.apache.wicket.protocol.http.WebApplication#init()
        */
       @Override
       protected void init()
       {
               super.init();
               getPageSettings().setAutomaticMultiWindowSupport(true);
       }

 mf

 Am 03.05.2009 um 15:00 schrieb Matthew Welch:

 The data in the application that I'm working on is divided in any
 number of
 different contexts. The pages displayed for each context are the
 same but
 the data shown on those pages will be different depending on the
 specific
 context. A logged in user might might have multiple pages (browser
 windows)
 open at one time from any one of these contexts, otherwise I would
 store the
 context in their session. As it stands I need to pass the context
 around
 from page to page as a parameter. Is there an easy way to have this
 parameter automatically appended to all links on page as they are
 rendered
 or generated?

 I suppose I could build my own set of Link components that look for
 the
 existing context of a page and append that to themselves, and use
 those
 links instead of the built in ones. Any other options?

 -Matt




 --
 View this message in context: 
 http://www.nabble.com/Automatically-adding-a-parameter-to-every-link--tp2338p23376936.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



Apache Pivot vs Wicket

2009-05-04 Thread Antony Stubbs

Anyone checked out Apache Pivot yet?
http://incubator.apache.org/pivot/

It seems similar to Wicket - but I don't see any sine of a model  
type of thing to compare with...


Anyone got a comparison?

Regards,
Antony Stubbs,
NZ


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



Re: Apache Pivot vs Wicket

2009-05-04 Thread Igor Vaynberg
erm, on the first page:

Pivot applications are written using a combination of Java and XML and
can be run either as an applet or as a standalone (optionally offline)
desktop application.

so pivot apps run in a browser as an applet not as an html app. pretty
big difference right there.

-igor

On Mon, May 4, 2009 at 2:29 PM, Antony Stubbs antony.stu...@gmail.com wrote:
 Anyone checked out Apache Pivot yet?
 http://incubator.apache.org/pivot/

 It seems similar to Wicket - but I don't see any sine of a model type of
 thing to compare with...

 Anyone got a comparison?

 Regards,
 Antony Stubbs,
 NZ


 -
 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



Selenium-ide support

2009-05-04 Thread Antony Stubbs
I've read the selenium threads on here but i'm interested in the  
current state of play. Does anyone have a setup where you can use  
selenium-ide to record tests and play them back without having to  
modify them? this is in respect to the whole id generation thing.  
selenium-ide only seems to use the id to find components.


i'm not talking about selenium-rc hand coding etc... I've seen the  
wicket-bench support:

http://www.laughingpanda.org/~inhuman/wicket-bench/docs/features-0.5.html

Regards,
Antony Stubbs,
NZ


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



Re: Internationalized titles

2009-05-04 Thread Jeremy Thomerson
Yeah - that's what I've done on several sites.

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




On Mon, May 4, 2009 at 2:38 PM, James Carman
jcar...@carmanconsulting.com wrote:
 One reason would be to let subclasses actually override it with a more
 complex model, if need be.  The method in the superclass (assuming
 you're using markup inheritance) would be like this:

 public IModelString getTitleModel()
 {
  return new ResourceModel(page.title, [TITLE]);
 }

 But, subclasses could override this in case they have something else
 they want to display in the title (with other information from the
 current page for example).

 On Mon, May 4, 2009 at 3:33 PM, Martijn Dashorst
 martijn.dasho...@gmail.com wrote:
 why not use a wicket:message ?

 Martijn

 On Mon, May 4, 2009 at 8:08 PM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
 add(new Label(appTitle, new ResourceModel(your.title.key));

 also, change your html:
 title wicket:id=appTitlethis will be replaced/title

 Of course, if you don't use markup inheritance, you'll need to repeat
 this throughout each page.

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




 On Mon, May 4, 2009 at 1:02 PM, Shelah Horvitz
 shelah.horv...@blackwave.tv wrote:
 I want to internationalize the title of my application, so that I would 
 get its value from a properties file, and the HTML would look something 
 like:

 head
  titlespan wicket:id=appTitle/span/title
 /head

 It doesn't look like I can use a header contributor to do this sort of 
 thing, so how is it done?

 Thanks for your help.

 Shelah


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





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

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



 -
 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: Automatically adding a parameter to every link?

2009-05-04 Thread Eyal Golan
In short,
what does it mean exactly Multi Window Support ?

Eyal Golan
egola...@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary


On Mon, May 4, 2009 at 1:06 PM, Martin Funk mafulaf...@googlemail.comwrote:

 maybe automatic multi window support might help you

 this can be turned on like this in the init method of your Application.

/**
 * @see org.apache.wicket.protocol.http.WebApplication#init()
 */
@Override
protected void init()
{
super.init();
getPageSettings().setAutomaticMultiWindowSupport(true);
}

 mf

 Am 03.05.2009 um 15:00 schrieb Matthew Welch:


  The data in the application that I'm working on is divided in any number
 of
 different contexts. The pages displayed for each context are the same but
 the data shown on those pages will be different depending on the specific
 context. A logged in user might might have multiple pages (browser
 windows)
 open at one time from any one of these contexts, otherwise I would store
 the
 context in their session. As it stands I need to pass the context around
 from page to page as a parameter. Is there an easy way to have this
 parameter automatically appended to all links on page as they are rendered
 or generated?

 I suppose I could build my own set of Link components that look for the
 existing context of a page and append that to themselves, and use those
 links instead of the built in ones. Any other options?

 -Matt





Re: Internationalized titles

2009-05-04 Thread Luther Baker
I've setup and used this approach with success as well ...
public class ChildPage extends MasterLayoutPage
{
public ChildPage()
{
   super(new Model ...);
}

One interesting factoid ... depending on how you actually mark this up,
DEVELOPMENT mode can look a bit screwy. It is my experience that the wicket
markup tags actually render in the title bar. I believe that was one problem
I had with using something like

titlewicket:message...//title

-Luther


On Mon, May 4, 2009 at 5:01 PM, Jeremy Thomerson
jer...@wickettraining.comwrote:

 Yeah - that's what I've done on several sites.

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




 On Mon, May 4, 2009 at 2:38 PM, James Carman
 jcar...@carmanconsulting.com wrote:
  One reason would be to let subclasses actually override it with a more
  complex model, if need be.  The method in the superclass (assuming
  you're using markup inheritance) would be like this:
 
  public IModelString getTitleModel()
  {
   return new ResourceModel(page.title, [TITLE]);
  }
 
  But, subclasses could override this in case they have something else
  they want to display in the title (with other information from the
  current page for example).
 
  On Mon, May 4, 2009 at 3:33 PM, Martijn Dashorst
  martijn.dasho...@gmail.com wrote:
  why not use a wicket:message ?
 
  Martijn
 
  On Mon, May 4, 2009 at 8:08 PM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
  add(new Label(appTitle, new ResourceModel(your.title.key));
 
  also, change your html:
  title wicket:id=appTitlethis will be replaced/title
 
  Of course, if you don't use markup inheritance, you'll need to repeat
  this throughout each page.
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
 
 
  On Mon, May 4, 2009 at 1:02 PM, Shelah Horvitz
  shelah.horv...@blackwave.tv wrote:
  I want to internationalize the title of my application, so that I
 would get its value from a properties file, and the HTML would look
 something like:
 
  head
   titlespan wicket:id=appTitle/span/title
  /head
 
  It doesn't look like I can use a header contributor to do this sort of
 thing, so how is it done?
 
  Thanks for your help.
 
  Shelah
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 
  --
  Become a Wicket expert, learn from the best: http://wicketinaction.com
  Apache Wicket 1.3.5 is released
  Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
  -
  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: Putting HTML files in src/main/webapp

2009-05-04 Thread Alan Garfield
On Mon, 2009-05-04 at 08:55 -0400, Richard Allen wrote:
 If you are using packagingwar/packaging, then the maven-war-plugin will
 automatically pick up the resources in src/main/webapp, which means you do
 not have to configure that directory as a resource. Additionally, the
 maven-resources-plugin automatically picks up resources in
 src/main/resources, so you don't have to explicitly configure that either.
 Try removing that configuration and see what happens.


Thanks for that, but that's not really my issue. How do I make Wicket
find the .html files in the root of the war? The hack I have with maven
at the moment properly constructs the war by copying all the .html files
into the classes folder for Wicket to find, but maven also helpfully
copies them into the war's root as well creating duplicates in the war.
This is what I'm trying to stop as it makes the war bigger than it needs
to be, and is confusing to other developers if they look at the war.

I've also tried to make Wicket load it's .html files from the root of
the war, but I cannot seem to get the incantation right. I've tried to
follow :-

http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html#ControlwhereHTMLfilesareloadedfrom-InWicket1.3

but I'm having little success.

Thanks,
Alan.



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



Re: Putting HTML files in src/main/webapp

2009-05-04 Thread James Carman
What's the justification of having them in src/main/webapp again?

On Mon, May 4, 2009 at 8:28 PM, Alan Garfield a...@fromorbit.com wrote:
 On Mon, 2009-05-04 at 08:55 -0400, Richard Allen wrote:
 If you are using packagingwar/packaging, then the maven-war-plugin will
 automatically pick up the resources in src/main/webapp, which means you do
 not have to configure that directory as a resource. Additionally, the
 maven-resources-plugin automatically picks up resources in
 src/main/resources, so you don't have to explicitly configure that either.
 Try removing that configuration and see what happens.


 Thanks for that, but that's not really my issue. How do I make Wicket
 find the .html files in the root of the war? The hack I have with maven
 at the moment properly constructs the war by copying all the .html files
 into the classes folder for Wicket to find, but maven also helpfully
 copies them into the war's root as well creating duplicates in the war.
 This is what I'm trying to stop as it makes the war bigger than it needs
 to be, and is confusing to other developers if they look at the war.

 I've also tried to make Wicket load it's .html files from the root of
 the war, but I cannot seem to get the incantation right. I've tried to
 follow :-

 http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html#ControlwhereHTMLfilesareloadedfrom-InWicket1.3

 but I'm having little success.

 Thanks,
 Alan.



 -
 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



Request to improve documentation of onRuntimeException

2009-05-04 Thread Peter Ross
Hi,

I'm looking at overriding onRuntimeException[1]to do some cleanup if
there was an exception,however I want the standard error handling page
to be displayed.

I thought I would need use getInternalErrorPage and then do some
tricky stuff to instantiate it, but after inspecting
AbstractRequestCycleProcessor then it appears that just returning null
is sufficient to get the standard wicket error handling page.

It would be nice if the documentation stated that returning null will
leave it up to the RequestCycleProcessor to display what page to
display, and that the standard wicket RequestCycleProcessor will
simply display the default error page in this case.

Regards
Pete

[1] 
http://wicket.apache.org/docs/1.4/org/apache/wicket/RequestCycle.html#onRuntimeException(org.apache.wicket.Page,%20java.lang.RuntimeException)

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



Re: Putting HTML files in src/main/webapp

2009-05-04 Thread Alan Garfield
On Mon, 2009-05-04 at 21:07 -0400, James Carman wrote:
 What's the justification of having them in src/main/webapp again?

Separates the code from the templates so the designers don't have to
checkout the whole project, also keeps all the content in one directory.
Even though they are dynamic template files for wicket there is a
certain amount of static stuff that would be nice to be in one place.

Additionally, under Netbeans it seems to me to be rather daft that there
is a folder is called Web Pages in the project view but all it
contains is image/binary files and the WEB-INF directory. But the actual
HTML files end up in the Source Packages or worse Other Sources
folder. I understand the reasons for putting them in the source packages
directories but it's not an ideal solution to my mind and my team.

Looking at the debug from org.apache.wicket.util.resource it looks like
Wicket already looks for all and sundry anyway. How do I make it look in
the webroot?

Thanks,
Alan.



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



Re: Automatically adding a parameter to every link?

2009-05-04 Thread Matt Welch



igor.vaynberg wrote:
 
 you can provide your own subclass of webresponse and override
 encodeurl the same way. see WebApplication#newWebResponse
 
 -igor
 
Thanks. That's exactly the kind of thing I was looking for. I'll look into
it. 

-Matt

-- 
View this message in context: 
http://www.nabble.com/Automatically-adding-a-parameter-to-every-link--tp2338p23380118.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 Offline Applications

2009-05-04 Thread taha siddiqi
A popular Indian product FINACLE has an applet which kind of acts as a
fat client and each time a customer detail or scheme detail is fetched
the whole detail gets downloaded into the applet. But it is not an
pure offline application as only the current page can we viewed or
changed and every time you try to commit,  it searches for the
network.

May be it helps
taha


On Sun, May 3, 2009 at 10:34 PM, Carlo Camerino cmcamer...@gmail.com wrote:
 hmm,
 ya i guess you're right.
 -- further i would look into security of gears, how easy is it for
 -- someone to access the underlying data store?

 this will be the major issue.
 sad to say, i don't know how safe is this
 with the branch servers i'm safer.

 i don't really know how google gears plays out yet.
 thanks for all the inputs.

 On Mon, May 4, 2009 at 12:25 AM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:

 you already said each branch has their own server, so why not simply
 make this server sync to the central server when the connection is
 available.

 your argument for administering cost does not make sense as you are
 heading down the fat client path so instead of having a single server
 per branch to administer you will have every fat client app instance
 to administer.

 further i would look into security of gears, how easy is it for
 someone to access the underlying data store?

 -igor

 On Sun, May 3, 2009 at 4:35 AM, Carlo Camerino cmcamer...@gmail.com wrote:
  just to add, we don't have any plan of exposing this to the public (retail)
  but rather only to people within organization.
  so maybe we could have some sort of control.
  I don't know the implications of opening offline banking applications to 
  the
  public yet :P and i don't really see any usecase for this type of
  applications for now.
 
  btw, it's not that easy to target a larger set of people if you are using
  Fat Web clients.
  Just my two cents. bandwidht, cpu considerations, etc... maybe it depends 
  on
  your geographical location
 
  On Sun, May 3, 2009 at 7:27 PM, Carlo Camerino cmcamer...@gmail.com 
  wrote:
 
  There are really a lot of things i have to consider.
  Especially security.
 
  Here Are Some Of The Considerations I Guess
 
  1.) To View (Subset) Records But Not Edit Or Delete Them
  2.) Users must not be able to edit reference tables. Tables that are
  referenced by others.
  3.) Users must be able to enter transactions(Purely Insert,Transaction
  Recording Only) with client side validation and observance of limits and
  rules of course which were defined during online mode. ( Store This Queue
  Somewhere)
 
  I'm not reallyh sure that I want to go through with this however, this is
  just a prototype idea.
 
 
  On Sun, May 3, 2009 at 4:55 PM, Johan Compagner 
  jcompag...@gmail.comwrote:
 
  I cannot believe that a typical wicket application (and a banking app
  fall under that category) does well in offline mode, to me offline
  mode works if the app is just about personal data (like gmail for your
  email) because if that is not the case and loads of none peronal ==
  shared data is used, how are you pushing that to the client? Maybe if
  the data is not thah much (not very likely  in a banking app if you
  ask me) then you can push it to the client. But then when he gets
  online again you have to merge everything and resolve conflicts in the
  data...
 
  But wicket doesnt really play well for this at all. GWT or just
  another fat client like air or just java webstart would be better
 
  On 03/05/2009, Carlo Camerino cmcamer...@gmail.com wrote:
   hmm, you have a point here.however, every requirement is different.
  
   I know that it may sound weird, but still I believe that it depends on
  the
   nature of the application.
   There are lots of types of applications that banks use.
   Some I know would have to always have a central server managing it.
  
   There are different types of Technical Architectures that we cater for
  in
   our applications.
   There are some applicationms that always require online mode regardless
  adn
   there are applications that the user just
   needs to be able to view customer information ,etc
  
  
   actually it's hard to decide here.
   on the downside, I heard that GWT consumes a lot of resources on the
  client
   side, it's also a consideration.
  
   Failsafe servers are of course an option but again, the network is 
   still
  a
   factor here.
   For example a very slow connection to the central server makes my
   productivity a lot less.
   Some places suffer from low bandwidth, unreliable networks, etc...
  
   I saw the value of distributed or offline applications that uses
   synchronization.
   It will be harder for the developers of course sicne they have to cater
  to
   two modes.
   On Sun, May 3, 2009 at 1:55 PM, Vladimir K koval...@gmail.com wrote:
  
  
   I would install failsafe cluster rather satisfying every client 
   request
   about
   offline workability. You may end up 

Wicket SWFObject

2009-05-04 Thread Douglas Ferguson
Has anybody successfully got SWFObject to work on a wicket page?

Douglas


Re: wicket-jasper UI

2009-05-04 Thread raviJPYADAV

Thanks Juha for your reply, though i wanted some java sample code but
whatever instruction you have written is sufficient for me i think.

--Ravi

Juha Palomäki wrote:
 
 Here are some rough instructions. If you for example want to embed the
 HTML report on a web page, you need:
 - instance of JRResource (there are several implementations, depending
 on what kind of output you want to have)
 - a  report (either as File or as InputStream)
 - datasource
 
 1. Instantiate new JRHtmlResource, pass the File or InputStream to the
 constructor, depending on where you compiled report-file is coming
 from.
 
 2. Use the setConnectionProvider to pass in an implementation of
 IDatabaseConnectionProvider that will return a JDBC connection to the
 database
 
 3. Specify report parameters with setReportParameters method. At least
 some older versions require you to do this even if you don't have
 parameters to pass (you can use an empty map).
 
 4. In order to render the report, you just use EmbeddedHtmlReport
 component, which takes in the JRResource reference and otherwise acts
 as a normal label.
 
 If you want to provide links to the reports, you can use
 JRResourceLink component which takes in JRResource.
 
 Br,
 Juha
 
 On Mon, May 4, 2009 at 8:42 AM, raviJPYADAV ravijpya...@yahoo.co.in
 wrote:

 Hi , can you please share some sample code how to integrate this api with
 our
 code?

 --Ravi
 
 -
 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/wicket-jasper-UI-tp22634657p23381203.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 SWFObject

2009-05-04 Thread Douglas Ferguson
I just figured out that the deal is that SWFObject doesn't like to be set 
visible false on page load then visible true via Ajax.

Any thoughts on how to get around this?

D/

-Original Message-
From: Douglas Ferguson [mailto:doug...@douglasferguson.us]
Sent: Tuesday, May 05, 2009 12:20 AM
To: users@wicket.apache.org
Subject: Wicket  SWFObject

Has anybody successfully got SWFObject to work on a wicket page?

Douglas

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