[Wicket-user] Using own localizer

2007-01-31 Thread Juha Alatalo
Hi,

is there some way of using own Localizer in WebApplication? I found out 
that in version 1.1 there was setLocalizer() method in Application, but 
I couldn't find such anymore anywhere.

In quite many cases the path used in Localizer.visitResourceLoaders() is 
realy long and there is done too many useless 
loader.loadStringResource() calls. This is starting to have a 
significant impact in loading times. I would like to change getString 
call of a component so that 'final List searchStack' is null when 
finally calling localicer.visitResourceLoaders().

- Juha Alatalo

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Right-click context menu

2007-01-31 Thread Igor Vaynberg

i dont know if it makes sense to back the menu items with a listview,
labels, links, etc. for what purpose?

i would have a single component for the menu that spits out the necessary
html directly into the page rather then backing it via actual wicket
components. this menu component can implement ILinkListener and generate a
url back to itself, prepend the index of the clicked menu item to it and you
are done.

much more light weight. its not like the html you are spitting out is very
comples, just a bunch of 

now if you want a menu where items can be panels that can contain other
panels, etc, etc, then it makes sense to use actual wicket components to
back it.

-igor


On 1/31/07, Shams Mahmood <[EMAIL PROTECTED]> wrote:


See the following site :

http://www.dhtmlgoodies.com/index.html?whichScript=context_menu
demo : http://www.dhtmlgoodies.com/scripts/context-menu/context-menu.html

I think the html can be easily generated by using a ListView and
Adding Links inisde and handling the onclick of the links.

Hope u find it useful.


Shams

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Fighting "Too many open files" problem related to wicket resource files

2007-01-31 Thread beboris

We have found a pretty weird situation with "too many open files" error on
our alpha-testing site. Further analysis showed that on each page refresh
the following resources get repeatedly obtained from the wicket's .jar and
add to the number of open files:
   'wicket/ajax/wicket-ajax.js'
   'wicket/extensions/ajax/markup/html/modal/res/modal.css'
   'wicket/extensions/ajax/markup/html/modal/res/modal.js'
   'wicket/extensions/markup/html/tree/res/tree.css'
   'wicket/extensions/markup/html/tree/res/tree.js'

Eventually (due to garbage collection?) the number of open files goes down
again. But we wanted to know why those files stayed open in the first place
and were not closed upon retrieving a resource.

It looks like switching to the "deployment" mode from "development" one
would significantly reduce the peak numbers of the open files/streams to
wicket .jar-s, and extracting resources from the .jar would reduce it even
better. We were told that the original reason for files staying open is a
Java bug (the fact that URLConnection doesnt have a .close), which causes
those nasty results when combined with development mode trying to monitor
[resource] files for changes and reloading them.

We were also told that there is a workaround for that problem in SVN
somewhere, but it's probably not backported to 1.2.5 . I have 2 questions in
that regard:
(1) Where can we find those workarounds in the code?
(2) Is it too much work to backport them to 1.2.5 so when it's released it
doesn't contain the problem?

Thanks,
Bob.
-- 
View this message in context: 
http://www.nabble.com/Fighting-%22Too-many-open-files%22-problem-related-to-wicket-resource-files-tf3153256.html#a8743682
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ui framework choice

2007-01-31 Thread beboris

We have done some performance testing between JSF, JSP, Wicket and Stripes
when choosing a framework to develop Ajax-enabled WebUI.

You may find it interesting to know that our results showed JSF is at least
3-4 times slower than JSP on simple pages (exactly as described at
http://www.mail-archive.com/users@myfaces.apache.org/msg24571.html), while
wicket's performance is "on par" with JSP for the same pages...

Actually, those performance testing results was the main reason why we have
chosen Wicket over JSF despite the fact the cumulative team experience with
JSF in terms of projects made and time spent was significantly greater than
with Wicket (the latter being around zero...)


Eelco Hillenius wrote:
> 
> That would be interesting yeah. I'm not sure if there would be a clear
> winner.
> 
> Eelco
> 
> 
> On 1/29/07, Christopher Gardner <[EMAIL PROTECTED]> wrote:
>> I apologize if this has been mentioned, but is comparative performance
>> and
>> load testing planned?  I'd love to see Wicket rule on this.
>>
>>
>> On 1/29/07, Scott Swank <[EMAIL PROTECTED]> wrote:
>> >
>> > One week (of two) into the JSF vs. Wicket comparison here at Vegas.com
>> things are going nicely -- team Wicket is finished while team JSF is
>> trying
>> to get Ajax functionality working.  There were four people working on
>> each
>> implementation, but JSF is so far behind that an additional person was
>> added
>> to the JSF team and one of the Wicket folk was moved from Wicket to JSF
>> --
>> i.e. three folk working on Wicket and 6 on JSF in an effort to catch up.
>> The three of us remaining are working on:
>> >
>> > * overriding components' css -- i.e. a custom look/feel for ModalWindow
>> > * unit test integration
>> > * cleaner use of dynamic models
>> >
>> > Cheers,
>> > Scott
>> >
>> > --
>> > Scott Swank
>> > reformed mathematician
>> >
>> -
>> > Take Surveys. Earn Cash. Influence the Future of IT
>> > Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your
>> > opinions on IT & business topics through brief surveys - and earn cash
>> >
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> >
>> > ___
>> > Wicket-user mailing list
>> > Wicket-user@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >
>> >
>> >
>>
>>
>> -
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your
>> opinions on IT & business topics through brief surveys - and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
>>
>>
> 
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> 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/-Wicket-user--ui-framework-choice-tf3137969.html#a8743585
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] MultipartForm

2007-01-31 Thread Igor Vaynberg

html was not designed with encapsulation in mind. imagine a panel that
processes some inputs via textfields. that panel needs a form. so you either
have a restriction that you can only use that panel inside a form, or put
the form into the panel and let wicket figure it out - that way the panel
works anywhere you drop it.

-igor


On 1/31/07, Carfield Yim <[EMAIL PROTECTED]> wrote:


On 2/1/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> yes, we already do enough "hacking" to allow users to nest forms
eventhough
> it is not allowed in the html spec. what wicket does is turn all inner
form
> tags into divs and use its magic to route the values/call events. but
when
> it comes to multipart there isnt much we can do because at the end there
is
> only one top level form, and if you have upload fields then that form
has to
> be multipart.
>
Excellent idea, but how about just don't allow it? Even if it work but
I feel it is kind of hard to maintain and manage. How many people
really need this?

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Right-click context menu

2007-01-31 Thread Shams Mahmood
See the following site :

http://www.dhtmlgoodies.com/index.html?whichScript=context_menu
 demo : http://www.dhtmlgoodies.com/scripts/context-menu/context-menu.html

I think the html can be easily generated by using a ListView and
Adding Links inisde and handling the onclick of the links.

Hope u find it useful.


Shams

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] MultipartForm

2007-01-31 Thread Carfield Yim
On 2/1/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> yes, we already do enough "hacking" to allow users to nest forms eventhough
> it is not allowed in the html spec. what wicket does is turn all inner form
> tags into divs and use its magic to route the values/call events. but when
> it comes to multipart there isnt much we can do because at the end there is
> only one top level form, and if you have upload fields then that form has to
> be multipart.
>
Excellent idea, but how about just don't allow it? Even if it work but
I feel it is kind of hard to maintain and manage. How many people
really need this?

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ui framework choice

2007-01-31 Thread Igor Vaynberg

and what we expect from our users are patches :)

-igor


On 1/31/07, Carfield Yim <[EMAIL PROTECTED]> wrote:


On 2/1/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> you are free to write your own if the one we provide doesnt fit your
needs
> :) we didnt use any api you dont have access to to create this one.
>
Sure, no offence, in fact I am happy to use ModalWindow. I just say
what we expect for our software some time is a lot difference from
what user expected

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ui framework choice

2007-01-31 Thread Carfield Yim
On 2/1/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> you are free to write your own if the one we provide doesnt fit your needs
> :) we didnt use any api you dont have access to to create this one.
>
Sure, no offence, in fact I am happy to use ModalWindow. I just say
what we expect for our software some time is a lot difference from
what user expected

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ui framework choice

2007-01-31 Thread Igor Vaynberg

you are free to write your own if the one we provide doesnt fit your needs
:) we didnt use any api you dont have access to to create this one.

-igor


On 1/31/07, Carfield Yim <[EMAIL PROTECTED]> wrote:


On 2/1/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> one thing to keep in mind is that the modalwindow was _not meant_ to be
very
> customizable. it was meant to be a dropin component that you would use
as

However, people like every component to be very customizable, that is
what client expect from our software :-/

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ui framework choice

2007-01-31 Thread Carfield Yim
On 2/1/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> one thing to keep in mind is that the modalwindow was _not meant_ to be very
> customizable. it was meant to be a dropin component that you would use as

However, people like every component to be very customizable, that is
what client expect from our software :-/

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Right-click context menu

2007-01-31 Thread Sean Sullivan

Yahoo UI has a nice context menu:

  http://developer.yahoo.com/yui/menu/#contextmenu

  http://developer.yahoo.com/yui/examples/menu/contextmenu.html

It should be possible to wrap this menu as a Wicket component.

Sean

On 1/31/07, Bruce Fraser <[EMAIL PROTECTED]> wrote:


 Hi,

Does anyone know of, or is anyone working on, a Wicket-based right-click
context menu?

