Re: Form processing issues and questions (particularly related to Border and ListMultipleChoice)

2009-09-01 Thread Martin Makundi
> However, on the second call to
> updateModel, one of the first things done is to call clear() on my model
> object, which clears the converted input as well (since they are the
> same collection).  This results in the loss of my converted input, which
> in turn, blanks out my model.  I have worked around this particular
> issue by insuring that my model object is never null in the first place
> -> if null, I make sure it is an empty collection in onBeforeRender...

If you are tweaking like this you should override the place where
setting the model internally clears the state. InternalonUpdate or
something, that worked for us... until we found a better more clean
way to deal with it alltogether. Maybe post your code here for
comments? "hacking" near the edges of functionality is always a bad
idea.

> 1.)     Should I always code expecting that it is normal behavior for
> convertInput/updateModel to be called on my FormComponent instances more
> than once?

I would expect it to be called n times depending on the particular
context. It is bad design to RELY on a certain number of calls if the
framework does not constrain this and if the OTHER programmer is not
aware. Someone (or yourself when you forget about it) will break it
for sure so do not rely on this.>

**
Martin

>
>
>
> Thanks for any insight!
>
>
>
>

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



Form processing issues and questions (particularly related to Border and ListMultipleChoice)

2009-09-01 Thread Crabb, Curtis
I am hoping that someone can shed some light upon a few questions I have
around how Borders affect form processing.  I have a Border that I
commonly use within my application.  When using this Border, I have
noticed that all my FormComponents are being processed twice
(validateRequired, convertInput, validateValidators, and updateModel all
are called twice).

 

I have traced this down to the fact that both
Form.visitFormComponentsPostOrder and
Form.internalUpdateFormComponentModels initiate a second pass when the
form's parent is a Border object (although these methods are slightly
different -> one only looks to the immediate parent while the other
traverses up all parents looking for a Border).

 

First of all, is it expected behavior that conversion, validation, and
updateModel can be called more than once per FormComponent during form
processing?  I would have expected that these methods would only be
called once per request cycle (in particular, with updateModel).  If
this is not the case, I need to change my mindset a bit when it comes to
developing FormComponents.  Generally speaking, my implementations as
well as Wicket's default FormComponent subclasses work fine when these
methods are called twice.  However, this is not always the case.

 

For example, with ListMultipleChoice, a second call to these methods
ends up updating the model incorrectly if my original model object value
is null.  The first call to updateModel in this case sets my model value
to be the same instance as getConvertedInput(), which appropriately
places my selected items in the model.  However, on the second call to
updateModel, one of the first things done is to call clear() on my model
object, which clears the converted input as well (since they are the
same collection).  This results in the loss of my converted input, which
in turn, blanks out my model.  I have worked around this particular
issue by insuring that my model object is never null in the first place
-> if null, I make sure it is an empty collection in onBeforeRender...

 

So I have two primary questions:

 

1.) Should I always code expecting that it is normal behavior for
convertInput/updateModel to be called on my FormComponent instances more
than once?

2.) Is it necessary that Borders cause a second pass?  Part of me
tends to want to steer away from Borders if this is the case... although
I really love what they provide me.

 

Thanks for any insight!

 



Re: Modal window position - always centred, even on long page

2009-09-01 Thread mfs

Igor,

Thanks..what you suggested worked. I was making a mistake in adding the
javascript, it wasnt getting included due to a missing wicket:link tag.

Farhan



mfs wrote:
> 
> I believe what you are suggesting requires modifying the ModalWindow class
> where the modal.js is added.  Am i right ? Because without that I am not
> sure how can i ensure that my snippet is added/rendered after the modal.js
> on my wicket page. I have tried adding the js-snippet on my wicket page
> (after the modal-window div tag) but it doesn't work.
> 
> I am just trying to avoid adding a dependency on the new/custom
> wicket-extensions.jar (with the modified modal center method) and rely on
> the 1.3.6 version only.
> 
> Thanks
> Farhan.
> 
> 
> 
> igor.vaynberg wrote:
>> 
>> Simply include a js snippet after the modal.js that overrides the method.
>> 
>> -igor
>> 
>> 
>> On 8/31/09, mfs  wrote:
>>>
>>> Hi Steve,
>>>
>>> I have come across a scenario where I need to provide custom
>>> implementation
>>> for the Wicket.Window.prototype.center method. The question I had was,
>>> that
>>> is there anyway I can override this method without injecting the new
>>> modified modal.js (i.e. with the custom center() method impl) in the
>>> wicket-extensions.jar.
>>>
>>> Thanks
>>> Farhan.
>>>
>>>
>>> German Morales-3 wrote:

 Hi Steve,

 I answer quickly with some ideas, perhaps it helps.

 It seems that you need a different implementation of the center method
 provided by ModalWindow.

 You can see the original in modal.js, in the package
 org.apache.wicket.extensions.ajax.markup.html.modal.res of the
 wicket-extensions.
 You should attempt centering the window to the current browser window,
 instead of the viewport.

 You could provide an own javascript with a content like:

Wicket.Window.prototype.center = function() {
   // your own version
};

 Hope this helps,

 German


 2009/1/23 Steve Swinsburg 

> Hi all,
>
> I have a fairly long page making use of Modal Windows, and any
> ModalWindow
> that I place onto this page always renders in the exact centre of the
> page
> (vertically). So if the button that opens the window is at the top,
> you
> need
> to scroll down to get to the window. Likewise if the button is at the
> bottom, you'll need to scroll up. This is a pain because sometimes the
> screen just dims out but the window is off screen.
>
> How can I control where the Modal Window is placed on the screen
> vertically? Doesn't seem to be any options.
>
> BTW this is inside an iframe which takes up most of the screen (but
> not
> all). Ideally I'd like the mask to extend over the whole window, not
> just
> the part that the iframe is in (which it currently does, but I can
> live
> with
> that)
>
>
> cheers,
> Steve
>
>
>
>
>


>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Modal-window-position---always-centred%2C-even-on-long-page-tp21629148p25229119.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
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Modal-window-position---always-centred%2C-even-on-long-page-tp21629148p25251492.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: Palette rendering issue

