spring problem! Panel Component could not get spring context beans,

2008-03-06 Thread Mead

well, a Panel Component could not get spring context beans, it got 
java.lang.NullPointerException, but a WebPage Component is ok. 
  I use 
'applicationFactoryClassName=org.apache.wicket.spring.SpringWebApplicationFactory'
 to config in the web.xml




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Sorting a list

2008-03-06 Thread Thomas Kappler
databinder has MoveUpButton and MoveDownButton, which do the job in
ListViews.  If you don't use databinder, you can still have a look at
the source.

databinder.net

Cheers,
Thomas


On Thu, Mar 6, 2008 at 6:35 PM, jeredm <[EMAIL PROTECTED]> wrote:
>
>  I should have been more clear that I need to create a control to allow the
>  user to change the order in a list.  I am able to sort the list before it is
>  rendered just fine.  What I need to do is to loop through the table once it
>  has been re-ordered by the user and then set a sort order in the DB based on
>  the order of the rows in the table.
>
>  I believe the solution Ryan mentioned earlier in this thread is capable of
>  doing what I need, but I have not been able to get it to work yet in the
>  context that I need it.  I was able to get his solution working with an
>  unordered list in a WebPage, but the panel I need the list/table on is
>  swapped in via AJAX which seems to be creating a javascript error.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Extend MockHttpServletRequest for JUnit testing

2008-03-06 Thread mohan.shenoy

Is it possible to extend MockHttpServletRequest for JUnit testing? If yes,
how? In particular I want to override  the isUserInRole method.

--Mohan
-- 
View this message in context: 
http://www.nabble.com/Extend-MockHttpServletRequest-for-JUnit-testing-tp15890465p15890465.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



form submit using document.form.submit() in wicket

2008-03-06 Thread hjuturu

Hi All
I have a form in my html page . I am trying to simulate form submit from  
tag using onclick="document.myForm.submit();". The onSubmit() method my
wicket class doesnt get called when i do this. Do i have to use  to achieve this. i am using   tag so that i can style the
buttons as required.

Thanks
Haritha

=== Here is the code i am using ==




To [Email]:

 document.myForm.submit();">Submit  





-- 
View this message in context: 
http://www.nabble.com/form-submit-using-document.form.submit%28%29-in-wicket-tp15889727p15889727.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can we get a couple of methods added to Component/Localizer?

2008-03-06 Thread Ned Collyer

I removed my initial post and rethought it.

It would be nice to have the cascading properties work, so if it can't find
it on my 3rd party class file, it looks at the panel , page, or
application.properties.


jwcarman wrote:
> 
> Since you're passing in the class, couldn't this go into a utils type
> class?  I don't know, but the fact that you're asking for resources
> from other classes seems like it doesn't belong in the component
> hierarchy.
> 

-- 
View this message in context: 
http://www.nabble.com/Re%3A-Can-we-get-a-couple-of-methods-added-to-Component-Localizer--tp15888017p15888951.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Question about StringResourceLoader

2008-03-06 Thread Ned Collyer

If I have something like

my.example.City.java
my.example.City.properties

And its a non wicket class, possibly coming from another library managing
its own internationalisation.

How can I use this in my panels, and have the same override behaviour as
with Panels and Pages.

I think I would want something like this
StringResourceModel(java.lang.String resourceKey, Component component,
Object myObj) 

where it can use the lookup "my.example.City.properties" and if it cant find
anything there, then look in MyPanel.properties etc.

>From reading the javadoc for StringResourceModels its non obvious if this
can be achieved with inbuilt wicket objects.

I can use the IStringResourceLoader and write something myself, or...
perhaps I'm overlooking something.

Can someone shed some light please?
-- 
View this message in context: 
http://www.nabble.com/Question-about-StringResourceLoader-tp15888948p15888948.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: create wicket form on the fly

2008-03-06 Thread Mead
Hello taygolf,

well, In the wicket Example, there is a velocity example.
the source file is 'DynamicPage.java'.
It may meet your need.

I think the jsp and servlet may simpleness than wicket

Best regards, 
  
=== At 2008-02-20, 05:11:23 you wrote: ===

>
>Hey guys,
>
>I am very new to wicket and I have a quick question. What I have is a page
>that takes in a type and subtype in a form and submits it to the next page.
>based on that information I want to query my table and create the form that
>needs to be completed. How can I do this with wicket. I am currently using
>JSp to loop through the resultset and create the html but how do I do this
>with wicket. I have done some searching and I will continue to do so but if
>you could point me in the right direction I would appreciate it.
>
>Thanks
>
>-- 
>View this message in context: 
>http://www.nabble.com/create-wicket-form-on-the-fly-tp15568030p15568030.html
>Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

= = = = = = = = = = = = = = = = = = = =

Mead
[EMAIL PROTECTED]
2008-03-07




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket-datetime

2008-03-06 Thread Ned Collyer

Thanks for the reply.

Core to my requirement is internationalisation, and per locale date formats
(both client and server side).

The wicket-datetime one is close to ideal, just has some implementation
issues which I believe could be cleaned up in a manner similar to *.js
convenience methods.

Rgds

Ned


ptrthomas wrote:
> 
> I rolled my own datepicker (based on YUI) which was easy, you can have a
> look at the code here:
> 
> http://fisheye3.cenqua.com/browse/j-trac/trunk/jtrac/src/main/java/info/jtrac/wicket/yui/YuiCalendar.java?r=1090
> 
> It does not support internationalization at all, but it may help, I also
> wrote a small piece of javascript that reduces the amount of js needed in
> head:
> http://fisheye3.cenqua.com/browse/j-trac/trunk/jtrac/src/main/webapp/resources/yui/calendar/calendar-utils.js?r=1004
> 

-- 
View this message in context: 
http://www.nabble.com/wicket-datetime-tp15866334p15886521.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket-datetime

2008-03-06 Thread Ned Collyer

Thanks for the calendar info - i'll check it out.

nb, they both share the same bug in StyleDateConverter.java where the
formatter does not take the component locale.

I've created a Jira item for this for the wicket-datetime component.
https://issues.apache.org/jira/browse/WICKET-1401

Rgds

Ned



igor.vaynberg wrote:
> 
> i have no idea how much of that javascript can be factored out and how
> much of it is requried to init each instance of the yui calendar.
> (didnt write that one). perhaps gerolf or eelco wouldnt mind pipinig
> in... i didnt see any license headers being dumped into html though.
> 
> personally ive used this one [1] in the past and liked it more then
> the yui thing...
> 
> http://wicket-stuff.svn.sf.net/svnroot/wicket-stuff/trunk/wicket-calendar/
> 
> -igor
> 
> 

-- 
View this message in context: 
http://www.nabble.com/wicket-datetime-tp15866334p15886182.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicketstuff-jmx-panel: can't find a repository

2008-03-06 Thread Gerolf Seitz
done, wicketstuff-jmx-panel is in the wicketstuff.org maven repository


  org.wicketstuff
  wicketstuff-jmx-panel
  1.3-SNAPSHOT


cheers,
  Gerolf


On Wed, Mar 5, 2008 at 12:13 PM, Rommert de Bruijn <[EMAIL PROTECTED]>
wrote:

> Hi,
>
> I'm setting up a small PoC web application with JMX, Spring & Wicket.
> Among other things I'm using the JmxPanel component by Gerolf Seitz.
> which I checked out here:
>
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jmx-panel/
>
> The JmxPanel component works like a charm, so I'd like to add a
> dependency for the wicketstuff-jmx-panel artifact to my project.
> Unfortunately, I can't seem to find a repository that contains the
> wicketstuff-jmx-panel artifact at all.
>
> For now, I created a .jar from the svn checkout and added it to our
> local repository, but it would be preferable to use a public repository.
> Can anyone help me out?
>
> Thanks in advance,
> Rommert
>
> --
> Rommert de Bruijn
> Func. Internet Integration
> W http://www.func.nl
> T +31 20 423
> F +31 20 4223500
>
>


Re: Can we get a couple of methods added to Component/Localizer?

2008-03-06 Thread James Carman
On 3/6/08, Ned Collyer <[EMAIL PROTECTED]> wrote:
>
>  I'd like to get some thoughts around adding the following to the base
>  Component class.
>
>  I may have missed something and it's already available via some other
>  elegant means :)
>
>  add(new Label("testLabel", getString(dashboardModel.getNameKey(),
>  DashboardTestModel.class, "default val")));
>
>  It's sort of a convience method that would get used in panels, forms, pages
>  etc. and would allow any class to have its appopriate translations written
>  in property files next to the class.
>
>  At the moment I have it in an abstract DashboardPanel, but I'd like to
>  expose it to all components, and I think it could be useful for others.
>
>  (I can of course put it into some Util thing, but it makes it less handy,
>  and every impl a bit less elegant.)
>
>  What are your thoughts?
>

Since you're passing in the class, couldn't this go into a utils type
class?  I don't know, but the fact that you're asking for resources
from other classes seems like it doesn't belong in the component
hierarchy.

>
> /**
>  * @param key   The resource key
>  * @param clazz The class
>  *
>  * @return the resolved string, or null if it cannot be found.
>  */
> public String getString(final String key, final Class clazz) {
> return getString(key, clazz, null);
> }
>
> /**
>  * @param key  The resource key
>  * @param clazzThe class
>  * @param defaultValue A default value if the string cannot be found
>  *
>  * @return the resolved string, or null if it cannot be found.
>  */
> public String getString(final String key, final Class clazz, final
>  String defaultValue) {
> final IResourceSettings resourceSettings =
>  Application.get().getResourceSettings();
>
> String string = null;
>
> for (Object o : resourceSettings.getStringResourceLoaders()) {
> IStringResourceLoader loader = (IStringResourceLoader) o;
> string = loader.loadStringResource(clazz, key, getLocale(),
>  getStyle());
> if (string != null) {
> break;
> }
> }
> return (string != null) ? string : defaultValue;
> }
>
> --
>  View this message in context: 
> http://www.nabble.com/Can-we-get-a-couple-of-methods-added-to-Component-Localizer--tp15885409p15885409.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Can we get a couple of methods added to Component/Localizer?

2008-03-06 Thread Ned Collyer

I'd like to get some thoughts around adding the following to the base
Component class.

I may have missed something and it's already available via some other
elegant means :)

add(new Label("testLabel", getString(dashboardModel.getNameKey(),
DashboardTestModel.class, "default val")));

It's sort of a convience method that would get used in panels, forms, pages
etc. and would allow any class to have its appopriate translations written
in property files next to the class.

At the moment I have it in an abstract DashboardPanel, but I'd like to
expose it to all components, and I think it could be useful for others.

(I can of course put it into some Util thing, but it makes it less handy,
and every impl a bit less elegant.)

What are your thoughts?


/**
 * @param key   The resource key
 * @param clazz The class
 *
 * @return the resolved string, or null if it cannot be found.
 */
public String getString(final String key, final Class clazz) {
return getString(key, clazz, null);
}

/**
 * @param key  The resource key
 * @param clazzThe class
 * @param defaultValue A default value if the string cannot be found
 *
 * @return the resolved string, or null if it cannot be found.
 */
public String getString(final String key, final Class clazz, final
String defaultValue) {
final IResourceSettings resourceSettings =
Application.get().getResourceSettings();

String string = null;

for (Object o : resourceSettings.getStringResourceLoaders()) {
IStringResourceLoader loader = (IStringResourceLoader) o;
string = loader.loadStringResource(clazz, key, getLocale(),
getStyle());
if (string != null) {
break;
}
}
return (string != null) ? string : defaultValue;
}
-- 
View this message in context: 
http://www.nabble.com/Can-we-get-a-couple-of-methods-added-to-Component-Localizer--tp15885409p15885409.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Problem when MIgrating from 1.2 to 1.3 - Parameters removed from HomePage URL

2008-03-06 Thread David Leangen

