Re: [Wicket-user] closing ServletResponse stream/writer

2007-07-19 Thread Johan Compagner
i can remove the close() on it.
But i am curious what you want to write afterwards
because how do you know what to get the writer or the outputstream?
because for the redirect strategy we just use the outpustream (bytes)
instead of the writer (strings)

and you can't use the output and the writer in one request.

if you want to append or do stuff or replace stuff wicket has special
support for that with IResponseFilters

johan

On 7/19/07, jan_bar <[EMAIL PROTECTED]> wrote:
>
> Thans for the answer, but I never said that BufferedHttpServletResponse is
> handled by container. In my opinion, BufferedHttpServletResponse should
> not
> call servletResponse.getOutputStream().close(), as pointed in my first
> quesion. There can be other filters up the chain who want to write to the
> response. Besides that, wicket is incosistent. For instance WebResponse
> uses
> httpServletResponse.getWriter(), but never calls close() on it.
>
> Regards, Jan
>
> --
> Jan Bares
> http://jan.vegetband.cz
>
>
> "Jean-Baptiste Quenot" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > * jan_bar:
> > >
> > > the ServletResponse javadoc doesn't state if and when one should call
> > > getWriter().close() or getOutputStream().close(). I have a filter that
> > > writes comments after the request was processed. Wicket sometimes
> closes
> the
> > > response and sometimes not. For instance
> > > BufferedHttpServletResponse.writeTo(HttpServletResponse
> servletResponse)
> > > calls:
> > >
> > > final OutputStream out = servletResponse.getOutputStream();
> > > out.write(this.byteBuffer);
> > > out.close();
> >
> > FYI BufferedHttpServletResponse is not directly handled by the
> > servlet container, it is a wrapper around the real response for
> > the REDIRECT_TO_BUFFER RenderStrategy.
> > --
> >  Jean-Baptiste Quenot
> > aka  John Banana   Qwerty
> > http://caraldi.com/jbq/
> >
> >
> -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
>
>
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Overriding ID attributes

2007-07-19 Thread Johan Compagner
i just always overwrite getMarkupId()

but a setter is also fine to have. We store it anyway.

johan

On 7/18/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>
> On 7/18/07, mperham <[EMAIL PROTECTED]> wrote:
> >
> >
> > We are migrating our existing application from UI framework XXX to
> Wicket
> > and
> > we have a boatload of UI automated tests which depend on the ID
> attribute
> > of
> > our form inputs to drive the tests.  I'm trying to figure out how to get
> > Wicket to use the exact same IDs when it generates the HTML as with our
> > old
> > system.  Here's an example of the generated HTML where I have a DropDown
> > within a Form:
> >
> > 
> > Business
> > Service
> > 
> > 
> >   
> > Choose One
> > http://www.test-sdk/sdkl#Fetch_COB";>Fetch
> COB
> > http://www.test-sdk/sdkl#Status_Visibility";>Status
> > Visibility
> > http://www.test-sdk/sdkl#Claims_Submission";>Claims
> > Submission
> >   
> > 
> >
> > Now the actual ID of the select should be "selBusinessService" and
> that's
> > the wicket:id of the component in Java but Wicket prepends the component
> > hierarchy, I guess, when auto-generating the id attribute in HTML.  Now
> I
> > can use an AttributeModifier to adjust the value of the ID but the
> > SimpleFormComponentLabel does NOT reflect that change in the for
> > attribute.
> >
> > Is it possible to do this?  Can I completely override Wicket's ID
> handling
> > and just have it use my specified ID?
>
>
> not right now, but creating setMarkupId() wont be very difficult. please
> add
> a jira request.
>
> -igor
>
>
> mike
> > --
> > View this message in context:
> > http://www.nabble.com/Overriding-ID-attributes-tf4105343.html#a11675275
> > Sent from the Wicket - User mailing list archive at Nabble.com.
> >
> >
> >
> -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] PasswordTextField encryption

2007-07-19 Thread David Rosenstrauch
Just wondering:  anyone know what's the reason behind 1) making 
PasswordTextField's automatically encrypting their contents by default, 
and 2) making this not configurable?

I lost several hours debugging tonight till I finally pinpointed this as 
the cause of my bug.

TIA,

DR

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Submit method problem