2009-09-01 Thread Jeremy Thomerson
If you want to replace any html for a component, simply put it in your
source tree at the same location it would appear in Wicket's jar.  As long
as your jar takes precedence on your classpath (which is usually the case
since you build yours into the war and wicket goes in the lib dir), then
your file will be loaded instead.

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



On Tue, Sep 1, 2009 at 8:25 PM, Troy Cauble  wrote:

> When "rows" is small, say 4, and "allowOrder" is false, Palette
> renders less than perfectly.
>
> I think it's due to a couple of extra  s left in the buttons panel
> when the order buttons are made invisible.
>
> Is there any way I could replace that Palette.html without replacing
> the whole component?  Or maybe CSS "magic" could work around this?
>
> Thanks,
> -troy
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: [OT] OWasp Vulnerability Validation

2009-09-01 Thread Doug Leeper

Nino,

Further searching found a lot more information...but it is scattered.  I was
hoping that someone may have aggregated a quick tip sheet about these
vulnerabilities and how Wicket can/does help...but haven't found the "golden
ticket" yet.

I was also hoping that someone has had experience in using an automated tool
in helping to validate a web app against these vulnerabilities.  If so, do
they recommend any particular one and what are the pros/cons?

I will compile a list of information that specifically addresses these
vulnerabilities and the different options and post to get a review from the
community.

Thanks
- Doug

BTW...I did find the following links in Wicket's Nabble that were very
useful...I originally used Google to do my search...but should have gone
here first to look.

http://www.nabble.com/Security-Features-offered-by-Wicket-to15738864.html#a15738864
http://www.nabble.com/How-to-protect-against-Session-Fixation-attacks--tp18734278p18734278.html
http://www.nabble.com/CSRF-Protection%3A-double-submitted-cookie-tp20065995p20067039.html
https://issues.apache.org/jira/browse/WICKET-1767
https://issues.apache.org/jira/browse/WICKET-1782
-- 
View this message in context: 
http://www.nabble.com/-OT--OWasp-Vulnerability-Validation-tp25225742p25250738.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



Palette rendering issue

2009-09-01 Thread Troy Cauble
When "rows" is small, say 4, and "allowOrder" is false, Palette
renders less than perfectly.

I think it's due to a couple of extra  s left in the buttons panel
when the order buttons are made invisible.

Is there any way I could replace that Palette.html without replacing
the whole component?  Or maybe CSS "magic" could work around this?

Thanks,
-troy

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



Re: UTF-8

2009-09-01 Thread Eelco Hillenius
>> But I'm sure you can write a properties implementation that reads from
>> UTF-8 in a few hours max, especially now that you have an example in
>> Tapestry's code. Patch is welcome :-)
>
> Why not just "borrow" the code from Tapestry?  It's Apache licensed of
> course, so no issues there.

Sure, if it makes sense. But it needs to fit in Wicket's framework,
and I don't know how Tapestry specific that code for handling those
UTF-8 properties files in Tapestry is.

Eelco

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



Re: FeedbackPanel not displaying in IE6

2009-09-01 Thread Dane Laverty
Good call. Looks like it's a Peek-a-boo bug (
http://www.positioniseverything.net/explorer/peekaboo.html ). Sometimes I
get so excited about my Java work that I forget my basic HTML and CSS
pitfalls.

Dane


On Tue, Sep 1, 2009 at 11:57 AM, Matej Knopp  wrote:

> This is most likely related to your styling. Wicket only generates
> simple ul/li markup that shouldn't trigger any IE6 bugs.
>
> -Matej
>
> On Tue, Sep 1, 2009 at 8:51 PM, Dane Laverty wrote:
> > The FeedbackPanel on my site is not displaying in IE6, unless the user
> > minimizes and restores the browser window. I would imagine other Wicket
> > developers have run into this, but I don't see anything about in in the
> > archives. Does anyone have a solution?
> >
> > Dane
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Dynamic Optgroups in Wicket

2009-09-01 Thread Michael O'Cleirigh

Hi Gary,


Hi,I am kind of new to Wicket and am having a difficult time finding some 
decent info on creating optgroups within selects.I basically have a structured 
list in my DB which in turn has children - perfect solution would be to use 
dynamically generated optgroups with their children which will of course be 
option tags.All the examples containing optgroups seem to have the optgroups 
fixed in markup with no wicket:ids.Any thoughts would be most welcomed.Gary
  


I created a custom implementation of SelectOptions and SelectOption (in 
wicket-extensions) that I use to render the optgroups.  What I do is use 
a wrapping object that contains the business object and the name of the 
optgroup and if it is the first or last wrapping object with that 
particular optgroup name.


Then I override the SelectOptions.newOption(...) to wire in my custom 
CustomSelectOption.  Note that newOption() is called in order for each 
option in the list so tracking the last optiongroup name can be used to 
determine if its changed or not. i.e. if the 
Custom.SlectOption.startOptionGroup or the 
CustomSelectOption.endOptionGroup parameter should be true or false.


This is the only change in the selectOption:

   @Override
   protected void onRender(MarkupStream markupStream) {

   /*
* Write out the option group wrappings if this is the first or 
last option in a particular group.

*/
   if (startOptionGroup) {
   getResponse().write(""\">" + optionGroupName + "\n");

   }
   super.onRender(markupStream);
  
   if (endOptionGroup) {

   getResponse().write("\n");
   }
   }

The setting of the start and end flags are handled in 
SelectOptions.newOption(...) and then the above code is used to render 
the options into optiongroups.


Let me know if you need more details,

Regards,

Mike


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



Re: FeedbackPanel not displaying in IE6

2009-09-01 Thread Matej Knopp
This is most likely related to your styling. Wicket only generates
simple ul/li markup that shouldn't trigger any IE6 bugs.

-Matej

On Tue, Sep 1, 2009 at 8:51 PM, Dane Laverty wrote:
> The FeedbackPanel on my site is not displaying in IE6, unless the user
> minimizes and restores the browser window. I would imagine other Wicket
> developers have run into this, but I don't see anything about in in the
> archives. Does anyone have a solution?
>
> Dane
>

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



FeedbackPanel not displaying in IE6

2009-09-01 Thread Dane Laverty
The FeedbackPanel on my site is not displaying in IE6, unless the user
minimizes and restores the browser window. I would imagine other Wicket
developers have run into this, but I don't see anything about in in the
archives. Does anyone have a solution?