I've already filed an issue and submitted a patch for this:

  https://issues.apache.org/jira/browse/WICKET-1385


Cheers,
Dave



> -Original Message-
> From: Rajiv Jivan [mailto:[EMAIL PROTECTED]
> Sent: 7 March 2008 05:47
> To: users@wicket.apache.org
> Subject: Problem when MIgrating from 1.2 to 1.3 - Parameters 
> removed from HomePage URL
> 
> 
> We have a site developed using Wicket 1.2. One of the use cases we
> have is to pass in a parameter on the home page, and based on that we
> perform some actions. e.g
> 
> http://localhost/helloworld?name=John
> 
> This functionality seem to be broken in 1.3. When passing in
> parameters on the home page URL they are stripped. Going through the
> Wicket I have narrowed down to an issue in WicketFilter
> 
> // Special-case for home page - we redirect to add a 
> trailing slash.
> if (relativePath.length() == 0 &&
> 
> !Strings.stripJSessionId(servletRequest.getRequestURI()).endsWith("/"))
> {
> final String redirectUrl = 
> servletRequest.getRequestURI() + "/";
> 
> servletResponse.sendRedirect(servletResponse.encodeRedirectURL(red
> irectUrl));
> return;
> }
> 
> The only workaround I have is to change the URL to
> http://localhost/helloworld/?name=John
> Notice the traling / after helloworld
> 
> Am I missing something or is this a bug ?
> 
> Thanks,
> 
> Rajiv
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket-datetime

2008-03-06 Thread Gerolf Seitz
off the top of my head, i'd say we could skip the localization part for
Locale.ENGLISH (and the like), as it's the default language in YUI.

couple of YUI releases, we switched to using the YUILoader to
dynamically load the needed .js files. and now that you've mentioned it,
it may not be an ideal solution anyway, since we have to reuse the same
YUILoader instance for all components (only datepickers in this case) on
a page for the dependency resolution to work.

maybe we should switch back to how it was before (good old header
contributions).

any thoughts?

  gerolf

On Thu, Mar 6, 2008 at 6:52 PM, Igor Vaynberg <[EMAIL PROTECTED]>
wrote:

> i have no idea how much of that javascript can be factored out and how
> much of it is requried to init each instance of the yui calendar.
> (didnt write that one). perhaps gerolf or eelco wouldnt mind pipinig
> in... i didnt see any license headers being dumped into html though.
>
> personally ive used this one [1] in the past and liked it more then
> the yui thing...
>
> http://wicket-stuff.svn.sf.net/svnroot/wicket-stuff/trunk/wicket-calendar/
>
> -igor
>
>
> On Thu, Mar 6, 2008 at 1:42 AM, Ned Collyer <[EMAIL PROTECTED]> wrote:
> >
> >  Hi Igor,
> >
> >  The picker works fine - its the implementation I'm concerned about.
> >
> >  If you have 2 instances, then all the javascript exists twice.  All the
> >  translations exist twice.
> >
> >  The demo does not show 2 date pickers and you can clearly see the
> dependance
> >  on "initdateTextField2" being pasted into the middle of the script
> area.
> >
> >  eg, say you need to specify a date range - or multiple date ranges for
> >  something like a search input, or you have multiple panels with date
> >  pickers.
> >
> >  Is this purely to satisfy the requirement of the example? -ie, not
> suitable
> >  for anything more than "date of birth" checking and 1 instance per
> page.
> >
> >
> >
> >  igor.vaynberg wrote:
> >  >
> >  > it seems to be working just fine here
> >  >
> >  > http://wicketstuff.org/wicket13/dates/
> >  >
> >  >
> >  > -igor
> >  >
> >
> >  --
> >  View this message in context:
> http://www.nabble.com/wicket-datetime-tp15866334p15869748.html
> >
> >
> > Sent from the Wicket - User mailing list archive at Nabble.com.
> >
> >
> >  -
> >  To unsubscribe, e-mail: [EMAIL PROTECTED]
> >  For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: link onClick add panel

2008-03-06 Thread Maurice Marrink
So you want option 2,
The popup panel has a model to store the customer entity.
the popup panel probably has a form.
because you only want to refresh part of the parent page the form has
to have an ajax submit
in the submit you add the customer entity or its model to the panel on
the parent page. then add that panel to the ajaxtarget so it will be
refreshed.

Maurice

On Thu, Mar 6, 2008 at 5:13 PM, taygolf <[EMAIL PROTECTED]> wrote:
>
>  This isnt going to work for me. At least I do not think it will. Lets start
>  with the first issue and then move from there.
>
>  The link calls the popup which has a form. when the link is submitted I want
>  to add the customer info to the parent page.
>
>  You suggest storing the info in a database but that will not work for me
>  because they will be adding and deleting these customers a lot and i do not
>  want to have to call the database every time they do this. I would like to
>  pass the info with a model but I can not refresh the parent page because I
>  do not want to lose any information in any other textfield on that page.
>
>  So is there a way I can pass the model to the popup page, add the customer
>  info to the model, and then get that model data to show up on the parent
>  page without a refresh? I have this part of my code in a panel. Can I just
>  refresh the panel without refreshing the whole page?
>
>  After we get this done I would like to make the name of the customer a link
>  but i think I can handle that with no problem in the repeater.
>
>  Thanks
>
>  T
>
>
>
>
>  Mr Mean wrote:
>  >
>  > Assuming you are using a listview or dataview to display all the
>  > customers you can simply add a link to the items, attach a label
>  > displaying the name and you have your clickable name. You could rig
>  > the link to open the popup.
>  > To get the customer data from the popup to the page i would choose to
>  > simply store the customer in the db using a form submit before closing
>  > the popup, from there you can use ajax or a simple setResponsePage to
>  > the parentpage to update its content.
>  > Alternatively if you do not yet want to store your customer you need
>  > to add it to the model of the listview. Note do not replace the
>  > listviews model but do something like
>  > ((List)model.getObject()).add(myCustomer); then you could use either
>  > ajax or setresponsepage to trigger a refresh on the parentpage.
>  >
>  > If you are using ModalWindow as your popup you might need to add a
>  > WindowClosedCallbackHandler to redraw the listview.
>  >
>  > Maurice
>  >
>  > On Wed, Mar 5, 2008 at 9:52 PM, taygolf <[EMAIL PROTECTED]> wrote:
>  >>
>  >>  I have a problem and I have thought of 2 ways to get it done but I can
>  >> not
>  >>  make either work nor am I sure which one is the best.
>  >>
>  >>  I want the user to be able to add as many customers as they want.
>  >>
>  >>  So I have thought of 2 ways to do this.
>  >>
>  >>  1) I have a link that when clicked creates a popup with all the
>  >> necessary
>  >>  form fields that need to be filled out to create a customer. When the
>  >> the
>  >>  page is submitted I want the information to be stored on the parent page
>  >> in
>  >>  a table. I also want the customer name to be a link so they can edit the
>  >>  customer if need be.
>  >>
>  >>  I have the popup working and collecting all the data but the only way I
>  >> see
>  >>  to get it to put the data on the parent page is with javascript and I
>  >> can
>  >>  not seem to get the customer name to be a wicket link. so I guess the
>  >>  problem with this method is how can I get javascript to create a new
>  >> wicket
>  >>  link on the fly or how can I populate the parent page from the onSubmit
>  >> of
>  >>  the form on the popup page.
>  >>
>  >>  2) I have a link and when that link is clicked it opens a panel with all
>  >> the
>  >>  necessary fields that need to be filled out. For some reason I can not
>  >> get
>  >>  the link to add the panel to the parent page so I am stuck there.
>  >>
>  >>  I would prefer option one because I think it looks cleaner. How can I
>  >> fix
>  >>  these issues? am I thinking in the right direction for what I want to
>  >> do? If
>  >>  not what do I need to be looking at?
>  >>
>  >>  Thanks
>  >>
>  >>  T
>  >>  --
>  >>  View this message in context:
>  >> http://www.nabble.com/link-onClick-add-panel-tp15860001p15860001.html
>  >>  Sent from the Wicket - User mailing list archive at Nabble.com.
>  >>
>  >>
>  >>  -
>  >>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >>  For additional commands, e-mail: [EMAIL PROTECTED]
>  >>
>  >>
>  >
>  > -
>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>  >
>
>  --
>  View this message in context: 
> http://www.nabble.com/link-onClick-add-panel-tp158600

Re: Parameters as /param-name/param-value over traditional query strings

2008-03-06 Thread Igor Vaynberg
On Thu, Mar 6, 2008 at 2:33 PM, Chris Colman
<[EMAIL PROTECTED]> wrote:
> I've been using wicket for quite some time now and I just have a
>  question regarding the reason why wicket parameters are sent as a
>  sequence of
>
>  /param-name/param-value/
>
>  pairs instead of the traditional ?param-name=param-value& etc., query
>  strings.
>
>  Was the reason that it was believed that /p/v pairs are more search
>  engine friendly that traditional query strings?

yes. there was a big user movement to make wicket very search friendly
by default. however, i think we made a mistake by using /name/value/
encoding by default. i am hoping in 1.4 we can back off a bit and use
query string by default, leaving /name/value/ as an explicit option.

-igor



>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Parameters as /param-name/param-value over traditional query strings

2008-03-06 Thread Chris Colman
I've been using wicket for quite some time now and I just have a
question regarding the reason why wicket parameters are sent as a
sequence of

/param-name/param-value/

pairs instead of the traditional ?param-name=param-value& etc., query
strings.

Was the reason that it was believed that /p/v pairs are more search
engine friendly that traditional query strings?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Integrating with a forum application...?

2008-03-06 Thread Toto Laricot
Hi Nino,

we're using cookie sso. works like a charm.
when the user logs in (in our app) we generate a temporary forum password,
store it in the Account table, and return it (hashed with a salt) in a
cookie, along withthe username.
the cookie gets passed to the forum,
which looks up the username, retrieves the temporary passwd, rehashes
it and compares it to the value in the cookie.




On 3/4/08, Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]>
wrote:
>
> How did you do the SSO?
>
> Im trying the RemoteSSO but it doesnt seem to work out of the box... Or
> they forgot to mention some critical information about it.. Do you have
> to set a cross context or something?
>
> regards
>
>
> Toto Laricot wrote:
> > We've done it. Nothing Wicket-specific. JForum runs as a separate
> webapp, we
> > display it in a frame.
> > SSO is a bit tricky but it's doable.
> >
> > v.
> >
> > On 2/29/08, Nino Saturnino Martinez Vazquez Wael <
> [EMAIL PROTECTED]>
> > wrote:
> >
> >> Has any one done this?
> >>
> >> Im thinking of jforum.. http://www.jforum.net/ ?
> >>
> >> It should'nt be that hard to create a contrib for btw, if somebody are
> >> interested..?
> >>
> >> --
> >> -Wicket for love
> >> -Jme for fun
> >>
> >> Nino Martinez Wael
> >> Java Specialist @ Jayway DK
> >> http://www.jayway.dk
> >> +45 2936 7684
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >
> >
>
>
> --
>
> -Wicket for love
> -Jme for fun
>
> Nino Martinez Wael
> Java Specialist @ Jayway DK
> http://www.jayway.dk
> +45 2936 7684
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Google hosting next London Apache Wicket User Group meet on Wednesday April 2nd.

2008-03-06 Thread jweekend

Al,

Good news, thanks to you and your colleagues at Google - I hope some of them
will be able to join us again as well.

The  http://jweekend.co.uk/dev/LWUGReg/ registration page  is now ready for
those of you who would like to come along. Please remember to click on the
link in the automated email you get when you register to confirm or cancel
your place so we can make best use of the space available. 

Let us know if you'd like to give a short presentation and if you need any
help, or just another pair of eyes to review your material, while you're
putting it together.

See you on 2nd April.

Regards - Cemal
http://jWeekend.co.uk jWeekend.co.uk 

 