2007-07-19 Thread Timo Rantalaiho
On Mon, 16 Jul 2007, Eelco Hillenius wrote:
> Note that with Wicket 1.3 you configure a filter instead of a servlet
> and map that to /* without problems.

BTW, on Websphere 6.0, we couldn't get the resource paths
working with the filter on 1.3. After a while of debugging,
we resorted to using the servlet as a workaround and it 
worked as expected (with non-empty context path).

- Timo

-- 
Timo Rantalaiho   
Reaktor Innovations Oyhttp://www.ri.fi/ >

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] PasswordTextField encryption

2007-07-19 Thread Martijn Dashorst
It is configurable: don't use PasswordTextField but TextField instead.

The reason behind PTF's encryption is that we want to provide a secure
solution out-of-the-box. You can circumvent it, but then *you* need to
open up Pandorra's box, not us. Same with escaping markup while
outputting model values: the default is safe.

Martijn

On 7/19/07, David Rosenstrauch <[EMAIL PROTECTED]> wrote:
> Just wondering:  anyone know what's the reason behind 1) making
> PasswordTextField's automatically encrypting their contents by default,
> and 2) making this not configurable?
>
> I lost several hours debugging tonight till I finally pinpointed this as
> the cause of my bug.
>
> TIA,
>
> DR
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-- 
Wicket joins the Apache Software Foundation as Apache Wicket
Apache Wicket 1.3.0-beta2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] PasswordTextField encryption

2007-07-19 Thread Eelco Hillenius
On 7/19/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> It is configurable: don't use PasswordTextField but TextField instead.
>
> The reason behind PTF's encryption is that we want to provide a secure
> solution out-of-the-box. You can circumvent it, but then *you* need to
> open up Pandorra's box, not us. Same with escaping markup while
> outputting model values: the default is safe.

Didnt it have to do with persistency of fields via cookies as well?

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] PasswordTextField encryption - integrating Jasypt

2007-07-19 Thread Daniel Fernández Garrido
Hello,

About this topic, I am the founder of a project called Jasypt (Java
Simplified Encryption) [http://www.jasypt.org], which is aimed at easily
adding robust encryption capabilities to java applications, be it password
digesting or two-way text, binary, or number encryption (based on any JCE
provider).

I am still relatively new to wicket (although I really, really like what I
am learning :-)), and I am interested in developing some kind of wicket -
jasypt integration so that wicket applications can easily benefit from
jasypt-based password encryption with little effort.

This could be easily done by creating a wrapper for jasypt's
PasswordEncryptor or StringDigester implementations, and make the wrapper
itself implement wicket's ICrypt interface. Jasypt already performs Base64
encoding "out of the box" as required by Wicket 1.2.

I would be happy to develop this integration for the next version of jasypt,
unless you prefer to integrate jasypt directly into the ICrypt
infrastructure of wicket (by providing something like a "StrongCrypt"
implementation based on a digest algorithm stronger than PBEWithMD5AndDES),
which would also be alright for me. What do you think? Did you already have
any plans for improving this encryption infrastructure for Wicket 2.0?

As further info, about user password encryption:
http://www.jasypt.org/howtoencryptuserpasswords.html

Regards,
Daniel.




On 7/19/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
>
> It is configurable: don't use PasswordTextField but TextField instead.
>
> The reason behind PTF's encryption is that we want to provide a secure
> solution out-of-the-box. You can circumvent it, but then *you* need to
> open up Pandorra's box, not us. Same with escaping markup while
> outputting model values: the default is safe.
>
> Martijn
>
> On 7/19/07, David Rosenstrauch <[EMAIL PROTECTED]> wrote:
> > Just wondering:  anyone know what's the reason behind 1) making
> > PasswordTextField's automatically encrypting their contents by default,
> > and 2) making this not configurable?
> >
> > I lost several hours debugging tonight till I finally pinpointed this as
> > the cause of my bug.
> >
> > TIA,
> >
> > DR
> >
> >
> -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> --
> Wicket joins the Apache Software Foundation as Apache Wicket
> Apache Wicket 1.3.0-beta2 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] PasswordTextField encryption

2007-07-19 Thread Martijn Dashorst
On 7/19/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> Didnt it have to do with persistency of fields via cookies as well?

Yeah, didn't think of that too. Anything stored on the client is a
risk, so having the default to be secure is a real safeguard.

Martijn

-- 
Wicket joins the Apache Software Foundation as Apache Wicket
Apache Wicket 1.3.0-beta2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Modal Window and "Page Expired".

2007-07-19 Thread Matej Knopp
Five modal windows? At the same time? It might be that you are running
out of pagemaps.

This is very weird, hovewer, seems to be reproducable. Can you post a
quickstart? Also, could you check if this is working with wicket 1.3?

-Matej

On 7/18/07, Laurent Brucher <[EMAIL PROTECTED]> wrote:
> Cookies have been cleared many times, without any success ;-)
>
> But I found out what is "causing" (directly or indirectly) the problem:
> In the page that includes the ajax button that is used to bring up the modal
> window, there is a  section at the top of the page.
> If I remove this  section, there is no problem with the modal
> window anymore.
>
> The page globally looks like:
> 
> 
> ...
> 
> 
> ...
> 
> 
> 
> 
> 
>
> Somehow, I've noticed that including the  triggers an
> additional HTTP request to the same URL (that is, the URL to display the
> above page).
> Dunno why this is happening but the end result is that the pagemap then
> contains 2 versions for the same page ID.
> Then, when I hit the button that brings up the modal window, the framework
> is trying to access the above page, version 0. This has the effect of
> putting that page's version at the top of the pagemap's access stack
> (PageMap.access() method). By doing this, the version 1 of the page is
> removed from the access stack, but also the page itself (call to
> PageMap.remove(Page)).
> Thus, once the modal window gets closed and the original page needs to be
> rendered, we get a page expired since it was removed from the cache.
>
> That's as far as I can describe what I've seen & understood tracing the
> code.
> I'm not sure where the problem lies: second request because of the
>  or incorrectly evicting the page.
>
> Maybe there is something funky in my own code but I don't see what. Or maybe
> there is an issue here.
> Any input would be helpful at this point.
>
> Thanks!
> Laurent.
>
>
>
>   _
>
> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> Sent: mercredi 18 juillet 2007 8:50
> To: [EMAIL PROTECTED]; wicket-user@lists.sourceforge.net
> Subject: Re: [Wicket-user] Modal Window and "Page Expired".
>
>
> On 7/13/07, Laurent Brucher <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> There was a post last December about the same problem that I'm facing right
> now, which is getting a page expired error page after I close a modal
> window.
> The post was called "Firefox and ModalWindow" and seemed to talk about the
> issue for FF only.
> I've encountered the problem first with FF (2.0.0.4). After reading the
> post, I tried with IE7 and it worked ok (that was this afternoon).
> This evening, neither IE7 or FF work anymore. Darn! Clearing cookies and
> stuff don't change a thing.
> Oh, and of course, the Ajax ModalWindow example works just fine (my code is
> heavily inspired from that example)...
> I'm using Wicket 1.2.6, Tomcat 5.5.20, Jdk1.6u2.
>
> Have you guys shed any light on this issue at all?
> I've tried to trace the code, but as I'm rather new to Wicket, I couldn't
> really figure out what's going on...
>
> Anything I can do to help address this?
>
>
> i wonder, clear cookies in firefox and try again. i know there was a similar
> problem if you didnt set the cookie name in the modal window using
> setcookiename(), but looks like you did that. still, try clearing the
> cookies.
>
> -igor
>
>
>
>
>
> Below is the code I use, just in case.
>
> Reagrds,
> Laurent.
>
>
> // Page containing the modal window
> public class MainPage extends WebPage {
> public MainPage()
> {
> ...
> add( new PreferredStationsDialog("prefStationsDialog") );
> ...
> }
> }
>
> // The modal window impl.
> public class PreferredStationsDialog extends ModalWindow {
> public PreferredStationsDialog(String id)
> {
> super(id);
>
> setTitle("xyz");
> setCookieName("prefStationsDialog");
> setPageMapName("prefStationsDialogPageMap");
> setPageCreator( new ModalWindow.PageCreator() {
> @Override
> public Page createPage() {
> return new
> PreferredStationsDialogPage(PreferredStationsDialog.this);
> }
> });
>
> setCloseButtonCallback(new ModalWindow.CloseButtonCallback() {
> public boolean onCloseButtonClicked(AjaxRequestTarget target) {
> return true;
> }
> });
> }
> }
>
> // The content of the modal window, as a Page
> public class PreferredStationsDialogPage extends WebPage
> {
> public PreferredStationsDialogPage( final PreferredStationsDialog dialog
> )
> {
> super();
>
> add( new AjaxLink("button.save") {
> @Override
> public void onClick(AjaxRequestTarget target) {
> dialog.close(target);
> }
> }.add( new Label("text", "Save")) );
>
> add( new AjaxLink("button.cancel" ) {
> @Override
> public void onClick(AjaxRequestTarg

[Wicket-user] Select and SelectOptions

2007-07-19 Thread Huy Do
Hi,

I have been trying to use select and selectoptions in wicket-extensions 
but I can't figure out how to get a dynamic set of optgroups going.

I have seen the example from the mailing list where










My problem lies in the fact that I don't know all my optgroups before 
hand. It changes depending on the current user.

I am trying to get the following output



1
2


3
4

...
...


Any pointers would be greatly appreciated.

Thanks

Huy

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] .properties encoding

2007-07-19 Thread wheleph

Hi everyone!

I've got the following problem.

My component needs to display a cyrillic string. I put it in corresponding
.propreties with encoding cp1251.

But it's read like 
Íåïðàâèëüíûé ëîãèí/ïàðîëü 
instead of 
Неправильный логин/пароль

The problem is that the file is read like iso-8859-1. How can I set the
desired encoding?

Any ideas?
-- 
View this message in context: 
http://www.nabble.com/.properties-encoding-tf4110226.html#a11687794
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] .properties encoding

2007-07-19 Thread Matej Knopp
You can't. Java property files are always encoded in ISO-8859-1. In
order to use other characters you need to escape them properly. There
is an encoder/decoder for it and/or eclipse plugin.

-Matej

On 7/19/07, wheleph <[EMAIL PROTECTED]> wrote:
>
> Hi everyone!
>
> I've got the following problem.
>
> My component needs to display a cyrillic string. I put it in corresponding
> .propreties with encoding cp1251.
>
> But it's read like
> Íåïðàâèëüíûé ëîãèí/ïàðîëü
> instead of
> Неправильный логин/пароль
>
> The problem is that the file is read like iso-8859-1. How can I set the
> desired encoding?
>
> Any ideas?
> --
> View this message in context: 
> http://www.nabble.com/.properties-encoding-tf4110226.html#a11687794
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] .properties encoding

2007-07-19 Thread Erik van Oosten

Or you escape everything as unicode characters (e.g. /u00ef, see
http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#3.3), or
you use the xml syntax supported by Java 6 (sorry no idea how that works in
Wicket).

Regards,
Erik.



Matej Knopp-2 wrote:
> 
> You can't. Java property files are always encoded in ISO-8859-1. In
> order to use other characters you need to escape them properly. There
> is an encoder/decoder for it and/or eclipse plugin.
> 
> -Matej
> 

-- 
View this message in context: 
http://www.nabble.com/.properties-encoding-tf4110226.html#a11688643
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] .properties encoding

2007-07-19 Thread Martijn Dashorst
I vaguely remember something about xml properties files that do handle
other encodings. Didn't we implement that? Or was it just one of those
things to do in the next version?

Martijn

On 7/19/07, Matej Knopp <[EMAIL PROTECTED]> wrote:
> You can't. Java property files are always encoded in ISO-8859-1. In
> order to use other characters you need to escape them properly. There
> is an encoder/decoder for it and/or eclipse plugin.
>
> -Matej
>
> On 7/19/07, wheleph <[EMAIL PROTECTED]> wrote:
> >
> > Hi everyone!
> >
> > I've got the following problem.
> >
> > My component needs to display a cyrillic string. I put it in corresponding
> > .propreties with encoding cp1251.
> >
> > But it's read like
> > Íåïðàâèëüíûé ëîãèí/ïàðîëü
> > instead of
> > Неправильный логин/пароль
> >
> > The problem is that the file is read like iso-8859-1. How can I set the
> > desired encoding?
> >
> > Any ideas?
> > --
> > View this message in context: 
> > http://www.nabble.com/.properties-encoding-tf4110226.html#a11687794
> > Sent from the Wicket - User mailing list archive at Nabble.com.
> >
> >
> > -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-- 
Wicket joins the Apache Software Foundation as Apache Wicket
Apache Wicket 1.3.0-beta2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] .properties encoding

2007-07-19 Thread wheleph


Matej Knopp-2 wrote:
> 
> You can't. Java property files are always encoded in ISO-8859-1.
> 

I don't think so because actual loading look like this:

properties.load(new BufferedInputStream(resourceStream.getInputStream()));
strings = new ValueMap(properties);

java.util.Properties.load(InputStream) really assumes that output is encoded
in ISO-8859-1. But there is java.util.Properties.load(Reader) where
InputStreamReader instance may be passed. And InputStreamReader accepts
various charsets.

I think using the latter method instead of original may be nice improvement
in Wicket framework.
-- 
View this message in context: 
http://www.nabble.com/.properties-encoding-tf4110226.html#a11689103
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket with JExcel

2007-07-19 Thread Edi

Hi,

>then when you need the value of B4, then your interpreter translates it to
>Column 2, Row 4

Yes if col 2, row 4 means, it should B4. You are correct...

Any updates, please


Ayodeji Aladejebi wrote:
> 
> I really dint get your question but from what i interpreted,
> if you want an easy way to map between the Cell values and thier names
> then,
> 
> develop an interpreting matrix that maps A1, A2, B1 to the 2-Dimension
> model
> array that contains the values,
> 
> For columns, you have A,B,C,D,E..AA (there is a common algorithm on
> how
> to generate this from 1,2,3,4,5...)
> For rows, you have the 1,2,3,4,.
> 
> Then you have Cell[row][col] array or IModel[row][col] or
> TextField[row][col], any one you choose,
> 
> then when you need the value of B4, then your interpreter translates it to
> Column 2, Row 4
> 
> ?
> 
> On 7/17/07, Edi <[EMAIL PROTECTED]> wrote:
>>
>>
>> Hello Ayodeji Aladejebi,
>>
>> Thank you so much for your kind consideration regarding paginations.
>> and my question is how to find the each cell name.
>>
>> for. eg. First cell name is A1 in the xl sheet, and its value may be
>> integer/float/general. I want to get the cell name A1 and it's value.
>>
>> (we already get the value and displayed)
>>
>> Hope you understand my question.
>>
>> Thanking you.
>>
>> Regards,
>> Edi
>>
>>
>>
>> Ayodeji Aladejebi wrote:
>> >
>> > hi Edi,
>> >
>> > Concerning your question on Horizontal and vertical paging strategy, it
>> > wont
>> > be quite simple as ABC, i havent gotten time to do it but when i am
>> less
>> > busy i will work on it.
>> >
>> > i dint also pick your question on A1, B2, C1? you want to change it?,
>> >
>> > On 7/16/07, Edi <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> Hi, How to find each xl cell name,
>> >>
>> >> Eg. A1, B2, C1 etc
>> >>
>> >>
>> >>
>> >> Ayodeji Aladejebi wrote:
>> >> >
>> >> > thats why the source is open for you to hack into :)
>> >> >
>> >> > however,
>> >> > 1. for the  Stuff, check the XCell class for modification
>> >> > 2. the one without ajax is easy, Look up the ExcelGridPanel class
>> and
>> >> make
>> >> > these modifications
>> >> >
>> >> > final XCell cell = ...
>> >> > TextField celltx = new TextField("cell", new
>> >> PropertyModel(cell,"data")){
>> >> > public void onComponentTag(ComponentTag tag){
>> >> > super.onComponentTag(tag);
>> >> > if(!isValid()){
>> >> >tag.put("class", "grid-error");
>> >> >
>> >> >   }else
>> >> >tag.put("class", "grid-normal");
>> >> >   //How can I change the empty field box style in Red color.
>> >> It's
>> >> > easy to
>> >> > //Identify. Because XL file may contains lot of empty fields.
>> >> >   if(cell.getContent().equals(""))
>> >> >   tag.put("class","grid-error");
>> >> > //In xls one field contains more than 20 characters. When I upload
>> that
>> >> > xls,
>> >> > //initially it shows the data only not in red color box. But when I
>> >> click
>> >> > the
>> >> > //box only it shows red color. How can I show in red color when load
>> >> the
>> >> > //document.
>> >> >   if(cell.getContent().length() > 20)
>> >> >   tag.put("class", "grid-error");
>> >> > //And how can I add alt tag when I mouse over the empty field text
>> box
>> >> -
>> >> > //for eg. If I mouse over the empty field, It shows the empty field
>> >> should
>> >> > not
>> >> > //be allowed.
>> >> > if(cell.getContent().equals(""))
>> >> >   tag.put("alt","Empty Cells Not Allowed ");
>> >> >
>> >> >  }
>> >> >};
>> >> >
>> >> >>>After changing the file, what is save record button. How it works?
>> >> Please
>> >> >>>explain.
>> >> >
>> >> > hmm... ok, depends on what you want to achieve but basically this is
>> >> the
>> >> > part of the code that you du what you got to do
>> >> >
>> >> > when i wrote the code, i used it for a project where ppl needed to
>> >> upload
>> >> > Mobile phone contacts into a database from Excel file, so our line
>> of
>> >> > purpose may be different. if you want to allow users to modify the
>> >> Excel
>> >> > Spreadsheet, its a different ball game
>> >> >
>> >> >  Form gridForm = new Form("gridform"){
>> >> >
>> >> > public void onSubmit(){
>> >> > //you could keep a reference to a XCell array and
>> then
>> >> > write
>> >> > it back to the corresponding Cell instances from the Workbook
>> >> > // NOte: that the code assumes every data in the Excel is a String.
>> to
>> >> > support multiple data types is another beast of code
>> >> >
>> >> >   //so place your logic code here
>> >> > }
>> >> > }
>> >> >
>> >> >
>> >> > Regards,
>> >> >
>> >> > On 7/4/07, Edi <[EMAIL PROTECTED]> wrote:
>> >> >>
>> >> >>
>> >> >>
>> >> >> In xls one field contains more than 20 characters. When I upload
>> that
>> >> >> xls,
>> >> >> initially it shows the data only not in red color box. But when I
>> >> click
>> >> >> the
>> >> >> box only it sho

[Wicket-user] CSS Issues with 1.2.6 from 1.2.4 (best practices)

2007-07-19 Thread Ayodeji Aladejebi
I had been crying about wicket 1.2.6 makes my site ugly when i upgraded from
1.2.4 without a change of any line of code. in case you are or meet with
this situation, here are the tips that may assist you.

While I was with wicket1.2.4 jars, i had Application.getMarkupSettings
().setAutomaticLinking(true)

So when I swapped with Wicket1.2.6 jar, my whole page became ugly because
neither my CSS or images were loaded

Now, during my try and error process, i removed
Application.getMarkupSettings().setAutomaticLinking(true) or set it to false

then all my static images and CSS loaded properly

but their was another problem:

1. My inline CSS with attributes like
style="background:url(images/reflect_bar_orange2.gif)
repeat-x center;"

did not load the background image.

So what was my fix?

My Fix for that was to move those type of inline CSS to the external CSS
file where there are meant to be anyway. when i did this, the background
images loaded


2. Another discovery was that images with src attribute with wicket:ids did
not show as well i.e. 

where myimage.gif was placed in the global /image folder.

My Fix, i appended the /app (wicket application path) to the image with
wicket:ids and then it loaded i.e. 


So after sticking to these, my CSS and images loaded correctly

just my 2 cents

thank you
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Passing parameters to a page in WicketTester

2007-07-19 Thread Federico Fanton
Hi everyone!
I'm sorry, I'm looking for a little clue..
I have this simple testcase:

public void testForm(){
WicketTester tester = new WicketTester();
tester.startPage(MyPage.class );
tester.assertNoErrorMessage();
}

And this simple page:

public class MyPage extends WebPage {
private String testParam;

public KISSPage(PageParameters params) {
testParam = params.getString("testParam");
}
}

When I run the testcase, it throws the exception
"Can't instantiate page using constructor public 
test.MyPage(wicket.PageParameters) and argument "

I guess this is because MyPage is without a default constructor, so I was 
wondering if there's a way to specify the required PageParameters.. I tried 
Google and "Pro Wicket" but no luck :(
I'm using Wicket 1.2.6

Many thanks in advance!


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] WicketTester and mocking up next page rendered.

2007-07-19 Thread Timo Rantalaiho
On Tue, 17 Jul 2007, Ingram Chen wrote:

> We also suffer the same issues here. But due to unmanaged nature of Wicket,
> there is no chance to intercept construction of page B unless you build your
> own factory for page.
> 
> class Page A {
> MyFactory myFactory ;
> public Page A {
>add(new Link("toBPage") {
> setResponsePage(myFactory.newBPage());
>});
> }
> }

I might do

  class PageA extends Page {
  public PageA() {
  add(new Link("toBPage") {
  @Override
  public void onLinkClicked() {
  goToPageB();
  }
  );
  }

  protected goToPageB() {
  ...

and overriding goToPageB() in the test. 

This technique has even a fancy name in the excellent
_Working Effectively with Legacy Code_ by Michael Feathers, 
so maybe it's a kludge to use it in non-legacy code. But 
it's simple and it works.

- Timo


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] setVesible for the component after onEvent

2007-07-19 Thread Timo Rantalaiho
On Mon, 16 Jul 2007, Igor Vaynberg wrote:
> try calling setoutputmarkupplaceholdertag(true) on all components you are
> planning to call setvisible(false) when you create them

By the way, would it be a good idea to rename that method to
something more descriptive such as enableAjaxUpdates()? I
think that it anyway also has the side effect of calling 
setOutputMarkupId(true).

- Timo

-- 
Timo Rantalaiho   
Reaktor Innovations Oyhttp://www.ri.fi/ >

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] setVesible for the component after onEvent

2007-07-19 Thread Martijn Dashorst
No, because we have discussed the naming already quite a bit and the
api is already widely used (not only in apps, but also in libraries).

Martijn

On 7/19/07, Timo Rantalaiho <[EMAIL PROTECTED]> wrote:
> On Mon, 16 Jul 2007, Igor Vaynberg wrote:
> > try calling setoutputmarkupplaceholdertag(true) on all components you are
> > planning to call setvisible(false) when you create them
>
> By the way, would it be a good idea to rename that method to
> something more descriptive such as enableAjaxUpdates()? I
> think that it anyway also has the side effect of calling
> setOutputMarkupId(true).
>
> - Timo
>
> --
> Timo Rantalaiho
> Reaktor Innovations Oyhttp://www.ri.fi/ >
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-- 
Wicket joins the Apache Software Foundation as Apache Wicket
Apache Wicket 1.3.0-beta2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Passing parameters to a page in WicketTester

2007-07-19 Thread jonaqua

I'm a wicket newbie,

but this was in the javadoc for WicketTester (also your constructor name
'kisspage' doesn't match your class name 'mypage'):

 //test code
 public void testRenderYourPage()
 {
// provide page instance source for WicketTester
tester.startPage(new TestPageSource()
{
public Page getTestPage()
{
return new YourPage("mock message");
}
});
 
tester.assertRenderedPage(YourPage.class);
tester.assertLabel("yourMessage", "mock message");
 
// assert feedback messages in INFO Level 
tester.assertInfoMessages(new String[] { "Wicket Rocks ;-)" });
 
 }
 

Instead of tester.startPage(pageClass), we define a ITestPageSource to
provide testing page instance for WicketTester. This is necessary because
YourPage uses a custom constructor, which is very common for transfering
model data, can not be instansiated by reflection. Finally, we use
assertInfoMessages to assert there is a feedback message "Wicket Rocks ;-)"
in INFO level. TODO General: Example usage of FormTester
-- 
View this message in context: 
http://www.nabble.com/Passing-parameters-to-a-page-in-WicketTester-tf496.html#a11690441
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] .properties encoding

2007-07-19 Thread wheleph

I've solved the problem in the following way:

1. I've created CustomPropertiesFactory subclass of PropertiesFactory and
put it in wicket.resource package (to get access to
wicket.resource.Properties' package-private constructor)

package wicket.resource;
...
public class CustomPropertiesFactory extends PropertiesFactory {
private String charset;

public CustomPropertiesFactory(final String charset) {
this.charset = charset;
}

private synchronized Properties loadPropertiesFile(final String key,
final IResourceStream resourceStream, final Class 
componentClass,
final String style, final Locale locale) {
...
// this is the custom line
properties.load(
new InputStreamReader(
new BufferedInputStream(

resourceStream.getInputStream()), 
charset));
//  properties.load(new 
BufferedInputStream(resourceStream
//  .getInputStream()));
strings = new ValueMap(properties);
...
}
...
}

2. I've attached the instance of class given above to application:
public class EcoApplication extends SpringWebApplication {

...
@Override
public final void init() {
// this line is important
// for spring-injection through annotations
addComponentInstantiationListener(new 
SpringComponentInjector(this));
// here is the attachment
getSettings().setPropertiesFactory(new 
CustomPropertiesFactory("cp1251"));
}
}
-- 
View this message in context: 
http://www.nabble.com/.properties-encoding-tf4110226.html#a11690737
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] PasswordTextField encryption

2007-07-19 Thread David Rosenstrauch
Martijn Dashorst wrote:
> It is configurable: don't use PasswordTextField but TextField instead.


No.  If you try to use a TextField, then wicket will insist that you 
convert your HTML to use  instead of  - and thus lose the masked password entry capabilities 
(i.e., echoing "*" characters).


> The reason behind PTF's encryption is that we want to provide a secure
> solution out-of-the-box. You can circumvent it, but then *you* need to
> open up Pandorra's box, not us. Same with escaping markup while
> outputting model values: the default is safe.
> 
> Martijn

Well, I guess I don't have a problem with that.  But I think that 
there's a bug going on here.  I just filed it at: 
https://issues.apache.org/jira/browse/WICKET-768

DR


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] PasswordTextField encryption

2007-07-19 Thread Martijn Dashorst
On 7/19/07, David Rosenstrauch <[EMAIL PROTECTED]> wrote:
> Martijn Dashorst wrote:
> > It is configurable: don't use PasswordTextField but TextField instead.
> No.  If you try to use a TextField, then wicket will insist that you
> convert your HTML to use  instead of  type="password"/> - and thus lose the masked password entry capabilities
> (i.e., echoing "*" characters).

In 1.3-beta2 the type is not specified: so you can use any type of
field. IIUC (I don't have the code open) you can override the
getType() method of the textfield, and return null.

Martijn

-- 
Wicket joins the Apache Software Foundation as Apache Wicket
Apache Wicket 1.3.0-beta2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] PasswordTextField encryption

2007-07-19 Thread Daniel Fernández Garrido
David, I think your problem (not wanting password to come encrypted from the
input component) would be solved by simply making your Application object
return your own implementation of the
wicket.settings.ISecuritySettingsinterface for its getSecuritySettings
method. And in this extension
(MySecuritySettings, for instance) make that the getCryptFactory method
return a wicket.util.crypt.NoCryptFactory object.

This way you would be able to use PasswordTextField component while not
getting your text encrypted from it.

Regards,
Daniel.



On 7/19/07, David Rosenstrauch <[EMAIL PROTECTED]> wrote:
>
> Martijn Dashorst wrote:
> > It is configurable: don't use PasswordTextField but TextField instead.
>
>
> No.  If you try to use a TextField, then wicket will insist that you
> convert your HTML to use  instead of  type="password"/> - and thus lose the masked password entry capabilities
> (i.e., echoing "*" characters).
>
>
> > The reason behind PTF's encryption is that we want to provide a secure
> > solution out-of-the-box. You can circumvent it, but then *you* need to
> > open up Pandorra's box, not us. Same with escaping markup while
> > outputting model values: the default is safe.
> >
> > Martijn
>
> Well, I guess I don't have a problem with that.  But I think that
> there's a bug going on here.  I just filed it at:
> https://issues.apache.org/jira/browse/WICKET-768
>
> DR
>
>
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] PasswordTextField encryption

2007-07-19 Thread David Rosenstrauch
Martijn Dashorst wrote:
> On 7/19/07, David Rosenstrauch <[EMAIL PROTECTED]> wrote:
>> Martijn Dashorst wrote:
>>> It is configurable: don't use PasswordTextField but TextField instead.
>> No.  If you try to use a TextField, then wicket will insist that you
>> convert your HTML to use  instead of > type="password"/> - and thus lose the masked password entry capabilities
>> (i.e., echoing "*" characters).
> 
> In 1.3-beta2 the type is not specified: so you can use any type of
> field.


?  I am using 1.3-beta2.


> IIUC (I don't have the code open) you can override the
> getType() method of the textfield, and return null.
> 
> Martijn
> 

Hmmm ... I don't think I totally understand what you're suggesting here:

new RequiredTextField() {
public Class getType() {
return what?!?!?;
}
}

And now that I check, that's not even allowed.  getType() is final in 
FormComponent.

DR

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] PasswordTextField encryption

2007-07-19 Thread David Rosenstrauch
Daniel Fernández Garrido wrote:
> David, I think your problem (not wanting password to come encrypted from the
> input component) would be solved by simply making your Application object
> return your own implementation of the
> wicket.settings.ISecuritySettingsinterface for its getSecuritySettings
> method. And in this extension
> (MySecuritySettings, for instance) make that the getCryptFactory method
> return a wicket.util.crypt.NoCryptFactory object.
> 
> This way you would be able to use PasswordTextField component while not
> getting your text encrypted from it.
> 
> Regards,
> Daniel.

Hmmm ... well, I guess I'll do that if I have to.

But (despite my initial message) I think I actually don't have a problem 
with Wicket encrypting the password internally (as long as it gets 
delivered to the model and the model target unencrypted).

But as per the bug I found, it looks like perhaps I ran into a case 
where Wicket is encrypting the password field when it shouldn't be.  As 
long as it was working correctly, though, (or there's some workaround) 
then I guess I don't really have any need to bypass the internal encryption.

Thanks,

DR

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] PasswordTextField encryption

2007-07-19 Thread Martijn Dashorst
PasswordTextField {
protected String getInputType()
{
return "password";
}
}

TextField {
/**
 * Subclass should override this method if this textfields mappes on
a different
 * input type as text. Like PasswordField or HiddenField.
 *
 * @return The input type of this textfield, default is 'text'
 */