We are looking for something similar to the Dojo one (
http://dojotoolkit.org/ General Widgets -> Menu -> ContextMenu), and that
will most likely be what we'll use if we can't find a Wicket alternative. If
we do need to go down the Dojo route, does anyone have any tips regarding
how to go about integrating that with our Wicket site? Any help would be
most appreciated.

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Header contribution not always rendered

2007-01-31 Thread Igor Vaynberg

its fixed and will be included in the upcoming 1.2.5

-igor


On 1/31/07, smallufo <[EMAIL PROTECTED]> wrote:


I got the same problem with 1.2.4


2006/11/11, Matej Knopp <[EMAIL PROTECTED]>:
>
> That's weird. Which wicket version are you using? Seems that Wicket 1.x
> has already become 1.3 and the latest revision is 473519.
>
> Wicket 1.2 has it's own branch now.
>
> Are you sure you're using the apache repository?
>


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Header contribution not always rendered

2007-01-31 Thread smallufo

I got the same problem with 1.2.4


2006/11/11, Matej Knopp <[EMAIL PROTECTED]>:


That's weird. Which wicket version are you using? Seems that Wicket 1.x
has already become 1.3 and the latest revision is 473519.

Wicket 1.2 has it's own branch now.

Are you sure you're using the apache repository?

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Right-click context menu

2007-01-31 Thread Bruce Fraser
Hi,
Does anyone know of, or is anyone working on, a Wicket-based right-click 
context menu?
We are looking for something similar to the Dojo one (http://dojotoolkit.org/ 
General Widgets -> Menu -> ContextMenu), and that will most likely be what 
we'll use if we can't find a Wicket alternative. If we do need to go down the 
Dojo route, does anyone have any tips regarding how to go about integrating 
that with our Wicket site? Any help would be most appreciated.
Thanks,
Bruce
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [wicket-1.x, wicket-2.0] ServletWebRequest#getRelativeURL()

2007-01-31 Thread Edward Yakop
Thanx.

Regards,
Edward Yakop

On 2/1/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> Done.
>
> Eelco
>
>
> On 1/31/07, Edward Yakop <[EMAIL PROTECTED]> wrote:
> > That's because I have my own implementation of servlet request.
> >
> > In my PaxWicketApplication.java
> > 
> > public class PaxWicketApplication extends WebApplication
> > {
> >   ...
> >
> >@Override
> >protected final WebRequest newWebRequest( final HttpServletRequest
> > servletRequest )
> >{
> >   return new PaxWicketRequest( m_mountPoint, servletRequest );
> >}
> > }
> > 
> >
> > and inside my PaxWicketRequest
> > 
> > /**
> >  * @author Niclas Hedhman, Edward Yakop
> >  *
> >  * @since 1.0.0
> >  */
> > final class PaxWicketRequest extends ServletWebRequest
> > {
> >...
> >public final String getServletPath()
> > {
> > String contextPath = getHttpServletRequest().getContextPath();
> > if ( m_logger.isDebugEnabled() )
> > {
> > m_logger.debug( "getServletPath() : " + contextPath );
> > }
> > if ( !contextPath.endsWith( "/" ) )
> > {
> > contextPath += "/";
> > }
> >
> > return contextPath;
> > }
> >
> > // ContextPath pretty much similar to servlet path the diff is,
> > // getHttpServletRequest().getServletPath()
> > }
> > 
> >
> > Because I override both getServletPath() and getContextPath() to
> > return the right values for OSGi cases. I would need getRelativeURL()
> > to use ServletWebRequest#getServletPath() instead of
> > httpServletRequest.getServletPath().
> >
> > Hope this clear.
> >
> > Regards,
> > Edward Yakop
> >
> >
> > On 1/31/07, Johan Compagner <[EMAIL PROTECTED]> wrote:
> > > so to get this correctly
> > > you just changed the line:
> > >
> > >  String url = httpServletRequest.getServletPath();
> > >
> > > to
> > >
> > >  String url = getServletPath();
> > >
> > > how can that help?
> > >
> > > because this is getServletPath() on ServletWebRequest
> > >
> > >
> > > return httpServletRequest.getServletPath();
> > >
> > >
> > > so thats exactly the same code
> > >
> > > johan
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > On 1/31/07, Edward Yakop <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi,
> > > >
> > > > I have a small bug to fix for
> > > ServletWebRequest#getRelativeURL(). For
> > > > some odd reason, for resources (images, css etcs) to be displayed for
> > > > Felix http service, ServletWebRequest#getServletPath()
> > > and
> > > > #getContextPath() must be swapped. Due to getRelativeURL() uses
> > > > httpServletRequest.getServletPath()  to initialize the
> > > url variable
> > > > instead of calling ServletWebRequest#getServletPath(),
> > > the returned
> > > > string is invalid in this setup.
> > > >
> > > > Can we change the implementation of getRelativeURL()
> > > > from
> > > > 
> > > > public String getRelativeURL()
> > > > {
> > > >...
> > > >String url = httpServletRequest.getServletPath();
> > > >final String pathInfo = httpServletRequest.getPathInfo();
> > > >
> > > >...
> > > >return url;
> > > > }
> > > > 
> > > >
> > > > to
> > > > 
> > > > public String getRelativeURL()
> > > > {
> > > >...
> > > >String url = getServletPath(); // Modified line
> > > >final String pathInfo = httpServletRequest.getPathInfo();
> > > >
> > > >...
> > > >return url;
> > > > }
> > > > 
> > > >
> > > > The use case why this is a bug when we have a login page that does not
> > > > have redirection pages, getRelativeURL() returns
> > > > "/mountPoint/mountPoint/", instead of only "/mountPoint/".
> > > >
> > > > Regards,
> > > > Edward Yakop
> > > >
> > > >
> > > -
> > > > Take Surveys. Earn Cash. Influence the Future of IT
> > > > Join SourceForge.net's Techsay panel and you'll get the chance to share
> > > your
> > > > opinions on IT & business topics through brief surveys - and earn cash
> > > >
> > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > > ___
> > > > Wicket-user mailing list
> > > > Wicket-user@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > >
> > >
> > >
> > > -
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the chance to share 
> > > your
> > > opinions on IT & business topics through brief surveys - and earn cash
> > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > >
> > > ___
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> > >
> > >
> >
> > -
> > Take Surveys. Ear

Re: [Wicket-user] How to include a form field in the ajax request without form submit

2007-01-31 Thread Conny Kühne

2007/1/31, Marc-Andre Houle <[EMAIL PROTECTED]>:


Why not simply use AjaxSubmitLink or AjaxSubmitButton ? It will submit all
the form, evidently, but you can do which ever action you want in the
onClick handler?




That's exactly the conclusion  I came up with after thinking a bit about the
problem. Thank's again to all for the help!

Conny
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket-auth examples or documentation?

2007-01-31 Thread Matt Welch

Thanks, I didn't even think of just looking in the download itself. As I
suspected, they were right there in front of me!

Matt

On 1/31/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:


Download the wicket-auth-roles-examples project. It contains the
examples. There is no specific documentation available afaik, other
then what is contained in the examples and the javadoc of the project.


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Wicket 2.0 bookmarkable page issue?

2007-01-31 Thread Aaron Hiniker
I have a webapp that is bound to root "/" context, and I am mounting a
bookmarkable page to "/script/execute" via:

mountBookmarkablePage( "/script/execute", ScriptExecutor.class );

That page displays a textarea and a submit button within the form.  The
code is as follows:


public class ScriptExecutor extends WebPage
{
private static final Log log = LogFactory.getLog(ScriptExecutor.class);

String script;

public ScriptExecutor()
{
Form form = new Form( this, "form" ) {

final TextArea textarea = new TextArea( this, "textarea",
new PropertyModel( ScriptExecutor.this, "script" ) );
   
protected void onSubmit()
{
super.onSubmit();

System.out.println("TextArea: " + getScript() );
}
};  
}


public String getScript()
{
return script;
}

public void setScript(String script)
{
this.script = script;
}
}

When I first load the page via the bookmarkable url and hit submit, I
get a 404 because wicket is submitting to:

   
http://localhost:8080/script/?wicket:interface=:5:form::IFormSubmitListener

when it should be submitting to:

http://localhost:8080/?wicket:interface=:5:form::IFormSubmitListener

This all seems to be due to the fact wicket isn't prepending a "/" to
the form's action URL, causing the browser to use the current directory
from the url, "/script/":













Is this a user error on my part or an issue with how wicket is
generating the url?

Aaron

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] HTTP session expiration and Wicket pages

2007-01-31 Thread Johan Compagner


1.3 has the disk store that saves pages to disk. so if you keep session id
in a cookie and reuse it upon login the pages can be retrieved from disk and
thus you have "unlimited" storage. you can wrap that store in your own and
save all session attributes into it not just the pages, that way the session
doesnt really time out.



that wouldn't work
if the session time out the session dir with its pages are removed
else we would have a problem

But ofcourse if you make your own IPageStore impl that doesn't depend on the
sessionid or doesn't invalidate the session
But does it on another key you could make pages as long lived as you want.
I guess outlive session timeouts and so on with no problem


johan
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] HTTP session expiration and Wicket pages

2007-01-31 Thread Igor Vaynberg

no, client side state is not something we support, and probably will not in
the foreseeable future. there are a lot of downsides to doing so that are
outlined in numerous threads on this list.

encoding state into the url is not feasible, urls have a limit on how much
they can hold which is last time i checked was around 2000 chars. while this
might be enough for tapestry it is not enough for wicket. remember tapestry
has a static page component hierarchy and separates state away from
components, so for tapestry it is enough to save only that state while
wicket doesnt make the distinction so it has to serialize the entire
component hierarchy. so for wicket it would have to be a hidden form, which
means every link has javascript submit handler, which needs you need to have
javascript, etc, etc, etc. combine that with the overhead of client side
state and it doesnt seem like an attractive solution.

1.3 has the disk store that saves pages to disk. so if you keep session id
in a cookie and reuse it upon login the pages can be retrieved from disk and
thus you have "unlimited" storage. you can wrap that store in your own and
save all session attributes into it not just the pages, that way the session
doesnt really time out.

but in the end how many concurrent users do you expect? you must have a
pretty good idea since this is an intranet app, maybe an ajax callback that
prevents the session from timing out is the simplest solution that will
work.

-igor


On 1/31/07, Sean Sullivan <[EMAIL PROTECTED]> wrote:



Awesome. Thanks Igor.Can Wicket 1.3 encode page state in URLs or in a
hidden form field?

By the way, I noticed Tapestry 4.1 can optionally encode page state as URL
query parameters:

 http://tapestry.apache.org/tapestry4.1/usersguide/state.html


*The [Tapestry] application may be stateless even when it has persistent
page properties, if those properties use the client persistence strategy
(which encodes pesistent page data into URLs as query parameters). This can
be a very powerful approach, though it introduces its own problems: *

   - *The query parameters are an encoding of Java objects, and could
   be decoded to expose privileged information. *
   - *The encoding of page state can result in very long strings
   included as part of URLs, possibly extending beyond the 3000 to 4000
   character effective maximum URL length. *

Regards,

Sean


On 1/31/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>
> yes, 1.3 has support for stateless pages and stateless forms. but notice
> that by doing this you give up a lot of what makes wicket wicket
>
> -igor
>
>
> On 1/31/07, Sean Sullivan <[EMAIL PROTECTED] > wrote:
> >
> > Hello again,
> >
> > Will it be possible to have zero serverside state in Wicket 1.3?
> >
> > Using Google, I found two references to this topic:
> >
> > *   The next version of Wicket will support client-side models for
> > zero-state scalability.*
> >
> >source:  http://wicket.sourceforge.net/Features.html
> >
> >[...] *in 1.1 we are implementing the means to go near zero
> > serverside state. However, we will again try to make it as easy as possible
> > to go from full serverside state to minimal serverside state.
> > *
> > *  source:  http://www.theserverside.com/news/thread.tss?thread_id=34725
> > *
> > **
> >
>
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] HTTP session expiration and Wicket pages

2007-01-31 Thread Sean Sullivan

Awesome. Thanks Igor.Can Wicket 1.3 encode page state in URLs or in a
hidden form field?

By the way, I noticed Tapestry 4.1 can optionally encode page state as URL
query parameters:

http://tapestry.apache.org/tapestry4.1/usersguide/state.html


*The [Tapestry] application may be stateless even when it has persistent
page properties, if those properties use the client persistence strategy
(which encodes pesistent page data into URLs as query parameters). This can
be a very powerful approach, though it introduces its own problems: *

  - *The query parameters are an encoding of Java objects, and could be
  decoded to expose privileged information. *
  - *The encoding of page state can result in very long strings included
  as part of URLs, possibly extending beyond the 3000 to 4000 character
  effective maximum URL length. *

Regards,

Sean


On 1/31/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:


yes, 1.3 has support for stateless pages and stateless forms. but notice
that by doing this you give up a lot of what makes wicket wicket

-igor


On 1/31/07, Sean Sullivan <[EMAIL PROTECTED]> wrote:
>
> Hello again,
>
> Will it be possible to have zero serverside state in Wicket 1.3?
>
> Using Google, I found two references to this topic:
>
> *   The next version of Wicket will support client-side models for
> zero-state scalability.*
>
>source:  http://wicket.sourceforge.net/Features.html
>
>[...] *in 1.1 we are implementing the means to go near zero
> serverside state. However, we will again try to make it as easy as possible
> to go from full serverside state to minimal serverside state.
> *
> *  source:  http://www.theserverside.com/news/thread.tss?thread_id=34725
> *
> **
>

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] HTTP session expiration and Wicket pages

2007-01-31 Thread Igor Vaynberg

yes, 1.3 has support for stateless pages and stateless forms. but notice
that by doing this you give up a lot of what makes wicket wicket

-igor


On 1/31/07, Sean Sullivan <[EMAIL PROTECTED]> wrote:


Hello again,

Will it be possible to have zero serverside state in Wicket 1.3?

Using Google, I found two references to this topic:

*   The next version of Wicket will support client-side models for
zero-state scalability.*

   source:  http://wicket.sourceforge.net/Features.html

   [...] *in 1.1 we are implementing the means to go near zero serverside
state. However, we will again try to make it as easy as possible to go from
full serverside state to minimal serverside state.
*
*  source:  http://www.theserverside.com/news/thread.tss?thread_id=34725*
**
Regards,

Sean
* *


On 1/31/07, Sean Sullivan <[EMAIL PROTECTED]> wrote:
>
>
> I'm building an Intranet web application that will run in Websphere. In
> a nutshell, this is my situation:
>- Websphere has a 30 minute timeout for inactive sessions
>- users open their browser in the morning and expect to be able to
> use the application on and off during the day
>- users may have idle periods that exceed 30 minutes (lunch,
> meetings, etc)
>
> According to the Wicket FAQ, Wicket pages are stored in the HTTP
> session:
>
> *"When new pages are created they are added to the session, when pages
> are no longer needed they are expired (removed) from the session" *
>
> My question is: What will happen when these users try to click on a
> Wicket link after the HTTP session has expired?   I don't want the users to
> see a "your page has expired" message. I want the user to resume using the
> application in the same context that they were in before the HTTP session
> expired.  Are there any best practices for this scenario?
>
> I studied the javadocs and I found the default error page (
> wicket.markup.html.pages.PageExpiredErrorPage)
> as well as methods for changing the page:
>
>IApplicationSettings.setPageExpiredErrorPage
>IApplicationSettings.getPageExpiredErrorPage
>
> Cheers,
>
> Sean
>


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] HTTP session expiration and Wicket pages

2007-01-31 Thread Sean Sullivan

Hello again,

Will it be possible to have zero serverside state in Wicket 1.3?

Using Google, I found two references to this topic:

*   The next version of Wicket will support client-side models for
zero-state scalability.*

  source:  http://wicket.sourceforge.net/Features.html

  [...] *in 1.1 we are implementing the means to go near zero serverside
state. However, we will again try to make it as easy as possible to go from
full serverside state to minimal serverside state.
*
*  source:  http://www.theserverside.com/news/thread.tss?thread_id=34725*
**
Regards,

Sean
*
*

On 1/31/07, Sean Sullivan <[EMAIL PROTECTED]> wrote:



I'm building an Intranet web application that will run in Websphere. In a
nutshell, this is my situation:
   - Websphere has a 30 minute timeout for inactive sessions
   - users open their browser in the morning and expect to be able to use
the application on and off during the day
   - users may have idle periods that exceed 30 minutes (lunch, meetings,
etc)

According to the Wicket FAQ, Wicket pages are stored in the HTTP session:

*"When new pages are created they are added to the session, when pages are
no longer needed they are expired (removed) from the session"*

My question is: What will happen when these users try to click on a Wicket
link after the HTTP session has expired?   I don't want the users to see a
"your page has expired" message. I want the user to resume using the
application in the same context that they were in before the HTTP session
expired.  Are there any best practices for this scenario?

I studied the javadocs and I found the default error page (
wicket.markup.html.pages.PageExpiredErrorPage)
as well as methods for changing the page:

   IApplicationSettings.setPageExpiredErrorPage
   IApplicationSettings.getPageExpiredErrorPage

Cheers,

Sean

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] HTTP session expiration and Wicket pages