Al Maw wrote:
> 
> Hi folks,
> 
> Building on the success of the previous Apache Wicket User Group meet last
> month, Google UK has generously decided to host the next one.
> 
> This time, the fun and games will happen on *April 2nd*, starting at
> *6:30pm
> *.
> 
> To sign up and for more details (links to a map, etc.) please go to: *
> http://jweekend.co.uk/dev/LWUGReg/*
> 
> We'd love to get more of you involved in this event, so here are some
> ideas
> to get you started:
> 
>- We'd love to have some short talks or stories about how you're using
>Wicket. One minute or twenty, it's up to you.
>- Similar to last time, we will have a couple of 20 minutes
>presentations covering topics of interest in a fairly in-depth manner.
> If
>you'd like to present something like this, please shout. (Last time I
> talked
>about creating a really generic reusable AJAX drag-and-drop list editor
> and
>Ian Godman talked about his security framework.)
>- Bring your coding problems! There will be quite a few knowledgeable
>Wicket folk there, so you can get them to help you debug things for
> free (or
>the promise of a pint afterwards).
>- Based on the feedback we've had, there will be more breaks and time
>for networking than last time.
> 
> Come! Bring your laptop! We have wi-fi, projectors, and all the other
> things
> you might need and expect, like beach balls and a plentiful supply of
> pizza.
> 
> Hope to see many of you there!
> 
> Best regards,
> 
> Alastair
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Google-hosting-next-London-Apache-Wicket-User-Group-meet-on-Wednesday-April-2nd.-tp15881686p15884043.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problem when MIgrating from 1.2 to 1.3 - Parameters removed from HomePage URL

2008-03-06 Thread Rajiv Jivan
We have a site developed using Wicket 1.2. One of the use cases we
have is to pass in a parameter on the home page, and based on that we
perform some actions. e.g

http://localhost/helloworld?name=John

This functionality seem to be broken in 1.3. When passing in
parameters on the home page URL they are stripped. Going through the
Wicket I have narrowed down to an issue in WicketFilter

// Special-case for home page - we redirect to add a trailing slash.
if (relativePath.length() == 0 &&

!Strings.stripJSessionId(servletRequest.getRequestURI()).endsWith("/"))
{
final String redirectUrl = servletRequest.getRequestURI() + "/";

servletResponse.sendRedirect(servletResponse.encodeRedirectURL(redirectUrl));
return;
}

The only workaround I have is to change the URL to
http://localhost/helloworld/?name=John
Notice the traling / after helloworld

Am I missing something or is this a bug ?

Thanks,

Rajiv

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Having problems with resource keys in a form which has two panels of the same kind

2008-03-06 Thread Igor Vaynberg
see FormComponent.MessageSource for resource resolution.

FormComponent.error(ivalidationerror) already has a todo in there to
make the error show tried keys, just havent gotten to it yet. perhaps
if you file a jira issue the priority of that todo will move up..

-igor



On Thu, Mar 6, 2008 at 11:10 AM, AshleyAbraham <[EMAIL PROTECTED]> wrote:
>
>  Hi everyone,
>  I am having problems with finding resource keys for formComponents in a
>  form which has two panels of the same kind. My formcomponents are inside
>  couple levels of panels from the form and I am having hard time to figure
>  out the resource key for those formComponents. Is there an easy way to
>  figure out the resource key for those formComponents?
>
>  I am using Wicket wizard and in one of the steps I have a WebMarkupContainer
>  (AddressGroupbox) which has two Panels (physicalAddress and mailingAddress)
>  which are of  the same class AddressPanel. The AddressPanel has
>  formComoponents like addressLine1, 2, 3, city, state, and zipCode in it, and
>  most of them are set as required. So, when I submit the empty form, all I am
>  getting is the general required error in the feedback.
>
>  I've tried setting the custom required error messages in that particular
>  WiardStep's properties file using
>  addressGroupbox.physicalAddress.addressLine1.Required=Physical Address Line
>  1 is required, and so on. But wicket is not finding the custom error
>  messages and it uses the default ones. But when I just put
>  addressLine1.Required=Address Line 1 is required in the WizardStep's
>  properties file, then both of the addressLine1 formcomponent from
>  physicalAddress and mailingAddress Panel uses the same error message for
>  addressLine1.
>
>  Can someone help me identify what I am doing wrong or what I should do or
>  how to find the resource key wicket is using to search for those two address
>  panels.
>
>  Thanks
>  Ashley
>  --
>  View this message in context: 
> http://www.nabble.com/Having-problems-with-resource-keys-in-a-form-which-has-two-panels-of-the-same-kind-tp15881597p15881597.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Faulty URL on http://wicket.apache.org/writing-documentation.html

2008-03-06 Thread Edvin Syse
The URL to the Wiki on the mentioned url is wrong, it seems like there 
is some variable substitution not taking place. It links to 
http://cwiki.apache.org/SPACE_NAME instead of 
http://cwiki.apache.org/WICKET/.


Sorry, think I screwed up. I guess it's supposed to be that way :) *taking a 
break*

-- Edvin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Faulty URL on http://wicket.apache.org/writing-documentation.html

2008-03-06 Thread Edvin Syse
The URL to the Wiki on the mentioned url is wrong, it seems like there is some variable substitution not taking place. It links to 
http://cwiki.apache.org/SPACE_NAME instead of http://cwiki.apache.org/WICKET/.


-- Edvin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Google hosting next London Apache Wicket User Group meet on Wednesday April 2nd.

2008-03-06 Thread Al Maw
Hi folks,

Building on the success of the previous Apache Wicket User Group meet last
month, Google UK has generously decided to host the next one.

This time, the fun and games will happen on *April 2nd*, starting at *6:30pm
*.

To sign up and for more details (links to a map, etc.) please go to: *
http://jweekend.co.uk/dev/LWUGReg/*

We'd love to get more of you involved in this event, so here are some ideas
to get you started:

   - We'd love to have some short talks or stories about how you're using
   Wicket. One minute or twenty, it's up to you.
   - Similar to last time, we will have a couple of 20 minutes
   presentations covering topics of interest in a fairly in-depth manner. If
   you'd like to present something like this, please shout. (Last time I talked
   about creating a really generic reusable AJAX drag-and-drop list editor and
   Ian Godman talked about his security framework.)
   - Bring your coding problems! There will be quite a few knowledgeable
   Wicket folk there, so you can get them to help you debug things for free (or
   the promise of a pint afterwards).
   - Based on the feedback we've had, there will be more breaks and time
   for networking than last time.

Come! Bring your laptop! We have wi-fi, projectors, and all the other things
you might need and expect, like beach balls and a plentiful supply of pizza.

Hope to see many of you there!

Best regards,

Alastair


Re: ListView#isVisible dilemma

2008-03-06 Thread Edvin Syse

not really sure, maybe add it into the gotchas wiki page


OK :)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ListView#isVisible dilemma

2008-03-06 Thread Igor Vaynberg
not really sure, maybe add it into the gotchas wiki page

-igor

On Thu, Mar 6, 2008 at 11:08 AM, Edvin Syse <[EMAIL PROTECTED]> wrote:
> > it is called that way for security reasons, eg so you cannot click a
>  > link that is not visible just because you know its url...
>  >
>  > what he should do is follow the delete call with a listview.detach() call
>
>  Allright, thanks. Is it worth making a wiki page for this? I'll do it if you 
> think there is any value to it.
>
>
>
>  -- Edvin
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Having problems with resource keys in a form which has two panels of the same kind

2008-03-06 Thread AshleyAbraham

Hi everyone, 
 I am having problems with finding resource keys for formComponents in a
form which has two panels of the same kind. My formcomponents are inside
couple levels of panels from the form and I am having hard time to figure
out the resource key for those formComponents. Is there an easy way to
figure out the resource key for those formComponents?

I am using Wicket wizard and in one of the steps I have a WebMarkupContainer
(AddressGroupbox) which has two Panels (physicalAddress and mailingAddress)
which are of  the same class AddressPanel. The AddressPanel has
formComoponents like addressLine1, 2, 3, city, state, and zipCode in it, and
most of them are set as required. So, when I submit the empty form, all I am
getting is the general required error in the feedback.

I've tried setting the custom required error messages in that particular
WiardStep's properties file using
addressGroupbox.physicalAddress.addressLine1.Required=Physical Address Line
1 is required, and so on. But wicket is not finding the custom error
messages and it uses the default ones. But when I just put
addressLine1.Required=Address Line 1 is required in the WizardStep's
properties file, then both of the addressLine1 formcomponent from
physicalAddress and mailingAddress Panel uses the same error message for
addressLine1.

Can someone help me identify what I am doing wrong or what I should do or
how to find the resource key wicket is using to search for those two address
panels.

Thanks
Ashley
-- 
View this message in context: 
http://www.nabble.com/Having-problems-with-resource-keys-in-a-form-which-has-two-panels-of-the-same-kind-tp15881597p15881597.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ListView#isVisible dilemma

2008-03-06 Thread Edvin Syse

it is called that way for security reasons, eg so you cannot click a
link that is not visible just because you know its url...

what he should do is follow the delete call with a listview.detach() call


Allright, thanks. Is it worth making a wiki page for this? I'll do it if you 
think there is any value to it.

-- Edvin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ListView#isVisible dilemma

2008-03-06 Thread Igor Vaynberg
it is called that way for security reasons, eg so you cannot click a
link that is not visible just because you know its url...

what he should do is follow the delete call with a listview.detach() call

-igor



On Thu, Mar 6, 2008 at 10:56 AM, Edvin Syse <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I've run a cross a small dilemma while teaching one of my employees Wicket. 
> On his first project he created a ListView that pulls data from
>  a LoadableDetachableModel. He overrides isVisible on the ListView, and does:
>
>  @Override public boolean isVisible() {
> return ((List)myModel.getObject()).size() > 0;
>  }
>
>  .. so the list won't be visible if the list is empty.
>
>  In the ListView ha has a button that deletes items. The code was originally:
>
>  item.add(new Link("delete") {
> @Override public void onClick() {
> myDao.delete(item.getModelObject());
> }
>  });
>
>  When he clicks the delete-link, isVisible() for the ListView is called 
> BEFORE the onClick() action, and since it is a
>  LoadableDetachableModel, it then holds the data from the list as it was 
> before the row is deleted. The result is ofcourse that the deleted
>  object is still in the list when the page rerenders, which forces him to 
> include a setResponsePage(TheListPage.class) instead of just
>  letting the ListView reuse items and render itself again.
>
>  It's a bit of a surprice that isVisible() is called before the onClick() 
> method. I understand that this has to do with the flow of things in
>  Wicket, but if someone can shed some light as to why/how, I'd ble glad to 
> contribute a Wicket page explaining this dilemma and how to get
>  around it, as I'm sure people run into this problem regularily.
>
>  -- Edvin
>
>
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ListView#isVisible dilemma

2008-03-06 Thread Edvin Syse


to contribute a Wicket page explaining this dilemma and how to get 
around it, as I'm sure people run into this problem regularily.


Sorry, I meant wiki page ofcourse :)

-- Edvin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ListView#isVisible dilemma

2008-03-06 Thread Edvin Syse

Hi,

I've run a cross a small dilemma while teaching one of my employees Wicket. On his first project he created a ListView that pulls data from 
a LoadableDetachableModel. He overrides isVisible on the ListView, and does:


@Override public boolean isVisible() {
return ((List)myModel.getObject()).size() > 0;
}

.. so the list won't be visible if the list is empty.

In the ListView ha has a button that deletes items. The code was originally:

item.add(new Link("delete") {
@Override public void onClick() {
myDao.delete(item.getModelObject());
}
});

When he clicks the delete-link, isVisible() for the ListView is called BEFORE the onClick() action, and since it is a 
LoadableDetachableModel, it then holds the data from the list as it was before the row is deleted. The result is ofcourse that the deleted 
object is still in the list when the page rerenders, which forces him to include a setResponsePage(TheListPage.class) instead of just 
letting the ListView reuse items and render itself again.