protected String getInputType()
{
return null;
}
}

On 7/19/07, David Rosenstrauch <[EMAIL PROTECTED]> wrote:
> Martijn Dashorst wrote:
> > On 7/19/07, David Rosenstrauch <[EMAIL PROTECTED]> wrote:
> >> Martijn Dashorst wrote:
> >>> It is configurable: don't use PasswordTextField but TextField instead.
> >> No.  If you try to use a TextField, then wicket will insist that you
> >> convert your HTML to use  instead of  >> type="password"/> - and thus lose the masked password entry capabilities
> >> (i.e., echoing "*" characters).
> >
> > In 1.3-beta2 the type is not specified: so you can use any type of
> > field.
>
>
> ?  I am using 1.3-beta2.
>
>
> > IIUC (I don't have the code open) you can override the
> > getType() method of the textfield, and return null.
> >
> > Martijn
> >
>
> Hmmm ... I don't think I totally understand what you're suggesting here:
>
> new RequiredTextField() {
> public Class getType() {
> return what?!?!?;
> }
> }
>
> And now that I check, that's not even allowed.  getType() is final in
> FormComponent.
>
> DR
>
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-- 
Wicket joins the Apache Software Foundation as Apache Wicket
Apache Wicket 1.3.0-beta2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Repaint single row of a DataTable

2007-07-19 Thread ChuckDeal

I searched for answers to this problem, but most responses were to repaint
the whole table (or more specifically, the container holding the table).

I am trying to make an editable grid.  In addition to that, when some cell
contents change, other cells may need to be repainted (they might contain
computed values based upon values of one or more other cells).  For
performance, I don't want to repaint the entire table on each keypress, but
repainting the single row won't be so bad.

What could I do to repaint a single row of a DataTable?  Don't use
DataTable?  but I think I still want a repeater and ultimatley it is the
repeater's fault that I can't repaint because the MarkupFragmentFinder can't
grab the markup because it uses the component's id to "match" up to the
markup it finds and the id of repeater children will never match.  It would
need to know that it is a repeater child and use it's parent it to match the
markup.  Component.renderComponent is final and new MArkupFragmentFinder is
hardcoded in there, so it doesn't look like I can create a custom
MarkupFragmentFinder impl for this special case.

Maybe I am seeing this from the wrong perspective?  Could someone suggest an
alternative to this approach?  Basically, I like Datatable because it allows
me to define each cell (and any number of them), but I want the ability to
repaint only PART of the table...

Thanks
Chuck
-- 
View this message in context: 
http://www.nabble.com/Repaint-single-row-of-a-DataTable-tf4111859.html#a11691581
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Passing parameters to a page in WicketTester

2007-07-19 Thread Federico Fanton
On Thu, 19 Jul 2007 07:25:47 -0700 (PDT)
jonaqua <[EMAIL PROTECTED]> wrote:

> but this was in the javadoc for WicketTester

D'oh!! I'm sorry :(

> Instead of tester.startPage(pageClass), we define a ITestPageSource to
> provide testing page instance for WicketTester.

I see.. Many thanks, you've been very kind, I deserved a "RTFM" X-)


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Download / View Attacment (like gmail)

2007-07-19 Thread Francisco Diaz Trepat - gmail
Hello.

Any way of doing this?

-- Forwarded message --
From: Francisco Diaz Trepat - gmail <[EMAIL PROTECTED]>
Date: Jul 18, 2007 4:15 PM
Subject: Download / View Attacment (like gmail)
To: wicket-user@lists.sourceforge.net


Hi guys is there an easy way to have, say two buttons or links, one
downloads a txt file and the other one opens it up on a new window?

mus be ajax.

f(t)
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] PasswordTextField encryption

2007-07-19 Thread David Rosenstrauch
Martijn Dashorst wrote:
> PasswordTextField {
>   protected String getInputType()
>   {
>   return "password";
>   }
> }
> 
> TextField {
>   /**
>* Subclass should override this method if this textfields mappes on
> a different
>* input type as text. Like PasswordField or HiddenField.
>*
>* @return The input type of this textfield, default is 'text'
>*/
>   protected String getInputType()
>   {
>   return null;
>   }
> }

Maybe so, but this is what I get when I use a RequiredTextField coupled 
to an :

org.apache.wicket.markup.MarkupException: Component password must be 
applied to a tag with 'type' attribute matching 'text', not 'password'
[markup = file:/usr/local/.pr/jb/test_classes/unit/PasswordPage.html

Password required test page








, index = 11, current = '' 
(line 6, column 1)]

...

You can grab the code from 
https://issues.apache.org/jira/browse/WICKET-768 if you want to try this 
yourself.

DR

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] PasswordTextField encryption