2007-01-31 Thread Eelco Hillenius
Furthermore, you can go as fancy as you like, including implementing
an auto-login thing based on a cookie, and saving where the user is as
persistent state (you could even postpone that until the session time
outs) and then after a re-login redirect to that again.

Furthermore, (links to) bookmarkable pages never expire, which is a
good thing to keep in the back of your mind for sections of your site
where you expect the user to come in from nowhere (out of the
session).

Eelco


On 1/31/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> what do you mean resume within the same context?
>
> one option might be to add an ajax behavior that pings the server, so the
> session doesnt time out while the page is open in the browser.
>
> -igor
>
>
>
>  On 1/31/07, Sean Sullivan <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > I'm building an Intranet web application that will run in Websphere. In a
> nutshell, this is my situation:
> >- Websphere has a 30 minute timeout for inactive sessions
> >- users open their browser in the morning and expect to be able to use
> the application on and off during the day
> >- users may have idle periods that exceed 30 minutes (lunch, meetings,
> etc)
> >
> > According to the Wicket FAQ, Wicket pages are stored in the HTTP session:
> >
> > "When new pages are created they are added to the session, when pages are
> no longer needed they are expired (removed) from the session"
> >
> > My question is: What will happen when these users try to click on a Wicket
> link after the HTTP session has expired?   I don't want the users to see a
> "your page has expired" message. I want the user to resume using the
> application in the same context that they were in before the HTTP session
> expired.  Are there any best practices for this scenario?
> >
> > I studied the javadocs and I found the default error page
> (wicket.markup.html.pages.PageExpiredErrorPage)
> > as well as methods for changing the page:
> >
> >IApplicationSettings.setPageExpiredErrorPage
> >IApplicationSettings.getPageExpiredErrorPage
> >
> > Cheers,
> >
> > Sean
> >
> -
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> easier.
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> >
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
> >
>
>
> -
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier.
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket-auth examples or documentation?

2007-01-31 Thread Martijn Dashorst
Download the wicket-auth-roles-examples project. It contains the
examples. There is no specific documentation available afaik, other
then what is contained in the examples and the javadoc of the project.

Martijn

On 1/31/07, Matt Welch <[EMAIL PROTECTED]> wrote:
> Perhaps it's right in from of me and I' just missing it but I can't seem to
> find any information about how to take advantage of wicket-auth. The only
> mention of it I see at all is on the main Wicket site's "Download" page.
>
> Matt
>
> -
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier.
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>


-- 
Vote for Wicket at the http://www.thebeststuffintheworld.com/vote_for/wicket
Wicket 1.2.4 is as easy as 1-2-4. Download Wicket now!
http://wicketframework.org

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket-auth examples or documentation?

2007-01-31 Thread Eelco Hillenius
You can take a look at the examples projects:
https://svn.apache.org/repos/asf/incubator/wicket/trunk/wicket-auth-roles
and 
https://svn.apache.org/repos/asf/incubator/wicket/trunk/wicket-auth-roles-examples

Eelco


On 1/31/07, Matt Welch <[EMAIL PROTECTED]> wrote:
> Perhaps it's right in from of me and I' just missing it but I can't seem to
> find any information about how to take advantage of wicket-auth. The only
> mention of it I see at all is on the main Wicket site's "Download" page.
>
> Matt
>
> -
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier.
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] wicket-auth examples or documentation?

2007-01-31 Thread Matt Welch

Perhaps it's right in from of me and I' just missing it but I can't seem to
find any information about how to take advantage of wicket-auth. The only
mention of it I see at all is on the main Wicket site's "Download" page.

Matt
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] HTTP session expiration and Wicket pages

2007-01-31 Thread Igor Vaynberg

what do you mean resume within the same context?

one option might be to add an ajax behavior that pings the server, so the
session doesnt time out while the page is open in the browser.

-igor


On 1/31/07, Sean Sullivan <[EMAIL PROTECTED]> wrote:



 I'm building an Intranet web application that will run in Websphere. In a
nutshell, this is my situation:
- Websphere has a 30 minute timeout for inactive sessions
- users open their browser in the morning and expect to be able to use
the application on and off during the day
- users may have idle periods that exceed 30 minutes (lunch, meetings,
etc)

 According to the Wicket FAQ, Wicket pages are stored in the HTTP session:

* "When new pages are created they are added to the session, when pages
are no longer needed they are expired (removed) from the session"*

 My question is: What will happen when these users try to click on a
Wicket link after the HTTP session has expired?   I don't want the users to
see a "your page has expired" message. I want the user to resume using the
application in the same context that they were in before the HTTP session
expired.  Are there any best practices for this scenario?

 I studied the javadocs and I found the default error page (
wicket.markup.html.pages.PageExpiredErrorPage)
 as well as methods for changing the page:

IApplicationSettings.setPageExpiredErrorPage
IApplicationSettings.getPageExpiredErrorPage

 Cheers,

 Sean

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Getting the servlet context path (virtual directory)

2007-01-31 Thread dukejansen

Excellent! Thanks.
-Jason


igor.vaynberg wrote:
> 
> ((webrequest)requestcycle.get().getrequest()).gethttpservletrequest().
> 
> -igor
> 
> 
> On 1/31/07, dukejansen <[EMAIL PROTECTED]> wrote:
>>
>>
>> I know that Wicket intentionally obsfuscates much of the
>> HttpSession/HttpServletRequest/HttpServletResponse complexity, and that's
>> mostly fine, but I need to be able to get the root context path for my
>> application so that I can construct meaningful links to servlets and
>> other
>> resources that are outside of Wicket.
>>
>> Any tips on how to get this context path from within my WebSession
>> object?
>>
>> -Jason
>> --
>> View this message in context:
>> http://www.nabble.com/Getting-the-servlet-context-path-%28virtual-directory%29-tf3150240.html#a8734171
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> Using Tomcat but need to do more? Need to support web services, security?
>> Get stuff done quickly with pre-integrated technology to make your job
>> easier.
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
>> Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
> 
> -
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier.
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> ___
> 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/Getting-the-servlet-context-path-%28virtual-directory%29-tf3150240.html#a8736186
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] HTTP session expiration and Wicket pages

2007-01-31 Thread Sean Sullivan

I'm building an Intranet web application that will run in Websphere. In a
nutshell, this is my situation:
  - Websphere has a 30 minute timeout for inactive sessions
  - users open their browser in the morning and expect to be able to use
the application on and off during the day
  - users may have idle periods that exceed 30 minutes (lunch, meetings,
etc)

According to the Wicket FAQ, Wicket pages are stored in the HTTP session:

*"When new pages are created they are added to the session, when pages are
no longer needed they are expired (removed) from the session"*

My question is: What will happen when these users try to click on a Wicket
link after the HTTP session has expired?   I don't want the users to see a
"your page has expired" message. I want the user to resume using the
application in the same context that they were in before the HTTP session
expired.  Are there any best practices for this scenario?

I studied the javadocs and I found the default error page (
wicket.markup.html.pages.PageExpiredErrorPage)
as well as methods for changing the page:

  IApplicationSettings.setPageExpiredErrorPage
  IApplicationSettings.getPageExpiredErrorPage

Cheers,

Sean
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ui framework choice

2007-01-31 Thread Scott Swank

take a look at datatable example in wicket-examples.


Nice example, thank you.
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Getting the size of the client

2007-01-31 Thread Eelco Hillenius
On 1/31/07, Daniele Dellafiore <[EMAIL PROTECTED]> wrote:
> I will try to understand better how things works.
> What I really need is to get the new browser size after a search form
> has been submitted so I can try to send the size properties in the
> search form  (as you do in thee postback form) and then update the
> ClientProperties in... some way.

Just make sure your form submits the current width and size. Nest some
hidden fields in your form (but back them up with Wicket components)
and have something like this in your page's header:

  document.myForm.widthField.value =  window.innerWidth ||
document.body.offsetWidth;
  document.myForm.heightField.value =  window.innerHeight ||
document.body.offsetHeight;

where myForm is the id of your Wicket form, and widthField and
heightField are the ids of the hidden fields on your form.

When those values come in, you can just update your client properties
object; they are cached throughout the whole session. Though you don't
have to use that object in the first place; you can just use those
values directly and be done with it, or put them in your session as
separate properties. Whatever you like :)

> This would be a specific solution and maybe does not really need the
> ClientProperties to handle browser size cause I will have direct
> access to the form submitted value.

Yep.

> If I have correctly understood, what you suggest is a more general
> solution where I could put some javascript in the main template page
> of my webapp that continuously send information about changes. Such a
> solution would send a lot of event from client to server and the most
> will not be considered... this is the way a swing app works but maybe
> it is "too much" for a webapp, isn't it?

Yep. The duty of a framework is to provide generic solutions, but if
you don't need it, go for the simplest thing that works! :)

Eelco

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ui framework choice

2007-01-31 Thread Scott Swank

That someone may well be me -- once I have a better idea about how the
moving pieces (js & css) fit together.

On 1/31/07, Matej Knopp <[EMAIL PROTECTED]> wrote:


Hi.

I guess someone should write a how to customize modal window article to
wiki :)

You don't have to use blue or grey css. You can specify your own style
selector in modal window (ModalWindow.setCssClassName). If you set it to
e.g. black, you won't even have the background images loaded.

As for adding images through background-image - there really is no other
way. This is the only way you can have repeated image. Plus this was the
only way to reduce number of images loaded (modal window loads only two
images, so that it appears rather quickly).

-Matej

Scott Swank wrote:
> Mmm, here's the rather frustrated response from the developer who's been
> working on re-skinning DatePicker & ModalWindow to get them to more
> seamlessly fit our UI look/feel.  Apart from this hitch the demo
> implementation has been proceeded so well that we're trying to figure
> out what else to do to take up the rest of the week -- so things really
> are coming along rather well.  I'm open to any/all advice on how best to
> give our html/css team reasonably straight-forward access to the
> look/feel of components that come packages with their own css.
>
> Many thanks again,
> Scott
>
> --
>
> Team,
> Here is my findings and final thoughts on Wicket and CSS for
> components.  Please let me know if you really want me to get the CSS
> changed on a component.  I can do just that, but the path to get there
> isn't entirely easy.  Here are my thoughts:
>
> Firstly, to answer Scotts question "How easy would it be to just
> sub-class ModalWindow to one that has our css attached?".  The answer is
> not that easy.  We can subclass sure, but telling wicket to use our own
> CSS with a member function call would require changing the code that
> implements that component. The components I have seen have a function
> called setStyle().  The problem is that style assumes you are setting
> one of its predefined styles that exist in the package directory.
>
> By convention components have their CSS at the class level (inside the
> package) .  Worse than that, some times the CSS (or in the case of the
> DatePicker) reference a handful of other content like images in the same
> class package.  In that case you would have to move every referenced
> piece of content relative to where you made your changes.
>
> Here are the following ways that make it possible to override Wicket
> components CSS:
>
> *1)*  Change the source for the desired component(s) to allow better
> flexibility in choosing external CSS.
> *2)*  Override the CSS by either of the following 2 ways:
> *a)* Insert a  tag on the page and override CSS
> attributes on the desired component page.  To find out what the CSS
> looks like, you still have to unzip the wicket JAR or wicket-extensions
> JAR to get to the CSS:
> 
> div.calendar {position:
> absolute;z-index: 10;top:150;left:100;}
> 
> *b)* Do what I did for the DatePicker, and force the component to
> add a new Header to the page (overriding its original components CSS).
> I was able to put the CSS in our content directory which in practive
> gives a designer the ability to change any CSS properties at will
> without redeploying our app:
>
> *add(HeaderContributor./forCss/("../../css/cyllenius_cal.css"));*
> **
> Note:  In any case we are going to want designers to be able to access
> CSS files without digging into a Java package structure.
>
> *The ModalWindow Problems with styes*
> **
> I started looking into modifying the ModalWindows CSS just to show we
> have control over the component. In order to change its behavior, we
> would have to modify Javascript.  In order to change its look we need to
> modify a tightly coupled component to its CSS.
>
> What has made this a mess is that the ModalWindow has 2 choices, grey
> and blue based CSS.  By default it uses the blue css (blue borders,
> etc).  In order for me to override any of the CSS attributes, such as if
> i want to have no blue borders and simple black lines, I need to apply
> choice 1 or 2 above.  If we don't modify the source code, we would have
> to give the designer the CSS and they would be required to override CSS
> classes called "div.wicket-modal div.w_blue" in order to change to new
> properties.  Just looks ugly to change a property with the word "blue"
> in it, but its not blue now its black.
>
> Another silly issue that demonstrates the coupling of a component to its
> CSS is that the modal window uses CSS's background-image in for its
> blue/grey border.  We can only override the image not remove it so that
> we simply have a black line.  Bottom line is that the relationship of
> the CSS and the component is pure infatuation.  That intense desire
> needs to be broken up in order to achieve the true love that is often
> s

Re: [Wicket-user] ui framework choice

2007-01-31 Thread Scott Swank

Eelco & Igor,

I'm in agreement on the broad component-packaging approach and had much the
same conversation with our developer (Chris).  Mostly he was frustrated.
We're sub-classes both DatePicker & ModalWindow so that they have our
look/feel for the prototype.  Things really aren't nearly so bad as he made
them out to be, and my phobia of css stopped me from digging into the
particulars before I passed his commentary along.  I am suitably chastised.
:)