It's a bit of a surprice that isVisible() is called before the onClick() method. I understand that this has to do with the flow of things in 
Wicket, but if someone can shed some light as to why/how, I'd ble glad to contribute a Wicket page explaining this dilemma and how to get 
around it, as I'm sure people run into this problem regularily.


-- Edvin




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Feedback on proposed Groovy DSL syntax for Wicket

2008-03-06 Thread djo.mos

Hi,
  Seems very interesting to me also.
  In fact, what I would be interested in seeing in more details is the
groovy way of describing models as closures.

  Can you please elaborate on this point ? (the propertyModel for instance,
and how the Grooby properties may help ?)

Cheers
-- 
View this message in context: 
http://www.nabble.com/Feedback-on-proposed-Groovy-DSL-syntax-for-Wicket-tp15873183p15880617.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Interesting markup question

2008-03-06 Thread Igor Vaynberg
right, in your menu panel call setrenderbodyonly(true) and then inside
itis markup have the diiv wth the class attr.

-igor


On Thu, Mar 6, 2008 at 8:09 AM, Erik van Oosten <[EMAIL PROTECTED]> wrote:
> Hi Maurice,
>
>  Nice, I did not think of the setRenderBody option.
>
>  Thanks!
>
> Erik.
>
>
>  --
>  Erik van Oosten
>  http://day-to-day-stuff.blogspot.com/
>
>
>
>
> Maurice Marrink wrote:
>  > The logic thing would be to add the class to the div:
>  > 
>  >
>  > However i can see your point of adding it to  if you
>  > want to enforce it on all menu's. Sure would be nice if wicket could
>  > automatically transfer anything extra it finds there to the actual
>  > element, but then what would be the behavior if setRenderbodyOnly was
>  > used, they would effectively bypass your enforced css style.
>  > So imo using a div in  to do this, optionally in
>  > combination with setRenderbodyOnly to get rid of the empty   > wicket:id="menu"> is the best way to go if you want to force this kind
>  > of stuff.
>  >
>  > Maurice
>  >
>  >
>
>
>
> -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket-datetime

2008-03-06 Thread Igor Vaynberg
i have no idea how much of that javascript can be factored out and how
much of it is requried to init each instance of the yui calendar.
(didnt write that one). perhaps gerolf or eelco wouldnt mind pipinig
in... i didnt see any license headers being dumped into html though.

personally ive used this one [1] in the past and liked it more then
the yui thing...

http://wicket-stuff.svn.sf.net/svnroot/wicket-stuff/trunk/wicket-calendar/

-igor


On Thu, Mar 6, 2008 at 1:42 AM, Ned Collyer <[EMAIL PROTECTED]> wrote:
>
>  Hi Igor,
>
>  The picker works fine - its the implementation I'm concerned about.
>
>  If you have 2 instances, then all the javascript exists twice.  All the
>  translations exist twice.
>
>  The demo does not show 2 date pickers and you can clearly see the dependance
>  on "initdateTextField2" being pasted into the middle of the script area.
>
>  eg, say you need to specify a date range - or multiple date ranges for
>  something like a search input, or you have multiple panels with date
>  pickers.
>
>  Is this purely to satisfy the requirement of the example? -ie, not suitable
>  for anything more than "date of birth" checking and 1 instance per page.
>
>
>
>  igor.vaynberg wrote:
>  >
>  > it seems to be working just fine here
>  >
>  > http://wicketstuff.org/wicket13/dates/
>  >
>  >
>  > -igor
>  >
>
>  --
>  View this message in context: 
> http://www.nabble.com/wicket-datetime-tp15866334p15869748.html
>
>
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Page reload after file upload

2008-03-06 Thread Igor Vaynberg
you need to use the same form for both upload and other fields. that
is just how html works.

-igor


On Thu, Mar 6, 2008 at 1:30 AM, Kai Mütz <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I have one form with multiple fields where I can edit a object. I want to
>  attach a document or image (of class Document) to the form/object using a
>  second upload form. This works fine if I first execute the upload, then edit
>  other fields and finally submit the form.
>
>  The problem occurs if I upload/attach a file subsequent to editing the
>  fields. The upload form reloads the page and the changes in the form are
>  gone. How can I avoid this? How can I catch the changes made before upload?
>  Can nested forms solve this?
>
>  Thanks in advance,
>  Kai
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: File upload weird problem

2008-03-06 Thread Igor Vaynberg
maybe it wasnt always a diskfileitem, perhaps it got saved to ram...

-igor


On Thu, Mar 6, 2008 at 12:34 AM, Piller Sébastien <[EMAIL PROTECTED]> wrote:
> Well, I did it, and it worked fine ;) Thank you!
>
>  Could you give me a short explaination?
>
>
>  Igor Vaynberg a écrit :
>
> > can you try not casting to DiskFileItem and just use 
> > FileItem.getinputstrema()?
>  >
>  > -igor
>  >
>
>  -
>
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Sorting a list

2008-03-06 Thread jeredm

I should have been more clear that I need to create a control to allow the
user to change the order in a list.  I am able to sort the list before it is
rendered just fine.  What I need to do is to loop through the table once it
has been re-ordered by the user and then set a sort order in the DB based on
the order of the rows in the table.

I believe the solution Ryan mentioned earlier in this thread is capable of
doing what I need, but I have not been able to get it to work yet in the
context that I need it.  I was able to get his solution working with an
unordered list in a WebPage, but the panel I need the list/table on is
swapped in via AJAX which seems to be creating a javascript error.


Johan Compagner wrote:
> 
> the wicket way would be to sort it in java. use Arrays.sort and a
> comparator
> 
> johan
> 
> 
> 
> On Thu, Mar 6, 2008 at 12:00 AM, jeredm <[EMAIL PROTECTED]>
> wrote:
> 
>>
>> I am looking for an easy way to sort single items within a
>> list...basically I
>> need to re-order a list.  For example, I have 30 table rows and I want to
>> move row 13 to be before row 10.  An example I found that is similar to
>> what
>> I am looking for is located at http://demos.mootools.net/Sortables.  Does
>> anybody know an easy way to implement this type of solution (an easy to
>> re-order list) in Wicket?  My list size is probably more than 10 and less
>> than 100.  Thanks for any help!
>> --
>> View this message in context:
>> http://www.nabble.com/Sorting-a-list-tp15862619p15862619.html
>> Sent from the Wicket - User mailing list archive at
>> Nabble.com
>> .
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Sorting-a-list-tp15862619p15879305.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Feedback on proposed Groovy DSL syntax for Wicket

2008-03-06 Thread Ryan Sonnek
I think this looks really great.  I'm pretty sure the current wicket
builder project has been abandoned, so this would be a welcome
replacement.

I've been dying to dive into grails now that it supports a *real* view
layer!  =)

On Thu, Mar 6, 2008 at 8:59 AM, graemer <[EMAIL PROTECTED]> wrote:
>
>  So as some of you may know I've been updating the Grails Wicket plug-in.
>  There is quite a few users on the Grails list who have shown interest in it
>  and the ability to use a component framework backed onto the rest of the
>  Grails stack (GORM, transactional services, plugin system etc.)
>
>  However, the plugin provides a very basic level of integration and I was
>  thinking it would be nice to create a Groovy DSL for Wicket. I looked into
>  the WicketBuilder, but really I think we can take this further. So based on
>  the example here:
>  
> http://www.theserverside.com/tt/articles/article.tss?l=IntroducingApacheWicket
>
>  I came up with the below syntax to represent this application (note i havent
>  actually implemented anything yet this is just a syntax proposal).
>  Thoughts/feedback/suggestions welcome:
>
>  class BasePage extends BuildablePage {
> public build() {
> stylesheet "main"
> panel "searchPanel" {
> form "searchForm" {
> def model = [:]
> bookmarkablePageLink "addContact", EditContact
> textField "searchString", model:model
> onSubmit {
> redirect page:ListContacts, [searchString:
>  model.searchString]
> }
> }
> }
> }
>  }
>  class ListContacts extends BasePage {
>
> public build() {
> super.build();
>
> def contactsModel = {
>  Contact.findByNameLike("%${params.searchString}%") }  as
>  LoadableDetachableModel
>
> listView "contacts", contactsModel { item ->
> def view = link( "view", item.model ) {
> onClick {
>  redirect page:new ViewContact(item.model.id)
> }
> }
> view << label("firstName", new PropertyModel(item.model,
>  "firstName"))
> view << label("lastName", new PropertyModel(item.model,
>  "lastName"))
>
> item << view
>
> item << link("edit", item.model) {
> onClick {
> redirect page:new EditContact(model.id)
> }
> }
> item << link("delete", item.model) {
> onClick {
> item.model.delete()
> redirect page:ListContacts
> }
> }
>
> }
>
> }
>
>  }
>  --
>  View this message in context: 
> http://www.nabble.com/Feedback-on-proposed-Groovy-DSL-syntax-for-Wicket-tp15873183p15873183.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [MEETUP] Wicket Meetup @ ApacheCon Europe: 4 weeks to go, 21 attendees already

2008-03-06 Thread Martin Funk
when is the date going to be drilled down?


Re: ajaxified dynamic lists as parts of bigger forms

2008-03-06 Thread Erik van Oosten
Hi Wojciech,

I am sorry, it appeared I wrote too quickly. This morning I found out
that what I wrote mostly does not work.

You /can/ call processInput() on any form component (if not all). This
will make that particular form component puts its value in the model.
But any way, the nested forms seems the way to go.

I prefer the refreshing repeater as does not have the tricky
model-re-use-problem. Still, ListView works fine if you know how to use it.

AjaxSubmitLink is of course fine too. Personally I try to avoid
components that completely depend on Javascript.

Regards,
Erik.



Wojciech Biela wrote:
> Thank you Erik,
>
>   
>>  You should use Buttons instead of links. Button (or AjaxFallbackButton)
>>  does submit the form.
>> 
>
> Why, should I submit using links? we've just done it using a nested
> form and attaching a AjaxSubmitLink to it.
>
>   
>> The only thing you need to do is disable
>>  validation on the button (call button.setDefaultFormProcessing(false)),
>>  otherwise the onSubmit of the button is not called when some field in
>>  the form does not validate. You can optionally call form.validate() in
>>  the onSubmit of the button so that validation messages do not disappear.
>> 
>
> Problem is I can't call form.validate() or more importantly
> form.updateFormComponentModels from the link's onSubmit method because
> those methods are private. What's the preferred way to retain user
> input without validating it a doing other form processing magic?
>
>   
>>  OT: personally, in forms I prefer RefreshingView instead of ListView why's 
>> that?
>> 
>
> how does it compare to ListView (with list.setReuseItems(true) and
> list.removeAll in onSubmit)?
> I haven't found much on it besides a few sentences in
> http://cwiki.apache.org/WICKET/tables-and-grids.html
>
>   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: link onClick add panel

2008-03-06 Thread taygolf

This isnt going to work for me. At least I do not think it will. Lets start
with the first issue and then move from there.

The link calls the popup which has a form. when the link is submitted I want
to add the customer info to the parent page.

You suggest storing the info in a database but that will not work for me
because they will be adding and deleting these customers a lot and i do not
want to have to call the database every time they do this. I would like to
pass the info with a model but I can not refresh the parent page because I
do not want to lose any information in any other textfield on that page.

So is there a way I can pass the model to the popup page, add the customer
info to the model, and then get that model data to show up on the parent
page without a refresh? I have this part of my code in a panel. Can I just
refresh the panel without refreshing the whole page?

After we get this done I would like to make the name of the customer a link
but i think I can handle that with no problem in the repeater.

Thanks

T