2007-07-19 Thread Martijn Dashorst
Ok, my bad: you need to provide your own type...

So create a MyRequiredPasswordTextField, and override the
getInputType() and have it return "password"

Martijn

On 7/19/07, David Rosenstrauch <[EMAIL PROTECTED]> wrote:
> Martijn Dashorst wrote:
> > PasswordTextField {
> >   protected String getInputType()
> >   {
> >   return "password";
> >   }
> > }
> >
> > TextField {
> >   /**
> >* Subclass should override this method if this textfields mappes on
> > a different
> >* input type as text. Like PasswordField or HiddenField.
> >*
> >* @return The input type of this textfield, default is 'text'
> >*/
> >   protected String getInputType()
> >   {
> >   return null;
> >   }
> > }
>
> Maybe so, but this is what I get when I use a RequiredTextField coupled
> to an :
>
> org.apache.wicket.markup.MarkupException: Component password must be
> applied to a tag with 'type' attribute matching 'text', not 'password'
> [markup = file:/usr/local/.pr/jb/test_classes/unit/PasswordPage.html
> 
> Password required test page
> 
> 
> 
> 
> 
> 
> 
> 
> , index = 11, current = ''
> (line 6, column 1)]
>
> ...
>
> You can grab the code from
> https://issues.apache.org/jira/browse/WICKET-768 if you want to try this
> yourself.
>
> DR
>
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-- 
Wicket joins the Apache Software Foundation as Apache Wicket
Apache Wicket 1.3.0-beta2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Repaint single row of a DataTable

2007-07-19 Thread Peter Thomas
On 7/19/07, ChuckDeal <[EMAIL PROTECTED]> wrote:
>
>
> I searched for answers to this problem, but most responses were to repaint
> the whole table (or more specifically, the container holding the table).
>
> I am trying to make an editable grid.  In addition to that, when some cell
> contents change, other cells may need to be repainted (they might contain
> computed values based upon values of one or more other cells).  For
> performance, I don't want to repaint the entire table on each keypress,
> but
> repainting the single row won't be so bad.
>
> What could I do to repaint a single row of a DataTable?  Don't use
> DataTable?  but I think I still want a repeater and ultimatley it is the
> repeater's fault that I can't repaint because the MarkupFragmentFinder
> can't
> grab the markup because it uses the component's id to "match" up to the
> markup it finds and the id of repeater children will never match.  It
> would
> need to know that it is a repeater child and use it's parent it to match
> the
> markup.  Component.renderComponent is final and new MArkupFragmentFinder
> is
> hardcoded in there, so it doesn't look like I can create a custom
> MarkupFragmentFinder impl for this special case.
>
> Maybe I am seeing this from the wrong perspective?  Could someone suggest
> an
> alternative to this approach?  Basically, I like Datatable because it
> allows
> me to define each cell (and any number of them), but I want the ability to
> repaint only PART of the table...
>
> Thanks
> Chuck
> --


How about this thread:

http://www.nabble.com/Adding-item-to-ListView-over-Ajax---refresh-only-newest-row-t3971491.html#a11572531

Does this help?

Thanks,

Peter.
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Question regarding dropdownchoice

2007-07-19 Thread Walter_Ritzel
Hello to all!

I'm beginning to learn how to use wicket and I have a question regarding
DropDownChoice: I have a POJO that is serving me as the model for my
page, so my form is bind to the properties.
My problem with the Dropdownchoice in this case is: even if the property
in the POJO is filled exactly with the same string as the dropdown, I
never have the proper value selected. It is always selecting that
"Choose One" option. So , the question really is: what I need to do to
have this working properly?


Follow below the source code for this situation:
public class User {
   private String userName;
   private String userType;

  public User() {
  this.userType = "General User";
  }

 /* getters/setters */
}

Now, I'll create a page and bind this POJO in the interface:
HTML:

Test Page
   

  User Name: 
 User Type: 
Demo 1
Demo 2
   
   
  

JAVA:
public class TestPage extends WebPage {
   private String[] options = new String[] {new String("Test User"), new
String("General User")};
   private List OPTIONS = Array.arrayAsList(options);
public TestPage() {
 User user = new User();
CompoundPropertyModel userModel = new
CompoundPropertyModel(user);
 Form testForm = new Form("testForm", userModel);
 TextField userName = new TextField("userName");
 DropDownChoice userType = new DropDownChoice("userType", new
PropertyModel(userModel,"userType"), OPTIONS);
testForm.add(userName);
   testForm.add(userType);
  add(testForm);
   }
} 

Regards,
Walter Ritzel, Developer
[EMAIL PROTECTED] 

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] PasswordTextField encryption

2007-07-19 Thread David Rosenstrauch
Martijn Dashorst wrote:
> Ok, my bad: you need to provide your own type...
> 
> So create a MyRequiredPasswordTextField, and override the
> getInputType() and have it return "password"
> 
> Martijn

K.  That makes much more sense.  Thx.

BTW, I'm curious to hear if anyone has any thoughts about the related 
bug I filed: https://issues.apache.org/jira/browse/WICKET-768

Seems like a weird issue.

Thx,

DR

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] .properties encoding

2007-07-19 Thread Igor Vaynberg
he problem here is specifying the charset, properties factory is global so
you might encode your files one way but a jar you use with components might
have them encoded in another charset - so we cannot really have a global
charset specified. i think the proper thing to do is use xml properties
format where you specify charset/file

-igor