Scott

On 1/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:


Hi,

> By convention components have their CSS at the class level (inside the
> package) .  Worse than that, some times the CSS (or in the case of the
> DatePicker) reference a handful of other content like images in the same
> class package.  In that case you would have to move every referenced
piece
> of content relative to where you made your changes.

> Wicket's component nature introduces the tight relationship with to CSS
> and silly convention of housing the CSS in the packages themselves.
> After this exercise I am convinced component UI frameworks (at least
Wicket)
> fall short in allow the developer to "skin" or change the look of a
component with ease.
> It is obvious these components are written with the thought that that
their look is your
> desired look.  Until this problem can be solved, I believe this is a
major weakness
>  of the component framework.

The main reason for Wicket to put markup and resources in packages
*and* facilitate such use (which is something most frameworks do not
provide) is to enable users to create components that you can put in a
jar and enable your users to use it without them having to worry about
what resources they need to put in the web app dir.

I am surprised this ability of writing encapsulated components is
marked as a major weakness; it is quite the opposite if you ask me.
I'm also surprised that the fact that a couple of existing components
depend heavily on packaged resources is taken as a framework weakness.

It is *very easy* to write your own date picker component if you don't
care about the encapsulation. Just get your favorite javascript
widget, wrap a Wicket component around it so that you'd have the
proper header contribution (HeaderContributor#forJavaScript/
HeaderContributor#forCss with the single string argument) and
initialization of the specific widget (e.g. by doing another header
contribution of a little script that initializes the widget using the
component (markup) id). My estimate is that doing this is less than an
hour work! If you follow the user/ dev lists, you can see that we keep
repeating that one of Wicket's major features is the ability to create
custom components easily yourself. This saves us from having to write
kitchen sink components, and others from going through the frustration
that a certain component doesn't do what they want.

> It is obvious these components are written with the thought that that
their look is your
> desired look

Huh? DatePicker packages all the skins that the original javascript
component packages, and creating your own style for this is as easy as
creating your own folder (and subfolders if you want) with css and
images etc and then doing something like:

public class MyPicker extends DatePicker {

private static class Settings extends DatePickerSettings {

public DatePickerSettings() {
setStyle(new ResourceReference(MyPicker.class, "
mystyle.css"));
}
}

public MyPicker(String id, Component target) {
  super(id, target, new Settings());
}

and you're done! The only thing DatePicker isn't flexible in, is that
it is not written with the idea in mind that people want it to use
resources from a web app dir (and thus break encapsulation). There's
nothing wrong with doing that for your own project (in fact the
project I'm working on has many of such components), but like I
stated, writing such a component yourself would be so easy it would be
better letting people do it themselves so that they have exactly what
they need.

I think we have some work to do getting this message across louder, so
I opened up http://issues.apache.org/jira/browse/WICKET-249

Cheers,

Eelco

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





--
Scott Swank
reformed mathematician
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job eas

Re: [Wicket-user] ui framework choice

2007-01-31 Thread Matej Knopp
Hi.

I guess someone should write a how to customize modal window article to 
wiki :)

You don't have to use blue or grey css. You can specify your own style 
selector in modal window (ModalWindow.setCssClassName). If you set it to 
e.g. black, you won't even have the background images loaded.

As for adding images through background-image - there really is no other 
way. This is the only way you can have repeated image. Plus this was the 
only way to reduce number of images loaded (modal window loads only two 
images, so that it appears rather quickly).

-Matej

Scott Swank wrote:
> Mmm, here's the rather frustrated response from the developer who's been 
> working on re-skinning DatePicker & ModalWindow to get them to more 
> seamlessly fit our UI look/feel.  Apart from this hitch the demo 
> implementation has been proceeded so well that we're trying to figure 
> out what else to do to take up the rest of the week -- so things really 
> are coming along rather well.  I'm open to any/all advice on how best to 
> give our html/css team reasonably straight-forward access to the 
> look/feel of components that come packages with their own css.
> 
> Many thanks again,
> Scott
> 
> --
> 
> Team,
> Here is my findings and final thoughts on Wicket and CSS for 
> components.  Please let me know if you really want me to get the CSS 
> changed on a component.  I can do just that, but the path to get there 
> isn't entirely easy.  Here are my thoughts:
>  
> Firstly, to answer Scotts question "How easy would it be to just 
> sub-class ModalWindow to one that has our css attached?".  The answer is 
> not that easy.  We can subclass sure, but telling wicket to use our own 
> CSS with a member function call would require changing the code that 
> implements that component. The components I have seen have a function 
> called setStyle().  The problem is that style assumes you are setting 
> one of its predefined styles that exist in the package directory. 
>  
> By convention components have their CSS at the class level (inside the 
> package) .  Worse than that, some times the CSS (or in the case of the 
> DatePicker) reference a handful of other content like images in the same 
> class package.  In that case you would have to move every referenced 
> piece of content relative to where you made your changes.
>  
> Here are the following ways that make it possible to override Wicket 
> components CSS:
>  
> *1)*  Change the source for the desired component(s) to allow better 
> flexibility in choosing external CSS. 
> *2)*  Override the CSS by either of the following 2 ways:
> *a)* Insert a  tag on the page and override CSS 
> attributes on the desired component page.  To find out what the CSS 
> looks like, you still have to unzip the wicket JAR or wicket-extensions 
> JAR to get to the CSS:
> 
> div.calendar {position: 
> absolute;z-index: 10;top:150;left:100;}
> 
> *b)* Do what I did for the DatePicker, and force the component to 
> add a new Header to the page (overriding its original components CSS).  
> I was able to put the CSS in our content directory which in practive 
> gives a designer the ability to change any CSS properties at will 
> without redeploying our app:
>  
> *add(HeaderContributor./forCss/("../../css/cyllenius_cal.css"));*
> ** 
> Note:  In any case we are going to want designers to be able to access 
> CSS files without digging into a Java package structure.
>  
> *The ModalWindow Problems with styes*
> ** 
> I started looking into modifying the ModalWindows CSS just to show we 
> have control over the component. In order to change its behavior, we 
> would have to modify Javascript.  In order to change its look we need to 
> modify a tightly coupled component to its CSS.
>  
> What has made this a mess is that the ModalWindow has 2 choices, grey 
> and blue based CSS.  By default it uses the blue css (blue borders, 
> etc).  In order for me to override any of the CSS attributes, such as if 
> i want to have no blue borders and simple black lines, I need to apply 
> choice 1 or 2 above.  If we don't modify the source code, we would have 
> to give the designer the CSS and they would be required to override CSS 
> classes called "div.wicket-modal div.w_blue" in order to change to new 
> properties.  Just looks ugly to change a property with the word "blue" 
> in it, but its not blue now its black.
>  
> Another silly issue that demonstrates the coupling of a component to its 
> CSS is that the modal window uses CSS's background-image in for its 
> blue/grey border.  We can only override the image not remove it so that 
> we simply have a black line.  Bottom line is that the relationship of 
> the CSS and the component is pure infatuation.  That intense desire 
> needs to be broken up in order to achieve the true love that is often 
> seen with the concept of Windows application - its called "Skinning". 
>  
> *Summary*
>

Re: [Wicket-user] ui framework choice

2007-01-31 Thread Scott Swank

what we need to do is to extract an AbstractModalWindow that doesnt have

all the bells and whistles but lets you customize the look more.

+1  -- if we go with Wicket we might even contribute this ourselves


also can you not simply do modalwindow.setcssclassname("mine") and then

include an additional stylesheet that looks like one of modal window's but
uses the div.mine as a prefix so it overrides the other styles?

We're doing that, and embedding it in the constructor of a sub-class of
ModalWindow.


-igor


Igor rocks.
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ui framework choice

2007-01-31 Thread Eelco Hillenius
Hi,

> By convention components have their CSS at the class level (inside the
> package) .  Worse than that, some times the CSS (or in the case of the
> DatePicker) reference a handful of other content like images in the same
> class package.  In that case you would have to move every referenced piece
> of content relative to where you made your changes.

> Wicket's component nature introduces the tight relationship with to CSS
> and silly convention of housing the CSS in the packages themselves.
> After this exercise I am convinced component UI frameworks (at least Wicket)
> fall short in allow the developer to "skin" or change the look of a component 
> with ease.
> It is obvious these components are written with the thought that that their 
> look is your
> desired look.  Until this problem can be solved, I believe this is a major 
> weakness
>  of the component framework.

The main reason for Wicket to put markup and resources in packages
*and* facilitate such use (which is something most frameworks do not
provide) is to enable users to create components that you can put in a
jar and enable your users to use it without them having to worry about
what resources they need to put in the web app dir.

I am surprised this ability of writing encapsulated components is
marked as a major weakness; it is quite the opposite if you ask me.
I'm also surprised that the fact that a couple of existing components
depend heavily on packaged resources is taken as a framework weakness.

It is *very easy* to write your own date picker component if you don't
care about the encapsulation. Just get your favorite javascript
widget, wrap a Wicket component around it so that you'd have the
proper header contribution (HeaderContributor#forJavaScript/
HeaderContributor#forCss with the single string argument) and
initialization of the specific widget (e.g. by doing another header
contribution of a little script that initializes the widget using the
component (markup) id). My estimate is that doing this is less than an
hour work! If you follow the user/ dev lists, you can see that we keep
repeating that one of Wicket's major features is the ability to create
custom components easily yourself. This saves us from having to write
kitchen sink components, and others from going through the frustration
that a certain component doesn't do what they want.

> It is obvious these components are written with the thought that that their 
> look is your
> desired look

Huh? DatePicker packages all the skins that the original javascript
component packages, and creating your own style for this is as easy as
creating your own folder (and subfolders if you want) with css and
images etc and then doing something like:

public class MyPicker extends DatePicker {

private static class Settings extends DatePickerSettings {

public DatePickerSettings() {
setStyle(new ResourceReference(MyPicker.class, "mystyle.css"));
}
}

public MyPicker(String id, Component target) {
  super(id, target, new Settings());
}

and you're done! The only thing DatePicker isn't flexible in, is that
it is not written with the idea in mind that people want it to use
resources from a web app dir (and thus break encapsulation). There's
nothing wrong with doing that for your own project (in fact the
project I'm working on has many of such components), but like I
stated, writing such a component yourself would be so easy it would be
better letting people do it themselves so that they have exactly what
they need.

I think we have some work to do getting this message across louder, so
I opened up http://issues.apache.org/jira/browse/WICKET-249

Cheers,

Eelco

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Getting the servlet context path (virtual directory)

2007-01-31 Thread Igor Vaynberg

((webrequest)requestcycle.get().getrequest()).gethttpservletrequest().

-igor


On 1/31/07, dukejansen <[EMAIL PROTECTED]> wrote:



I know that Wicket intentionally obsfuscates much of the
HttpSession/HttpServletRequest/HttpServletResponse complexity, and that's
mostly fine, but I need to be able to get the root context path for my
application so that I can construct meaningful links to servlets and other
resources that are outside of Wicket.

Any tips on how to get this context path from within my WebSession object?

-Jason
--
View this message in context:
http://www.nabble.com/Getting-the-servlet-context-path-%28virtual-directory%29-tf3150240.html#a8734171
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ui framework choice

2007-01-31 Thread Igor Vaynberg

On 1/31/07, Scott Swank <[EMAIL PROTECTED]> wrote:



Another silly issue that demonstrates the coupling of a component to its
CSS is that the modal window uses CSS's background-image in for its
blue/grey border.  We can only override the image not remove it so that we
simply have a black line.



if you can override it why do you need  to remove it?

Bottom line is that the relationship of the CSS and the component is pure

infatuation.



components and css work together, of course there will be tight coupling.

 That intense desire needs to be broken up in order to achieve the true

love that is often seen with the concept of Windows application - its called
"Skinning".



heh...windows applications consist of a set of predefined components defined
by the OS. i have plenty of applications where custom components do not skin
properly. they match the colors sure, but they look out of place. we can
provide great skinning support if we will stop letting you create your own
components.

not to mention that html+css is a much more flexible canvas then windows
(before WFP), so i dont think you can draw the parallel very well.

*Summary*


Wicket's component nature introduces the tight relationship with to CSS
and silly convention of housing the CSS in the packages themselves.



is this really that silly? you had to use a datepicker, what did you have to
do? just add a datepicker component. did you have to unzip some zip that
housed datepicker related css+images into some folder in your webapp? no.
why? because datepicker could get them from the jar so there is no
configuration you had to do.

of course if you are going to start overriding css yourself then you have to
do that, but then you probably have your own images to provide anyways. btw,
you dont have to have all your images in the package. nothing is stopping
you from adding an absolute link to your css, and that css having absolute
links to any image urls. of course if you later wanted to reuse this
component in another project you would have to copy over the jar AND any
resources you created as opposed to just dropping in the jar.


After this exercise I am convinced component UI frameworks (at least Wicket)

fall short in allow the developer to "skin" or change the look of a
component with ease.



it really depends on how you approach this. my general approach has been to
change the css class of the top level component via attribute modifier or
something else, and then have my global stylesheet include any css for that
component based on that class. take a look at datatable example in
wicket-examples.

It is obvious these components are written with the thought that that their

look is your desired look.



with the exception of modal window i would have to disagree.

-igor


 Until this problem can be solved, I believe this is a major weakness of

the component framework.


chris

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ui framework choice

2007-01-31 Thread Igor Vaynberg

one thing to keep in mind is that the modalwindow was _not meant_ to be very
customizable. it was meant to be a dropin component that you would use as
is. that is why we put so much work into making it look really good. what we
need to do is to extract an AbstractModalWindow that doesnt have all the
bells and whistles but lets you customize the look more.

also can you not simply do modalwindow.setcssclassname("mine") and then
include an additional stylesheet that looks like one of modal window's but
uses the div.mine as a prefix so it overrides the other styles?

-igor


On 1/31/07, Scott Swank <[EMAIL PROTECTED]> wrote:


Ok, I dug into the DatePickerSettings and figured out that we can very
easily:

1. Apply our own css that overrides part of the existing css like so:

   this.add(HeaderContributor.forCss("../../css/cyllenius_cal.css"));

2. Apply our own css _instead of_ the existing css like so:

   settings.setStyle(new ResourceReference(DatePickerSettings.class,
"css/cyllenius_cal.css"));

I'm still researching ModalWindow...

Cheers,
Scott

On 1/31/07, Scott Swank <[EMAIL PROTECTED]> wrote:
>
> Mmm, here's the rather frustrated response from the developer who's been
> working on re-skinning DatePicker & ModalWindow to get them to more
> seamlessly fit our UI look/feel.  Apart from this hitch the demo
> implementation has been proceeded so well that we're trying to figure out
> what else to do to take up the rest of the week -- so things really are
> coming along rather well.  I'm open to any/all advice on how best to give
> our html/css team reasonably straight-forward access to the look/feel of
> components that come packages with their own css.
>
> Many thanks again,
> Scott
>
> --
>
> Team,
> Here is my findings and final thoughts on Wicket and CSS for
> components.  Please let me know if you really want me to get the CSS changed
> on a component.  I can do just that, but the path to get there isn't
> entirely easy.  Here are my thoughts:
>
> Firstly, to answer Scotts question "How easy would it be to just
> sub-class ModalWindow to one that has our css attached?".  The answer is not
> that easy.  We can subclass sure, but telling wicket to use our own CSS
> with a member function call would require changing the code that implements
> that component. The components I have seen have a function called
> setStyle().  The problem is that style assumes you are setting one of its
> predefined styles that exist in the package directory.
>
> By convention components have their CSS at the class level (inside the
> package) .  Worse than that, some times the CSS (or in the case of the
> DatePicker) reference a handful of other content like images in the same
> class package.  In that case you would have to move every referenced piece
> of content relative to where you made your changes.
>
> Here are the following ways that make it possible to override Wicket
> components CSS:
>
> *1)*  Change the source for the desired component(s) to allow better
> flexibility in choosing external CSS.
> *2)*  Override the CSS by either of the following 2 ways:
> *a)* Insert a  tag on the page and override CSS
> attributes on the desired component page.  To find out what the CSS looks
> like, you still have to unzip the wicket JAR or wicket-extensions JAR to get
> to the CSS:
> 
> div.calendar {position: absolute;z-index:
> 10;top:150;left:100;}
> 
> *b)* Do what I did for the DatePicker, and force the component to
> add a new Header to the page (overriding its original components CSS).  I
> was able to put the CSS in our content directory which in practive gives a
> designer the ability to change any CSS properties at will without
> redeploying our app:
>
> *add(HeaderContributor.forCss("../../css/cyllenius_cal.css"));*
> **
> Note:  In any case we are going to want designers to be able to access
> CSS files without digging into a Java package structure.
>
> *The ModalWindow Problems with styes*
> **
> I started looking into modifying the ModalWindows CSS just to show we
> have control over the component. In order to change its behavior, we would
> have to modify Javascript.  In order to change its look we need to modify a
> tightly coupled component to its CSS.
>
> What has made this a mess is that the ModalWindow has 2 choices, grey
> and blue based CSS.  By default it uses the blue css (blue borders, etc).
> In order for me to override any of the CSS attributes, such as if i want to
> have no blue borders and simple black lines, I need to apply choice 1 or 2
> above.  If we don't modify the source code, we would have to give the
> designer the CSS and they would be required to override CSS classes called "
> div.wicket-modal div.w_blue" in order to change to new properties.  Just
> looks ugly to change a property with the word "blue" in it, but its not blue
> now its black.
>
> Another silly issue that demonstrates the coupling of a componen