Mr Mean wrote:
> 
> Assuming you are using a listview or dataview to display all the
> customers you can simply add a link to the items, attach a label
> displaying the name and you have your clickable name. You could rig
> the link to open the popup.
> To get the customer data from the popup to the page i would choose to
> simply store the customer in the db using a form submit before closing
> the popup, from there you can use ajax or a simple setResponsePage to
> the parentpage to update its content.
> Alternatively if you do not yet want to store your customer you need
> to add it to the model of the listview. Note do not replace the
> listviews model but do something like
> ((List)model.getObject()).add(myCustomer); then you could use either
> ajax or setresponsepage to trigger a refresh on the parentpage.
> 
> If you are using ModalWindow as your popup you might need to add a
> WindowClosedCallbackHandler to redraw the listview.
> 
> Maurice
> 
> On Wed, Mar 5, 2008 at 9:52 PM, taygolf <[EMAIL PROTECTED]> wrote:
>>
>>  I have a problem and I have thought of 2 ways to get it done but I can
>> not
>>  make either work nor am I sure which one is the best.
>>
>>  I want the user to be able to add as many customers as they want.
>>
>>  So I have thought of 2 ways to do this.
>>
>>  1) I have a link that when clicked creates a popup with all the
>> necessary
>>  form fields that need to be filled out to create a customer. When the
>> the
>>  page is submitted I want the information to be stored on the parent page
>> in
>>  a table. I also want the customer name to be a link so they can edit the
>>  customer if need be.
>>
>>  I have the popup working and collecting all the data but the only way I
>> see
>>  to get it to put the data on the parent page is with javascript and I
>> can
>>  not seem to get the customer name to be a wicket link. so I guess the
>>  problem with this method is how can I get javascript to create a new
>> wicket
>>  link on the fly or how can I populate the parent page from the onSubmit
>> of
>>  the form on the popup page.
>>
>>  2) I have a link and when that link is clicked it opens a panel with all
>> the
>>  necessary fields that need to be filled out. For some reason I can not
>> get
>>  the link to add the panel to the parent page so I am stuck there.
>>
>>  I would prefer option one because I think it looks cleaner. How can I
>> fix
>>  these issues? am I thinking in the right direction for what I want to
>> do? If
>>  not what do I need to be looking at?
>>
>>  Thanks
>>
>>  T
>>  --
>>  View this message in context:
>> http://www.nabble.com/link-onClick-add-panel-tp15860001p15860001.html
>>  Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>>  -
>>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/link-onClick-add-panel-tp15860001p15877182.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Interesting markup question

2008-03-06 Thread Erik van Oosten
Hi Maurice,

Nice, I did not think of the setRenderBody option.

Thanks!
Erik.


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



Maurice Marrink wrote:
> The logic thing would be to add the class to the div:
> 
>
> However i can see your point of adding it to  if you
> want to enforce it on all menu's. Sure would be nice if wicket could
> automatically transfer anything extra it finds there to the actual
> element, but then what would be the behavior if setRenderbodyOnly was
> used, they would effectively bypass your enforced css style.
> So imo using a div in  to do this, optionally in
> combination with setRenderbodyOnly to get rid of the empty  wicket:id="menu"> is the best way to go if you want to force this kind
> of stuff.
>
> Maurice
>   
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



right click popup context menu

2008-03-06 Thread Karen Schaper
Hi,

I have a data table and for each row that is generated, I'd like to be able
to right click on the row and have actions that I can perform on the row
appear in a popup menu.

Any suggestions?  I see the context menu in YUI library but is there a
something in wicket that can help accomplish this?

I like this example but it's all in javascript..
http://developer.yahoo.com/yui/examples/datatable/dt_contextmenu.html.

I am using wicket 1.3.

Thanks

Karen


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Feedback on proposed Groovy DSL syntax for Wicket

2008-03-06 Thread graemer

So as some of you may know I've been updating the Grails Wicket plug-in.
There is quite a few users on the Grails list who have shown interest in it
and the ability to use a component framework backed onto the rest of the
Grails stack (GORM, transactional services, plugin system etc.) 

However, the plugin provides a very basic level of integration and I was
thinking it would be nice to create a Groovy DSL for Wicket. I looked into
the WicketBuilder, but really I think we can take this further. So based on
the example here:
http://www.theserverside.com/tt/articles/article.tss?l=IntroducingApacheWicket

I came up with the below syntax to represent this application (note i havent
actually implemented anything yet this is just a syntax proposal).
Thoughts/feedback/suggestions welcome:

class BasePage extends BuildablePage {
public build() {
stylesheet "main"
panel "searchPanel" {
form "searchForm" {
def model = [:]
bookmarkablePageLink "addContact", EditContact
textField "searchString", model:model
onSubmit {
redirect page:ListContacts, [searchString:
model.searchString]
}
}
}
}
}
class ListContacts extends BasePage {

public build() {
super.build();

def contactsModel = {
Contact.findByNameLike("%${params.searchString}%") }  as
LoadableDetachableModel

listView "contacts", contactsModel { item ->
def view = link( "view", item.model ) {
onClick {
 redirect page:new ViewContact(item.model.id)
}
}
view << label("firstName", new PropertyModel(item.model,
"firstName"))
view << label("lastName", new PropertyModel(item.model,
"lastName"))

item << view

item << link("edit", item.model) {
onClick {
redirect page:new EditContact(model.id)
}
}
item << link("delete", item.model) {
onClick {
item.model.delete()
redirect page:ListContacts  
}
}

}

}

}
-- 
View this message in context: 
http://www.nabble.com/Feedback-on-proposed-Groovy-DSL-syntax-for-Wicket-tp15873183p15873183.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Wicket 1.3 migration problem

2008-03-06 Thread Renan Camponez
 Hi!

I am tring to migrate a wicket 1.2 app to wicket 1.3 (because we hit a
blocking issue with ajax calls on dataviews in 1.2.
The problem is that the way wicket calculates path information seems to have
changed. Our architecture that uses wicket as one of several possible
rendering technologies in zones of a "workbench" relies on the wicket
request paths. Let me try to explain a little:

We have a wicket servlet mapped as /app/wicketservlet
We have a main servlet: /app/mainservlet and on our page we run the
following javascript code:

var req=new Ajax.Request('/app/view',{method: 'get',parameters: 'viewid=' +
viewid,onLoaded: function(){},onComplete: function(){div.innerHtml =
req.transport.responseText);}});
This "view" servlet has a registry of all screens and do a forward with the
correct one like the following:
req.getRequestDispatcher("/app/wicketservlet/mountPoint/Page/variant/myVariant").forward(req,
res);

This used to work on wicket 1.2...
But as wicket 1.3 has relative path, all my buttons/resources are refering
to ../../../

If I were on /app/wicketservlet/mountPoint/Page/variant/myVariant this will
work...

But I'm on /app/mainservlet..  So, all my references are lost...

I've tried to do a search/replace on "req.transport.responseText" to change
../../../ to correctly absolute path as it used to be...

Then, the resources (images, css) came back, my wicket ajax submit buttons
are doing the request to server (onClick methods are called server-side),
but the problem is that my components on client-side (the ones at
AjaxRequestTarget.addComponent), are not updated at all..

What can I do? Please help!

Renan Camponez


Re: wicket-datetime

2008-03-06 Thread Paolo Di Tommaso
If you don't have licence matter you can download the old 1.2.x datepicker
available here

http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-contrib-datepicker

and refactor to make it use the Wicket 1.3.x core classes.


That's all .

/ Paolo


On Thu, Mar 6, 2008 at 11:23 AM, Charlie Dobbie <[EMAIL PROTECTED]> wrote:

> Hi all,
>
> This is causing me some issues as well.  I have a page which contains
> 21 datepickers...  These add 59KB of JavaScript to the head and I now
> believe might be the cause of a ~three second browser pause I'm seeing
> when the entering the page.
>
> The 1.2.6 datepicker component kept its JavaScript in external
> libraries, so they were only loaded once, and made a call to
> Calendar.setup to do the work for each component.  Obviously, they're
> both different technologies behind the scenes, so the same approach
> might not work.  Anyone got any suggestions?
>
> Charlie.
>
>
>
> On Thu, Mar 6, 2008 at 9:42 AM, Ned Collyer <[EMAIL PROTECTED]> wrote:
> >
> >  Hi Igor,
> >
> >  The picker works fine - its the implementation I'm concerned about.
> >
> >  If you have 2 instances, then all the javascript exists twice.  All the
> >  translations exist twice.
> >
> >  The demo does not show 2 date pickers and you can clearly see the
> dependance
> >  on "initdateTextField2" being pasted into the middle of the script
> area.
> >
> >  eg, say you need to specify a date range - or multiple date ranges for
> >  something like a search input, or you have multiple panels with date
> >  pickers.
> >
> >  Is this purely to satisfy the requirement of the example? -ie, not
> suitable
> >  for anything more than "date of birth" checking and 1 instance per
> page.
> >
> >
> >
> >  igor.vaynberg wrote:
> >  >
> >  > it seems to be working just fine here
> >  >
> >  > http://wicketstuff.org/wicket13/dates/
> >  >
> >  >
> >  > -igor
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: ajaxified dynamic lists as parts of bigger forms

2008-03-06 Thread Wojciech Biela
Thank you Gerolf,

I know there is one form (in conformance to HTML specs), I just
thought that when using ajax the form may be submitted partially using
some smart neat trick, but thank you for bringing be back to reality
;)

We'll try to overcome it in a different way. Put the file uploads in a
separate form (or a whole component with a form) put it somewhere in a
hidden div and show it on top just to send one of the files, then just
show the already uploaded files name in the main form ...
theoretically should ... or would it be better to rewrite the whole
dynamic list component to use AjaxFormComponentUpdatingBehavior? but
then this behaviour will have to validate those values? otherwise it
can't update the model because there may be trash strings there,

and that reminds me of my earlier question :): what about retaining
the user input without validating it ?

Thank you all for your help!

regards
Wojtek