On 7/19/07, wheleph <[EMAIL PROTECTED]> wrote:
>
>
> I've solved the problem in the following way:
>
> 1. I've created CustomPropertiesFactory subclass of PropertiesFactory and
> put it in wicket.resource package (to get access to
> wicket.resource.Properties' package-private constructor)
>
> package wicket.resource;
> ...
> public class CustomPropertiesFactory extends PropertiesFactory {
> private String charset;
>
> public CustomPropertiesFactory(final String charset) {
> this.charset = charset;
> }
>
> private synchronized Properties loadPropertiesFile(final String
> key,
> final IResourceStream resourceStream, final Class
> componentClass,
> final String style, final Locale locale) {
> ...
> // this is the custom line
> properties.load(
> new
> InputStreamReader(
> new
> BufferedInputStream(
>
> resourceStream.getInputStream()),
> charset));
> //  properties.load(new
> BufferedInputStream(resourceStream
>
> //  .getInputStream()));
> strings = new
> ValueMap(properties);
> ...
> }
> ...
> }
>
> 2. I've attached the instance of class given above to application:
> public class EcoApplication extends SpringWebApplication {
>
> ...
> @Override
> public final void init() {
> // this line is important
> // for spring-injection through annotations
> addComponentInstantiationListener(new
> SpringComponentInjector(this));
> // here is the attachment
> getSettings().setPropertiesFactory(new
> CustomPropertiesFactory("cp1251"));
> }
> }
> --
> View this message in context:
> http://www.nabble.com/.properties-encoding-tf4110226.html#a11690737
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Download / View Attacment (like gmail)

2007-07-19 Thread Igor Vaynberg
On 7/19/07, Francisco Diaz Trepat - gmail <[EMAIL PROTECTED]>
wrote:
>
> Hello.
>
> Any way of doing this?


see downloadlink and popupsettings

-igor




-- Forwarded message --
> From: Francisco Diaz Trepat - gmail <[EMAIL PROTECTED]>
> Date: Jul 18, 2007 4:15 PM
> Subject: Download / View Attacment (like gmail)
> To: wicket-user@lists.sourceforge.net
>
>
> Hi guys is there an easy way to have, say two buttons or links, one
> downloads a txt file and the other one opens it up on a new window?
>
> mus be ajax.
>
> f(t)
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Question regarding dropdownchoice

2007-07-19 Thread Igor Vaynberg
On 7/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hello to all!
>
> I'm beginning to learn how to use wicket and I have a question regarding
> DropDownChoice: I have a POJO that is serving me as the model for my
> page, so my form is bind to the properties.
> My problem with the Dropdownchoice in this case is: even if the property
> in the POJO is filled exactly with the same string as the dropdown, I
> never have the proper value selected. It is always selecting that
> "Choose One" option. So , the question really is: what I need to do to
> have this working properly?
>
>
> Follow below the source code for this situation:
> public class User {
>private String userName;
>private String userType;
>
>   public User() {
>   this.userType = "General User";
>   }
>
> /* getters/setters */
> }
>
> Now, I'll create a page and bind this POJO in the interface:
> HTML:
> 
> Test Page
>
> 
>   User Name: 
>  User Type: 
> Demo 1
> Demo 2
>
>
>   
> 
> JAVA:
> public class TestPage extends WebPage {
>private String[] options = new String[] {new String("Test User"), new
> String("General User")};
>private List OPTIONS = Array.arrayAsList(options);
> public TestPage() {
>  User user = new User();
> CompoundPropertyModel userModel = new
> CompoundPropertyModel(user);
>  Form testForm = new Form("testForm", userModel);
>  TextField userName = new TextField("userName");
>  DropDownChoice userType = new DropDownChoice("userType", new
> PropertyModel(userModel,"userType"), OPTIONS);
> testForm.add(userName);
>testForm.add(userType);
>   add(testForm);
>}
> }


set a breakpoint in abstractsingleselectchoice.isselected() and see why it
is returning false

futher, since you are using a compound model this

 DropDownChoice userType = new DropDownChoice("userType", new
PropertyModel(userModel,
>
> "userType"), OPTIONS);



can be changed to

 DropDownChoice userType = new DropDownChoice("userType",OPTIONS);

-igor








Regards,
> Walter Ritzel, Developer
> [EMAIL PROTECTED]
>
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] .properties encoding

2007-07-19 Thread Eelco Hillenius
On 7/19/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> I vaguely remember something about xml properties files that do handle
> other encodings. Didn't we implement that? Or was it just one of those
> things to do in the next version?

Yes, that is implemented now. XML properties is a JDK 5 feature, but I
backported the functionality to Wicket a while ago. Look at the form
input example. See FormInput_ru.xml for instance, which has:


http://java.sun.com/dtd/properties.dtd";>

'${input}' не является
корректным URL
'${input}' не
является корректным телефонным номером США
Локаль:
по-умолчанию

Etc.

Eelco
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Repaint single row of a DataTable

2007-07-19 Thread ChuckDeal


ptrthomas wrote:
> 
> How about this thread:
> 
> http://www.nabble.com/Adding-item-to-ListView-over-Ajax---refresh-only-newest-row-t3971491.html#a11572531
> 
> Does this help?
> 
> Thanks,
> 
> Peter.
> 

Not quite, I want to be able to repaint a row that has already been output. 
Although, this does give me some insight on the next feature that I have to
add to the grid...

Chuck
-- 
View this message in context: 
http://www.nabble.com/Repaint-single-row-of-a-DataTable-tf4111859.html#a11693796
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Repaint single row of a DataTable

2007-07-19 Thread Igor Vaynberg
this is tricky because datatable encapsulates a lot of this stuff so it will
probably need something exposed for this usecase. if you create a quickstart
that has a datatable, some bogus data, and some links in columns that should
trigger a refresh i can play around with it and see what needs to be done.

-igor


On 7/19/07, ChuckDeal <[EMAIL PROTECTED]> wrote:
>
>
> I searched for answers to this problem, but most responses were to repaint
> the whole table (or more specifically, the container holding the table).
>
> I am trying to make an editable grid.  In addition to that, when some cell
> contents change, other cells may need to be repainted (they might contain
> computed values based upon values of one or more other cells).  For
> performance, I don't want to repaint the entire table on each keypress,
> but
> repainting the single row won't be so bad.
>
> What could I do to repaint a single row of a DataTable?  Don't use
> DataTable?  but I think I still want a repeater and ultimatley it is the
> repeater's fault that I can't repaint because the MarkupFragmentFinder
> can't
> grab the markup because it uses the component's id to "match" up to the
> markup it finds and the id of repeater children will never match.  It
> would
> need to know that it is a repeater child and use it's parent it to match
> the
> markup.  Component.renderComponent is final and new MArkupFragmentFinder
> is
> hardcoded in there, so it doesn't look like I can create a custom
> MarkupFragmentFinder impl for this special case.
>
> Maybe I am seeing this from the wrong perspective?  Could someone suggest
> an
> alternative to this approach?  Basically, I like Datatable because it
> allows
> me to define each cell (and any number of them), but I want the ability to
> repaint only PART of the table...
>
> Thanks
> Chuck
> --
> View this message in context:
> http://www.nabble.com/Repaint-single-row-of-a-DataTable-tf4111859.html#a11691581
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] closing ServletResponse stream/writer

2007-07-19 Thread jan_bar
Thanks for your care. I have a filter that appends some statistics (request
processing time, date, ...) as comment to response of text/html content:

final String stats = String.format("", new Date(),
responseTime);
try {
try {
response.getOutputStream().println(stats);
} catch(IllegalStateException e) {
// try writer
response.getWriter().println(stats);
}
} catch (IOException e) {
LOG.warn("Cannot write to response", e);
}

-- 
Jan Bares
http://jan.vegetband.cz


"Johan Compagner" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> i can remove the close() on it.
> But i am curious what you want to write afterwards
> because how do you know what to get the writer or the outputstream?
> because for the redirect strategy we just use the outpustream (bytes)
> instead of the writer (strings)
>
> and you can't use the output and the writer in one request.
>
> if you want to append or do stuff or replace stuff wicket has special
> support for that with IResponseFilters
>
> johan
>
> On 7/19/07, jan_bar <[EMAIL PROTECTED]> wrote:
> >
> > Thans for the answer, but I never said that BufferedHttpServletResponse
is
> > handled by container. In my opinion, BufferedHttpServletResponse should
> > not
> > call servletResponse.getOutputStream().close(), as pointed in my first
> > quesion. There can be other filters up the chain who want to write to
the
> > response. Besides that, wicket is incosistent. For instance WebResponse
> > uses
> > httpServletResponse.getWriter(), but never calls close() on it.
> >
> > Regards, Jan
> >
> > --
> > Jan Bares
> > http://jan.vegetband.cz
> >
> >
> > "Jean-Baptiste Quenot" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > * jan_bar:
> > > >
> > > > the ServletResponse javadoc doesn't state if and when one should
call
> > > > getWriter().close() or getOutputStream().close(). I have a filter
that
> > > > writes comments after the request was processed. Wicket sometimes
> > closes
> > the
> > > > response and sometimes not. For instance
> > > > BufferedHttpServletResponse.writeTo(HttpServletResponse
> > servletResponse)
> > > > calls:
> > > >
> > > > final OutputStream out = servletResponse.getOutputStream();
> > > > out.write(this.byteBuffer);
> > > > out.close();
> > >
> > > FYI BufferedHttpServletResponse is not directly handled by the
> > > servlet container, it is a wrapper around the real response for
> > > the REDIRECT_TO_BUFFER RenderStrategy.
> > > --
> > >  Jean-Baptiste Quenot
> > > aka  John Banana   Qwerty
> > > http://caraldi.com/jbq/
> > >
> > >
>
> -
> > > This SF.net email is sponsored by DB2 Express
> > > Download DB2 Express C - the FREE version of DB2 express and take
> > > control of your XML. No limits. Just data. Click to get it now.
> > > http://sourceforge.net/powerbar/db2/
> >
> >
> >
> >
>
> -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/




-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Repaint single row of a DataTable

2007-07-19 Thread ChuckDeal


Matej Knopp-2 wrote:
> 
> AjaxRequestTarget target;
> target.addComponent(item);
> 
> where item is a repeater Item.
> 
> This doesn't work for you? What wicket version are you using?
> 
> -Matej
> 

1.3.0-SNAPSHOT

Here's how the Column is created...  basically it is adding a custom
Fragment to the cellItem.  That Fragment represents a TextField onto which I
put the Ajax event.

columns.add(new AbstractColumn(new Model("Added")) {
public void populateItem(final Item cellItem, final String componentId,
final IModel rowModel) {
cellItem.add(new NumericTextFieldFragment(componentId, rowModel,
"slocAdded", "6", 0) {
@Override
protected void decorateTextField(TextField tf) {
super.decorateTextField(tf);

tf.add(new 
AjaxFormComponentUpdatingBehavior("onkeyup") {
@Override
protected void 
onUpdate(AjaxRequestTarget target) {
MarkupContainer row = 
cellItem.findParent(Item.class);
target.addComponent(row);
}
});
}
});
}
});


which throws this exception