Dane


Re: UTF-8

2009-09-01 Thread James Carman
On Tue, Sep 1, 2009 at 12:00 PM, Eelco
Hillenius wrote:
> But I'm sure you can write a properties implementation that reads from
> UTF-8 in a few hours max, especially now that you have an example in
> Tapestry's code. Patch is welcome :-)
>

Why not just "borrow" the code from Tapestry?  It's Apache licensed of
course, so no issues there.

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



Re: UTF-8

2009-09-01 Thread Eelco Hillenius
On Tue, Sep 1, 2009 at 1:19 AM, Olivier
Bourgeois wrote:
> That's exactly what I said : I had to use XML properties files to have
> UTF-8 localized properties.
>
> You can't use simple properties format because Java can't handle
> natively anything else than ISO. We use also Tapestry here, and you
> can use UTF-8 properties files (thanks to the wrapper around native
> Java properties).

Ah, right. Well reading is an art :-)

It's been a while, but I think I considered 'fixing' or otherwise
supporting loading in regular properties files through UTF-8, but
decided against it because it would be non-standard even in newer JDK
versions, and the newer JDKs already had a solution for reading
properties in UTF-8 with xml files.

But I'm sure you can write a properties implementation that reads from
UTF-8 in a few hours max, especially now that you have an example in
Tapestry's code. Patch is welcome :-)

Eelco

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



Re: Wicket YUI integration

2009-09-01 Thread Peter Thomas
Not really answering OP but was wondering if anyone started thinking about
targeting YUI 3 and whether it has to be a re-write of existing wicket-stuff
YUI.

This link is a good source of YUI 3 changes info (slides, video):
http://yuiblog.com/blog/2009/05/12/video-desai-yui3/