2008/3/6, Gerolf Seitz <[EMAIL PROTECTED]>:
> Wojtek,
>
>  using nested forms, there's always exactly one form tag.
>  submitting a nested form results in submitting the entire form,
>  but only processing (converting, validating, updating models)
>  the nested form on the server side.
>
>  bringing in a fileupload field basically takes away the ability to
>  submit the form via ajax.
>  having said that, an AjaxFormComponentUpdatingBehavior should still work.
>
>  cheers,
>
>   Gerolf
>
>
>
>  On Thu, Mar 6, 2008 at 2:19 PM, Wojciech Biela <[EMAIL PROTECTED]> wrote:
>
>  > Hello Maurice,
>  >
>  > We just (almost) implemented this component (as I wrote in response to
>  > Erik's post), but we're are now struggling with not processing the
>  > form and retaining user input
>  >
>  > other than that I have the same wondering, if I submit only the inner
>  > form, will the browser send the whole form, or will the AjaxSubmitLink
>  > only submit the part I'm interested in? It's quite important because I
>  > will have fileiupload fields in the the outer form, so then adding an
>  > item to this listview (and sending this little form) will cause the
>  > browser to send the whole form with heavy files ... that would be
>  > absurd
>  >
>  > how does it work in wicket 1.3.1? or do I have to get a sniffer to be
>  > sure?
>  >
>  > regards
>  > Wojtek
>  >
>  > 2008/3/5, Maurice Marrink <[EMAIL PROTECTED]>:
>  > > Actually AjaxFormComponentUpdatingBehavior accomplishes the desired
>  > >  behavior without submitting the entire form. I can see the tricky part
>  > >  in loosing changes to the text in the textfields if you replace the
>  > >  div surrounding them but i thought nested forms in wicket 1.3.? solved
>  > >  this by only submitting the child formcomponents, or am i mistaken?
>  > >
>  > >
>  > >  Maurice
>  > >
>  > >
>  > >  On Wed, Mar 5, 2008 at 4:50 PM, Erik van Oosten <[EMAIL PROTECTED]>
>  > wrote:
>  > >  > Hi Wojciech,
>  > >  >
>  > >  >  You should use Buttons instead of links. Button (or
>  > AjaxFallbackButton)
>  > >  >  does submit the form. The only thing you need to do is disable
>  > >  >  validation on the button (call button.setDefaultFormProcessing
>  > (false)),
>  > >  >  otherwise the onSubmit of the button is not called when some field
>  > in
>  > >  >  the form does not validate. You can optionally call form.validate()
>  > in
>  > >  >  the onSubmit of the button so that validation messages do not
>  > disappear.
>  > >  >
>  > >  >  OT: personally, in forms I prefer RefreshingView instead of
>  > ListView.
>  > >  >
>  > >  >  Regards,
>  > >  > Erik.
>  > >  >
>  > >  >  --
>  > >  >  Erik van Oosten
>  > >  >  http://www.day-to-day-stuff.blogspot.com/
>  > >  >
>  > >  >
>  > >  >
>  > >  >
>  > >  >  Wojciech Biela wrote:
>  > >  >  > Hello
>  > >  >  >
>  > >  >  > This time my question is not so general.
>  > >  >  >
>  > >  >  > We have a big form, part of this form there is a component which
>  > >  >  > should be a dynamic list of fields like this:
>  > >  >  >
>  > >  >  > |TextField| - remove
>  > >  >  > |TextField| - remove
>  > >  >  > |TextField| - remove
>  > >  >  > |TextField| - add
>  > >  >  >
>  > >  >  > if you click "add" another row "|TextField| - remove" should
>  > appear at
>  > >  >  > the bottom, it you should click "remove" then this row should be
>  > >  >  > removed
>  > >  >  >
>  > >  >  > problem we have is that the "add" and "remove" link does not send
>  > the
>  > >  >  > form, it only sends and ajax request to add an element to the list
>  > of
>  > >  >  > components and it operates (target) on a DIV that wraps the whole
>  > >  >  > list, so afterwards it renders the list again loosing values that
>  > were
>  > >  >  > already put in
>  > >  >  >
>  > >  >  > what is the preferred method to do such a thing? should the add
>  > and
>  > >  >  > remove link be a submit link with defaultFormProcessing set to
>  > false?
>  > >  >  > or maybe should we try to save values to model objects onchange in
>  > the
>  > >  >  > respect

Russian localization

2008-03-06 Thread Juha Alatalo

Hi,

Russian language supports seems to be broken. Calling getString() causes 
class cast exception (stack trace in the end of the mail).


Removing file org\apache\wicket\Application_ru.xml seems to be fixing 
the provlem. Should I create a jire issue for that?


- Juha


java.lang.ClassCastException: 
org.apache.xerces.dom.DeferredDocumentTypeImpl cannot be cast to 
org.w3c.dom.Element at 
org.apache.wicket.util.io.Streams.loadFromXml(Streams.java:154) at 
org.apache.wicket.resource.PropertiesFactory.loadPropertiesFile(PropertiesFactory.java:193) 
at 
org.apache.wicket.resource.PropertiesFactory.loadPropertiesFileAndWatchForChanges(PropertiesFactory.java:283) 
at 
org.apache.wicket.resource.PropertiesFactory.load(PropertiesFactory.java:124) 
at 
org.apache.wicket.resource.loader.ComponentStringResourceLoader.loadStringResource(ComponentStringResourceLoader.java:148) 
at 
org.apache.wicket.resource.loader.ClassStringResourceLoader.loadStringResource(ClassStringResourceLoader.java:64) 
at 
org.apache.wicket.resource.loader.ComponentStringResourceLoader.loadStringResource(ComponentStringResourceLoader.java:225) 
at 
org.apache.wicket.resource.loader.ClassStringResourceLoader.loadStringResource(ClassStringResourceLoader.java:78) 
at org.apache.wicket.Localizer.getString(Localizer.java:221) at 
org.apache.wicket.Component.getString(Component.java:1802) at 
syncrontech.common.gate.GateDateRange.(GateDateRange.java:47) at 
syncrontech.common.gate.AutoQueryPanel.(AutoQueryPanel.java:39) 
  at 
syncrontech.common.gate.GateWebPage.getQueryPanel(GateWebPage.java:245) 
at syncrontech.common.gate.GateUiPanel.(GateUiPanel.java:19) 
at 
syncrontech.common.gate.GateWebPage.addUiPanel(GateWebPage.java:589)  at 
syncrontech.common.gate.GateWebPage.(GateWebPage.java:40)  at 
syncrontech.menu.AboutPage.(AboutPage.java:11) at 
java.lang.reflect.Constructor.newInstance(Unknown Source) at 
java.lang.Class.newInstance0(Unknown Source) at 
java.lang.Class.newInstance(Unknown Source) at 
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:58) 
at 
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:262) 
at 
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:283) 
at 
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:210) 
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90) 
at 
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1166) 
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241) at 
org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316) at 
org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354) 
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194) 
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) 
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 
at 
syncrontech.common.storage.TxnServletFilter.doFilter(TxnServletFilter.java:65) 
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) 
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) 
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) 
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) 
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) 
at 
org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:482) 
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) 
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) 
at 
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:834) 
at 
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640) 
at 
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286) 
at java.lang.Thread.run(Unknown Source)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ajaxified dynamic lists as parts of bigger forms

2008-03-06 Thread Gerolf Seitz
Wojtek,

using nested forms, there's always exactly one form tag.
submitting a nested form results in submitting the entire form,
but only processing (converting, validating, updating models)
the nested form on the server side.

bringing in a fileupload field basically takes away the ability to
submit the form via ajax.
having said that, an AjaxFormComponentUpdatingBehavior should still work.

cheers,
  Gerolf


On Thu, Mar 6, 2008 at 2:19 PM, Wojciech Biela <[EMAIL PROTECTED]> wrote:

> Hello Maurice,
>
> We just (almost) implemented this component (as I wrote in response to
> Erik's post), but we're are now struggling with not processing the
> form and retaining user input
>
> other than that I have the same wondering, if I submit only the inner
> form, will the browser send the whole form, or will the AjaxSubmitLink
> only submit the part I'm interested in? It's quite important because I
> will have fileiupload fields in the the outer form, so then adding an
> item to this listview (and sending this little form) will cause the
> browser to send the whole form with heavy files ... that would be
> absurd
>
> how does it work in wicket 1.3.1? or do I have to get a sniffer to be
> sure?
>
> regards
> Wojtek
>
> 2008/3/5, Maurice Marrink <[EMAIL PROTECTED]>:
> > Actually AjaxFormComponentUpdatingBehavior accomplishes the desired
> >  behavior without submitting the entire form. I can see the tricky part
> >  in loosing changes to the text in the textfields if you replace the
> >  div surrounding them but i thought nested forms in wicket 1.3.? solved
> >  this by only submitting the child formcomponents, or am i mistaken?
> >
> >
> >  Maurice
> >
> >
> >  On Wed, Mar 5, 2008 at 4:50 PM, Erik van Oosten <[EMAIL PROTECTED]>
> wrote:
> >  > Hi Wojciech,
> >  >
> >  >  You should use Buttons instead of links. Button (or
> AjaxFallbackButton)
> >  >  does submit the form. The only thing you need to do is disable
> >  >  validation on the button (call button.setDefaultFormProcessing
> (false)),
> >  >  otherwise the onSubmit of the button is not called when some field
> in
> >  >  the form does not validate. You can optionally call form.validate()
> in
> >  >  the onSubmit of the button so that validation messages do not
> disappear.
> >  >
> >  >  OT: personally, in forms I prefer RefreshingView instead of
> ListView.
> >  >
> >  >  Regards,
> >  > Erik.
> >  >
> >  >  --
> >  >  Erik van Oosten
> >  >  http://www.day-to-day-stuff.blogspot.com/
> >  >
> >  >
> >  >
> >  >
> >  >  Wojciech Biela wrote:
> >  >  > Hello
> >  >  >
> >  >  > This time my question is not so general.
> >  >  >
> >  >  > We have a big form, part of this form there is a component which
> >  >  > should be a dynamic list of fields like this:
> >  >  >
> >  >  > |TextField| - remove
> >  >  > |TextField| - remove
> >  >  > |TextField| - remove
> >  >  > |TextField| - add
> >  >  >
> >  >  > if you click "add" another row "|TextField| - remove" should
> appear at
> >  >  > the bottom, it you should click "remove" then this row should be
> >  >  > removed
> >  >  >
> >  >  > problem we have is that the "add" and "remove" link does not send
> the
> >  >  > form, it only sends and ajax request to add an element to the list
> of
> >  >  > components and it operates (target) on a DIV that wraps the whole
> >  >  > list, so afterwards it renders the list again loosing values that
> were
> >  >  > already put in
> >  >  >
> >  >  > what is the preferred method to do such a thing? should the add
> and
> >  >  > remove link be a submit link with defaultFormProcessing set to
> false?
> >  >  > or maybe should we try to save values to model objects onchange in
> the
> >  >  > respective fields themselves
> >  >  >
> >  >  > isn't there a way to do it in a neat fashion?
> >  >  >
> >  >  > code responsible for the list component is
> >  >  >
> >  >  > wrapper = new WebMarkupContainer("attributes-wrapper");
> >  >  > listView = new ListView("attributes", attributeValuesList) {
> >  >  >   public void populateItem(final ListItem listItem) {
> >  >  > final AttributeValue attributeValue = (AttributeValue)
> >  >  > listItem.getModelObject();
> >  >  > Renderer inputRenderer =
> >  >  > attributeValue.getAttribute().getInputRenderer();
> >  >  > Component component = inputRenderer.getComponent
> (attributeValue);
> >  >  > listItem.add(component);
> >  >  > AjaxLink addLink = new AddLink("add-link");
> >  >  > AjaxLink removeLink = new RemoveLink("remove-link",
> listItem);
> >  >  > if (listItem.getIndex() < (listView.getViewSize() - 1)) {
> >  >  >   addLink.setVisible(false);
> >  >  > } else {
> >  >  >   removeLink.setVisible(false);
> >  >  > }
> >  >  > listItem.add(addLink);
> >  >  > listItem.add(removeLink);
> >  >  >   }
> >  >  > };
> >  >  > wrapper.setOutputMarkupId(true);
> >  >  >
> >  >  > HTML is
> >  >  >
> > 

Re: ajaxified dynamic lists as parts of bigger forms

2008-03-06 Thread Wojciech Biela
> Problem is I can't call form.validate() or more importantly
>  form.updateFormComponentModels from the link's onSubmit method because
>  those methods are private. What's the preferred way to retain user
>  input without validating it a doing other form processing magic?

I just hit me that i can't call updateFormComponentModels even if I
could because i haven't validated my input so there may be strings and
my model may accept only intergers for example. So what method should
I call then just to show the modified listview (an element added or
deleted) with the previous values, not necessarily putting them into
the model. This is normally done it I don't bypass the
defaultformprocessing and the validation results with an error, so
there should be a way to invoke it by hand...

-- 
Wojtek Biela

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket-datetime

2008-03-06 Thread Alex Jacoby
Side note: the demo doesn't seem to be working in Safari (3.0.4).   
Clicking the calendar icon doesn't do anything.  I don't see any JS  
errors in the console.


Anyone else seen this?

Alex

On Mar 6, 2008, at 1:20 AM, Igor Vaynberg wrote:


it seems to be working just fine here

http://wicketstuff.org/wicket13/dates/


-igor



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



bug or feature in FormTester while setting a value on a form?

2008-03-06 Thread Wojciech Biela
Hey

It looks like a bug but it's so obvious I suspect it's a feature not a
bug, a feature I yet have learn to appreciate.

When I assert a value on a component and the path is invalid (either
the component is not there or I misspelled the path) the assertion
fails. This is fine.

When I try to set a value of a component and the path is invalid the
method returns without any complaints. So now I have to double every
set with an assert to be sure I'm setting a value to an existing
component. Why the extra work?

regards

-- 
Wojtek Biela

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ajaxified dynamic lists as parts of bigger forms

2008-03-06 Thread Wojciech Biela
Hello Maurice,

We just (almost) implemented this component (as I wrote in response to
Erik's post), but we're are now struggling with not processing the
form and retaining user input

other than that I have the same wondering, if I submit only the inner
form, will the browser send the whole form, or will the AjaxSubmitLink
only submit the part I'm interested in? It's quite important because I
will have fileiupload fields in the the outer form, so then adding an
item to this listview (and sending this little form) will cause the
browser to send the whole form with heavy files ... that would be
absurd

how does it work in wicket 1.3.1? or do I have to get a sniffer to be sure?

regards
Wojtek

2008/3/5, Maurice Marrink <[EMAIL PROTECTED]>:
> Actually AjaxFormComponentUpdatingBehavior accomplishes the desired
>  behavior without submitting the entire form. I can see the tricky part
>  in loosing changes to the text in the textfields if you replace the
>  div surrounding them but i thought nested forms in wicket 1.3.? solved
>  this by only submitting the child formcomponents, or am i mistaken?
>
>
>  Maurice
>
>
>  On Wed, Mar 5, 2008 at 4:50 PM, Erik van Oosten <[EMAIL PROTECTED]> wrote:
>  > Hi Wojciech,
>  >
>  >  You should use Buttons instead of links. Button (or AjaxFallbackButton)
>  >  does submit the form. The only thing you need to do is disable
>  >  validation on the button (call button.setDefaultFormProcessing(false)),
>  >  otherwise the onSubmit of the button is not called when some field in
>  >  the form does not validate. You can optionally call form.validate() in
>  >  the onSubmit of the button so that validation messages do not disappear.
>  >
>  >  OT: personally, in forms I prefer RefreshingView instead of ListView.
>  >
>  >  Regards,
>  > Erik.
>  >
>  >  --
>  >  Erik van Oosten
>  >  http://www.day-to-day-stuff.blogspot.com/
>  >
>  >
>  >
>  >
>  >  Wojciech Biela wrote:
>  >  > Hello
>  >  >
>  >  > This time my question is not so general.
>  >  >
>  >  > We have a big form, part of this form there is a component which
>  >  > should be a dynamic list of fields like this:
>  >  >
>  >  > |TextField| - remove
>  >  > |TextField| - remove
>  >  > |TextField| - remove
>  >  > |TextField| - add
>  >  >
>  >  > if you click "add" another row "|TextField| - remove" should appear at
>  >  > the bottom, it you should click "remove" then this row should be
>  >  > removed
>  >  >
>  >  > problem we have is that the "add" and "remove" link does not send the
>  >  > form, it only sends and ajax request to add an element to the list of
>  >  > components and it operates (target) on a DIV that wraps the whole
>  >  > list, so afterwards it renders the list again loosing values that were
>  >  > already put in
>  >  >
>  >  > what is the preferred method to do such a thing? should the add and
>  >  > remove link be a submit link with defaultFormProcessing set to false?
>  >  > or maybe should we try to save values to model objects onchange in the
>  >  > respective fields themselves
>  >  >
>  >  > isn't there a way to do it in a neat fashion?
>  >  >
>  >  > code responsible for the list component is
>  >  >
>  >  > wrapper = new WebMarkupContainer("attributes-wrapper");
>  >  > listView = new ListView("attributes", attributeValuesList) {
>  >  >   public void populateItem(final ListItem listItem) {
>  >  > final AttributeValue attributeValue = (AttributeValue)
>  >  > listItem.getModelObject();
>  >  > Renderer inputRenderer =
>  >  > attributeValue.getAttribute().getInputRenderer();
>  >  > Component component = 
> inputRenderer.getComponent(attributeValue);
>  >  > listItem.add(component);
>  >  > AjaxLink addLink = new AddLink("add-link");
>  >  > AjaxLink removeLink = new RemoveLink("remove-link", listItem);
>  >  > if (listItem.getIndex() < (listView.getViewSize() - 1)) {
>  >  >   addLink.setVisible(false);
>  >  > } else {
>  >  >   removeLink.setVisible(false);
>  >  > }
>  >  > listItem.add(addLink);
>  >  > listItem.add(removeLink);
>  >  >   }
>  >  > };
>  >  > wrapper.setOutputMarkupId(true);
>  >  >
>  >  > HTML is
>  >  >
>  >  >   
>  >  >   
>  >  >class="composit-item">
>  >  >   
>  >  >   + add
>  >  >   - remove
>  >  >   
>  >  >   
>  >  >   
>  >  >
>  >  >
>  >
>  >
>  >
>  >
>  > -
>  >  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---

Re: ajaxified dynamic lists as parts of bigger forms

2008-03-06 Thread Wojciech Biela
Thank you Erik,

>  You should use Buttons instead of links. Button (or AjaxFallbackButton)
>  does submit the form.

Why, should I submit using links? we've just done it using a nested
form and attaching a AjaxSubmitLink to it.

> The only thing you need to do is disable
>  validation on the button (call button.setDefaultFormProcessing(false)),
>  otherwise the onSubmit of the button is not called when some field in
>  the form does not validate. You can optionally call form.validate() in
>  the onSubmit of the button so that validation messages do not disappear.

Problem is I can't call form.validate() or more importantly
form.updateFormComponentModels from the link's onSubmit method because
those methods are private. What's the preferred way to retain user
input without validating it a doing other form processing magic?

>  OT: personally, in forms I prefer RefreshingView instead of ListView why's 
> that?

how does it compare to ListView (with list.setReuseItems(true) and
list.removeAll in onSubmit)?
I haven't found much on it besides a few sentences in
http://cwiki.apache.org/WICKET/tables-and-grids.html

-- 
Wojtek Biela

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Guide for html designers

2008-03-06 Thread Alex Jacoby
Thanks for all the advice -- guess I'll see how it goes, possibly post  
something to the wiki if it seems to be useful.


Alex

On Mar 6, 2008, at 4:58 AM, Nino Saturnino Martinez Vazquez Wael wrote:

Yeah thats the usual way.. But still if you panalize a lot, tweaking  
for them could become a little hard. But I guess if you spend a  
little hour with them they should not have those trouble..


Johan Compagner wrote:

most of the time at least as far as i know
you work the other way around.

First the webdeveloper then the programmer
And maybe after that the webdeveloper only tweaks. But he can do  
that just

fine he just should leave the wicket tags alone

johan



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Interesting markup question

2008-03-06 Thread Maurice Marrink
The logic thing would be to add the class to the div:


However i can see your point of adding it to  if you
want to enforce it on all menu's. Sure would be nice if wicket could
automatically transfer anything extra it finds there to the actual
element, but then what would be the behavior if setRenderbodyOnly was
used, they would effectively bypass your enforced css style.
So imo using a div in  to do this, optionally in
combination with setRenderbodyOnly to get rid of the empty  is the best way to go if you want to force this kind
of stuff.

Maurice

On Thu, Mar 6, 2008 at 9:28 AM, Erik van Oosten <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I recently tried the following in a panel's markup:
>
> 
>
> add(new MenuPanel("menu"));
>
>  and in MenuPanel.html:
>
>   ...   
>
>  Unfortunately the "class" attribute was not put in the result. It was
>  even silently ignored!
>
>  WDYT, is this desired behavior?
>
>
>  FYI, this is my workaround:
>
> 
>
> add(new MenuPanel("menu"));
>
>  and in MenuPanel.html:
>
> 
>  ...  
> 
>
>
>
>
>  Regards,
> Erik.
>
>
>  --
>  Erik van Oosten
>  http://day-to-day-stuff.blogspot.com/
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Interesting markup question

2008-03-06 Thread Charlie Dobbie
Hi Erik,

The wicket:panel construct will be stripped entirely of course.  Where
would you expect the class applied to a wicket:panel to appear - are
you suggesting it should be added to the containing div?

So:
[menu]

And:
Contents of Panel

Would become:
Contents of Panel


Charlie.


On Thu, Mar 6, 2008 at 8:28 AM, Erik van Oosten <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I recently tried the following in a panel's markup:
>
> 
>
> add(new MenuPanel("menu"));
>
>  and in MenuPanel.html:
>
>   ...   
>
>  Unfortunately the "class" attribute was not put in the result. It was
>  even silently ignored!
>
>  WDYT, is this desired behavior?
>
>
>  FYI, this is my workaround:
>
> 
>
> add(new MenuPanel("menu"));
>
>  and in MenuPanel.html:
>
> 
>  ...  
> 
>
>
>
>
>  Regards,
> Erik.
>
>
>  --
>  Erik van Oosten
>  http://day-to-day-stuff.blogspot.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Page reload after file upload

2008-03-06 Thread Michael Sparer

unfortunately i haven't had the time to try it so far. but i'd be interested
if it works too ;-)

regards, 
Michael


Kai Mütz wrote:
> 
> [EMAIL PROTECTED] <> wrote:
>> a fancy solution would be to upload the file by means of an ajax
>> request - then the values would stay the same as the page doesn't
>> perform a full reload, that ain't as easy as it sounds, take a look a
>> this:
>> http://www.nabble.com/Submitting-an-ajaxform-with-multipart-form-d
>> ata-to15734375.html#a15734375 
> 
> Thanks for your quick reply.
> 
> Have you tried the multi file upload component? Does that work?
> 
> Kai 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/Page-reload-after-file-upload-tp15869570p15870416.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket-datetime

2008-03-06 Thread Charlie Dobbie
Hi all,

This is causing me some issues as well.  I have a page which contains
21 datepickers...  These add 59KB of JavaScript to the head and I now
believe might be the cause of a ~three second browser pause I'm seeing
when the entering the page.

The 1.2.6 datepicker component kept its JavaScript in external
libraries, so they were only loaded once, and made a call to
Calendar.setup to do the work for each component.  Obviously, they're
both different technologies behind the scenes, so the same approach
might not work.  Anyone got any suggestions?

Charlie.



On Thu, Mar 6, 2008 at 9:42 AM, Ned Collyer <[EMAIL PROTECTED]> wrote:
>
>  Hi Igor,
>
>  The picker works fine - its the implementation I'm concerned about.
>
>  If you have 2 instances, then all the javascript exists twice.  All the
>  translations exist twice.
>
>  The demo does not show 2 date pickers and you can clearly see the dependance
>  on "initdateTextField2" being pasted into the middle of the script area.
>
>  eg, say you need to specify a date range - or multiple date ranges for
>  something like a search input, or you have multiple panels with date
>  pickers.
>
>  Is this purely to satisfy the requirement of the example? -ie, not suitable
>  for anything more than "date of birth" checking and 1 instance per page.
>
>
>
>  igor.vaynberg wrote:
>  >
>  > it seems to be working just fine here
>  >
>  > http://wicketstuff.org/wicket13/dates/
>  >
>  >
>  > -igor

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Page reload after file upload

2008-03-06 Thread Kai Mütz
[EMAIL PROTECTED] <> wrote:
> a fancy solution would be to upload the file by means of an ajax
> request - then the values would stay the same as the page doesn't
> perform a full reload, that ain't as easy as it sounds, take a look a
> this:
> http://www.nabble.com/Submitting-an-ajaxform-with-multipart-form-d
> ata-to15734375.html#a15734375 

Thanks for your quick reply.

Have you tried the multi file upload component? Does that work?

Kai 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Guide for html designers

2008-03-06 Thread Nino Saturnino Martinez Vazquez Wael
Yeah thats the usual way.. But still if you panalize a lot, tweaking for 
them could become a little hard. But I guess if you spend a little hour 
with them they should not have those trouble..


Johan Compagner wrote:

most of the time at least as far as i know
you work the other way around.

First the webdeveloper then the programmer
And maybe after that the webdeveloper only tweaks. But he can do that just
fine he just should leave the wicket tags alone

johan



On Thu, Mar 6, 2008 at 2:10 AM, Alex Jacoby <[EMAIL PROTECTED]> wrote:

  

Heh, slight misunderstanding -- I *am* the programmer, and my site is
just about done, and I'm going to be passing it on to the web folk
(HTML, CSS, graphics people who don't program) to prettify it asap.

I know that it will involve me teaching them some of the basics of
wicket, but I was wondering if there were resources out there for
helping in this type of situation... a "Wicket for non-programmers"
type guide.  I've written a few pages so far...

Thanks again for the suggestions,
Alex

On Mar 5, 2008, at 4:54 PM, Ned Collyer wrote:



A web designer being a graphics or a HTML guy (or a combination
thereof)?

Seriously tho, design your site, give the output to the programmer to
"wicket up".

I don't see how wicket will work for you if you don't understand the
basic
bits of java.  If you do, the tutorials and examples on the website
http://wicket.apache.org/examples.html then that should be an easy
enough
stepping stone to forage deeper.

Things you are probably interested in are panels, borders, includes
and
fragments.
http://wicketstuff.org/wicket13/compref/

But I think you will find it tough with zero java knowledge.  It may
work
well if you are working with a programmer :), but solo - good luck!
  

 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





  


--
-Wicket for love
-Jme for fun

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Page reload after file upload

2008-03-06 Thread Michael Sparer

a fancy solution would be to upload the file by means of an ajax request -
then the values would stay the same as the page doesn't perform a full
reload, that ain't as easy as it sounds, take a look a this:
http://www.nabble.com/Submitting-an-ajaxform-with-multipart-form-data-to15734375.html#a15734375

regards,
Michael

Kai Mütz wrote:
> 
> Hi,
> 
> I have one form with multiple fields where I can edit a object. I want to
> attach a document or image (of class Document) to the form/object using a
> second upload form. This works fine if I first execute the upload, then
> edit
> other fields and finally submit the form.
> 
> The problem occurs if I upload/attach a file subsequent to editing the
> fields. The upload form reloads the page and the changes in the form are
> gone. How can I avoid this? How can I catch the changes made before
> upload?
> Can nested forms solve this?
> 
> Thanks in advance,
> Kai
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/Page-reload-after-file-upload-tp15869570p15869948.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Sorting a list

2008-03-06 Thread Johan Compagner
the wicket way would be to sort it in java. use Arrays.sort and a comparator

johan



On Thu, Mar 6, 2008 at 12:00 AM, jeredm <[EMAIL PROTECTED]>
wrote:

>
> I am looking for an easy way to sort single items within a
> list...basically I
> need to re-order a list.  For example, I have 30 table rows and I want to
> move row 13 to be before row 10.  An example I found that is similar to
> what
> I am looking for is located at http://demos.mootools.net/Sortables.  Does
> anybody know an easy way to implement this type of solution (an easy to
> re-order list) in Wicket?  My list size is probably more than 10 and less
> than 100.  Thanks for any help!
> --
> View this message in context:
> http://www.nabble.com/Sorting-a-list-tp15862619p15862619.html
> Sent from the Wicket - User mailing list archive at 
> Nabble.com
> .
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Guide for html designers

2008-03-06 Thread Johan Compagner
most of the time at least as far as i know
you work the other way around.

First the webdeveloper then the programmer
And maybe after that the webdeveloper only tweaks. But he can do that just
fine he just should leave the wicket tags alone

johan



On Thu, Mar 6, 2008 at 2:10 AM, Alex Jacoby <[EMAIL PROTECTED]> wrote:

> Heh, slight misunderstanding -- I *am* the programmer, and my site is
> just about done, and I'm going to be passing it on to the web folk
> (HTML, CSS, graphics people who don't program) to prettify it asap.
>
> I know that it will involve me teaching them some of the basics of
> wicket, but I was wondering if there were resources out there for
> helping in this type of situation... a "Wicket for non-programmers"
> type guide.  I've written a few pages so far...
>
> Thanks again for the suggestions,
> Alex
>
> On Mar 5, 2008, at 4:54 PM, Ned Collyer wrote:
>
> >
> > A web designer being a graphics or a HTML guy (or a combination
> > thereof)?
> >
> > Seriously tho, design your site, give the output to the programmer to
> > "wicket up".
> >
> > I don't see how wicket will work for you if you don't understand the
> > basic
> > bits of java.  If you do, the tutorials and examples on the website
> > http://wicket.apache.org/examples.html then that should be an easy
> > enough
> > stepping stone to forage deeper.
> >
> > Things you are probably interested in are panels, borders, includes
> > and
> > fragments.
> > http://wicketstuff.org/wicket13/compref/
> >
> > But I think you will find it tough with zero java knowledge.  It may
> > work
> > well if you are working with a programmer :), but solo - good luck!
>
>
>  -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: getPageParameters() NullPointer

2008-03-06 Thread Johan Compagner
>
>
> in FirstLogin.java ---
> PageParameters params = new PageParameters();
> System.out.print("pid=" + params.getKey("pid"));--the output is
> null;how to get the parameter?


What are you doing here exactly?
Are you creating the PageParameters yourself?? in the FirstLogin page?
That is wrong. You should use the PageParameter constructor

johan


Re: wicket-datetime

2008-03-06 Thread Ned Collyer

Hi Igor,

The picker works fine - its the implementation I'm concerned about.

If you have 2 instances, then all the javascript exists twice.  All the
translations exist twice.

The demo does not show 2 date pickers and you can clearly see the dependance
on "initdateTextField2" being pasted into the middle of the script area.

eg, say you need to specify a date range - or multiple date ranges for
something like a search input, or you have multiple panels with date
pickers.

Is this purely to satisfy the requirement of the example? -ie, not suitable
for anything more than "date of birth" checking and 1 instance per page.


igor.vaynberg wrote:
> 
> it seems to be working just fine here
> 
> http://wicketstuff.org/wicket13/dates/
> 
> 
> -igor
> 

-- 
View this message in context: 
http://www.nabble.com/wicket-datetime-tp15866334p15869748.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Page reload after file upload

2008-03-06 Thread Kai Mütz
Hi,

I have one form with multiple fields where I can edit a object. I want to
attach a document or image (of class Document) to the form/object using a
second upload form. This works fine if I first execute the upload, then edit
other fields and finally submit the form.

The problem occurs if I upload/attach a file subsequent to editing the
fields. The upload form reloads the page and the changes in the form are
gone. How can I avoid this? How can I catch the changes made before upload?
Can nested forms solve this?

Thanks in advance,
Kai


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[MEETUP] Wicket Meetup @ ApacheCon Europe: 4 weeks to go, 21 attendees already

2008-03-06 Thread Arje Cahn
Hi all,

Here's a little reminder.. Don't forget to sign up for our private little party 
@ ApacheCon!

More info below...

Arje 



It is meetup time again! Our last Amsterdam Meetup was a big  
success and we want to continue that tradition. Over 80 
Wicket developers attended the previous meetup and we had a 
blast. If you have missed the previous meetup from Nov 30th, 
2007 you can see the pictures online [1], or enjoy the 
presentations [2].

Attending is simple: simply add your name to the wiki page 
and you're all set! 
http://cwiki.apache.org/WICKET/wicket-community-meetups-amsterdam.html

If you have an idea for a talk, presentation, demo, 
discussion, or whatever you feel like, be sure to add it to 
the Wiki page.

Please note that no fee has been set yet for attending, since 
we're still looking for some sponsors. But it'll be either 
free or extremely cheap - 25 Euros or so. We'll still have to 
pay for the room you see :)