13:56:20,494 ERROR RequestCycle:1255 - Unable to find the markup for the
component. That may be due to transparent containers or components
implementing IComponentResolver: [MarkupContainer [Component id = id1, page
= com.csc.aims.specchange.wicket.SpecChangePage, path =
0:contentPanel:dataForm:romEvents:currentEvent:collapsibleBody:sections:current:nonemptyLanguage:subsections:romSlocData:collapsibleBody:sections:slocData:slocData:rows:id1.OddEvenItem,
isVisible = true, isVersioned = true]]
org.apache.wicket.WicketRuntimeException: Unable to find the markup for the
component. That may be due to transparent containers or components
implementing IComponentResolver: [MarkupContainer [Component id = id1, page
= com.csc.aims.specchange.wicket.SpecChangePage, path =
0:contentPanel:dataForm:romEvents:currentEvent:collapsibleBody:sections:current:nonemptyLanguage:subsections:romSlocData:collapsibleBody:sections:slocData:slocData:rows:id1.OddEvenItem,
isVisible = true, isVersioned = true]]
at
org.apache.wicket.MarkupFragmentFinder.find(MarkupFragmentFinder.java:111)
at org.apache.wicket.Component.renderComponent(Component.java:2024)
at
org.apache.wicket.ajax.AjaxRequestTarget.respondComponent(AjaxRequestTarget.java:762)
at
org.apache.wicket.ajax.AjaxRequestTarget.respondComponents(AjaxRequestTarget.java:662)
at
org.apache.wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java:520)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1038)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1108)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:257)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:127)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:495)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)


during renderComponent(), a new Marku

Re: [Wicket-user] Repaint single row of a DataTable

2007-07-19 Thread Matej Knopp
AjaxRequestTarget target;
target.addComponent(item);

where item is a repeater Item.

This doesn't work for you? What wicket version are you using?

-Matej

On 7/19/07, ChuckDeal <[EMAIL PROTECTED]> wrote:
>
>
> ptrthomas wrote:
> >
> > How about this thread:
> >
> > http://www.nabble.com/Adding-item-to-ListView-over-Ajax---refresh-only-newest-row-t3971491.html#a11572531
> >
> > Does this help?
> >
> > Thanks,
> >
> > Peter.
> >
>
> Not quite, I want to be able to repaint a row that has already been output.
> Although, this does give me some insight on the next feature that I have to
> add to the grid...
>
> Chuck
> --
> View this message in context: 
> http://www.nabble.com/Repaint-single-row-of-a-DataTable-tf4111859.html#a11693796
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] closing ServletResponse stream/writer

2007-07-19 Thread Johan Compagner
ahh ok, We have ResponseFilter in wicket build in that do that.

johan


On 7/19/07, jan_bar <[EMAIL PROTECTED]> wrote:
>
> Thanks for your care. I have a filter that appends some statistics
> (request
> processing time, date, ...) as comment to response of text/html content:
>
> final String stats = String.format("", new Date(),
> responseTime);
> try {
> try {
> response.getOutputStream().println(stats);
> } catch(IllegalStateException e) {
> // try writer
> response.getWriter().println(stats);
> }
> } catch (IOException e) {
> LOG.warn("Cannot write to response", e);
> }
>
> --
> Jan Bares
> http://jan.vegetband.cz
>
>
> "Johan Compagner" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > i can remove the close() on it.
> > But i am curious what you want to write afterwards
> > because how do you know what to get the writer or the outputstream?
> > because for the redirect strategy we just use the outpustream (bytes)
> > instead of the writer (strings)
> >
> > and you can't use the output and the writer in one request.
> >
> > if you want to append or do stuff or replace stuff wicket has special
> > support for that with IResponseFilters
> >
> > johan
> >
> > On 7/19/07, jan_bar <[EMAIL PROTECTED]> wrote:
> > >
> > > Thans for the answer, but I never said that
> BufferedHttpServletResponse
> is
> > > handled by container. In my opinion, BufferedHttpServletResponse
> should
> > > not
> > > call servletResponse.getOutputStream().close(), as pointed in my first
> > > quesion. There can be other filters up the chain who want to write to
> the
> > > response. Besides that, wicket is incosistent. For instance
> WebResponse
> > > uses
> > > httpServletResponse.getWriter(), but never calls close() on it.
> > >
> > > Regards, Jan
> > >
> > > --
> > > Jan Bares
> > > http://jan.vegetband.cz
> > >
> > >
> > > "Jean-Baptiste Quenot" <[EMAIL PROTECTED]> wrote in message
> > > news:[EMAIL PROTECTED]
> > > > * jan_bar:
> > > > >
> > > > > the ServletResponse javadoc doesn't state if and when one should
> call
> > > > > getWriter().close() or getOutputStream().close(). I have a filter
> that
> > > > > writes comments after the request was processed. Wicket sometimes
> > > closes
> > > the
> > > > > response and sometimes not. For instance
> > > > > BufferedHttpServletResponse.writeTo(HttpServletResponse
> > > servletResponse)
> > > > > calls:
> > > > >
> > > > > final OutputStream out = servletResponse.getOutputStream();
> > > > > out.write(this.byteBuffer);
> > > > > out.close();
> > > >
> > > > FYI BufferedHttpServletResponse is not directly handled by the
> > > > servlet container, it is a wrapper around the real response for
> > > > the REDIRECT_TO_BUFFER RenderStrategy.
> > > > --
> > > >  Jean-Baptiste Quenot
> > > > aka  John Banana   Qwerty
> > > > http://caraldi.com/jbq/
> > > >
> > > >
> >
> >
> -
> > > > This SF.net email is sponsored by DB2 Express
> > > > Download DB2 Express C - the FREE version of DB2 express and take
> > > > control of your XML. No limits. Just data. Click to get it now.
> > > > http://sourceforge.net/powerbar/db2/
> > >
> > >
> > >
> > >
> >
> >
> -
> > > This SF.net email is sponsored by DB2 Express
> > > Download DB2 Express C - the FREE version of DB2 express and take
> > > control of your XML. No limits. Just data. Click to get it now.
> > > http://sourceforge.net/powerbar/db2/
> > > ___
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
> -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
>
>
>
>
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Adding markup dynamically to a container?

2007-07-19 Thread mperham

I'd like to build a dynamic charting applet component so that the page can
hardcode some presentation params but other params are generated
dynamically.  For instance:


  
  
  
  
  


The params above are presentation and page-specific so they belong in the
page's HTML.  However I also need to emit several params which are
data-driven and contain the actual data to render in the chart.  I want the
applet component to automatically inject any number of additional params at
runtime.  How can I do this mix of static and dynamic markup?  Can the
component subclass WebMarkupContainer and override onComponentTagBody() to
do this somehow?  Any pointers and examples would be appreciated.  I'm using
1.2.6.

mike
-- 
View this message in context: 
http://www.nabble.com/Adding-markup-dynamically-to-a-container--tf4112871.html#a11695022
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Select and SelectOptions

2007-07-19 Thread mperham

Use a RepeatingView?


Huy Do-4 wrote:
> 
> Hi,
> 
> I have been trying to use select and selectoptions in wicket-extensions 
> but I can't figure out how to get a dynamic set of optgroups going.
> 
> I have seen the example from the mailing list where
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> My problem lies in the fact that I don't know all my optgroups before 
> hand. It changes depending on the current user.
> 
> I am trying to get the following output
> 
> 
> 
> 1
> 2
> 
> 
> 3
> 4
> 
> ...
> ...
> 
> 
> Any pointers would be greatly appreciated.
> 
> Thanks
> 
> Huy
> 
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Select-and-SelectOptions-tf4108987.html#a11695243
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Adding markup dynamically to a container?

2007-07-19 Thread Igor Vaynberg
class applet extends webcomponent {
 oncomponenttagbody(tag) {
   strinbuilder b=new stringbuilder();
b.append("");
...
   replacecomponenttagbody(tag, b.tostring());
  }
}

-igor


On 7/19/07, mperham <[EMAIL PROTECTED]> wrote:
>
>
> I'd like to build a dynamic charting applet component so that the page can
> hardcode some presentation params but other params are generated
> dynamically.  For instance:
>
> 
>
>
>
>
>
> 
>
> The params above are presentation and page-specific so they belong in the
> page's HTML.  However I also need to emit several params which are
> data-driven and contain the actual data to render in the chart.  I want
> the
> applet component to automatically inject any number of additional params
> at
> runtime.  How can I do this mix of static and dynamic markup?  Can the
> component subclass WebMarkupContainer and override onComponentTagBody() to
> do this somehow?  Any pointers and examples would be appreciated.  I'm
> using
> 1.2.6.
>
> mike
> --
> View this message in context:
> http://www.nabble.com/Adding-markup-dynamically-to-a-container--tf4112871.html#a11695022
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Repaint single row of a DataTable

2007-07-19 Thread ChuckDeal


igor.vaynberg wrote:
> 
> this is tricky because datatable encapsulates a lot of this stuff so it
> will
> probably need something exposed for this usecase. if you create a
> quickstart
> that has a datatable, some bogus data, and some links in columns that
> should
> trigger a refresh i can play around with it and see what needs to be done.
> 
> -igor
> 

Alright, this should do it: 
http://www.nabble.com/file/p11695492/quickstart-singlerowrefresh.zip
quickstart-singlerowrefresh.zip 

This quickstart (minus the lib folder) has a simple DataTable with two
columns.  Column one contains a button designed to repaint the row, the
second column is a label representing the rowModel.

I am not locked into the DataTable, but I think the repeater is the best
component for what I am trying to do.  Is that correct?

Thanks for looking into this.

Chuck
-- 
View this message in context: 
http://www.nabble.com/Repaint-single-row-of-a-DataTable-tf4111859.html#a11695492
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] WicketTester & border

2007-07-19 Thread Thies Edeling
I have a page containing a border and a form:

GreyRoundedBorder greyBorder = new GreyRoundedBorder("configFrame", new 
ResourceModel("admin.config.title"));
Form configForm = new Form("configForm", new 
CompoundPropertyModel(dbConfig));
greyBorder.add(configForm);