I really would like to contribute but my track record after being added as a
wicket-stuff committer ages back (0 lines checked in) speaks for itself :(

- Peter

On Tue, Sep 1, 2009 at 8:43 PM, Joshua Lim  wrote:

> Hi Frank
>
> there's Yui (2) integration in wicketstuff-core/yui great if you could add
> to it
>
> Josh
>
>
> 2009/8/31 Frank van Lankvelt 
>
> > we've been developing a wicket application for some time now, where
> > the client keeps pushing for more and more fancy UI components.
> > We've been building some of them by hand, including browser version
> > checks, and have some code to enable YUI widgets.
> > This is a costly business where we are severely hampered by
> > compatibility requirements. (IE6!)
> >
> > Are there widget libraries out there, in particular that integrate
> > with YUI, that I've been missing?
> >
> > Related to this, about a year ago there was a discussion about Wicket
> > Ajax Next Generation.
> > Does anyone know if that is still scheduled for Wicket 1.5?
> >
> > thanks, Frank
> >
> >
> > PS: I don't think it would be a problem to donate the code we have
> > developed so far (it's APL already),
> > though it would need to be decoupled from the rest of our code first.
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>


Re: Wicket YUI integration

2009-09-01 Thread Joshua Lim
Hi Frank

there's Yui (2) integration in wicketstuff-core/yui great if you could add
to it

Josh


2009/8/31 Frank van Lankvelt 

> we've been developing a wicket application for some time now, where
> the client keeps pushing for more and more fancy UI components.
> We've been building some of them by hand, including browser version
> checks, and have some code to enable YUI widgets.
> This is a costly business where we are severely hampered by
> compatibility requirements. (IE6!)
>
> Are there widget libraries out there, in particular that integrate
> with YUI, that I've been missing?
>
> Related to this, about a year ago there was a discussion about Wicket
> Ajax Next Generation.
> Does anyone know if that is still scheduled for Wicket 1.5?
>
> thanks, Frank
>
>
> PS: I don't think it would be a problem to donate the code we have
> developed so far (it's APL already),
> though it would need to be decoupled from the rest of our code first.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Dynamic Optgroups in Wicket

2009-09-01 Thread Eyal Golan
I'm not sure this is what you want, but have a look at this:
http://www.wicket-library.com/wicket-examples/ajax/choice
It's drop down with ajax.
What they did is setting in the model Map of values.

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 Tue, Sep 1, 2009 at 4:33 PM, Iain Reddick
wrote:

> Looking at the API docs for the Select component, it would seem to be
> designed for more complex select situations (multi-select and optgroups).
> Unfortunately, I can't find any examples on using it with dynamically
> generated optgroups.
>
> Can anyone clarify how you would use the component like this, or suggest an
> alternative?
>
>
>
> Pedro Santos wrote:
>
>> correction:
>> In your application u CAN populate your list of options, and pass it to an
>> similar component.
>>
>> On Tue, Sep 1, 2009 at 9:07 AM, Pedro Santos  wrote:
>>
>>
>>
>>> Gary,
>>>
>>> Take a look at wicket.markup.html.form.DropDownChoice<
>>> http://wicketstuff.org/wicket13/compref/;jsessionid=9632D2AC608C8E9715009EAA5EEBD3FF?wicket:bookmarkablePage=:org.apache.wicket.examples.compref.DropDownChoicePage
>>> >at
>>> http://wicketstuff.org/wicket13/compref/
>>> on these examples, the option values ar not fixed in markup with no
>>> wicket:ids. They are passed to constructor of 2 lists that are used by
>>> DropDownChoice
>>> component model. In your application u can't populate your list of
>>> options, and pass it to an similar component.
>>>
>>>
>>> On Tue, Sep 1, 2009 at 8:57 AM, gary black  wrote:
>>>
>>>
>>>
 Hi,I am kind of new to Wicket and am having a difficult time finding
 some
 decent info on creating optgroups within selects.I basically have a
 structured list in my DB which in turn has children - perfect solution
 would
 be to use dynamically generated optgroups with their children which will
 of
 course be option tags.All the examples containing optgroups seem to have
 the
 optgroups fixed in markup with no wicket:ids.Any thoughts would be most
 welcomed.Gary





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


Re: 32 External CSS Files Limitation of Internet Explorer 6,7,8

2009-09-01 Thread nino martinez wael
Hmm what about the merged resources from wicketstuff:

http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-merged-resources


2009/9/1 Martin Letendre :
> Hello Folks
>
> Is there a feature that can be enabled that merge css ressource into one
> file ?
>
> Someone answer in this post that this kind of feature does not exist...
>
> http://www.nabble.com/Wicket-resources-%28css,-js-and-images%29--td19160980.html
>
> This is sad because it's causing a bug if you are using IE (6,7 or 8) and
> have more than 31 css file included in one Wicket page.
>
> Please read this article for more details:
>
> http://acidmartin.wordpress.com/2008/11/25/the-32-external-css-files-limitation-of-internet-explorer-and-more/
>
>
> Martin Letendre
> Montreal, Quebec
> Canada
>

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



32 External CSS Files Limitation of Internet Explorer 6,7,8

2009-09-01 Thread Martin Letendre
Hello Folks

Is there a feature that can be enabled that merge css ressource into one
file ?

Someone answer in this post that this kind of feature does not exist...

http://www.nabble.com/Wicket-resources-%28css,-js-and-images%29--td19160980.html

This is sad because it's causing a bug if you are using IE (6,7 or 8) and
have more than 31 css file included in one Wicket page.

Please read this article for more details:

http://acidmartin.wordpress.com/2008/11/25/the-32-external-css-files-limitation-of-internet-explorer-and-more/


Martin Letendre
Montreal, Quebec
Canada


Re: Regarding AjaxEditableLabel and feedback

2009-09-01 Thread Igor Vaynberg
your save link should be a save link that submits a form, unless you
are going to manually append the value you want sent back via
javascript to the save link's url.

-igor

On Tue, Sep 1, 2009 at 4:27 AM, Muro Copenhagen wrote:
> Hi,
>
> I have an issue with AjaxEditableLabel that i hope i can get some help with.
>
> In my application i have a couple of AjaxEditableLabel's.
>
> Though i am not interested in the default feature of AjaxEditableLabel.
>
> I want edit button and a save button, that switches automatically between
> the Label and TextInput mode for
> all the AjaxEditableLabel fields i have.
>
> I used AjaxFallbackLink to implement a save button and edit button, that
> switches between the Label and TextInput fields
> of the AjaxEditableLabel. And this works for me now.
>
> The only problem i have is that the feedback is not displaying unless i
> submit the form. It does not show when i switch
> between the modes.
>
> When i log the onError method in my instance of the AjaxEditableLabel, i can
> see that the error is caugth, but
> for some reason not displayed.
>
> Here is some of my code:
>
>        MyAjaxEditableLabel adress = new MyAjaxEditableLabel("adress", new
> PropertyModel(wildcardProfil, "adress.street"));
>        add(adresse.setRequired(true));
>        FeedbackPanel adressFP = new NbFeedbackPanel("adress.feedback", new
> ContainerFeedbackMessageFilter(adress));
>        add(adressFP);
>
> And the AjaxFallbackLink's:
>
>    class SaveAjaxFallbackLink extends AjaxFallbackLink {
>
>        public void onClick(AjaxRequestTarget target) {
>            if (target != null) {
>                // shift visibility
>                adress.makeEditorlVisible(true);
>                adress.makeLabelVisible(false);
>                target.addComponent(adress);
>               ...
>       }
>
>    class EditAjaxFallbackLink extends AjaxFallbackLink {
>
>        public void onClick(AjaxRequestTarget target) {
>            if (target != null) {
>                // shift visibility
>                adress.makeEditorlVisible(true);
>                adress.makeLabelVisible(false);
>                target.addComponent(adress);
>               ...
>       }
>
>
> So when i click edit it should be in display mode, when click save it should
> save the content and go back to none-edit mode. But how do i get the
> feedback, when press the save button ?
>
> Hope someone can help me on this.
>
> Best Regards
> Cemil
>

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



Re: LinkTree and Tabbed Panel + inMethod DataGrid

2009-09-01 Thread Igor Vaynberg
sounds like you are ginving your datagrid a static model, instead try
to give it a model that always checks the current treenode and pulls
the associated data.

-igor

On Tue, Sep 1, 2009 at 2:35 AM, Oliver-Sven Fritsch wrote:
> Hi everybody,
>
> I have a LinkTree which will work as my navigation and a panel with tabs for
> the content.
> Right now the tree loads all the neccesary data and displays correctly. On
> one of my tabs I have the inMethod datagrid which displays the values for
> the selected treenode well.
> My problem is that if I choose another node the datagrid does not refresh
> except if I use the browsers refresh (f5). I tried to override the
> onNodeLinkClicked method but don't seem to get it working. Could someone
> please point me to the right direction? Can't get it working with refresh,
> replaceWith etc...
>
> here's my code for the LinkTree
>
> tree = new LinkTree("myLinkTree", t) {
>           @Override
>           protected void onNodeLinkClicked(java.lang.Object node, BaseTree
> tree, AjaxRequestTarget target) {
> // this is for updating some global variables
>               ((WicketApplication)
> getApplication()).setViewId(Integer.valueOf(((MyTreeNode)
> node).getPraram1()));
> // this is my inMethod datagrid
>               target.addComponent( ((ExplorerApplication)
> getApplication()).getGrid());
>
> //- what comes here?
>           }
>       };
>
> Thanks in advance!
> Oliver
>
>
>
> -
> 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: Grouping messages in FeedbackPanel

2009-09-01 Thread Igor Vaynberg
there is nothing wrong with creating your own implementation of the
feedback panel.

-igor

On Mon, Aug 31, 2009 at 11:09 PM, Eyal Golan wrote:
> Hi,
> Thanks for the reply, but it's not suitable for us.
> We want to create a generic FeedbakPanel for hat purpose and not in a
> specific page.
>
> What we actually want is that the messages will be list of lists.
> In the first iteration he completely created a new FeedbackPanel that
> inherits from a regular Panel.
> I suggested him not to break Wicket's framework and to try using the methods
> that Wicket allow.
> The main problem was that the list view of the messages is private
> (MessageListView).
>
> He eventually overridden the model and of course newMessageDisplayComponent
> ...
>
> We use version 1.3.6
>
> Wouldn't it be nice to make the creation of the list protected? so we can
> override it?
>
>
> 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, Aug 31, 2009 at 11:25 AM, Eyal Golan  wrote:
>
>> Hello,
>> I there a way to change the feedback panel so we we group the messages
>> according to levels:
>> Errors:
>> error message 1.
>> error message 2.
>>
>> Info:
>> info 1.
>>
>> etc.
>>
>> Do we need to *completely* override FeedbackPanel? My team mate wants to
>> do that and I really holding him off.
>>
>> Thanks
>>
>> 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
>>
>

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



Re: UTF-8

2009-09-01 Thread Olivier Bourgeois
Yeah, one charset to rule them all !

:-)

2009/9/1 Johan Compagner :
> Everybody should stop using any other encoding then UTF-8
> Common people we should start this change from happening now :)
>
> Drop all charsets and all over the world. ban them everywhere, it should be
> illegal to use them, if you do still use them you should be thrown in to
> prison for at least 5 years.
> UTF-8 everywhere!
>

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



Re: UTF-8

2009-09-01 Thread Johan Compagner
Everybody should stop using any other encoding then UTF-8
Common people we should start this change from happening now :)

Drop all charsets and all over the world. ban them everywhere, it should be
illegal to use them, if you do still use them you should be thrown in to
prison for at least 5 years.
UTF-8 everywhere!


On Tue, Sep 1, 2009 at 10:19, Olivier Bourgeois  wrote:

> That's exactly what I said : I had to use XML properties files to have
> UTF-8 localized properties.
>
> You can't use simple properties format because Java can't handle
> natively anything else than ISO. We use also Tapestry here, and you
> can use UTF-8 properties files (thanks to the wrapper around native
> Java properties).
>
> XML files are allright, but they are definitively verbose.
>
> 2009/9/1 Eelco Hillenius :
> >> Erm
> http://chillenious.wordpress.com/2006/11/13/wicket-now-supports-resource-bundles-in-xml-format/
> >
> > Which says Wicket 2.0 (yes, it's that old), but it was also one of the
> > first things backported. Loading is automatic, and .xml takes
> > precedence over .properties.
> >
> > Eelco
> >
> > -
> > 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: Dynamic Optgroups in Wicket

2009-09-01 Thread Iain Reddick
Looking at the API docs for the Select component, it would seem to be 
designed for more complex select situations (multi-select and 
optgroups). Unfortunately, I can't find any examples on using it with 
dynamically generated optgroups.


Can anyone clarify how you would use the component like this, or suggest 
an alternative?



Pedro Santos wrote:

correction:
In your application u CAN populate your list of options, and pass it to an
similar component.

On Tue, Sep 1, 2009 at 9:07 AM, Pedro Santos  wrote:

  

Gary,

Take a look at 
wicket.markup.html.form.DropDownChoiceat
http://wicketstuff.org/wicket13/compref/
on these examples, the option values ar not fixed in markup with no
wicket:ids. They are passed to constructor of 2 lists that are used by 
DropDownChoice
component model. In your application u can't populate your list of
options, and pass it to an similar component.


On Tue, Sep 1, 2009 at 8:57 AM, gary black  wrote:



Hi,I am kind of new to Wicket and am having a difficult time finding some
decent info on creating optgroups within selects.I basically have a
structured list in my DB which in turn has children - perfect solution would
be to use dynamically generated optgroups with their children which will of
course be option tags.All the examples containing optgroups seem to have the
optgroups fixed in markup with no wicket:ids.Any thoughts would be most
welcomed.Gary



  





  



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



Re: UTF-8

2009-09-01 Thread Roman Uhlig

We usually do multilanguage sites, so we always try to keep the web
application in a full UTF-8 cycle. With Wicket we were fine doing the
following:

as mentioned above:

getMarkupSettings().setDefaultMarkupEncoding("UTF-8");
getRequestCycleSettings().setResponseRequestEncoding("UTF-8");

> 1) Edit connectors in server.xml and add URIEncoding="UTF-8"

Yes:
http://cwiki.apache.org/WW/how-to-support-utf-8-uriencoding-with-tomcat.html

> 2) Call request.setCharacterEncoding("UTF-8") (at the very beginning of
> the cycle)

We never had to use this (at least with Wicket 1.4.x). Just make sure your
template always has

  

in it's header.

If you plan to use mod_jk serving UTF-8 encoded URL's with special chars,
you also might have to consider this:

http://cwiki.apache.org/WICKET/wicket-behind-a-front-end-proxy.html#Wicketbehindafront-endproxy-UsingUTF8encodedURIswithmodjk

Best regards,
Roman


Douglas Ferguson-2 wrote:
> 
> Excellent.
> 
> I saw a bunch of emails floating around saying that you'd have to also
> 
> 1) Edit connectors in server.xml and add URIEncoding="UTF-8"
> 2) Call request.setCharacterEncoding("UTF-8") (at the very beginning of
> the cycle)
> 
> Are those also necessary?
> 
> I'm assuming that I'll need these:
> UTF-8
> true
> 
> 
> On Aug 31, 2009, at 5:48 AM, Tomasz Dziurko wrote:
> 
> Add this to init() method in your Application class:
> 
> getMarkupSettings().setDefaultMarkupEncoding("UTF-8");
> getRequestCycleSettings().setResponseRequestEncoding("UTF-8");
> 
> This should be enough.
> 
> --
> Regards,
> Tomasz Dziurko
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/UTF-8-tp25221136p25240295.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: UTF-8

2009-09-01 Thread Olivier Bourgeois
The people at my office handling translations are using a simple UTF-8
capable editor (that can be Eclipse for instance) and there is no need
to escape anything when you use UTF-8 in the properties files. That's
much more comfortable when working with arabic or chinese, because
people can read without unescaping, and they can also use a diff tool.

The point I was raising is that when working on a Tapestry
application, people at my office are used to have a simple property
format, and you can do this because they made a wrapper around native
Java Properties that can handle UTF-8 in properties file. When I
switched to Wicket and XML properties files, they complained that it
was much more verbose for no gain. And I don't have any objections to
this statement.

Doing the same thing with Wicket should be easy, basically it should
consists of changing the method :

PropertiesFilePropertiesLoader.loadProperties(BufferedInputStream in)

defined in PropertiesFactory class to *not* use Java Properties
directly but instead fill a new Property object from an InputStream.
And the InputStream should honor the application encoding set in the
Application settings, which in our case is UTF-8.

And you return Properties like before. That's it.

See :

http://tapestry.apache.org/tapestry4/tapestry/apidocs/org/apache/tapestry/util/text/LocalizedProperties.html

2009/9/1 Wojciech Żaboklicki :
> Man, use the native2ascii built-in JDK tool.
> It's very simple, transforms your messages into ASCII escaped.
>
> Regards,
> Wojtek
>
> Olivier Bourgeois pisze:
>>
>> That's exactly what I said : I had to use XML properties files to have
>> UTF-8 localized properties.
>>
>> You can't use simple properties format because Java can't handle
>> natively anything else than ISO. We use also Tapestry here, and you
>> can use UTF-8 properties files (thanks to the wrapper around native
>> Java properties).
>>
>> XML files are allright, but they are definitively verbose.
>>
>> 2009/9/1 Eelco Hillenius :
>>

 Erm
 http://chillenious.wordpress.com/2006/11/13/wicket-now-supports-resource-bundles-in-xml-format/

>>>
>>> Which says Wicket 2.0 (yes, it's that old), but it was also one of the
>>> first things backported. Loading is automatic, and .xml takes
>>> precedence over .properties.
>>>
>>> Eelco
>>>
>>> -
>>> 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: Dynamic Optgroups in Wicket

2009-09-01 Thread Pedro Santos
correction:
In your application u CAN populate your list of options, and pass it to an
similar component.

On Tue, Sep 1, 2009 at 9:07 AM, Pedro Santos  wrote:

> Gary,
>
> Take a look at 
> wicket.markup.html.form.DropDownChoiceat
> http://wicketstuff.org/wicket13/compref/
> on these examples, the option values ar not fixed in markup with no
> wicket:ids. They are passed to constructor of 2 lists that are used by 
> DropDownChoice
> component model. In your application u can't populate your list of
> options, and pass it to an similar component.
>
>
> On Tue, Sep 1, 2009 at 8:57 AM, gary black  wrote:
>
>> Hi,I am kind of new to Wicket and am having a difficult time finding some
>> decent info on creating optgroups within selects.I basically have a
>> structured list in my DB which in turn has children - perfect solution would
>> be to use dynamically generated optgroups with their children which will of
>> course be option tags.All the examples containing optgroups seem to have the
>> optgroups fixed in markup with no wicket:ids.Any thoughts would be most
>> welcomed.Gary
>>
>>
>>
>
>
>


Re: Dynamic Optgroups in Wicket

2009-09-01 Thread Pedro Santos
Gary,

Take a look at 
wicket.markup.html.form.DropDownChoiceat
http://wicketstuff.org/wicket13/compref/
on these examples, the option values ar not fixed in markup with no
wicket:ids. They are passed to constructor of 2 lists that are used by
DropDownChoice
component model. In your application u can't populate your list of options,
and pass it to an similar component.

On Tue, Sep 1, 2009 at 8:57 AM, gary black  wrote:

> Hi,I am kind of new to Wicket and am having a difficult time finding some
> decent info on creating optgroups within selects.I basically have a
> structured list in my DB which in turn has children - perfect solution would
> be to use dynamically generated optgroups with their children which will of
> course be option tags.All the examples containing optgroups seem to have the
> optgroups fixed in markup with no wicket:ids.Any thoughts would be most
> welcomed.Gary
>
>
>


Re: [OT] OWasp Vulnerability Validation

2009-09-01 Thread nino martinez wael
Hi Doug

I think almost every aspect of this list has been discussed. Search
the list for howto comply. Or are you searching for someone to find
vulnerabilities?

regards Nino

2009/8/31 Doug Leeper :
> All,
>
> Need some help here.  A soon to be released  Wicket application needs to 
> validated with the Top 10 vulnerabilities that Owasp has identified.  
> (http://www.owasp.org/index.php/Top_10_2007)
> Some of these cannot be validated by an outside entity...but for those can...
>
> Has anyone done this validation before?
> Is there a service that does this?
>
> Thanks in advance,
> - Doug
>

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



Dynamic Optgroups in Wicket

2009-09-01 Thread gary black
Hi,I am kind of new to Wicket and am having a difficult time finding some 
decent info on creating optgroups within selects.I basically have a structured 
list in my DB which in turn has children - perfect solution would be to use 
dynamically generated optgroups with their children which will of course be 
option tags.All the examples containing optgroups seem to have the optgroups 
fixed in markup with no wicket:ids.Any thoughts would be most welcomed.Gary


  

Re: why is getHomePage called multiple times?

2009-09-01 Thread Pedro Santos
Jason, the method getHomePage#MyWicketApplication only return the Class of
your application home page, an call from Wicket to it's method, doesn't
means that an instance of HomePage will to be generated.

This is a code from WebRequestCodingStrategy for example:

if (!application.getHomePage().equals(pageClass) ||
!"".equals(pageMapName) ||
(application.getHomePage().equals(pageClass) && requestTarget
instanceof BookmarkableListenerInterfaceRequestTarget))

2 calls to getHomePage and none instance was made from home page class

On Tue, Sep 1, 2009 at 1:29 AM, Jason Novotny wrote:

>
> Hi Nick,
>
>   I tried with the simplest page:
>
> http://www.w3.org/1999/xhtml"; xmlns:wicket="
> http://www.w3.org/1999/xhtml";>
> 
> 
> 
> hello wicket
> 
> 
>
> The good news is that it only happens after loading the app for the first
> time-- after an additional request is made to the home page, it's
> instantiated only once.
>
>   Cheers, Jason
>
>
> Nick Heudecker wrote:
>
>> Any chance you have empty image src attributes in your home page?
>>
>> On Mon, Aug 31, 2009 at 9:19 PM, Jason Novotny > >wrote:
>>
>>
>>
>>> Hi,
>>>
>>>  My home page takes longer to load than expected and after placing a log
>>> line in getHomePage#MyWicketApplication I see that it's being called 3
>>> times:
>>>
>>> Connected to server
>>> gethome page
>>> called me!
>>> gethome page
>>> called me!
>>> gethome page
>>> called me!
>>>
>>>  Is there sort of a LoadableDetachableModel equivalent for pages, so they
>>> are just instantiated one per request cycle?
>>>
>>>  Thanks, Jason
>>>
>>> -
>>> 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
>
>


Regarding AjaxEditableLabel and feedback

2009-09-01 Thread Muro Copenhagen
Hi,

I have an issue with AjaxEditableLabel that i hope i can get some help with.

In my application i have a couple of AjaxEditableLabel's.

Though i am not interested in the default feature of AjaxEditableLabel.

I want edit button and a save button, that switches automatically between
the Label and TextInput mode for
all the AjaxEditableLabel fields i have.

I used AjaxFallbackLink to implement a save button and edit button, that
switches between the Label and TextInput fields
of the AjaxEditableLabel. And this works for me now.

The only problem i have is that the feedback is not displaying unless i
submit the form. It does not show when i switch
between the modes.

When i log the onError method in my instance of the AjaxEditableLabel, i can
see that the error is caugth, but
for some reason not displayed.

Here is some of my code:

MyAjaxEditableLabel adress = new MyAjaxEditableLabel("adress", new
PropertyModel(wildcardProfil, "adress.street"));
add(adresse.setRequired(true));
FeedbackPanel adressFP = new NbFeedbackPanel("adress.feedback", new
ContainerFeedbackMessageFilter(adress));
add(adressFP);

And the AjaxFallbackLink's:

class SaveAjaxFallbackLink extends AjaxFallbackLink {

public void onClick(AjaxRequestTarget target) {
if (target != null) {
// shift visibility
adress.makeEditorlVisible(true);
adress.makeLabelVisible(false);
target.addComponent(adress);
   ...
   }

class EditAjaxFallbackLink extends AjaxFallbackLink {

public void onClick(AjaxRequestTarget target) {
if (target != null) {
// shift visibility
adress.makeEditorlVisible(true);
adress.makeLabelVisible(false);
target.addComponent(adress);
   ...
   }


So when i click edit it should be in display mode, when click save it should
save the content and go back to none-edit mode. But how do i get the
feedback, when press the save button ?

Hope someone can help me on this.

Best Regards
Cemil


Re: UTF-8

2009-09-01 Thread Wojciech Żaboklicki

Man, use the native2ascii built-in JDK tool.
It's very simple, transforms your messages into ASCII escaped.

Regards,
Wojtek

Olivier Bourgeois pisze:

That's exactly what I said : I had to use XML properties files to have
UTF-8 localized properties.

You can't use simple properties format because Java can't handle
natively anything else than ISO. We use also Tapestry here, and you
can use UTF-8 properties files (thanks to the wrapper around native
Java properties).

XML files are allright, but they are definitively verbose.

2009/9/1 Eelco Hillenius :
  

Erm 
http://chillenious.wordpress.com/2006/11/13/wicket-now-supports-resource-bundles-in-xml-format/
  

Which says Wicket 2.0 (yes, it's that old), but it was also one of the
first things backported. Loading is automatic, and .xml takes
precedence over .properties.

Eelco

-
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: UTF-8

2009-09-01 Thread Vit Rozkovec

In case you use Eclipse, there is an utility called Properties Editor
http://propedit.sourceforge.jp/index_en.html


Vit


Olivier Bourgeois wrote:

That's exactly what I said : I had to use XML properties files to have
UTF-8 localized properties.

You can't use simple properties format because Java can't handle
natively anything else than ISO. We use also Tapestry here, and you
can use UTF-8 properties files (thanks to the wrapper around native
Java properties).

XML files are allright, but they are definitively verbose.

2009/9/1 Eelco Hillenius :
  

Erm 
http://chillenious.wordpress.com/2006/11/13/wicket-now-supports-resource-bundles-in-xml-format/
  

Which says Wicket 2.0 (yes, it's that old), but it was also one of the
first things backported. Loading is automatic, and .xml takes
precedence over .properties.

Eelco

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





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


  



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



Re: how to add panel in gmap2

2009-09-01 Thread nino martinez wael
Why are you adding a panel to the GMap? Instead add the panel below or above.

regards Nino

2009/9/1 新希望软件 -- 俞宏伟 :
> i want to add child panel to gmap2 container, but when add child panel,
> there alway throw tag not closed error.
>
> here is my code detail:
>
> GMap2 gMap = new gMap = new GMap2("googleMap",
> application.getGoogleMapApiKey());
> add(gMap);
>
> final WebMarkupContainer wmChild = new WebMarkupContainer("wmcChild");
> wmChild .setOutputMarkupId(true);
> gmap2.add(wmChild);
>
> html file:
> 
>
> 
>
> when run, it throws error: close tag not found for tag:  id="googleMap2c" style="width: 46.8em; height: 350px; position: relative;
> background-color: rgb(229, 227, 223);" wicket:id="googleMap">. Component:
> [MarkupContainer [Component id = googleMap]]
>
> org.apache.wicket.markup.MarkupException: close tag not found for tag:  id="googleMap2c" style="width: 46.8em; height: 350px; position: relative;
> background-color: rgb(229, 227, 223);" wicket:id="googleMap">. Component:
> [MarkupContainer [Component id = googleMap]]
>at
> org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:121)
>at org.apache.wicket.Component.renderComponent(Component.java:2524)
>at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1412)
>at org.apache.wicket.Component.render(Component.java:2361)
>at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1298)
>at
> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1477)
>at
> org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:640)
>at
> org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:112)
>at org.apache.wicket.Component.renderComponent(Component.java:2524)
>at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1412)
>at org.apache.wicket.Component.render(Component.java:2361)
>at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1298)
>at
> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1477)
>at
> org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:640)
>at
> org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:112)
>at org.apache.wicket.Component.renderComponent(Component.java:2524)
>at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1412)
>at org.apache.wicket.Component.render(Component.java:2361)
>at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1298)
>at
> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1477)
>at
> org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1402)
>at org.apache.wicket.Component.renderComponent(Component.java:2524)
>at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1412)
>at org.apache.wicket.Component.render(Component.java:2361)
>at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1298)
>at
> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1477)
>at
> org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1402)
>at org.apache.wicket.Component.renderComponent(Component.java:2524)
>at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1412)
>at org.apache.wicket.Component.render(Component.java:2361)
>at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:222)
>at
> org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(MarkupInheritanceResolver.java:66)
>at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1325)
>at
> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1477)
>at
> org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1402)
>at org.apache.wicket.Component.renderComponent(Component.java:2524)
>at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1412)
>at org.apache.wicket.Component.render(Component.java:2361)
>at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:222)
>at
> org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(MarkupInheritanceResolver.java:73)
>at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1325)
>at
> org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1428)
>at org.apache.wicket.Page.onRender(Page.java:1502)
>at org.apache.wicket.Component.render(Component.java:2361)
>at org.apache.wicket.Page.renderPage(Page.java:913)
>at
> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:240)
>at
> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
>at
> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1245)
>at