This Meetup will happen at the same time and in the same 
place as the ApacheCon Europe 2008, its bigger sister 
conference. Whereas the Meetup is purely about Wicket, run by 
the community, ApacheCon gives you an much bigger overview 
covering the entire Apache stack. There's no obligation to 
attend ApacheCon, but we're trying to get a good deal for 
Meetup attendees that want to visit ApacheCon too. For more 
info about ApacheCon, take a look at http://www.eu.apachecon.com/

Impress your boss with a deeper understanding of Wicket, or 
the new treasure chest of components that have been unveiled 
at the meetup. Meet other Wicket developers and share your 
hopes, victories and frustrations. Expand your network of 
Wicket developers!
 
See you all in Amsterdam beginning of April!
 
-- Arjé Cahn


> ---
> 
> Some background on the Wicket meetup: The Amsterdam meetup is 
> meant for everyone interested in Wicket, on all different 
> expertise levels. If you want to get started with Wicket, or 
> you need some more background information, are an expert 
> committer, or even when you've never even touched a single 
> line of code, you're more than welcome!
> 
> Last year's schedule:
> 
> 12:00 Room opens, Wifi connection, power outlets and coffee 
> available. Walk-in hackaton for whoever likes to join.
> 12:30 Q/A Ask the experts. Got a question for your Wicket 
> project? Feel free to ask!
> 14:00 Terracotta: JVM-level clustering for Wicket - Jonas 
> Bonér 15:00 Opening talk - Arjé Cahn
> 15:15 Apache Wicket: web applications with just Java - 
> Martijn Dashorst
> 15:45 Wicket and Swing from one codebase - Johan Compagner
> 16:15 wicket-contrib-gmap2 - Martin Funk 16:30 Dynamic markup 
> and on the fly components (on binding XML to Wicket) - Wouter 
> Huijnink 17:00 Wicket Portlets primer - Ate Douma 17:30 Break 
> / dinner pasta buffet 18:30 Introduction to Wicket Security - 
> Maurice Marrink 19:00 A plugin architecture for Wicket - 
> Niels van Kampenhout and Wander Grevink 19:30 SessionStores, 
> Pagemaps and Pages.. What does wicket store (and where) - 
> Johan Compagner 20:00 Wicket Live On Stage! A production case 
> study (with lots of AJAX) - Martijn Dashorst 20:30 Closing - Arjé Cahn
> 20:35 Sponsored drinks!
> 23:00 Bar closes
> 
> 
> Arjé Cahn
> Martijn Dashorst
> 
> [1] Photos from previous meetup http://flickr.com/tags/wicketmeetup
> [2] Slides from previous meetup http://www.slideshare.net/tag/wicket

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: File upload weird problem

2008-03-06 Thread Piller Sébastien

Well, I did it, and it worked fine ;) Thank you!

Could you give me a short explaination?


Igor Vaynberg a écrit :

can you try not casting to DiskFileItem and just use FileItem.getinputstrema()?

-igor
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Interesting markup question

2008-03-06 Thread Erik van Oosten
Hi,

I recently tried the following in a panel's markup:



add(new MenuPanel("menu"));

and in MenuPanel.html:

  ...   

Unfortunately the "class" attribute was not put in the result. It was
even silently ignored!

WDYT, is this desired behavior?


FYI, this is my workaround:



add(new MenuPanel("menu"));

and in MenuPanel.html:


 ...  





Regards,
Erik.


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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Upload file

2008-03-06 Thread Nino Saturnino Martinez Vazquez Wael

great:) and np..

Pierre G wrote:

ExternalLink works great with relative path (/DownloadedFiles/file1)
and I was able to access the context path 
using getServletContext().getRealPath("/") in Application.init 


Thanks

Pierre


Nino.Martinez wrote:
  



folder.getFiles()[1].toURL() should give the direct url for the file, now
if you want to serve if through wicket then you got to use resources..
Otherwise just create some externalLinks and that should be it..






  


--
-Wicket for love
-Jme for fun

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Upload file

2008-03-06 Thread Pierre G

ExternalLink works great with relative path (/DownloadedFiles/file1)
and I was able to access the context path 
using getServletContext().getRealPath("/") in Application.init 

Thanks

Pierre


Nino.Martinez wrote:
> 
> 
> 
> 
> folder.getFiles()[1].toURL() should give the direct url for the file, now
> if you want to serve if through wicket then you got to use resources..
> Otherwise just create some externalLinks and that should be it..
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Upload-file-tp15849850p15868265.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]