When I want to unit test the form using WicketTester I get a NullPointer on
public Component getComponentFromLastRenderedPage(String path)
{
final Component component = getLastRenderedPage().get(path);

from BaseWicketTester. Apparently getComponentFromLastRenderedPage only 
checks the direct children of the Page and
doesn't travel down the hierarchy. How to get a reference to the 
'nested' Form ?

regards,
Thies



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Adding markup dynamically to a container?

2007-07-19 Thread mperham

But I don't want to replace the body content of the markup container.  I want
to add additional tags at the bottom of the container's body.


  
  
  


Something like this:

/**
 * @param extraParams a Map which will be rendered as
additional parameters 
 * within the applet tag at runtime.
 */
public Chart(String id, Map extraParams) {

Make more sense?

mike


igor.vaynberg wrote:
> 
> class applet extends webcomponent {
>  oncomponenttagbody(tag) {
>strinbuilder b=new stringbuilder();
> b.append("");
> ...
>replacecomponenttagbody(tag, b.tostring());
>   }
> }
> 
> -igor
> 
> 
> On 7/19/07, mperham <[EMAIL PROTECTED]> wrote:
>>
>>
>> I'd like to build a dynamic charting applet component so that the page
>> can
>> hardcode some presentation params but other params are generated
>> dynamically.  For instance:
>>
>> 
>>
>>
>>
>>
>>
>> 
>>
>> The params above are presentation and page-specific so they belong in the
>> page's HTML.  However I also need to emit several params which are
>> data-driven and contain the actual data to render in the chart.  I want
>> the
>> applet component to automatically inject any number of additional params
>> at
>> runtime.  How can I do this mix of static and dynamic markup?  Can the
>> component subclass WebMarkupContainer and override onComponentTagBody()
>> to
>> do this somehow?  Any pointers and examples would be appreciated.  I'm
>> using
>> 1.2.6.
>>
>> mike
>> --
>> View this message in context:
>> http://www.nabble.com/Adding-markup-dynamically-to-a-container--tf4112871.html#a11695022
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2005.
>> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Adding-markup-dynamically-to-a-container--tf4112871.html#a11695730
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Modal Window and "Page Expired".

2007-07-19 Thread Laurent Brucher
"Five modal windows", huh?
Nope, there is only one modal window in the page, that's all.
Not sure where you got the "5".

Anyway, will give it a try with wicket 1.3.
I'm not familiar with quickstart but will figure out, or I'll ask.

Thanks,
Laurent.


-Original Message-
From: Matej Knopp [mailto:[EMAIL PROTECTED] 
Sent: jeudi 19 juillet 2007 10:36
To: [EMAIL PROTECTED]; wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Modal Window and "Page Expired".

Five modal windows? At the same time? It might be that you are running out
of pagemaps.

This is very weird, hovewer, seems to be reproducable. Can you post a
quickstart? Also, could you check if this is working with wicket 1.3?

-Matej

On 7/18/07, Laurent Brucher <[EMAIL PROTECTED]> wrote:
> Cookies have been cleared many times, without any success ;-)
>
> But I found out what is "causing" (directly or indirectly) the problem:
> In the page that includes the ajax button that is used to bring up the 
> modal window, there is a  section at the top of the page.
> If I remove this  section, there is no problem with the 
> modal window anymore.
>
> The page globally looks like:
> 
> 
> ...
> 
> 
> ...
> 
> 
> 
> 
> 
>
> Somehow, I've noticed that including the  triggers an 
> additional HTTP request to the same URL (that is, the URL to display 
> the above page).
> Dunno why this is happening but the end result is that the pagemap 
> then contains 2 versions for the same page ID.
> Then, when I hit the button that brings up the modal window, the 
> framework is trying to access the above page, version 0. This has the 
> effect of putting that page's version at the top of the pagemap's 
> access stack
> (PageMap.access() method). By doing this, the version 1 of the page is 
> removed from the access stack, but also the page itself (call to 
> PageMap.remove(Page)).
> Thus, once the modal window gets closed and the original page needs to 
> be rendered, we get a page expired since it was removed from the cache.
>
> That's as far as I can describe what I've seen & understood tracing 
> the code.
> I'm not sure where the problem lies: second request because of the 
>  or incorrectly evicting the page.
>
> Maybe there is something funky in my own code but I don't see what. Or 
> maybe there is an issue here.
> Any input would be helpful at this point.
>
> Thanks!
> Laurent.
>
>
>
>   _
>
> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> Sent: mercredi 18 juillet 2007 8:50
> To: [EMAIL PROTECTED]; wicket-user@lists.sourceforge.net
> Subject: Re: [Wicket-user] Modal Window and "Page Expired".
>
>
> On 7/13/07, Laurent Brucher <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> There was a post last December about the same problem that I'm facing 
> right now, which is getting a page expired error page after I close a 
> modal window.
> The post was called "Firefox and ModalWindow" and seemed to talk about 
> the issue for FF only.
> I've encountered the problem first with FF (2.0.0.4). After reading 
> the post, I tried with IE7 and it worked ok (that was this afternoon).
> This evening, neither IE7 or FF work anymore. Darn! Clearing cookies 
> and stuff don't change a thing.
> Oh, and of course, the Ajax ModalWindow example works just fine (my 
> code is heavily inspired from that example)...
> I'm using Wicket 1.2.6, Tomcat 5.5.20, Jdk1.6u2.
>
> Have you guys shed any light on this issue at all?
> I've tried to trace the code, but as I'm rather new to Wicket, I 
> couldn't really figure out what's going on...
>
> Anything I can do to help address this?
>
>
> i wonder, clear cookies in firefox and try again. i know there was a 
> similar problem if you didnt set the cookie name in the modal window 
> using setcookiename(), but looks like you did that. still, try 
> clearing the cookies.
>
> -igor
>
>
>
>
>
> Below is the code I use, just in case.
>
> Reagrds,
> Laurent.
>
>
> // Page containing the modal window
> public class MainPage extends WebPage {
> public MainPage()
> {
> ...
> add( new PreferredStationsDialog("prefStationsDialog") );
> ...
> }
> }
>
> // The modal window impl.
> public class PreferredStationsDialog extends ModalWindow {
> public PreferredStationsDialog(String id)
> {
> super(id);
>
> setTitle("xyz");
> setCookieName("prefStationsDialog");
> setPageMapName("prefStationsDialogPageMap");
> setPageCreator( new ModalWindow.PageCreator() {
> @Override
> public Page createPage() {
> return new
> PreferredStationsDialogPage(PreferredStationsDialog.this);
> }
> });
>
> setCloseButtonCallback(new ModalWindow.CloseButtonCallback() {
> public boolean onCloseButtonClicked(AjaxRequestTarget target)
{
> return true;
> }
> });
> }
> }
>
> // The content of the modal window, as a Page public class 
> PreferredStat

[Wicket-user] tooltip example

2007-07-19 Thread Flemming Boller
Hi


I hope this is not considered spam, but I have created a small tutorial
about how I have "wickyfied" a little YUI control, the tooltip.

http://bollersblog.blogspot.com


Comments are more than welcome, as this is my first attempt to "write stuff"
on the internet.


/Flemming

ps: I did not know of any other way to "notify" wicker users about this. So
I hope it is ok to use mailing list.
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Wicket URLs in javascript

2007-07-19 Thread Joel Hill
My app's home page is nothing more than a blank page which has an onload
script which opens a new browser window and loads my app's "main" page
into it.  I'm having trouble figuring out how to get it to work in
wicket.  I don't want to make the page bookmarkable if at all possible,
but I have to figure out how to get a url into my javascript call which
will access my wicket page.  I know how to get wicket to dynamically
create javascript using IHeaderContributor, but not how to get a url
which will load a non-bookmarkable wicket page.  I looked into
Component#urlFor, but the javadocs say that will make the page
bookmarkable; and I really want to force all access to the app to go
through the home page.  Any suggestions would be much appreciated. 
Thanks.

Joel

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Download / View Attacment (like gmail)

2007-07-19 Thread Francisco Diaz Trepat - gmail
great
thanks
ps: i have a first version of the extensible choice auto-complete.
should i send you the code?


On 7/19/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> On 7/19/07, Francisco Diaz Trepat - gmail <[EMAIL PROTECTED]>
> wrote:
> >
> > Hello.
> >
> > Any way of doing this?
>
>
> see downloadlink and popupsettings
>
> -igor
>
>
>
>
> -- Forwarded message --
> > From: Francisco Diaz Trepat - gmail <[EMAIL PROTECTED]>
> > Date: Jul 18, 2007 4:15 PM
> > Subject: Download / View Attacment (like gmail)
> > To: wicket-user@lists.sourceforge.net
> >
> >
> > Hi guys is there an easy way to have, say two buttons or links, one
> > downloads a txt file and the other one opens it up on a new window?
> >
> > mus be ajax.
> >
> > f(t)
> > -
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft Visual Studio 2005.
> > http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket URLs in javascript

2007-07-19 Thread Igor Vaynberg
RequestCycle.urlFor(Page) will do what you want

-igor


On 7/19/07, Joel Hill <[EMAIL PROTECTED]> wrote:
>
> My app's home page is nothing more than a blank page which has an onload
> script which opens a new browser window and loads my app's "main" page
> into it.  I'm having trouble figuring out how to get it to work in
> wicket.  I don't want to make the page bookmarkable if at all possible,
> but I have to figure out how to get a url into my javascript call which
> will access my wicket page.  I know how to get wicket to dynamically
> create javascript using IHeaderContributor, but not how to get a url
> which will load a non-bookmarkable wicket page.  I looked into
> Component#urlFor, but the javadocs say that will make the page
> bookmarkable; and I really want to force all access to the app to go
> through the home page.  Any suggestions would be much appreciated.
> Thanks.
>
> Joel
>
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Download / View Attacment (like gmail)

2007-07-19 Thread Igor Vaynberg
attach it to a jira issue, preferrably as a patch.

thanks,
-igor


On 7/19/07, Francisco Diaz Trepat - gmail <[EMAIL PROTECTED]>
wrote:
>
> great
> thanks
> ps: i have a first version of the extensible choice auto-complete.
> should i send you the code?
>
>
> On 7/19/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > On 7/19/07, Francisco Diaz Trepat - gmail <
> [EMAIL PROTECTED]>
> > wrote:
> > >
> > > Hello.
> > >
> > > Any way of doing this?
> >
> >
> > see downloadlink and popupsettings
> >
> > -igor
> >
> >
> >
> >
> > -- Forwarded message --
> > > From: Francisco Diaz Trepat - gmail <[EMAIL PROTECTED]>
> > > Date: Jul 18, 2007 4:15 PM
> > > Subject: Download / View Attacment (like gmail)
> > > To: wicket-user@lists.sourceforge.net
> > >
> > >
> > > Hi guys is there an easy way to have, say two buttons or links, one
> > > downloads a txt file and the other one opens it up on a new window?
> > >
> > > mus be ajax.
> > >
> > > f(t)
> > >
> -
> > > This SF.net email is sponsored by: Microsoft
> > > Defy all challenges. Microsoft Visual Studio 2005.
> > > http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> > > ___
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
> -
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft Visual Studio 2005.
> > http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Select and SelectOptions

2007-07-19 Thread Huy Do
Thanks for the suggestion. Matej also suggested this on IRC but I think 
the current Select component should support this.

I'm going to try to implement the current Select as a repeating view.

Thanks again,

Huy
> Use a RepeatingView?
>
>
> Huy Do-4 wrote:
>   
>> Hi,
>>
>> I have been trying to use select and selectoptions in wicket-extensions 
>> but I can't figure out how to get a dynamic set of optgroups going.
>>
>> I have seen the example from the mailing list where
>>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> My problem lies in the fact that I don't know all my optgroups before 
>> hand. It changes depending on the current user.
>>
>> I am trying to get the following output
>>
>> 
>> 
>> 1
>> 2
>> 
>> 
>> 3
>> 4
>> 
>> ...
>> ...
>> 
>>
>> Any pointers would be greatly appreciated.
>>
>> Thanks
>>
>> Huy
>>
>> -
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
>>
>> 
>
>   


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Odd Refresh Page Behavior

2007-07-19 Thread Eelco Hillenius
> I have successfully deployed and verified that the behavior still seems to be
> in error. I have not actually run the phonebook application but was using it
> as a pattern.

One of the forgotten emails I'm afraid...

Did you make any progress on this, or is it still a problem? If it is,
would you mind opening up a JIRA issue for it please?

Eelco

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Setting custom session in a wicket unit test that doesn't take an Application as parameter.

2007-07-19 Thread Eelco Hillenius
> How do you create a mock session for this websession? WicketTester creates a
> new instance of MockWebApplication which extends WebApplication and not my
> custom AuthenticatedWebApplication. This becomes troublesome because the
> constructor of my custom session takes a subclass of
> AuthenticatedWebApplication and not a subclass of WebApplication. How should
> I go about to test this?

Looks a bit tricky. I don't have a good answer tbh. If I were you I
would just create my own test classes that work for this particular
case. One big copy 'n paste action, and some effort in customizing it
that it works for you, but then at least you'll know it does exactly
what you want. Sorry,

Eelco

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] validator.w3.org validation

2007-07-19 Thread Eelco Hillenius
I don't know... I would still go for XML schema. DTDs don't know
namespaces, so anything you do with them will be a hack imho. Over the
last two years, I think various people have made a go at it, and tbh
I'm not sure whether anyone had the final working DTD or whether they
just gave up on it.

This issue is still open
http://issues.apache.org/jira/browse/WICKET-693. We really need a good
patch from someone who cares enough about getting it right.

Cheers,

Eelco

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Resource finder for files in a JAR

2007-07-19 Thread Eelco Hillenius
> With this code, resourceFinder.add() only accepts directories, isn't
> it? Now i want the templated to be searched from a jar (distributed as
> plugins) or from a directory (distributed with the installation).

You would be better off using IResourceStreamLocator directly. Use the
decorator pattern to pass on to other locators if the one you built
can't find it.

> Also, the theme can be dynamically changed, by the administrator, or
> by the user settings, so the new path for the templates must no be
> added to the current paths, the new path must overwrite the old value.

That's not really something you can implement in a straightforward
fashion I'm afraid, as you're typically not in charge of the
classloading. Maybe for your case, you have to take charge, but that's
way out of Wicket's scope. Or think about a solution where you don't
have to rely on the order of classloading. For instance, create some
dynamic registration and use e.g. time stamps with your register (new
time stamps 'win'). Look at how Wicket's IInitializers work for ideas
(not for time stamping, but you could do the registering in such an
initializer).

Eelco

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Page getting redirected when accessing from mail reply

2007-07-19 Thread Eelco Hillenius
> Will that be included in your book?

It's still the plan. We're fighting to get it done in the first place
though, so it might prove tricky. Marcel Offermans was also
interesting in helping out, so the problem does not lie in lack of
help from OSGi people.

Eelco

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Select and SelectOptions

2007-07-19 Thread Huy Do
On second thoughtsthis may be over my head. It's harder then I 
thought. I don't understand the wicket internals enough to confidently 
do this within an exceptable time frame.

Huy

> Thanks for the suggestion. Matej also suggested this on IRC but I think 
> the current Select component should support this.
>
> I'm going to try to implement the current Select as a repeating view.
>
> Thanks again,
>
> Huy
>   
>> Use a RepeatingView?
>>
>>
>> Huy Do-4 wrote:
>>   
>> 
>>> Hi,
>>>
>>> I have been trying to use select and selectoptions in wicket-extensions 
>>> but I can't figure out how to get a dynamic set of optgroups going.
>>>
>>> I have seen the example from the mailing list where
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>> My problem lies in the fact that I don't know all my optgroups before 
>>> hand. It changes depending on the current user.
>>>
>>> I am trying to get the following output
>>>
>>> 
>>> 
>>> 1
>>> 2
>>> 
>>> 
>>> 3
>>> 4
>>> 
>>> ...
>>> ...
>>> 
>>>
>>> Any pointers would be greatly appreciated.
>>>
>>> Thanks
>>>
>>> Huy
>>>
>>> -
>>> This SF.net email is sponsored by DB2 Express
>>> Download DB2 Express C - the FREE version of DB2 express and take
>>> control of your XML. No limits. Just data. Click to get it now.
>>> http://sourceforge.net/powerbar/db2/
>>> ___
>>> Wicket-user mailing list
>>> Wicket-user@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>>
>>>
>>> 
>>>   
>>   
>> 
>
>
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>   


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] line break after ImageMap?