LinkTree and Tabbed Panel + inMethod DataGrid

2009-09-01 Thread Oliver-Sven Fritsch

Hi everybody,

I have a LinkTree which will work as my navigation and a panel with tabs 
for the content.
Right now the tree loads all the neccesary data and displays correctly. 
On one of my tabs I have the inMethod datagrid which displays the values 
for the selected treenode well.
My problem is that if I choose another node the datagrid does not 
refresh except if I use the browsers refresh (f5). I tried to override 
the onNodeLinkClicked method but don't seem to get it working. Could 
someone please point me to the right direction? Can't get it working 
with refresh, replaceWith etc...


here's my code for the LinkTree

tree = new LinkTree("myLinkTree", t) {
   @Override
   protected void onNodeLinkClicked(java.lang.Object node, 
BaseTree tree, AjaxRequestTarget target) {

// this is for updating some global variables
   ((WicketApplication) 
getApplication()).setViewId(Integer.valueOf(((MyTreeNode) 
node).getPraram1()));

// this is my inMethod datagrid
   target.addComponent( ((ExplorerApplication) 
getApplication()).getGrid());


//- what comes here?
   }
   };

Thanks in advance!
Oliver



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



how to add panel in gmap2

2009-09-01 Thread 新希望软件 -- 俞宏伟
i want to add child panel to gmap2 container, but when add child panel,
there alway throw tag not closed error.