Re: [Wicket-user] ui framework choice

2007-01-31 Thread Scott Swank

Correction.  Step #1 is on the DatePicker itself, while step #2 is on the
DatePickerSettings.  Dumb cut/paste mistake.

On 1/31/07, Scott Swank <[EMAIL PROTECTED]> wrote:


Ok, I dug into the DatePickerSettings and figured out that we can very
easily:

1. Apply our own css that overrides part of the existing css like so:

   this.add(HeaderContributor.forCss("../../css/cyllenius_cal.css"));

2. Apply our own css _instead of_ the existing css like so:

   settings.setStyle(new ResourceReference(DatePickerSettings.class,
"css/cyllenius_cal.css"));

I'm still researching ModalWindow...

Cheers,
Scott

On 1/31/07, Scott Swank <[EMAIL PROTECTED]> wrote:
>
> Mmm, here's the rather frustrated response from the developer who's been
> working on re-skinning DatePicker & ModalWindow to get them to more
> seamlessly fit our UI look/feel.  Apart from this hitch the demo
> implementation has been proceeded so well that we're trying to figure out
> what else to do to take up the rest of the week -- so things really are
> coming along rather well.  I'm open to any/all advice on how best to give
> our html/css team reasonably straight-forward access to the look/feel of
> components that come packages with their own css.
>
> Many thanks again,
> Scott
>
> --
>
> Team,
> Here is my findings and final thoughts on Wicket and CSS for
> components.  Please let me know if you really want me to get the CSS changed
> on a component.  I can do just that, but the path to get there isn't
> entirely easy.  Here are my thoughts:
>
> Firstly, to answer Scotts question "How easy would it be to just
> sub-class ModalWindow to one that has our css attached?".  The answer is not
> that easy.  We can subclass sure, but telling wicket to use our own CSS
> with a member function call would require changing the code that implements
> that component. The components I have seen have a function called
> setStyle().  The problem is that style assumes you are setting one of its
> predefined styles that exist in the package directory.
>
> By convention components have their CSS at the class level (inside the
> package) .  Worse than that, some times the CSS (or in the case of the
> DatePicker) reference a handful of other content like images in the same
> class package.  In that case you would have to move every referenced piece
> of content relative to where you made your changes.
>
> Here are the following ways that make it possible to override Wicket
> components CSS:
>
> *1)*  Change the source for the desired component(s) to allow better
> flexibility in choosing external CSS.
> *2)*  Override the CSS by either of the following 2 ways:
> *a)* Insert a  tag on the page and override CSS
> attributes on the desired component page.  To find out what the CSS looks
> like, you still have to unzip the wicket JAR or wicket-extensions JAR to get
> to the CSS:
> 
> div.calendar {position: absolute;z-index:
> 10;top:150;left:100;}
> 
> *b)* Do what I did for the DatePicker, and force the component to
> add a new Header to the page (overriding its original components CSS).  I
> was able to put the CSS in our content directory which in practive gives a
> designer the ability to change any CSS properties at will without
> redeploying our app:
>
> *add(HeaderContributor.forCss("../../css/cyllenius_cal.css"));*
> **
> Note:  In any case we are going to want designers to be able to access
> CSS files without digging into a Java package structure.
>
> *The ModalWindow Problems with styes*
> **
> I started looking into modifying the ModalWindows CSS just to show we
> have control over the component. In order to change its behavior, we would
> have to modify Javascript.  In order to change its look we need to modify a
> tightly coupled component to its CSS.
>
> What has made this a mess is that the ModalWindow has 2 choices, grey
> and blue based CSS.  By default it uses the blue css (blue borders, etc).
> In order for me to override any of the CSS attributes, such as if i want to
> have no blue borders and simple black lines, I need to apply choice 1 or 2
> above.  If we don't modify the source code, we would have to give the
> designer the CSS and they would be required to override CSS classes called "
> div.wicket-modal div.w_blue" in order to change to new properties.  Just
> looks ugly to change a property with the word "blue" in it, but its not blue
> now its black.
>
> Another silly issue that demonstrates the coupling of a component to its
> CSS is that the modal window uses CSS's background-image in for its
> blue/grey border.  We can only override the image not remove it so that we
> simply have a black line.  Bottom line is that the relationship of the CSS
> and the component is pure infatuation.  That intense desire needs to be
> broken up in order to achieve the true love that is often seen with the
> concept of Windows application - its called "Skinning".
>
> *Summary*
>
> Wi

[Wicket-user] Getting the servlet context path (virtual directory)

2007-01-31 Thread dukejansen

I know that Wicket intentionally obsfuscates much of the
HttpSession/HttpServletRequest/HttpServletResponse complexity, and that's
mostly fine, but I need to be able to get the root context path for my
application so that I can construct meaningful links to servlets and other
resources that are outside of Wicket.

Any tips on how to get this context path from within my WebSession object?

-Jason
-- 
View this message in context: 
http://www.nabble.com/Getting-the-servlet-context-path-%28virtual-directory%29-tf3150240.html#a8734171
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ui framework choice

2007-01-31 Thread Scott Swank

Ok, I dug into the DatePickerSettings and figured out that we can very
easily:

1. Apply our own css that overrides part of the existing css like so:

  this.add(HeaderContributor.forCss("../../css/cyllenius_cal.css"));

2. Apply our own css _instead of_ the existing css like so:

  settings.setStyle(new ResourceReference(DatePickerSettings.class,
"css/cyllenius_cal.css"));

I'm still researching ModalWindow...

Cheers,
Scott

On 1/31/07, Scott Swank <[EMAIL PROTECTED]> wrote:


Mmm, here's the rather frustrated response from the developer who's been
working on re-skinning DatePicker & ModalWindow to get them to more
seamlessly fit our UI look/feel.  Apart from this hitch the demo
implementation has been proceeded so well that we're trying to figure out
what else to do to take up the rest of the week -- so things really are
coming along rather well.  I'm open to any/all advice on how best to give
our html/css team reasonably straight-forward access to the look/feel of
components that come packages with their own css.

Many thanks again,
Scott

--

Team,
Here is my findings and final thoughts on Wicket and CSS for components.
Please let me know if you really want me to get the CSS changed on a
component.  I can do just that, but the path to get there isn't entirely
easy.  Here are my thoughts:

Firstly, to answer Scotts question "How easy would it be to just sub-class
ModalWindow to one that has our css attached?".  The answer is not that
easy.  We can subclass sure, but telling wicket to use our own CSS with a
member function call would require changing the code that implements that
component. The components I have seen have a function called setStyle().
The problem is that style assumes you are setting one of its predefined
styles that exist in the package directory.

By convention components have their CSS at the class level (inside the
package) .  Worse than that, some times the CSS (or in the case of the
DatePicker) reference a handful of other content like images in the same
class package.  In that case you would have to move every referenced piece
of content relative to where you made your changes.

Here are the following ways that make it possible to override Wicket
components CSS:

*1)*  Change the source for the desired component(s) to allow better
flexibility in choosing external CSS.
*2)*  Override the CSS by either of the following 2 ways:
*a)* Insert a  tag on the page and override CSS
attributes on the desired component page.  To find out what the CSS looks
like, you still have to unzip the wicket JAR or wicket-extensions JAR to get
to the CSS:

div.calendar {position: absolute;z-index:
10;top:150;left:100;}

*b)* Do what I did for the DatePicker, and force the component to add
a new Header to the page (overriding its original components CSS).  I was
able to put the CSS in our content directory which in practive gives a
designer the ability to change any CSS properties at will without
redeploying our app:

*add(HeaderContributor.forCss("../../css/cyllenius_cal.css"));*
**
Note:  In any case we are going to want designers to be able to access CSS
files without digging into a Java package structure.

*The ModalWindow Problems with styes*
**
I started looking into modifying the ModalWindows CSS just to show we have
control over the component. In order to change its behavior, we would have
to modify Javascript.  In order to change its look we need to modify a
tightly coupled component to its CSS.

What has made this a mess is that the ModalWindow has 2 choices, grey and
blue based CSS.  By default it uses the blue css (blue borders, etc).  In
order for me to override any of the CSS attributes, such as if i want to
have no blue borders and simple black lines, I need to apply choice 1 or 2
above.  If we don't modify the source code, we would have to give the
designer the CSS and they would be required to override CSS classes called "
div.wicket-modal div.w_blue" in order to change to new properties.  Just
looks ugly to change a property with the word "blue" in it, but its not blue
now its black.

Another silly issue that demonstrates the coupling of a component to its
CSS is that the modal window uses CSS's background-image in for its
blue/grey border.  We can only override the image not remove it so that we
simply have a black line.  Bottom line is that the relationship of the CSS
and the component is pure infatuation.  That intense desire needs to be
broken up in order to achieve the true love that is often seen with the
concept of Windows application - its called "Skinning".

*Summary*

Wicket's component nature introduces the tight relationship with to CSS
and silly convention of housing the CSS in the packages themselves.  After
this exercise I am convinced component UI frameworks (at least Wicket) fall
short in allow the developer to "skin" or change the look of a component
with ease.  It is obvious these components 