2007-07-19 Thread Eelco Hillenius
On 7/16/07, verbal evasion <[EMAIL PROTECTED]> wrote:
> i had two images side by side, both inside the div tag. then i made the left
> one an ImageMap and the second image (on the right) went to the next line. i
> tried to resize them and everything, but nothing helped. how do i fix this?

Make it an inline element instead of a block element using CSS?

Eelco

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Replace a component with another component by adding a Behaviour

2007-07-19 Thread Eelco Hillenius
> I try to replace a TextArea with a HiddenField (or in next step with a
> Panel).
>
> before:
> Input comes
> here
>
> after:
> 
>
> I added a Behaviour to the TextArea:
> public void bind(Component c)
> {
> target = c;
>
> HiddenField hiddenField = new HiddenField(target.getId(),
> target.getModel());
>
> target.replaceWith(hiddenField);
> }
>
> but get error:
> Component messageInput must be applied to a tag of type 'input', not
> '' (line 0, column 0)

For many components, Wicket checks whether you attach them to the
correct tags. Sometimes, addmittedly, this is annoying, though the
idea is that it saves you from making stupid mistakes. In this case,
just either use custom components (or one that can do both, this might
actually be a fairly elegant solution) or wrap those components in
panels (TextAreaPanel and HiddenFieldPanel) and use a  tag or
something similar.

Eelco

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] some errors appear in wicket-example 1.3beta2

2007-07-19 Thread Eelco Hillenius
> I just run through the library sample -
> http://wicketstuff.org/wicket13/library/
>
> Supposedly, if you don't key in the title and author field, it will show
> error as it has FormComponentFeedbackBorder component wrapped around the
> title and author fields. but in wicket1.3 beta2, it seems like it doesn't
> show any error when those fields are left blank during submission..

Thanks for reporting. I fixed it. See
https://issues.apache.org/jira/browse/WICKET-774

> Actually
> the other day  I ran across few other errors on some of the samples in
> wicket1.3 as well,  and i don't remember all for now..another one is the
> datepicker in http://wicketstuff.org/wicket13/forminput/.

Yeah, the forminput & datepicker thing had to do with ids assigned in
the markup for components that use it. It is a bug, and there is an
issue for it, but it can be avoided (and we don't know a good solution
for this yet... it's one of the things the constructor change of 2.0
actually did solve).

> This is just a
> post to highlight there are errors in the sample

Keep em coming please! :) Thanks for reporting.

Eelco

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Modal Window and "Page Expired" - SOLVED

2007-07-19 Thread Laurent Brucher
Ok, my bad...
Cutting out the details, the page that included a ref to the modal window
had a piece of javascript, which generated an  tag with a src attribute
starting with a '#' (this is some code ported from a JSF version of the
application). The browser was then trying to fetch the page again looking
for the (inexistent) bookmark, hence the double hit to the page.
 
Now, I'm wondering if it is normal that the framework evicts the page when
removing one of the 2 versions of that page from the access stack since the
other version is still there and may be referenced again. But I don't know
wicket enough to make a valid statement on this.
 
Many thanks for the helps here and there though.
Laurent.
 
 

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Laurent
Brucher
Sent: vendredi 13 juillet 2007 22:42
To: wicket-user@lists.sourceforge.net
Subject: [Wicket-user] Modal Window and "Page Expired".


Hi all,
 
There was a post last December about the same problem that I'm facing right
now, which is getting a page expired error page after I close a modal
window.
The post was called "Firefox and ModalWindow" and seemed to talk about the
issue for FF only.
I've encountered the problem first with FF (2.0.0.4). After reading the
post, I tried with IE7 and it worked ok (that was this afternoon).
This evening, neither IE7 or FF work anymore. Darn! Clearing cookies and
stuff don't change a thing.
Oh, and of course, the Ajax ModalWindow example works just fine (my code is
heavily inspired from that example)...
I'm using Wicket 1.2.6, Tomcat 5.5.20, Jdk1.6u2.
 
Have you guys shed any light on this issue at all?
I've tried to trace the code, but as I'm rather new to Wicket, I couldn't
really figure out what's going on...
 
Anything I can do to help address this?
Below is the code I use, just in case.
 
Reagrds,
Laurent.
 
 
// Page containing the modal window
public class MainPage extends WebPage {
public MainPage()
{
...
add( new PreferredStationsDialog("prefStationsDialog") );
...
}
}
 
// The modal window impl.
public class PreferredStationsDialog extends ModalWindow {
public PreferredStationsDialog(String id)
{
super(id);
 
setTitle("xyz");
setCookieName("prefStationsDialog");
setPageMapName("prefStationsDialogPageMap");
setPageCreator( new ModalWindow.PageCreator() {
@Override
public Page createPage() {
return new
PreferredStationsDialogPage(PreferredStationsDialog.this);
}
});
 
setCloseButtonCallback(new ModalWindow.CloseButtonCallback() {
public boolean onCloseButtonClicked(AjaxRequestTarget target) {
return true;
}
});
}
}
 
// The content of the modal window, as a Page
public class PreferredStationsDialogPage extends WebPage
{
public PreferredStationsDialogPage( final PreferredStationsDialog dialog
)
{
super();
 
add( new AjaxLink("button.save") {
@Override
public void onClick(AjaxRequestTarget target) {
dialog.close(target);
}
}.add( new Label("text", "Save")) );
 
add( new AjaxLink("button.cancel") {
@Override
public void onClick(AjaxRequestTarget target) {
dialog.close(target);
}
}.add( new Label("text", "Cancel")) );
}
}
 
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Overriding button display for specific Wizard steps

2007-07-19 Thread David Leangen

I'm trying to figure out how to override the button displays for only
specific steps during the Wizard.

Essentially, I have a kind of license that a user needs to agree to, so
rather than "Next >", I'd like to override with "I agree".


No problem for overriding for all steps, but that doesn't work for me.

When I try to receive the parent of the WizardStep to do this
dynamically, I only get null, so that approach is not working...


Any suggestions?

Thanks!



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Overriding button display for specific Wizard steps

2007-07-19 Thread Eelco Hillenius
On 7/19/07, David Leangen <[EMAIL PROTECTED]> wrote:
>
> I'm trying to figure out how to override the button displays for only
> specific steps during the Wizard.
>
> Essentially, I have a kind of license that a user needs to agree to, so
> rather than "Next >", I'd like to override with "I agree".
>
>
> No problem for overriding for all steps, but that doesn't work for me.
>
> When I try to receive the parent of the WizardStep to do this
> dynamically, I only get null, so that approach is not working...
>
>
> Any suggestions?

Provide a custom button bar by overriding Wizard#newButtonBar. Pass in
the wizard to the steps as well (like the default do) and let the
steps work with either the wizard's model object or the current wizard
step (getActiveStep) and see what you need to do. You could even try
doing something like

interface IMyWizardStep extends IWizardStep {
  getNextButtonLabel();
}

and let your button call that.

Eelco

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Overriding button display for specific Wizard steps

2007-07-19 Thread David Leangen

Wow! That was fast.

Ok, thanks! I'll give one of those a try.


Cheers,
Dave



On Thu, 2007-07-19 at 23:49 -0700, Eelco Hillenius wrote:
> On 7/19/07, David Leangen <[EMAIL PROTECTED]> wrote:
> >
> > I'm trying to figure out how to override the button displays for only
> > specific steps during the Wizard.
> >
> > Essentially, I have a kind of license that a user needs to agree to, so
> > rather than "Next >", I'd like to override with "I agree".
> >
> >
> > No problem for overriding for all steps, but that doesn't work for me.
> >
> > When I try to receive the parent of the WizardStep to do this
> > dynamically, I only get null, so that approach is not working...
> >
> >
> > Any suggestions?
> 
> Provide a custom button bar by overriding Wizard#newButtonBar. Pass in
> the wizard to the steps as well (like the default do) and let the
> steps work with either the wizard's model object or the current wizard
> step (getActiveStep) and see what you need to do. You could even try
> doing something like
> 
> interface IMyWizardStep extends IWizardStep {
>   getNextButtonLabel();
> }
> 
> and let your button call that.
> 
> Eelco
> 
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user