here is my code detail:

GMap2 gMap = new gMap = new GMap2("googleMap",
application.getGoogleMapApiKey());
add(gMap);

final WebMarkupContainer wmChild = new WebMarkupContainer("wmcChild");
wmChild .setOutputMarkupId(true);
gmap2.add(wmChild);

html file:




when run, it throws error: close tag not found for tag: . Component:
[MarkupContainer [Component id = googleMap]]

org.apache.wicket.markup.MarkupException: close tag not found for tag: . Component:
[MarkupContainer [Component id = googleMap]]
at
org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:121)
at org.apache.wicket.Component.renderComponent(Component.java:2524)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1412)
at org.apache.wicket.Component.render(Component.java:2361)
at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1298)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1477)
at
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:640)
at
org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:112)
at org.apache.wicket.Component.renderComponent(Component.java:2524)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1412)
at org.apache.wicket.Component.render(Component.java:2361)
at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1298)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1477)
at
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:640)
at
org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:112)
at org.apache.wicket.Component.renderComponent(Component.java:2524)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1412)
at org.apache.wicket.Component.render(Component.java:2361)
at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1298)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1477)
at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1402)
at org.apache.wicket.Component.renderComponent(Component.java:2524)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1412)
at org.apache.wicket.Component.render(Component.java:2361)
at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1298)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1477)
at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1402)
at org.apache.wicket.Component.renderComponent(Component.java:2524)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1412)
at org.apache.wicket.Component.render(Component.java:2361)
at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:222)
at
org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(MarkupInheritanceResolver.java:66)
at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1325)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1477)
at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1402)
at org.apache.wicket.Component.renderComponent(Component.java:2524)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1412)
at org.apache.wicket.Component.render(Component.java:2361)
at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:222)
at
org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(MarkupInheritanceResolver.java:73)
at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1325)
at
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1428)
at org.apache.wicket.Page.onRender(Page.java:1502)
at org.apache.wicket.Component.render(Component.java:2361)
at org.apache.wicket.Page.renderPage(Page.java:913)
at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:240)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1245)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1316)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:532)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:356)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:201)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter

Re: UTF-8

2009-09-01 Thread Olivier Bourgeois
That's exactly what I said : I had to use XML properties files to have
UTF-8 localized properties.

You can't use simple properties format because Java can't handle
natively anything else than ISO. We use also Tapestry here, and you
can use UTF-8 properties files (thanks to the wrapper around native
Java properties).

XML files are allright, but they are definitively verbose.

2009/9/1 Eelco Hillenius :
>> Erm 
>> http://chillenious.wordpress.com/2006/11/13/wicket-now-supports-resource-bundles-in-xml-format/
>
> Which says Wicket 2.0 (yes, it's that old), but it was also one of the
> first things backported. Loading is automatic, and .xml takes
> precedence over .properties.
>
> Eelco
>
> -
> 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: Ajax DropDownChoice and null values

2009-09-01 Thread niaouli

Hello,

I have a problem with Ajax DropDownChoices and null values. I tried to make
this pseudo-code, as simple as possible :



OK 


final DropDownChoice choiceView = new
DropDownChoice("choice", new PropertyModel(model, "choice"),
new ArrayList(CHOICES.keySet()));

final DropDownChoice subChoiceView = new
DropDownChoice("subChoice", new PropertyModel(model,
"subChoice"), CHOICES.get(choice));
subChoiceView.setOutputMarkupId(true);

choiceView.add(new AjaxFormComponentUpdatingBehavior("onchange") {
protected void onUpdate(AjaxRequestTarget target) {
subChoiceView.setChoices(CHOICES.get(choice));
target.addComponent(subChoiceView);
}
});

Link ok = new AjaxFallbackLink("ok") {
public void onClick(AjaxRequestTarget target) {
System.out.println("choice: " + model.choice);
System.out.println("subChoice: " + model.subChoice);
}
};


When I select values in the drop down choices and click OK, the choice value
is the right one, and the subChoice value is always 'null'. I really don't
know if it is a bug or my mistake.

Thanks for your advices.
-- 
View this message in context: 
http://www.nabble.com/Ajax-DropDownChoice-and-null-values-tp16473687p25235882.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