Re: [Wicket-user] MultipartForm

2007-01-31 Thread Igor Vaynberg

yes, we already do enough "hacking" to allow users to nest forms eventhough
it is not allowed in the html spec. what wicket does is turn all inner form
tags into divs and use its magic to route the values/call events. but when
it comes to multipart there isnt much we can do because at the end there is
only one top level form, and if you have upload fields then that form has to
be multipart.

-igor


On 1/31/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:


Multipart nested forms are not supported (yet). I am not sure that we
ever will support them.

Martijn

On 1/31/07, Matthes R. <[EMAIL PROTECTED]> wrote:
> k. thanks. i was just wondering, because it worked all fine with the
> inner-form, just this thing with the multipart..
>
> Carfield Yim schrieb:
> > I think we are not suppose to have form inside anyother form.
> >
> > On 1/31/07, Matthes Rieke <[EMAIL PROTECTED]> wrote:
> >
> >> Hi everybody,
> >>
> >> i've got a problem with multipart-forms. i have a form with some
input-field and inside this form there is another form for uploading an
image:
> >>
> >> 
> >>
> >>   
> >> 
> >>   
> >>
> >>   
> >>   
> >>   
> >>
> >> 
> >>
> >> Wicket always sets the outer form to multipart (automatically adds
"enctype=..."), but i do not submit any multipart in the outer form and so i
get an exception that there is not multipart submitted.
> >>
> >> how can i tell wicket, that the outer form does not contain multipart
content? setMultiPart(false) did not help!
> >>
> >> thanks and greets,
> >> Matthes
> >> --
> >> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> >> Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
> >>
> >>
-
> >> Take Surveys. Earn Cash. Influence the Future of IT
> >> Join SourceForge.net's Techsay panel and you'll get the chance to
share your
> >> opinions on IT & business topics through brief surveys - and earn
cash
> >>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >> ___
> >> Wicket-user mailing list
> >> Wicket-user@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
> >>
> >>
> >
-
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to
share your
> > opinions on IT & business topics through brief surveys - and earn cash
> >
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
>
-
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
your
> opinions on IT & business topics through brief surveys - and earn cash
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


--
Vote for Wicket at the
http://www.thebeststuffintheworld.com/vote_for/wicket
Wicket 1.2.4 is as easy as 1-2-4. Download Wicket now!
http://wicketframework.org

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Getting the size of the client

2007-01-31 Thread Daniele Dellafiore
I will try to understand better how things works.
What I really need is to get the new browser size after a search form
has been submitted so I can try to send the size properties in the
search form  (as you do in thee postback form) and then update the
ClientProperties in... some way.

This would be a specific solution and maybe does not really need the
ClientProperties to handle browser size cause I will have direct
access to the form submitted value.

If I have correctly understood, what you suggest is a more general
solution where I could put some javascript in the main template page
of my webapp that continuously send information about changes. Such a
solution would send a lot of event from client to server and the most
will not be considered... this is the way a swing app works but maybe
it is "too much" for a webapp, isn't it?

Anyway, I will investigate on the problem in next days and let you know.

Thanks for support.

On 1/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> On 1/31/07, Daniele Dellafiore <[EMAIL PROTECTED]> wrote:
> > ok, my project is using 1.3 shapshot in fact i can get the browser
> > size properties.
> > However, like you said, properties are refreshed just at the beginning
> > of the session.
> > I have tried to include the code found in BrowserInfoPage all in the
> > 1.3 snapshot quickstart project: I have inserted:
> >
> > 1) 

Re: [Wicket-user] ui framework choice

2007-01-31 Thread Scott Swank

Mmm, here's the rather frustrated response from the developer who's been
working on re-skinning DatePicker & ModalWindow to get them to more
seamlessly fit our UI look/feel.  Apart from this hitch the demo
implementation has been proceeded so well that we're trying to figure out
what else to do to take up the rest of the week -- so things really are
coming along rather well.  I'm open to any/all advice on how best to give
our html/css team reasonably straight-forward access to the look/feel of
components that come packages with their own css.

Many thanks again,
Scott

--

Team,
Here is my findings and final thoughts on Wicket and CSS for components.
Please let me know if you really want me to get the CSS changed on a
component.  I can do just that, but the path to get there isn't entirely
easy.  Here are my thoughts:

Firstly, to answer Scotts question "How easy would it be to just sub-class
ModalWindow to one that has our css attached?".  The answer is not that
easy.  We can subclass sure, but telling wicket to use our own CSS with a
member function call would require changing the code that implements that
component. The components I have seen have a function called setStyle().
The problem is that style assumes you are setting one of its predefined
styles that exist in the package directory.

By convention components have their CSS at the class level (inside the
package) .  Worse than that, some times the CSS (or in the case of the
DatePicker) reference a handful of other content like images in the same
class package.  In that case you would have to move every referenced piece
of content relative to where you made your changes.

Here are the following ways that make it possible to override Wicket
components CSS:

*1)*  Change the source for the desired component(s) to allow better
flexibility in choosing external CSS.
*2)*  Override the CSS by either of the following 2 ways:
   *a)* Insert a  tag on the page and override CSS attributes
on the desired component page.  To find out what the CSS looks like, you
still have to unzip the wicket JAR or wicket-extensions JAR to get to the
CSS:
   
   div.calendar {position: absolute;z-index:
10;top:150;left:100;}
   
   *b)* Do what I did for the DatePicker, and force the component to add a
new Header to the page (overriding its original components CSS).  I was able
to put the CSS in our content directory which in practive gives a designer
the ability to change any CSS properties at will without redeploying our
app:

*add(HeaderContributor.forCss("../../css/cyllenius_cal.css"));*
**
Note:  In any case we are going to want designers to be able to access CSS
files without digging into a Java package structure.

*The ModalWindow Problems with styes*
**
I started looking into modifying the ModalWindows CSS just to show we have
control over the component. In order to change its behavior, we would have
to modify Javascript.  In order to change its look we need to modify a
tightly coupled component to its CSS.

What has made this a mess is that the ModalWindow has 2 choices, grey and
blue based CSS.  By default it uses the blue css (blue borders, etc).  In
order for me to override any of the CSS attributes, such as if i want to
have no blue borders and simple black lines, I need to apply choice 1 or 2
above.  If we don't modify the source code, we would have to give the
designer the CSS and they would be required to override CSS classes called "
div.wicket-modal div.w_blue" in order to change to new properties.  Just
looks ugly to change a property with the word "blue" in it, but its not blue
now its black.

Another silly issue that demonstrates the coupling of a component to its CSS
is that the modal window uses CSS's background-image in for its blue/grey
border.  We can only override the image not remove it so that we simply have
a black line.  Bottom line is that the relationship of the CSS and the
component is pure infatuation.  That intense desire needs to be broken up in
order to achieve the true love that is often seen with the concept of
Windows application - its called "Skinning".

*Summary*

Wicket's component nature introduces the tight relationship with to CSS and
silly convention of housing the CSS in the packages themselves.  After this
exercise I am convinced component UI frameworks (at least Wicket) fall short
in allow the developer to "skin" or change the look of a component with
ease.  It is obvious these components are written with the thought that that
their look is your desired look.  Until this problem can be solved, I
believe this is a major weakness of the component framework.


chris
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?pa

Re: [Wicket-user] How do I add custom javascript to wicket application

2007-01-31 Thread Eelco Hillenius
> Look like that  investigation code haven't executed. Which method is
> actually execute that  investigation code ?

Does the browserinfo example in wicket-examples work for you?

Try a break point in BrowserInfoPage, or specifically it's internal
class PostBackForm#onSubmit

Eelco

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] MultipartForm

2007-01-31 Thread Martijn Dashorst
Multipart nested forms are not supported (yet). I am not sure that we
ever will support them.

Martijn

On 1/31/07, Matthes R. <[EMAIL PROTECTED]> wrote:
> k. thanks. i was just wondering, because it worked all fine with the
> inner-form, just this thing with the multipart..
>
> Carfield Yim schrieb:
> > I think we are not suppose to have form inside anyother form.
> >
> > On 1/31/07, Matthes Rieke <[EMAIL PROTECTED]> wrote:
> >
> >> Hi everybody,
> >>
> >> i've got a problem with multipart-forms. i have a form with some 
> >> input-field and inside this form there is another form for uploading an 
> >> image:
> >>
> >> 
> >>
> >>   
> >> 
> >>   
> >>
> >>   
> >>   
> >>   
> >>
> >> 
> >>
> >> Wicket always sets the outer form to multipart (automatically adds 
> >> "enctype=..."), but i do not submit any multipart in the outer form and so 
> >> i get an exception that there is not multipart submitted.
> >>
> >> how can i tell wicket, that the outer form does not contain multipart 
> >> content? setMultiPart(false) did not help!
> >>
> >> thanks and greets,
> >> Matthes
> >> --
> >> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> >> Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
> >>
> >> -
> >> Take Surveys. Earn Cash. Influence the Future of IT
> >> Join SourceForge.net's Techsay panel and you'll get the chance to share 
> >> your
> >> opinions on IT & business topics through brief surveys - and earn cash
> >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >> ___
> >> Wicket-user mailing list
> >> Wicket-user@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
> >>
> >>
> > -
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share your
> > opinions on IT & business topics through brief surveys - and earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-- 
Vote for Wicket at the http://www.thebeststuffintheworld.com/vote_for/wicket
Wicket 1.2.4 is as easy as 1-2-4. Download Wicket now!
http://wicketframework.org

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [wicket-1.x, wicket-2.0] ServletWebRequest#getRelativeURL()

2007-01-31 Thread Eelco Hillenius
Done.

Eelco


On 1/31/07, Edward Yakop <[EMAIL PROTECTED]> wrote:
> That's because I have my own implementation of servlet request.
>
> In my PaxWicketApplication.java
> 
> public class PaxWicketApplication extends WebApplication
> {
>   ...
>
>@Override
>protected final WebRequest newWebRequest( final HttpServletRequest
> servletRequest )
>{
>   return new PaxWicketRequest( m_mountPoint, servletRequest );
>}
> }
> 
>
> and inside my PaxWicketRequest
> 
> /**
>  * @author Niclas Hedhman, Edward Yakop
>  *
>  * @since 1.0.0
>  */
> final class PaxWicketRequest extends ServletWebRequest
> {
>...
>public final String getServletPath()
> {
> String contextPath = getHttpServletRequest().getContextPath();
> if ( m_logger.isDebugEnabled() )
> {
> m_logger.debug( "getServletPath() : " + contextPath );
> }
> if ( !contextPath.endsWith( "/" ) )
> {
> contextPath += "/";
> }
>
> return contextPath;
> }
>
> // ContextPath pretty much similar to servlet path the diff is,
> // getHttpServletRequest().getServletPath()
> }
> 
>
> Because I override both getServletPath() and getContextPath() to
> return the right values for OSGi cases. I would need getRelativeURL()
> to use ServletWebRequest#getServletPath() instead of
> httpServletRequest.getServletPath().
>
> Hope this clear.
>
> Regards,
> Edward Yakop
>
>
> On 1/31/07, Johan Compagner <[EMAIL PROTECTED]> wrote:
> > so to get this correctly
> > you just changed the line:
> >
> >  String url = httpServletRequest.getServletPath();
> >
> > to
> >
> >  String url = getServletPath();
> >
> > how can that help?
> >
> > because this is getServletPath() on ServletWebRequest
> >
> >
> > return httpServletRequest.getServletPath();
> >
> >
> > so thats exactly the same code
> >
> > johan
> >
> >
> >
> >
> >
> >
> >
> >
> > On 1/31/07, Edward Yakop <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi,
> > >
> > > I have a small bug to fix for
> > ServletWebRequest#getRelativeURL(). For
> > > some odd reason, for resources (images, css etcs) to be displayed for
> > > Felix http service, ServletWebRequest#getServletPath()
> > and
> > > #getContextPath() must be swapped. Due to getRelativeURL() uses
> > > httpServletRequest.getServletPath()  to initialize the
> > url variable
> > > instead of calling ServletWebRequest#getServletPath(),
> > the returned
> > > string is invalid in this setup.
> > >
> > > Can we change the implementation of getRelativeURL()
> > > from
> > > 
> > > public String getRelativeURL()
> > > {
> > >...
> > >String url = httpServletRequest.getServletPath();
> > >final String pathInfo = httpServletRequest.getPathInfo();
> > >
> > >...
> > >return url;
> > > }
> > > 
> > >
> > > to
> > > 
> > > public String getRelativeURL()
> > > {
> > >...
> > >String url = getServletPath(); // Modified line
> > >final String pathInfo = httpServletRequest.getPathInfo();
> > >
> > >...
> > >return url;
> > > }
> > > 
> > >
> > > The use case why this is a bug when we have a login page that does not
> > > have redirection pages, getRelativeURL() returns
> > > "/mountPoint/mountPoint/", instead of only "/mountPoint/".
> > >
> > > Regards,
> > > Edward Yakop
> > >
> > >
> > -
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the chance to share
> > your
> > > opinions on IT & business topics through brief surveys - and earn cash
> > >
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > ___
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
> >
> > -
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share your
> > opinions on IT & business topics through brief surveys - and earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
> >
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

Re: [Wicket-user] Getting the size of the client

2007-01-31 Thread Eelco Hillenius
On 1/31/07, Daniele Dellafiore <[EMAIL PROTECTED]> wrote:
> ok, my project is using 1.3 shapshot in fact i can get the browser
> size properties.
> However, like you said, properties are refreshed just at the beginning
> of the session.
> I have tried to include the code found in BrowserInfoPage all in the
> 1.3 snapshot quickstart project: I have inserted:
>
> 1) 

Re: [Wicket-user] Getting the size of the client

2007-01-31 Thread Daniele Dellafiore
ok, my project is using 1.3 shapshot in fact i can get the browser
size properties.
However, like you said, properties are refreshed just at the beginning
of the session.
I have tried to include the code found in BrowserInfoPage all in the
1.3 snapshot quickstart project: I have inserted:

1) 

Re: [Wicket-user] MultipartForm

2007-01-31 Thread Matthes R.
k. thanks. i was just wondering, because it worked all fine with the 
inner-form, just this thing with the multipart..

Carfield Yim schrieb:
> I think we are not suppose to have form inside anyother form.
>
> On 1/31/07, Matthes Rieke <[EMAIL PROTECTED]> wrote:
>   
>> Hi everybody,
>>
>> i've got a problem with multipart-forms. i have a form with some input-field 
>> and inside this form there is another form for uploading an image:
>>
>> 
>>
>>   
>> 
>>   
>>
>>   
>>   
>>   
>>
>> 
>>
>> Wicket always sets the outer form to multipart (automatically adds 
>> "enctype=..."), but i do not submit any multipart in the outer form and so i 
>> get an exception that there is not multipart submitted.
>>
>> how can i tell wicket, that the outer form does not contain multipart 
>> content? setMultiPart(false) did not help!
>>
>> thanks and greets,
>> Matthes
>> --
>> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
>> Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
>>
>> -
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share your
>> opinions on IT & business topics through brief surveys - and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
>> 
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>   


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] MultipartForm

2007-01-31 Thread Carfield Yim
I think we are not suppose to have form inside anyother form.

On 1/31/07, Matthes Rieke <[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> i've got a problem with multipart-forms. i have a form with some input-field 
> and inside this form there is another form for uploading an image:
>
> 
>
>   
> 
>   
>
>   
>   
>   
>
> 
>
> Wicket always sets the outer form to multipart (automatically adds 
> "enctype=..."), but i do not submit any multipart in the outer form and so i 
> get an exception that there is not multipart submitted.
>
> how can i tell wicket, that the outer form does not contain multipart 
> content? setMultiPart(false) did not help!
>
> thanks and greets,
> Matthes
> --
> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How to include a form field in the ajax request without form submit

2007-01-31 Thread Marc-Andre Houle

Why not simply use AjaxSubmitLink or AjaxSubmitButton ? It will submit all
the form, evidently, but you can do which ever action you want in the
onClick handler?  Am I missing something?

Marc

On 1/31/07, Erik van Oosten <[EMAIL PROTECTED]> wrote:


Hello Conny,

You could use the 'onclick' event, however, you won't get the value of
the text input. So, you probably need to submit the form. For this links
are not intended, you need a submit buttons. With css you can style the
button as a link again (if you really must :) ). Wicket won't support
something that can not be supported.

Please read the class comment of Wicket's Form class for a lot of
information on form processing.

Regards,
 Erik.

Conny Kühne wrote:
> Thanks for the quick response. Unfortunately I don't quite understand
> how to achieve the functionality with
> ajaxformcomponentupdatingbehavior. More precise, I don't know which
> event to attache to it. I don't want to
> call the availability check "onBlur" but only when the link is clicked.
>
>
>
> 2007/1/30, Igor Vaynberg < [EMAIL PROTECTED]
> >:
>
> see ajaxformcomponentupdatingbehavior
>
> -igor
>
>
> On 1/30/07, *Conny Kühne* < [EMAIL PROTECTED]
> > wrote:
>
> Hi,
>
> my scenario is as follows:
>
> I have a registration form (non ajax) and want to add a link
> that checks the availability of the username
> (i.e., if it has already been taken) via ajax.
>
> So I need a way to get the value of a form field without
> submitting the form. Ideally the value of the form field
> should be read (or it's model updated) when the ajax link is
> clicked.
>
> Is there a convinient way to achieve this behavior.
>
> Best regards,
> Conny
>
>

--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] MultipartForm

2007-01-31 Thread Matthes Rieke
Hi everybody,

i've got a problem with multipart-forms. i have a form with some input-field 
and inside this form there is another form for uploading an image:



  

  

  
  
  



Wicket always sets the outer form to multipart (automatically adds 
"enctype=..."), but i do not submit any multipart in the outer form and so i 
get an exception that there is not multipart submitted.

how can i tell wicket, that the outer form does not contain multipart content? 
setMultiPart(false) did not help!

thanks and greets,
Matthes
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Ajax refreshing of DataTable

2007-01-31 Thread Pierre-Henri Trivier
Greetings

 I have a problem with a DataTable component that I am trying to refresh
 following an Ajax event.

My page contains a 'DataTable' component, with a FilterToolbar added as
a topToolbar.
The table is displayed correctly. My page contains a modal window that I
use to edit the bean ; when I close the modal window, I want my table to
be refreshed.

So assuming the table component is available when I declare the button,
and after setting table.setOutputId to true , I do :

-
AjaxSubmitButton save = new AjaxSubmitButton("save", EditForm.this) {

 @Override
 protected void onSubmit(AjaxRequestTarget target, Form form) {
ModalWindow.close(target);
target.addComponent(table);
 }  

};
-

This works fine as far as the table's row are concerned, except that the
filter field (the one rendered by the FilterToolbar) does not get drawn.

I tried to explicitely add the filterToolbar component to the target
(after setting it to output its ID), but then an exception was thrown,
complaining that components with setRenderBodyOnly set to true could not
be added to the target.
I tried to manually call setRenderBodyOnly on the toolbar, but it failed.

Afterwards, I tried the same thing with the AjaxFallbackDataTable ; the
problem was even worse, as when I would navigate from a part of the
table to the other, the "filter" field would disappear too. I suspect
this is because AjaxFallbackDataTable does the rendering of different
'pages' of the table using ajax, and the same problem occurs.

So, is there a way to refresh a FilterToolbar in a DataTable using an
Ajax event ? Or will I have to reload the entire page ?


Regards

-- 
Pierre-Henri Trivier
Solutions & Technologies
Anyware Technologies
www.anyware-tech.com

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How to include a form field in the ajax request without form submit

2007-01-31 Thread Erik van Oosten
Hello Conny,

You could use the 'onclick' event, however, you won't get the value of 
the text input. So, you probably need to submit the form. For this links 
are not intended, you need a submit buttons. With css you can style the 
button as a link again (if you really must :) ). Wicket won't support 
something that can not be supported.

Please read the class comment of Wicket's Form class for a lot of 
information on form processing.

Regards,
 Erik.

Conny Kühne wrote:
> Thanks for the quick response. Unfortunately I don't quite understand 
> how to achieve the functionality with
> ajaxformcomponentupdatingbehavior. More precise, I don't know which 
> event to attache to it. I don't want to
> call the availability check "onBlur" but only when the link is clicked.
>
>
>
> 2007/1/30, Igor Vaynberg < [EMAIL PROTECTED] 
> >:
>
> see ajaxformcomponentupdatingbehavior
>
> -igor
>
>
> On 1/30/07, *Conny Kühne* < [EMAIL PROTECTED]
> > wrote:
>
> Hi,
>
> my scenario is as follows:
>
> I have a registration form (non ajax) and want to add a link
> that checks the availability of the username
> (i.e., if it has already been taken) via ajax.
>
> So I need a way to get the value of a form field without
> submitting the form. Ideally the value of the form field
> should be read (or it's model updated) when the ajax link is
> clicked.
>
> Is there a convinient way to achieve this behavior.
>
> Best regards,
> Conny
>
>

-- 
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How to include a form field in the ajax request without form submit

2007-01-31 Thread Conny Kühne

Thanks for the quick response. Unfortunately I don't quite understand how to
achieve the functionality with
ajaxformcomponentupdatingbehavior. More precise, I don't know which event to
attache to it. I don't want to
call the availability check "onBlur" but only when the link is clicked.





2007/1/30, Igor Vaynberg < [EMAIL PROTECTED]>:


see ajaxformcomponentupdatingbehavior

-igor


On 1/30/07, Conny Kühne < [EMAIL PROTECTED] > wrote:

> Hi,
>
> my scenario is as follows:
>
> I have a registration form (non ajax) and want to add a link that checks
> the availability of the username
> (i.e., if it has already been taken) via ajax.
>
> So I need a way to get the value of a form field without submitting the
> form. Ideally the value of the form field
> should be read (or it's model updated) when the ajax link is clicked.
>
> Is there a convinient way to achieve this behavior.
>
> Best regards,
> Conny
>
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
>
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] GMarkerManager in GMap wicket lib?

2007-01-31 Thread Iulian Costan

Edward,

Thanks for the patch and hard work, i'll apply the patch right away.
As far as I see the root problem is in the way gmap 1.0 is designed; it
doenst really fit with wicket 2.0 model where we haveto pass the parent as
contructor argument. as you said, porting and issues that appear might be
long, an overkill and we have to do all kind of workarounds to fit it.

my initial thinking was to redesign gmap for wicket 2.0, i put some ideas on
paper but nothing concrete yet.
but still till that time i'll apply your patch and see how it goes. keep in
touch.

/iulian

On 1/31/07, Edward Yakop <[EMAIL PROTECTED]> wrote:


Hi,

Just continuing from this thread.

I'm currently helping [EMAIL PROTECTED] to get their *secret* project
going. I svn co the gmap contrib with version 1712 and try to migrate
their existing code to use wicket-2.0 and pax-wicket-2.0.

During migration I noticed a couple of bug in gmap migration to wicket-2.0
:
* In the gmap-examples, in the constructor of HomePage()
  the label is instantiated with parent as HomePage.
  the info panel is instantiated with parent as HomePage.

  The homepage does not have "INFO_COMPONENT_ID" wicket id.

  The fix is rather long, instead of passing component to marker, I
decided to pass the component factory. This way, we can delay the
instantiation of the label/info panel as late as possible, and also,
there is no hardcoding involve on the user of gmap to ensure the
wicket id of the component is "INFO_COMPONENT_ID".

  ComponentFactory interface is added with the following signature.

public interface ComponentFactory extends
Serializable
{
 T createComponent(V parent, String
wicketId);
}


   - Update GMarker constructor to accept ComponentFactory instead of
Component.
   - Update GMarker#getComponent() method to use ComponentFactory. The
method signature becomes Gmarker#getComponent( MarkupContainer parent,
String wicketId )
   - Update GMarkerContainer constructor to use GMarker#getComponent(
MarkupContainer, String ) and remove static checking that the
component id must be "INFO_COMPONENT_ID".

* Fix up InfoPanel at populateItem( final ListItem item).
  the labels are added to (this), where it should be added to (item).

* For some odd reason that only one marker can be clicked at the
beginning, after that NullPointerException is thrown.


SEVERE: Error while responding to an AJAX request:
[EMAIL PROTECTED] markupIdToComponent
[{1787073357512=[MarkupContainer [Component id = gmarkerContainer,
page = wicket.contrib.examples.gmap.HomePage, path =
0:gmap:gmapContainer:gmarkersLoop:1:gmarkerContainer.GMarkerContainer,
isVisible = true, isVersioned = true]]}], prependJavascript [[]],
appendJavascript [[]]
wicket.WicketRuntimeException: Error attaching this container for
rendering: [MarkupContainer [Component id = gmarkerInfo, page =
wicket.contrib.examples.gmap.HomePage, path =
0:gmap:gmapContainer:gmarkersLoop:1:gmarkerContainer:gmarkerInfo
.InfoPanel, isVisible = true, isVersioned = true]]
at wicket.MarkupContainer.attachChildren(MarkupContainer.java:383)
at wicket.Component.attach(Component.java:2784)
at wicket.MarkupContainer.attachChildren(MarkupContainer.java:372)
at wicket.Component.attach(Component.java:2784)
at wicket.ajax.AjaxRequestTarget.respondComponents(
AjaxRequestTarget.java:448)
at wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java
:339)
at wicket.request.compound.DefaultResponseStrategy.respond(
DefaultResponseStrategy.java:53)
at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(
AbstractCompoundRequestCycleProcessor.j
ava:65)
at wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java
:944)
at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java
:978)
at wicket.RequestCycle.step(RequestCycle.java:1054)
at wicket.RequestCycle.steps(RequestCycle.java:1125)
at wicket.RequestCycle.request(RequestCycle.java:470)
at wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:232)
at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java
:138)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(
ServletHolder.java:491)
at org.mortbay.jetty.servlet.ServletHandler.handle(
ServletHandler.java:367)
at org.mortbay.jetty.security.SecurityHandler.handle(
SecurityHandler.java:185)
at org.mortbay.jetty.servlet.SessionHandler.handle(
SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(
ContextHandler.java:689)
at org.mortbay.jetty.webapp.WebAppContext.handle(
WebAppContext.java:391)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(
ContextHandlerCollection.java:146)
at org.mortbay.jetty.handler.HandlerCollection.handle(
HandlerCollection.jav

Re: [Wicket-user] writing unit tests

2007-01-31 Thread Timo Rantalaiho
On Wed, 31 Jan 2007, Nino Wael wrote:
> What do others do?

I use excellent (at least in 2.0) WicketTester to test basic
functionality and tree structure of components, and
complement it with WicketBenchTestCase from Wicket Bench to
test with Selenium how the components behave in Firefox.

And JUnit 3 with both.

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

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] writing unit tests

2007-01-31 Thread Nino Wael
Hi

 

I've been wondering about best practices for writing unit tests with wicket?

 

Looking around the source of wicket, I can see that most uses junit. A few 
places wicket tester are used.

 

Last time I wrote a test I tried writing using jwebunit and http unit (as I 
remember). I tried using the wicket test framework, but it gave me some 
complications (might be because I was new to the wicket world). Also this was 
on wicket 1.x.

 

What do others do?

 

-Nino Wael

 

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Problem of try to prevent startTransaction and commit

2007-01-31 Thread Carfield Yim
As most of the webpages does not need transaction support, thus I have
a marker interface to prevent transaction start and commit for those
webpage, which work like follow:

@Override
protected void onBeginRequest() {
super.onBeginRequest();
if (arg1.getPage() ==null || !(arg1.getPage()
instanceof NoTransactionRequired))
try {
sqlMap.startTransaction();
} catch (SQLException e) {
logger.log("startTransaction fail", e);
}
}

@Override
protected void onEndRequest() {
super.onEndRequest();
if (arg1.getPage() ==null || !(arg1.getPage()
instanceof NoTransactionRequired))
try {
sqlMap.commitTransaction();
} catch (Exception e) {
logger.log("commitTransaction fail", e);
} finally {
try {
sqlMap.endTransaction();
} catch (SQLException e) {
logger.log("endTransaction fail", e);
}
}
}

However I found that this is not very reliable and sometime there will
have transaction started but haven't get close or no transaction start
but try to close the transaction. Anyone know why?

By the way, I am thinking about something like

private boolean transactionStarted;
@Override
protected void onBeginRequest() {
super.onBeginRequest();
HttpUtil.setNoCacheHeaders((WebResponse) arg2);
arg2.setContentType("text/html; charset=UTF-8");
arg2.setCharacterEncoding("UTF-8");
if (arg1.getPage() ==null || !(arg1.getPage()
instanceof NoTransactionRequired))
try {
sqlMap.startTransaction();

transactionStarted = true;

} catch (SQLException e) {
logger.log("startTransaction fail", e);
}
}

@Override
protected void onEndRequest() {
super.onEndRequest();
if (transactionStarted)
try {
sqlMap.commitTransaction();
} catch (Exception e) {
logger.log("commitTransaction fail", e);
} finally {
try {
sqlMap.endTransaction();
} catch (SQLException e) {
logger.log("endTransaction fail", e);
}
}
}

Do you think this is ok to put a global variable at RequestCycle, is
it belong to that session only and for each request it will create a
new RequestCycle?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] GMarkerManager in GMap wicket lib?

2007-01-31 Thread Edward Yakop

Hi,

Just continuing from this thread.

I'm currently helping [EMAIL PROTECTED] to get their *secret* project
going. I svn co the gmap contrib with version 1712 and try to migrate
their existing code to use wicket-2.0 and pax-wicket-2.0.

During migration I noticed a couple of bug in gmap migration to wicket-2.0:
* In the gmap-examples, in the constructor of HomePage()
 the label is instantiated with parent as HomePage.
 the info panel is instantiated with parent as HomePage.

 The homepage does not have "INFO_COMPONENT_ID" wicket id.

 The fix is rather long, instead of passing component to marker, I
decided to pass the component factory. This way, we can delay the
instantiation of the label/info panel as late as possible, and also,
there is no hardcoding involve on the user of gmap to ensure the
wicket id of the component is "INFO_COMPONENT_ID".

 ComponentFactory interface is added with the following signature.

public interface ComponentFactory extends Serializable
{
 T createComponent(V parent, String 
wicketId);
}


  - Update GMarker constructor to accept ComponentFactory instead of Component.
  - Update GMarker#getComponent() method to use ComponentFactory. The
method signature becomes Gmarker#getComponent( MarkupContainer parent,
String wicketId )
  - Update GMarkerContainer constructor to use GMarker#getComponent(
MarkupContainer, String ) and remove static checking that the
component id must be "INFO_COMPONENT_ID".

* Fix up InfoPanel at populateItem( final ListItem item).
 the labels are added to (this), where it should be added to (item).

* For some odd reason that only one marker can be clicked at the
beginning, after that NullPointerException is thrown.


SEVERE: Error while responding to an AJAX request:
[EMAIL PROTECTED] markupIdToComponent
[{1787073357512=[MarkupContainer [Component id = gmarkerContainer,
page = wicket.contrib.examples.gmap.HomePage, path =
0:gmap:gmapContainer:gmarkersLoop:1:gmarkerContainer.GMarkerContainer,
isVisible = true, isVersioned = true]]}], prependJavascript [[]],
appendJavascript [[]]
wicket.WicketRuntimeException: Error attaching this container for
rendering: [MarkupContainer [Component id = gmarkerInfo, page =
wicket.contrib.examples.gmap.HomePage, path =
0:gmap:gmapContainer:gmarkersLoop:1:gmarkerContainer:gmarkerInfo
.InfoPanel, isVisible = true, isVersioned = true]]
   at wicket.MarkupContainer.attachChildren(MarkupContainer.java:383)
   at wicket.Component.attach(Component.java:2784)
   at wicket.MarkupContainer.attachChildren(MarkupContainer.java:372)
   at wicket.Component.attach(Component.java:2784)
   at 
wicket.ajax.AjaxRequestTarget.respondComponents(AjaxRequestTarget.java:448)
   at wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java:339)
   at 
wicket.request.compound.DefaultResponseStrategy.respond(DefaultResponseStrategy.java:53)
   at 
wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.j
ava:65)
   at wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:944)
   at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:978)
   at wicket.RequestCycle.step(RequestCycle.java:1054)
   at wicket.RequestCycle.steps(RequestCycle.java:1125)
   at wicket.RequestCycle.request(RequestCycle.java:470)
   at wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:232)
   at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
   at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
   at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
   at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
   at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
   at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
   at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
   at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
   at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
   at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
   at org.mortbay.jetty.Server.handle(Server.java:285)
   at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
   at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751)
   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
   at 
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
   at 
org.mortbay.thre

Re: [Wicket-user] [wicket-1.x, wicket-2.0] ServletWebRequest#getRelativeURL()

2007-01-31 Thread Edward Yakop
That's because I have my own implementation of servlet request.

In my PaxWicketApplication.java

public class PaxWicketApplication extends WebApplication
{
  ...

   @Override
   protected final WebRequest newWebRequest( final HttpServletRequest
servletRequest )
   {
  return new PaxWicketRequest( m_mountPoint, servletRequest );
   }
}


and inside my PaxWicketRequest

/**
 * @author Niclas Hedhman, Edward Yakop
 *
 * @since 1.0.0
 */
final class PaxWicketRequest extends ServletWebRequest
{
   ...
   public final String getServletPath()
{
String contextPath = getHttpServletRequest().getContextPath();
if ( m_logger.isDebugEnabled() )
{
m_logger.debug( "getServletPath() : " + contextPath );
}
if ( !contextPath.endsWith( "/" ) )
{
contextPath += "/";
}

return contextPath;
}

// ContextPath pretty much similar to servlet path the diff is,
// getHttpServletRequest().getServletPath()
}


Because I override both getServletPath() and getContextPath() to
return the right values for OSGi cases. I would need getRelativeURL()
to use ServletWebRequest#getServletPath() instead of
httpServletRequest.getServletPath().

Hope this clear.

Regards,
Edward Yakop


On 1/31/07, Johan Compagner <[EMAIL PROTECTED]> wrote:
> so to get this correctly
> you just changed the line:
>
>  String url = httpServletRequest.getServletPath();
>
> to
>
>  String url = getServletPath();
>
> how can that help?
>
> because this is getServletPath() on ServletWebRequest
>
>
> return httpServletRequest.getServletPath();
>
>
> so thats exactly the same code
>
> johan
>
>
>
>
>
>
>
>
> On 1/31/07, Edward Yakop <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I have a small bug to fix for
> ServletWebRequest#getRelativeURL(). For
> > some odd reason, for resources (images, css etcs) to be displayed for
> > Felix http service, ServletWebRequest#getServletPath()
> and
> > #getContextPath() must be swapped. Due to getRelativeURL() uses
> > httpServletRequest.getServletPath()  to initialize the
> url variable
> > instead of calling ServletWebRequest#getServletPath(),
> the returned
> > string is invalid in this setup.
> >
> > Can we change the implementation of getRelativeURL()
> > from
> > 
> > public String getRelativeURL()
> > {
> >...
> >String url = httpServletRequest.getServletPath();
> >final String pathInfo = httpServletRequest.getPathInfo();
> >
> >...
> >return url;
> > }
> > 
> >
> > to
> > 
> > public String getRelativeURL()
> > {
> >...
> >String url = getServletPath(); // Modified line
> >final String pathInfo = httpServletRequest.getPathInfo();
> >
> >...
> >return url;
> > }
> > 
> >
> > The use case why this is a bug when we have a login page that does not
> > have redirection pages, getRelativeURL() returns
> > "/mountPoint/mountPoint/", instead of only "/mountPoint/".
> >
> > Regards,
> > Edward Yakop
> >
> >
> -
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > opinions on IT & business topics through brief surveys - and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How do I add custom javascript to wicket application

2007-01-31 Thread Carfield Yim
On 1/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> > I see, as I only override the IRequestCycleFactory but not the
> > setting, I guess that investigation code should work anyway? But I
> > cannot make it work... How can I gather more information to debug?
>
> Set a break point in WebRequestCycle#newClientInfo.
>
> Oh, and don't forget that that method won't be triggered until your
> code calls getSession().getClientInfo() somewhere :)
>
Interesting, when I override that method as following , I get only one
properties print:

@Override
protected ClientInfo newClientInfo() {
final WebClientInfo ci =
(WebClientInfo)super.newClientInfo();
for (int i = 0; i <
ci.getProperties().getPropertyNames().length; i++) {
final String key =
ci.getProperties().getPropertyNames()[i];
final Object value = ci.getProperties().get(key);
System.out.println(key+": "+value);
}
return ci;
}

Only print:
browserOpera: true

Look like that  investigation code haven't executed. Which method is
actually execute that  investigation code ?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [wicket-1.x, wicket-2.0] ServletWebRequest#getRelativeURL()

2007-01-31 Thread Johan Compagner

so to get this correctly
you just changed the line:

String url = httpServletRequest.getServletPath();

to

String url = getServletPath();

how can that help?

because this is getServletPath() on ServletWebRequest


return httpServletRequest.getServletPath();


so thats exactly the same code

johan








On 1/31/07, Edward Yakop <[EMAIL PROTECTED]> wrote:


Hi,

I have a small bug to fix for ServletWebRequest#getRelativeURL(). For
some odd reason, for resources (images, css etcs) to be displayed for
Felix http service, ServletWebRequest#getServletPath() and
#getContextPath() must be swapped. Due to getRelativeURL() uses
httpServletRequest.getServletPath()  to initialize the url variable
instead of calling ServletWebRequest#getServletPath(), the returned
string is invalid in this setup.

Can we change the implementation of getRelativeURL()
from

public String getRelativeURL()
{
   ...
   String url = httpServletRequest.getServletPath();
   final String pathInfo = httpServletRequest.getPathInfo();

   ...
   return url;
}


to

public String getRelativeURL()
{
   ...
   String url = getServletPath(); // Modified line
   final String pathInfo = httpServletRequest.getPathInfo();

   ...
   return url;
}


The use case why this is a bug when we have a login page that does not
have redirection pages, getRelativeURL() returns
"/mountPoint/mountPoint/", instead of only "/mountPoint/".

Regards,
Edward Yakop

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How do I add custom javascript to wicket application

2007-01-31 Thread Eelco Hillenius
> I see, as I only override the IRequestCycleFactory but not the
> setting, I guess that investigation code should work anyway? But I
> cannot make it work... How can I gather more information to debug?

Set a break point in WebRequestCycle#newClientInfo.

Oh, and don't forget that that method won't be triggered until your
code calls getSession().getClientInfo() somewhere :)

Eelco

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How do I add custom javascript to wicket application

2007-01-31 Thread Carfield Yim
> By default, IRequestCycleSettings gatherExtendedBrowserInfo setting is
> false, resulting in the ClientProperties object to be initialized from
> just the user agent string that the browser sends with the request.
> This is ok for basic stuff, but for most interesting stuff, you really
> need some Javascript to investigate the browser and push that answer
> back to you. If you set the gatherExtendedBrowserInfo property to
> true, Wicket will do a sneaky redirect to a page that does this
> investigating. That page will gather the info a return to the server
> trying several methods (for e.g. in case Javascript is not supported).
> After that, the original request will be handled again (literally
> again, not from the point it was left) and the client properties with
> extended info will be available for you.
>
I see, as I only override the IRequestCycleFactory but not the
setting, I guess that investigation code should work anyway? But I
cannot make it work... How can I gather more information to debug?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user