Re: DropDownChoice/Model Confusion

2010-10-06 Thread Daniel Stoch
The code looks ok. Maybe the problem is in childRecordService:
childRecordService.getList()
when method getList() does not reflect changes until you create a new
session. So maybe the problem is related to your service layer? Have
you checked whet this method returns inside childRecordsModel.load() ?

--
Daniel

On Tue, Oct 5, 2010 at 10:23 PM, Shelli Orton shelli.or...@sjrb.ca wrote:
 This is what my class basically looks like, hope it helps:

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



Re: Forms ajax doesn't update components models

2010-10-06 Thread vov

Sorry, but I'm not see the problems.
Try to debug your isVisible method after submitting the form and find the
place in which this code return false. I think that isVisibleInHierarchy()
for your RequiredTextFieldString(patente) will have a problem
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Forms-ajax-doesn-t-update-components-models-tp2730857p2964459.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Coding - On Software Design Process

2010-10-06 Thread Nivedan Nadaraj
Hi John,

Thanks will wait for the paperback.
Cheers
Niv

On Mon, Oct 4, 2010 at 11:10 PM, John Owen jo...@globalscape.com wrote:

 Or iPhone/iPad.

 -Original Message-
 From: Jonathan Locke [mailto:jonathan.lo...@gmail.com]
 Sent: Saturday, October 02, 2010 7:17 PM
 To: users@wicket.apache.org
 Subject: Re: Coding - On Software Design Process


 You can always read it on your Mac or PC (there's a free Kindle reader).
 Also, there will be a print book. It's just been delayed a bit by some
 printer issues.
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Coding-On-Software-Design-Process-tp2720854p2952828.html
 Sent from the Users forum mailing list archive at Nabble.com.

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


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




Re: Wicket 1.5 and OSGi

2010-10-06 Thread Nico Guba

 On 10/3/2010 1:35 PM, Eike Kettner wrote:

Just want to mention that with this change in wicket 1.5, wicket cannot
be used in OSGi environments as easiliy as wicket 1.4. One usually has
to create a wrapped jar somehow. Maybe this is worth to mention on the
migration guide wiki page?

Maybe this project helps reduce the complexity working with OSGI?

http://wiki.ops4j.org/display/ops4j/Pax+Wicket


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



Getting client IP address

2010-10-06 Thread Josh Kamau
Hi Team;

Is it possible to get the IP address of the client and how?

kind regards.


Re: Getting client IP address

2010-10-06 Thread Altuğ Bilgin Altıntaş
Read with order

1 - http://www.javadb.com/get-users-ip-address
2 - https://cwiki.apache.org/WICKET/raw-httpservletrequest.html

2010/10/6 Josh Kamau joshnet2...@gmail.com

 Hi Team;

 Is it possible to get the IP address of the client and how?

 kind regards.



Re: Getting client IP address

2010-10-06 Thread Richard Nichols
There may be a more correct way of doing it, but this will work -

getWebRequestCycle().getWebRequest().getHttpServletRequest().getRemoteAddr();


On Wed, Oct 6, 2010 at 9:46 PM, Josh Kamau joshnet2...@gmail.com wrote:

 Hi Team;

 Is it possible to get the IP address of the client and how?

 kind regards.




-- 
Richard Nichols
http://www.richardnichols.net/ :: http://onmydoorstep.com.au/


Re: Getting client IP address

2010-10-06 Thread Josh Kamau
Thanks guys, I got the IP address. Is it possible to get the client computer
name? i checked the ClientInfo Object and it doesnt have much.

regards

On Wed, Oct 6, 2010 at 1:58 PM, Richard Nichols r...@visural.com wrote:

 There may be a more correct way of doing it, but this will work -


 getWebRequestCycle().getWebRequest().getHttpServletRequest().getRemoteAddr();


 On Wed, Oct 6, 2010 at 9:46 PM, Josh Kamau joshnet2...@gmail.com wrote:

  Hi Team;
 
  Is it possible to get the IP address of the client and how?
 
  kind regards.
 



 --
 Richard Nichols
 http://www.richardnichols.net/ :: http://onmydoorstep.com.au/



Authorization using PageParameters

2010-10-06 Thread Peter Munro
Hi all,

I'm confused... I'd like to setup authorization for a page, where the
authorization decision is based on the parameters passed to the page. For
example, http://blahblah/MyPage/?date=2010-10-06 would authorize correctly
(show the page), but previous dates would not.

Subclassing MyAuthorisationStrategy and overriding isPageAuthorized(final
ClassT pageClass) doesn't work, since I don't get passed the page
parameters.

What's the best way?

Many thanks,
Peter


AjaxLazyLoadPanel loading component

2010-10-06 Thread N. Metzger

Hi all,

I just don't see it this morning: I have a AjaxLazyLoadPanel to load a big
tree structure which works fine. I see the indicator that it's loading, but
would like to add some words to it, e.g. Loading  So I have
overridden:
public Component getLoadingComponent(String id){
return new Label (id, Loading ...);
}

This works, but now my indicator is gone.
Which would be the correct behavior to attach to the label to show the
little moving circle again?

Thanks,
Natalie
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxLazyLoadPanel-loading-component-tp2964896p2964896.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Initialization/Business Logic code before page loads

2010-10-06 Thread Brown, Berlin [GCG-PFS]
I might have asked a similar question in a previous post but I wanted to
clarify a bit.
 
Where is the best place to put code to initialize the model before a
page renders.  I know of five options, but where do you normally put
this type of initialization.
 
Before a page renders, I want to set the data in my bean/model with
certain attributes that may only be specific to that page. 
 
I think there are five options.
 
1. Add initialization logic in the constructor.  This may work, but I
don't know if the constructor is called for every page call (E.g. when
the page is deserialized)
2. Add init logic in onBeforeRender.  This works and it called for every
request?  But is it the best place?
3. Add init logic in a load or getmodel method in
LoadableDetachableModel class?
4. Add init in previous page on onSubmit method or onEvent. (onSubmit()
{ initBeanInSession(); setResponsePage(); }
5. Pass a model to a panel or page constructor (using pageparameters?)
 
Are any of these best practices or preferred over the other.
 
(a) Page Constructor code with Loadable detachable model:
 
MyPage.java:
...
final FormMyBean form = new FormMyBean(FORM, new
CompoundPropertyModelMyBean(new LoadableDetachableModelMyBean() {
   
   private static final long serialVersionUID = 1L;
   @Override
   protected MyBean load() {
final MyBean app = (MyBean) Session.get().getApp();

?
?
initialize here???
?
return app;
   }   
  };
});
 
???
onBeforeRender() {
   ?? Add initiailize here   
   final MyBean app = (MyBean) Session.get().getApp();
   app.setData(doSomeBusinessLogicHere)
   
}
 
or initModel?
 
---
 
 
 
 
Berlin Brown


Re: AjaxLazyLoadPanel loading component

2010-10-06 Thread Ernesto Reinaldo Barreiro
Haven´t tried this but it might work,

public Component getLoadingComponent(final String markupId)
{
return new Label(markupId, divLoading...img src=\ +

RequestCycle.get().urlFor(AbstractDefaultAjaxBehavior.INDICATOR) +
\//div).setEscapeModelStrings(false);
}

Also you could return a panel instead of a label if you need something
more complicated.

Ernesto


On Wed, Oct 6, 2010 at 3:11 PM, N. Metzger nmetz...@odu.edu wrote:

 Hi all,

 I just don't see it this morning: I have a AjaxLazyLoadPanel to load a big
 tree structure which works fine. I see the indicator that it's loading, but
 would like to add some words to it, e.g. Loading  So I have
 overridden:
 public Component getLoadingComponent(String id){
                return new Label (id, Loading ...);
 }

 This works, but now my indicator is gone.
 Which would be the correct behavior to attach to the label to show the
 little moving circle again?

 Thanks,
 Natalie
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/AjaxLazyLoadPanel-loading-component-tp2964896p2964896.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



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



Re: Authorization using PageParameters

2010-10-06 Thread Martin Grigorov
Try with WebRequestCycle.get().getWebRequest().getParameters() or something
like that.

On Wed, Oct 6, 2010 at 2:53 PM, Peter Munro spelud...@gmail.com wrote:

 Hi all,

 I'm confused... I'd like to setup authorization for a page, where the
 authorization decision is based on the parameters passed to the page. For
 example, http://blahblah/MyPage/?date=2010-10-06 would authorize correctly
 (show the page), but previous dates would not.

 Subclassing MyAuthorisationStrategy and overriding isPageAuthorized(final
 ClassT pageClass) doesn't work, since I don't get passed the page
 parameters.

 What's the best way?

 Many thanks,
 Peter



Re: Initialization/Business Logic code before page loads

2010-10-06 Thread Michael O'Cleirigh

 Hello,

There is a sixth option, look at Component.onInitialize() which was 
added recently (in July 2010) to 1.4.x which lets you initialize the 
component after it has been added to the page.


If you need to access state in the page and aren't passing a model 
through to your component this would be something to investigate.


Regards,

Mike


I might have asked a similar question in a previous post but I wanted to
clarify a bit.

Where is the best place to put code to initialize the model before a
page renders.  I know of five options, but where do you normally put
this type of initialization.

Before a page renders, I want to set the data in my bean/model with
certain attributes that may only be specific to that page.

I think there are five options.

1. Add initialization logic in the constructor.  This may work, but I
don't know if the constructor is called for every page call (E.g. when
the page is deserialized)
2. Add init logic in onBeforeRender.  This works and it called for every
request?  But is it the best place?
3. Add init logic in a load or getmodel method in
LoadableDetachableModel class?
4. Add init in previous page on onSubmit method or onEvent. (onSubmit()
{ initBeanInSession(); setResponsePage(); }
5. Pass a model to a panel or page constructor (using pageparameters?)

Are any of these best practices or preferred over the other.

(a) Page Constructor code with Loadable detachable model:

MyPage.java:
...
final FormMyBean  form = new FormMyBean(FORM, new
CompoundPropertyModelMyBean(new LoadableDetachableModelMyBean() {

private static final long serialVersionUID = 1L;
@Override
protected MyBean load() {
 final MyBean app = (MyBean) Session.get().getApp();

 ?
 ?
 initialize here???
 ?
 return app;
}
   };
});

???
onBeforeRender() {
?? Add initiailize here
final MyBean app = (MyBean) Session.get().getApp();
app.setData(doSomeBusinessLogicHere)

}

or initModel?

---




Berlin Brown




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



Re: AjaxLazyLoadPanel loading component

2010-10-06 Thread N. Metzger

It worked, thanks!!!

Natalie
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxLazyLoadPanel-loading-component-tp2964896p2965012.html
Sent from the Users forum mailing list archive at Nabble.com.

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



RE: AjaxLazyLoadPanel loading component

2010-10-06 Thread John Owen
Pseudocode:

class IndicatingLabel extends Label implements IAjaxIndicatorAware {
private final AjaxIndicatorAppender indicatorAppender;

public IndicatingLabel(...) {
super(...);
add(indicatorAppender = new AjaxIndicatorAppender());
}

public String getAjaxIndicatorMarkupId() {
return indicatorAppender.getMarkupId();
}

}

-Original Message-
From: N. Metzger [mailto:nmetz...@odu.edu] 
Sent: Wednesday, October 06, 2010 8:56 AM
To: users@wicket.apache.org
Subject: Re: AjaxLazyLoadPanel loading component


It worked, thanks!!!

Natalie
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxLazyLoadPanel-loading-component-tp2964896p2965012.html
Sent from the Users forum mailing list archive at Nabble.com.

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


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



Re: Forms ajax doesn't update components models

2010-10-06 Thread Tito
Well thank you!!

I'm going to see this. If I see another details or if I can solve I will
tell you.

Thank you very much for helping!

Bye


2010/10/6 vov vov...@mail.ru


 Sorry, but I'm not see the problems.
 Try to debug your isVisible method after submitting the form and find the
 place in which this code return false. I think that isVisibleInHierarchy()
 for your RequiredTextFieldString(patente) will have a problem
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Forms-ajax-doesn-t-update-components-models-tp2730857p2964459.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




wicket-groovy guru's please help me

2010-10-06 Thread fachhoch

here is my groovy file 

package gov.hhs.acf.web.util;


import java.util.ArrayList;
import java.util.List;


import org.apache.wicket.Component;
import org.apache.wicket.MarkupContainer;
import org.apache.wicket.markup.IMarkupResourceStreamProvider;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.util.resource.IResourceStream;
import org.apache.wicket.util.resource.StringResourceStream;


class UserMenuItems implements MenuItems {


ListComponent components ;


void myInit(){
components= new ArrayListComponent();
components.add (new OMBCircularPanel());
components.add (new SendComments());
}  

@Override
public ListComponent getComponents() {
myInit();
return components;
}


private abstract  class CustomPanel  extends  Panel implements 
IMarkupResourceStreamProvider{
public CustomPanel() {
super(MenuItems.menuItemId);
}
public IResourceStream getMarkupResourceStream(MarkupContainer
container,Class? containerClass){
return new StringResourceStream(getMarkUp());
}

protected abstract String getMarkUp();
}

private  class OMBCircularPanel   extends  CustomPanel {
public OMBCircularPanel() {
super();
}
@Override
protected String getMarkUp() {
return 
wicket:panel

http://www.whitehouse.gov/sites/default/files/omb/assets/a133/a133_revised_2007.pdf
A-133 OMB Circular 
/wicket:panel
;
}
}

private  class SendComments   extendsCustomPanel  {
public SendComments() {
super();
}
@Override
protected String getMarkUp() {
return 
wicket:panel
 mailto:comme...@gmail.com Send 
Comments 
/wicket:panel
;
}
}

}



this is a simple class creating some wicket panels . 

When I  call getComponents , I get this exception 

Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at
gov.hhs.acf.web.util.UserMenuItems$OMBCircularPanel.init(UserMenuItems.groovy:48)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
at
org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:107)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:52)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:192)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:200)
at gov.hhs.acf.web.util.UserMenuItems.myInit(UserMenuItems.groovy:24)
at gov.hhs.acf.web.util.UserMenuItems$myInit.callCurrent(Unknown Source)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:147)
at
gov.hhs.acf.web.util.UserMenuItems.getComponents(UserMenuItems.groovy:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:416)
at org.apache.wicket.proxy.$Proxy142.getComponents(Unknown Source)
at gov.hhs.acf.web.pages.common.BasePage.basePageInit(BasePage.java:164)
at gov.hhs.acf.web.pages.common.BasePage.init(BasePage.java:60)
at gov.hhs.acf.web.pages.common.HomePage.init(HomePage.java:40)
... 48 more



please somebody help me what is the 

Problem using wicket-extensions

2010-10-06 Thread chitrabhanu.das

Hi all,   I am trying to add DataTable into my wicket application. But I am
facing is problem doing that. And the fact is that it is not giving coding
related error. After adding wicket-extensions1.4.3.jar I am getting the
following error:



java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at
org.apache.wicket.extensions.ajax.markup.html.form.upload.UploadProgressBar.clinit(UploadProgressBar.java:42)
at
org.apache.wicket.extensions.ajax.markup.html.form.upload.UploadProgressBar$ComponentInitializer.init(UploadProgressBar.java:55)
at org.apache.wicket.extensions.Initializer.init(Initializer.java:36)
at org.apache.wicket.Application.callInitializers(Application.java:844)
at 
org.apache.wicket.Application.initializeComponents(Application.java:679)
at 
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:714)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
at 
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
at org.mortbay.jetty.Server.doStart(Server.java:220)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at nic.fts.Start.main(Start.java:35)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at
org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366)
at
org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 18 more
ERROR - log- failed
org.mortbay.jetty.webapp.webappcont...@54777e{/,src/main/webapp}



sl4j jar is added to the classpath. Is it a jar conflict??? 
Any help will be highly appreciated Thanx.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-using-wicket-extensions-tp2965023p2965023.html
Sent from the Users forum mailing list archive at Nabble.com.

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



RE: DropDownChoice/Model Confusion

2010-10-06 Thread Shelli Orton
No, the getList() (called in the LDM load()) is only called once.  For the 
buttons add, edit and delete, the processng is like this:

- ldm.load() (which calls getList())
- button.onSubmit()
- ldm.detach() (called two times)

For the save button, the processing is:

- button.onSubmit()
- ldm.load()
- ldm.detach() (called two times)

I've discovered another anomaly in my code.  When I choose a record and click 
the edit button, the record is displayed in the edit group.  If I then choose 
cancel, the edit group is no longer displayed and the ddc selection is null. I 
then choose another record from the list and edit and the previous record 
information is displayed in the edit group even though the ddc shows the newly 
selected record.

I added get/set for the selectedRecord and set breakpoints, but those methods 
are never called.  Since the edit group components use PropertyModels, 
shouldn't the get method be called each time the page is submitted?

Shelli


-Original Message-
From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On 
Behalf Of James Carman
Sent: Tuesday, October 05, 2010 4:50 PM
To: users@wicket.apache.org
Subject: Re: DropDownChoice/Model Confusion

Is your getList() being called multiple times?

On Tue, Oct 5, 2010 at 6:37 PM, Shelli Orton shelli.or...@sjrb.ca wrote:
 I overrode the detach method in my class (which simply calls super.detach()) 
 so I could set a breakpoint and see if it gets called and it does.

 Shelli

 -Original Message-
 From: Shelli Orton
 Sent: Tuesday, October 05, 2010 2:24 PM
 To: users@wicket.apache.org
 Subject: RE: DropDownChoice/Model Confusion

 I don't know how to determine that.

 -Original Message-
 From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On 
 Behalf Of James Carman
 Sent: Tuesday, October 05, 2010 1:44 PM
 To: users@wicket.apache.org
 Subject: Re: DropDownChoice/Model Confusion

 Is it being detached?

 On Tue, Oct 5, 2010 at 3:26 PM, Shelli Orton shelli.or...@sjrb.ca wrote:
 No, I'm not using AJAX.  Is there a way to force the LDB to reload?

 Shelli

 -Original Message-
 From: jcgarciam [mailto:jcgarc...@gmail.com]
 Sent: Tuesday, October 05, 2010 12:52 PM
 To: users@wicket.apache.org
 Subject: Re: DropDownChoice/Model Confusion


 I dont think it may be related to the hierarchy, are you using AJAX?

 On Tue, Oct 5, 2010 at 2:38 PM, Shelli Orton [via Apache Wicket] 
 ml-node+2956527-385265518-65...@n4.nabble.comml-node%2B2956527-38526551
 8-65...@n4.nabble.com
 wrote:

 Hmm, that code sort of works.  When I create or edit a record, the
 list
 is updated.  However, when I delete a record it is not.  My component
 hierarchy is set up like this (hope it makes sense):

 TabPanel
   - SelectForEditForm
     - MyRecords (DDC)
     - Add (Button)
     - Edit (Button)
     - Delete (Button)
   - EditGroup (WebMarkupContainer)
     - EditForm
       - MyRecord Name (TextField)
       - MyRecord Attribute (DDC)
       - Save (Button)
       - Cancel (Button)

 I created the EditGroup so that I can hide/display the edit panel.
 Debugging the application shows that the save button onSubmit is
 called
 before the update of the myRecordsModel LDM and this is why the list
 is
 updated when I create/edit a record. The delete button onSubmit is
 called after the update of the myRecordsModel LDM and that is why a
 deleted record is still visible in the list.

 I think the issue has something to do with the buttons being in
 different places in the component hierarchy. Can you provide any
 guidance on if there's some way to have the LDM updated after the
 delete
 onSubmit?

 Thanks again,
 Shelli

 -Original Message-
 From: jcgarciam [mailto:[hidden
 email]http://user/SendEmail.jtp?type=nodenode=2956527i=0]

 Sent: Tuesday, October 05, 2010 9:33 AM
 To: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=2956527i=1
 Subject: Re: DropDownChoice/Model Confusion


 Yes, that should make your DDC to query the list any time it needs to
 re
 render.

 To your 2nd. question in order to set a default or selected value,
 just
 set
 a MyRecord reference to your property, keep in mind that your
 MyRecord
 should implement and equals/hashcode correctly.


 On Tue, Oct 5, 2010 at 12:00 PM, Shelli Orton [via Apache Wicket] 
 [hidden email]
 http://user/SendEmail.jtp?type=nodenode=2956527i=2ml-node%2B2956214
 -1797994

 [hidden email] http://user/SendEmail.jtp?type=nodenode=2956527i=3
  wrote:

  Hi,
 
  Thanks for replying.  Just to clarify, do you mean do something like
  this:
 
 
      LoadableDetachableModelListMyRecord myRecordsModel = new
  LoadableDetachableModelListMyRecord()
      {
          @Override
          protected ListMyRecord load()
          {
              return myRecordService.getList();
          }
      };
 
      MyRecord selectedRecord;
 
      form.add(new DropDownChoiceMyRecord(records,
          new PropertyModelMyRecord(this, selectedRecord),
          

Re: DropDownChoice/Model Confusion

2010-10-06 Thread James Carman
I meant between requests

On Wed, Oct 6, 2010 at 11:41 AM, Shelli Orton shelli.or...@sjrb.ca wrote:
 No, the getList() (called in the LDM load()) is only called once.  For the 
 buttons add, edit and delete, the processng is like this:

 - ldm.load() (which calls getList())
 - button.onSubmit()
 - ldm.detach() (called two times)

 For the save button, the processing is:

 - button.onSubmit()
 - ldm.load()
 - ldm.detach() (called two times)

 I've discovered another anomaly in my code.  When I choose a record and click 
 the edit button, the record is displayed in the edit group.  If I then choose 
 cancel, the edit group is no longer displayed and the ddc selection is null. 
 I then choose another record from the list and edit and the previous record 
 information is displayed in the edit group even though the ddc shows the 
 newly selected record.

 I added get/set for the selectedRecord and set breakpoints, but those methods 
 are never called.  Since the edit group components use PropertyModels, 
 shouldn't the get method be called each time the page is submitted?

 Shelli


 -Original Message-
 From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On 
 Behalf Of James Carman
 Sent: Tuesday, October 05, 2010 4:50 PM
 To: users@wicket.apache.org
 Subject: Re: DropDownChoice/Model Confusion

 Is your getList() being called multiple times?

 On Tue, Oct 5, 2010 at 6:37 PM, Shelli Orton shelli.or...@sjrb.ca wrote:
 I overrode the detach method in my class (which simply calls super.detach()) 
 so I could set a breakpoint and see if it gets called and it does.

 Shelli

 -Original Message-
 From: Shelli Orton
 Sent: Tuesday, October 05, 2010 2:24 PM
 To: users@wicket.apache.org
 Subject: RE: DropDownChoice/Model Confusion

 I don't know how to determine that.

 -Original Message-
 From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On 
 Behalf Of James Carman
 Sent: Tuesday, October 05, 2010 1:44 PM
 To: users@wicket.apache.org
 Subject: Re: DropDownChoice/Model Confusion

 Is it being detached?

 On Tue, Oct 5, 2010 at 3:26 PM, Shelli Orton shelli.or...@sjrb.ca wrote:
 No, I'm not using AJAX.  Is there a way to force the LDB to reload?

 Shelli

 -Original Message-
 From: jcgarciam [mailto:jcgarc...@gmail.com]
 Sent: Tuesday, October 05, 2010 12:52 PM
 To: users@wicket.apache.org
 Subject: Re: DropDownChoice/Model Confusion


 I dont think it may be related to the hierarchy, are you using AJAX?

 On Tue, Oct 5, 2010 at 2:38 PM, Shelli Orton [via Apache Wicket] 
 ml-node+2956527-385265518-65...@n4.nabble.comml-node%2B2956527-38526551
 8-65...@n4.nabble.com
 wrote:

 Hmm, that code sort of works.  When I create or edit a record, the
 list
 is updated.  However, when I delete a record it is not.  My component
 hierarchy is set up like this (hope it makes sense):

 TabPanel
   - SelectForEditForm
     - MyRecords (DDC)
     - Add (Button)
     - Edit (Button)
     - Delete (Button)
   - EditGroup (WebMarkupContainer)
     - EditForm
       - MyRecord Name (TextField)
       - MyRecord Attribute (DDC)
       - Save (Button)
       - Cancel (Button)

 I created the EditGroup so that I can hide/display the edit panel.
 Debugging the application shows that the save button onSubmit is
 called
 before the update of the myRecordsModel LDM and this is why the list
 is
 updated when I create/edit a record. The delete button onSubmit is
 called after the update of the myRecordsModel LDM and that is why a
 deleted record is still visible in the list.

 I think the issue has something to do with the buttons being in
 different places in the component hierarchy. Can you provide any
 guidance on if there's some way to have the LDM updated after the
 delete
 onSubmit?

 Thanks again,
 Shelli

 -Original Message-
 From: jcgarciam [mailto:[hidden
 email]http://user/SendEmail.jtp?type=nodenode=2956527i=0]

 Sent: Tuesday, October 05, 2010 9:33 AM
 To: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=2956527i=1
 Subject: Re: DropDownChoice/Model Confusion


 Yes, that should make your DDC to query the list any time it needs to
 re
 render.

 To your 2nd. question in order to set a default or selected value,
 just
 set
 a MyRecord reference to your property, keep in mind that your
 MyRecord
 should implement and equals/hashcode correctly.


 On Tue, Oct 5, 2010 at 12:00 PM, Shelli Orton [via Apache Wicket] 
 [hidden email]
 http://user/SendEmail.jtp?type=nodenode=2956527i=2ml-node%2B2956214
 -1797994

 [hidden email] http://user/SendEmail.jtp?type=nodenode=2956527i=3
  wrote:

  Hi,
 
  Thanks for replying.  Just to clarify, do you mean do something like
  this:
 
 
      LoadableDetachableModelListMyRecord myRecordsModel = new
  LoadableDetachableModelListMyRecord()
      {
          @Override
          protected ListMyRecord load()
          {
              return myRecordService.getList();
          }
      };
 
      MyRecord selectedRecord;

RE: DropDownChoice/Model Confusion

2010-10-06 Thread Shelli Orton
The childRecordService is a stateless JPA bean and the getList method
executes a named query on the database.  The logs show that the SQL to
retrieve the list from the db is called every time (i.e. no caching).

Shelli

-Original Message-
From: Daniel Stoch [mailto:daniel.st...@gmail.com] 
Sent: Wednesday, October 06, 2010 1:37 AM
To: users@wicket.apache.org
Subject: Re: DropDownChoice/Model Confusion

The code looks ok. Maybe the problem is in childRecordService:
childRecordService.getList()
when method getList() does not reflect changes until you create a new
session. So maybe the problem is related to your service layer? Have
you checked whet this method returns inside childRecordsModel.load() ?

--
Daniel

On Tue, Oct 5, 2010 at 10:23 PM, Shelli Orton shelli.or...@sjrb.ca
wrote:
 This is what my class basically looks like, hope it helps:

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


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



RE: DropDownChoice/Model Confusion

2010-10-06 Thread Shelli Orton
I don't understand what you mean by between requests.

-Original Message-
From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On 
Behalf Of James Carman
Sent: Wednesday, October 06, 2010 9:43 AM
To: users@wicket.apache.org
Subject: Re: DropDownChoice/Model Confusion

I meant between requests

On Wed, Oct 6, 2010 at 11:41 AM, Shelli Orton shelli.or...@sjrb.ca wrote:
 No, the getList() (called in the LDM load()) is only called once.  For the 
 buttons add, edit and delete, the processng is like this:

 - ldm.load() (which calls getList())
 - button.onSubmit()
 - ldm.detach() (called two times)

 For the save button, the processing is:

 - button.onSubmit()
 - ldm.load()
 - ldm.detach() (called two times)

 I've discovered another anomaly in my code.  When I choose a record and click 
 the edit button, the record is displayed in the edit group.  If I then choose 
 cancel, the edit group is no longer displayed and the ddc selection is null. 
 I then choose another record from the list and edit and the previous record 
 information is displayed in the edit group even though the ddc shows the 
 newly selected record.

 I added get/set for the selectedRecord and set breakpoints, but those methods 
 are never called.  Since the edit group components use PropertyModels, 
 shouldn't the get method be called each time the page is submitted?

 Shelli


 -Original Message-
 From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On 
 Behalf Of James Carman
 Sent: Tuesday, October 05, 2010 4:50 PM
 To: users@wicket.apache.org
 Subject: Re: DropDownChoice/Model Confusion

 Is your getList() being called multiple times?

 On Tue, Oct 5, 2010 at 6:37 PM, Shelli Orton shelli.or...@sjrb.ca wrote:
 I overrode the detach method in my class (which simply calls super.detach()) 
 so I could set a breakpoint and see if it gets called and it does.

 Shelli

 -Original Message-
 From: Shelli Orton
 Sent: Tuesday, October 05, 2010 2:24 PM
 To: users@wicket.apache.org
 Subject: RE: DropDownChoice/Model Confusion

 I don't know how to determine that.

 -Original Message-
 From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On 
 Behalf Of James Carman
 Sent: Tuesday, October 05, 2010 1:44 PM
 To: users@wicket.apache.org
 Subject: Re: DropDownChoice/Model Confusion

 Is it being detached?

 On Tue, Oct 5, 2010 at 3:26 PM, Shelli Orton shelli.or...@sjrb.ca wrote:
 No, I'm not using AJAX.  Is there a way to force the LDB to reload?

 Shelli

 -Original Message-
 From: jcgarciam [mailto:jcgarc...@gmail.com]
 Sent: Tuesday, October 05, 2010 12:52 PM
 To: users@wicket.apache.org
 Subject: Re: DropDownChoice/Model Confusion


 I dont think it may be related to the hierarchy, are you using AJAX?

 On Tue, Oct 5, 2010 at 2:38 PM, Shelli Orton [via Apache Wicket] 
 ml-node+2956527-385265518-65...@n4.nabble.comml-node%2B2956527-38526551
 8-65...@n4.nabble.com
 wrote:

 Hmm, that code sort of works.  When I create or edit a record, the
 list
 is updated.  However, when I delete a record it is not.  My component
 hierarchy is set up like this (hope it makes sense):

 TabPanel
   - SelectForEditForm
     - MyRecords (DDC)
     - Add (Button)
     - Edit (Button)
     - Delete (Button)
   - EditGroup (WebMarkupContainer)
     - EditForm
       - MyRecord Name (TextField)
       - MyRecord Attribute (DDC)
       - Save (Button)
       - Cancel (Button)

 I created the EditGroup so that I can hide/display the edit panel.
 Debugging the application shows that the save button onSubmit is
 called
 before the update of the myRecordsModel LDM and this is why the list
 is
 updated when I create/edit a record. The delete button onSubmit is
 called after the update of the myRecordsModel LDM and that is why a
 deleted record is still visible in the list.

 I think the issue has something to do with the buttons being in
 different places in the component hierarchy. Can you provide any
 guidance on if there's some way to have the LDM updated after the
 delete
 onSubmit?

 Thanks again,
 Shelli

 -Original Message-
 From: jcgarciam [mailto:[hidden
 email]http://user/SendEmail.jtp?type=nodenode=2956527i=0]

 Sent: Tuesday, October 05, 2010 9:33 AM
 To: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=2956527i=1
 Subject: Re: DropDownChoice/Model Confusion


 Yes, that should make your DDC to query the list any time it needs to
 re
 render.

 To your 2nd. question in order to set a default or selected value,
 just
 set
 a MyRecord reference to your property, keep in mind that your
 MyRecord
 should implement and equals/hashcode correctly.


 On Tue, Oct 5, 2010 at 12:00 PM, Shelli Orton [via Apache Wicket] 
 [hidden email]
 http://user/SendEmail.jtp?type=nodenode=2956527i=2ml-node%2B2956214
 -1797994

 [hidden email] http://user/SendEmail.jtp?type=nodenode=2956527i=3
  wrote:

  Hi,
 
  Thanks for replying.  Just to clarify, do you mean do something like

Re: Initialization/Business Logic code before page loads

2010-10-06 Thread Igor Vaynberg
and if you need it called before *every* render, there is component#onconfigure

-igor

On Wed, Oct 6, 2010 at 6:39 AM, Michael O'Cleirigh
michael.ocleir...@rivulet.ca wrote:
  Hello,

 There is a sixth option, look at Component.onInitialize() which was added
 recently (in July 2010) to 1.4.x which lets you initialize the component
 after it has been added to the page.

 If you need to access state in the page and aren't passing a model through
 to your component this would be something to investigate.

 Regards,

 Mike

 I might have asked a similar question in a previous post but I wanted to
 clarify a bit.

 Where is the best place to put code to initialize the model before a
 page renders.  I know of five options, but where do you normally put
 this type of initialization.

 Before a page renders, I want to set the data in my bean/model with
 certain attributes that may only be specific to that page.

 I think there are five options.

 1. Add initialization logic in the constructor.  This may work, but I
 don't know if the constructor is called for every page call (E.g. when
 the page is deserialized)
 2. Add init logic in onBeforeRender.  This works and it called for every
 request?  But is it the best place?
 3. Add init logic in a load or getmodel method in
 LoadableDetachableModel class?
 4. Add init in previous page on onSubmit method or onEvent. (onSubmit()
 { initBeanInSession(); setResponsePage(); }
 5. Pass a model to a panel or page constructor (using pageparameters?)

 Are any of these best practices or preferred over the other.

 (a) Page Constructor code with Loadable detachable model:

 MyPage.java:
 ...
 final FormMyBean  form = new FormMyBean(FORM, new
 CompoundPropertyModelMyBean(new LoadableDetachableModelMyBean() {

    private static final long serialVersionUID = 1L;
   �...@override
    protected MyBean load() {
     final MyBean app = (MyBean) Session.get().getApp();

     ?
     ?
     initialize here???
     ?
     return app;
    }
   };
 });

 ???
 onBeforeRender() {
    ?? Add initiailize here
    final MyBean app = (MyBean) Session.get().getApp();
    app.setData(doSomeBusinessLogicHere)

 }

 or initModel?

 ---




 Berlin Brown



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



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



Re: Authorization using PageParameters

2010-10-06 Thread Peter Munro
Huge thanks to both Eike and Martin.

They both work, so I'm figuring out the best approach. I'll probably go with
Martin's.
BTW, for anyone googling the archive, either:

   - WebRequestCycle.get().getPageParameters(), or
   - WebRequestCycle.get().getRequest().getParameter(myparam)

will do the trick.

Thanks again,
Peter


On Wed, Oct 6, 2010 at 2:32 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 Try with WebRequestCycle.get().getWebRequest().getParameters() or something
 like that.

 On Wed, Oct 6, 2010 at 2:53 PM, Peter Munro spelud...@gmail.com wrote:

  Hi all,
 
  I'm confused... I'd like to setup authorization for a page, where the
  authorization decision is based on the parameters passed to the page. For
  example, http://blahblah/MyPage/?date=2010-10-06 would authorize
 correctly
  (show the page), but previous dates would not.
 
  Subclassing MyAuthorisationStrategy and overriding isPageAuthorized(final
  ClassT pageClass) doesn't work, since I don't get passed the page
  parameters.
 
  What's the best way?
 
  Many thanks,
  Peter
 



Inheritance and wicket:child / inside a component tag (Wicket 1.5)

2010-10-06 Thread Alexander Morozov

Hi,

ParentPage.html:
div wicket:id=wrapper
  wicket:child/
/div

I know how it can be achieved in Wicket 1.4 (WebMarkupContainer with
overrided isTransparentResolver), but I cannot get the same behavior in case
of Wicket 1.5.

Wicket gurus, I need your advice :)

Thanks

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Inheritance-and-wicket-child-inside-a-component-tag-Wicket-1-5-tp2965286p2965286.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: isTemporary behavior + ajax behavior

2010-10-06 Thread Michal Kurtak
Hi,

Jira issue created with quickstart:

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

br,
michal

2010/10/5 Igor Vaynberg igor.vaynb...@gmail.com:
 hrm. this was fixed in 1.4.x a good while back. maybe it never got
 ported to trunk. please create a jira issue and attach a quickstart.

 -igor

 On Mon, Oct 4, 2010 at 4:49 AM, Michal Kurtak michal.kur...@gmail.com wrote:
 Hi,

 I think its a bug but i am not sure. My scenario:
 1. Component has 2 behaviors: first is temporary and second is ajax behavior.
 2. Url for Ajax behavior contains behavior's index (e.g.
 ../page?1-1.IBehaviorListener.1-form-text)
 2. Temporary behavior is removed in detachBehaviors method.
 3. Ajax request is invoking ListenerInterfaceRequestHandler and it's
 looking for behavior on non-existing index

 This scenario causes error on wicket 1.5-M2.1

 br,
 Michal

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



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



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



ApacheCon 2010

2010-10-06 Thread Nelson Segura
According to this link http://na.apachecon.com/c/acna2010/schedule/grid,
there will be Wicket training in the ApacheCon NA 2010.
But I can't find a way to register for it. Is the training really on or is
it just a mistake on scheduling?
-Nelson


Re: Inheritance and wicket:child / inside a component tag (Wicket 1.5)

2010-10-06 Thread Igor Vaynberg
jira+quickstart

-igor

On Wed, Oct 6, 2010 at 9:14 AM, Alexander Morozov
alexander.v.moro...@gmail.com wrote:

 Hi,

 ParentPage.html:
 div wicket:id=wrapper
  wicket:child/
 /div

 I know how it can be achieved in Wicket 1.4 (WebMarkupContainer with
 overrided isTransparentResolver), but I cannot get the same behavior in case
 of Wicket 1.5.

 Wicket gurus, I need your advice :)

 Thanks

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Inheritance-and-wicket-child-inside-a-component-tag-Wicket-1-5-tp2965286p2965286.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



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



RE: DropDownChoice/Model Confusion

2010-10-06 Thread Shelli Orton
By removing the call to setDefaultFormProcessing(false) on the cancel button, 
the edit group is now updated as per the selection from the ddc.

However, I'm still having the ldm loading issue.  Can anyone provide any 
insight into why when the save button is clicked that the onSubmit method is 
called before the ldm.load, but the onSubmit is called after the ldm.load for 
the delete button?

Thanks for all the help!

Shelli

-Original Message-
From: Shelli Orton 
Sent: Wednesday, October 06, 2010 9:41 AM
To: users@wicket.apache.org
Subject: RE: DropDownChoice/Model Confusion

No, the getList() (called in the LDM load()) is only called once.  For the 
buttons add, edit and delete, the processng is like this:

- ldm.load() (which calls getList())
- button.onSubmit()
- ldm.detach() (called two times)

For the save button, the processing is:

- button.onSubmit()
- ldm.load()
- ldm.detach() (called two times)

I've discovered another anomaly in my code.  When I choose a record and click 
the edit button, the record is displayed in the edit group.  If I then choose 
cancel, the edit group is no longer displayed and the ddc selection is null. I 
then choose another record from the list and edit and the previous record 
information is displayed in the edit group even though the ddc shows the newly 
selected record.

I added get/set for the selectedRecord and set breakpoints, but those methods 
are never called.  Since the edit group components use PropertyModels, 
shouldn't the get method be called each time the page is submitted?

Shelli


-Original Message-
From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On 
Behalf Of James Carman
Sent: Tuesday, October 05, 2010 4:50 PM
To: users@wicket.apache.org
Subject: Re: DropDownChoice/Model Confusion

Is your getList() being called multiple times?

On Tue, Oct 5, 2010 at 6:37 PM, Shelli Orton shelli.or...@sjrb.ca wrote:
 I overrode the detach method in my class (which simply calls super.detach()) 
 so I could set a breakpoint and see if it gets called and it does.

 Shelli

 -Original Message-
 From: Shelli Orton
 Sent: Tuesday, October 05, 2010 2:24 PM
 To: users@wicket.apache.org
 Subject: RE: DropDownChoice/Model Confusion

 I don't know how to determine that.

 -Original Message-
 From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On 
 Behalf Of James Carman
 Sent: Tuesday, October 05, 2010 1:44 PM
 To: users@wicket.apache.org
 Subject: Re: DropDownChoice/Model Confusion

 Is it being detached?

 On Tue, Oct 5, 2010 at 3:26 PM, Shelli Orton shelli.or...@sjrb.ca wrote:
 No, I'm not using AJAX.  Is there a way to force the LDB to reload?

 Shelli

 -Original Message-
 From: jcgarciam [mailto:jcgarc...@gmail.com]
 Sent: Tuesday, October 05, 2010 12:52 PM
 To: users@wicket.apache.org
 Subject: Re: DropDownChoice/Model Confusion


 I dont think it may be related to the hierarchy, are you using AJAX?

 On Tue, Oct 5, 2010 at 2:38 PM, Shelli Orton [via Apache Wicket] 
 ml-node+2956527-385265518-65...@n4.nabble.comml-node%2B2956527-38526551
 8-65...@n4.nabble.com
 wrote:

 Hmm, that code sort of works.  When I create or edit a record, the
 list
 is updated.  However, when I delete a record it is not.  My component
 hierarchy is set up like this (hope it makes sense):

 TabPanel
   - SelectForEditForm
     - MyRecords (DDC)
     - Add (Button)
     - Edit (Button)
     - Delete (Button)
   - EditGroup (WebMarkupContainer)
     - EditForm
       - MyRecord Name (TextField)
       - MyRecord Attribute (DDC)
       - Save (Button)
       - Cancel (Button)

 I created the EditGroup so that I can hide/display the edit panel.
 Debugging the application shows that the save button onSubmit is
 called
 before the update of the myRecordsModel LDM and this is why the list
 is
 updated when I create/edit a record. The delete button onSubmit is
 called after the update of the myRecordsModel LDM and that is why a
 deleted record is still visible in the list.

 I think the issue has something to do with the buttons being in
 different places in the component hierarchy. Can you provide any
 guidance on if there's some way to have the LDM updated after the
 delete
 onSubmit?

 Thanks again,
 Shelli

 -Original Message-
 From: jcgarciam [mailto:[hidden
 email]http://user/SendEmail.jtp?type=nodenode=2956527i=0]

 Sent: Tuesday, October 05, 2010 9:33 AM
 To: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=2956527i=1
 Subject: Re: DropDownChoice/Model Confusion


 Yes, that should make your DDC to query the list any time it needs to
 re
 render.

 To your 2nd. question in order to set a default or selected value,
 just
 set
 a MyRecord reference to your property, keep in mind that your
 MyRecord
 should implement and equals/hashcode correctly.


 On Tue, Oct 5, 2010 at 12:00 PM, Shelli Orton [via Apache Wicket] 
 [hidden email]
 

wicket 1.4.12 cannot cast to org.apache.wicket.protocol.http.WebApplication

2010-10-06 Thread cablepuff

Hi i have the following in my web.xml 


filter
filter-namewicket.filter/filter-name

filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
init-param
param-nameapplicationFactoryClassName/param-name

param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value
/init-param
init-param
param-nameapplicationBean/param-name
param-valueauthenticatedApplication/param-value
/init-param
init-param
param-nameconfiguration/param-name
param-valuedeployment/param-value
/init-param
init-param
param-namecontextConfigLocation/param-name

param-valueclasspath:applicationContext.xml/param-value
   /init-param
/filter


in my applicationContext.xml i have this define

bean id=authenticatedApplication
class=com.myapp.MyAuthenticatedApplication/

my MyAuthenticatedApplication extends AuthenticatedWebApplication ...


so i get this error. 

java.lang.ClassCastException: $Proxy35 cannot be cast to
org.apache.wicket.protocol.http.WebApplication
at
org.apache.wicket.spring.SpringWebApplicationFactory.createApplication(SpringWebApplicationFactory.java:150)
at
org.apache.wicket.spring.SpringWebApplicationFactory.createApplication(SpringWebApplicationFactory.java:143)
at 
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:706)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:287)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
at
org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:115)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4001)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4651)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:519)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)


What is wrong? 

i am using wicket-ioc 1.4.12 and wicket-auth-roles 1.4.12.

P.S. i already try applicationClassName with value of
com.myapp.MyAuthenticatedApplication and i get no bean of type
org.apache.wicket.protocol.http.WebApplication found.  

Thanks, 

Chun Ping Wang.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-1-4-12-cannot-cast-to-org-apache-wicket-protocol-http-WebApplication-tp2965438p2965438.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: ApacheCon 2010

2010-10-06 Thread Jeremy Thomerson
It was canceled due to a scheduling conflict - I have to be on-site at one
of my large clients that week. Sorry :)

Jeremy Thomerson
http://wickettraining.com
-- sent from my smart phone, so please excuse spelling, formatting, or
compiler errors

On Oct 6, 2010 11:53 AM, Nelson Segura nsegu...@gmail.com wrote:

According to this link http://na.apachecon.com/c/acna2010/schedule/grid,
there will be Wicket training in the ApacheCon NA 2010.
But I can't find a way to register for it. Is the training really on or is
it just a mistake on scheduling?
-Nelson


Re: ApacheCon 2010

2010-10-06 Thread Nelson Segura
Jeremy,
Thanks for your answer. Please let me know next time you offer training, so
we can have some people attend :D
-Nelson

On Wed, Oct 6, 2010 at 12:34 PM, Jeremy Thomerson jer...@wickettraining.com
 wrote:

 It was canceled due to a scheduling conflict - I have to be on-site at one
 of my large clients that week. Sorry :)

 Jeremy Thomerson
 http://wickettraining.com
 -- sent from my smart phone, so please excuse spelling, formatting, or
 compiler errors

 On Oct 6, 2010 11:53 AM, Nelson Segura nsegu...@gmail.com wrote:

 According to this link http://na.apachecon.com/c/acna2010/schedule/grid,
 there will be Wicket training in the ApacheCon NA 2010.
 But I can't find a way to register for it. Is the training really on or is
 it just a mistake on scheduling?
 -Nelson



Re: chrome + wicket ajax + back button = problem?

2010-10-06 Thread MZemeck
I've had similar issues, have you tried  HybridUrlCodingStrategy?



Notice: This communication, including any attachments, is intended solely 
for the use of the individual or entity to which it is addressed. This 
communication may contain information that is protected from disclosure 
under State and/or Federal law. Please notify the sender immediately if 
you have received this communication in error and delete this email from 
your system. If you are not the intended recipient, you are requested not 
to disclose, copy, distribute or take any action in reliance on the 
contents of this information.

PropertyModel Not Refreshing

2010-10-06 Thread Shelli Orton
Hi,

First, thanks to all who have been helping me as I am new to Wicket.  I
am splitting out two issues I am dealing with to try to keep things
clear.

I am trying to write a simple app that does CRUD operations on database
records.  The goal is for the app to make use of a tab panel where each
tab encapsulates one table from the database.  Each tab panel has two
groups (WebMarkupContainer).  The first, selectGroup, displays a list
(DDC) of the current items, and three buttons, add, edit and delete.
The second, editGroup, is displayed when either the add or edit button
was clicked on the select group, displays the record attributes and save
and cancel buttons.  The tab panel has a selectedRecord which is used
by both groups' components via PropertyModels. Very basic stuff.

When I choose a record and click the edit button, the record is
displayed in the edit group properly.  If I then choose cancel, the edit
group is no longer displayed and the select group DDC selection is null
as expected. I then choose another record from the list and click the
edit button and the previous record information is displayed in the edit
group even though the select group DDC shows the correct/selected
record.

This problem also occurs if I first choose to add a new record and then
cancel the add and then choose to edit a different record.  The DDC
shows the correct/selected record, but all the attributes in the edit
group are null/defaults for a new record.

If I remove the call to setDefaultFormProcessing(false) on the cancel
button, selecting other records for edit works correctly, but I can't
cancel a creating a new record if I use a RequiredTextField because the
form validation fails.

If I select a record for editing or save the newly created record, I can
select a different record for edit or create another one correctly.  So
I must be doing something wrong in the cancel logic. My editForm
(created in the EditGroup constructor) looks like this:

Form editForm = new Form(editForm);

editForm.add(new Label(nameLabel, Name));

editForm.add(new Label(attributeLabel, Attribute));

editForm.add(new RequiredTextFieldString(recordNameText,
new PropertyModelString(MyRecordPanel.this,
selectedRecord.name)));

editForm.add(new DropDownChoiceLir(attributes,
new PropertyModelAttribute(MyRecordPanel.this,
selectedRecord.attribute),
RateCentrePanel.this.getAttributes(),
new AttributeRenderer()));



editForm.add(new Button(cancel)
{
private static final long serialVersionUID = 1L;

public void onSubmit()
{
MyRecordPanel.this.selectedRecord = null;
editGroup.setVisible(false);
selectGroup.setVisible(true);
}
}.setDefaultFormProcessing(false));

add(editForm);

Other than setting the selectedRecord to null, what should I be doing
differently?

Thanks in advance!

Shelli

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



Processing Flow for Button onSubmit and LDM load

2010-10-06 Thread Shelli Orton
Hi,

Again, thanks to all who have been helping me as I am new to Wicket.  I
am splitting out two issues I am dealing with to try to keep things
clear.

I am trying to write a simple app that does CRUD operations on database
records.  The goal is for the app to make use of a tab panel where each
tab encapsulates one table from the database.  Each tab panel has two
groups (WebMarkupContainer).  The first, selectGroup, displays a list
(DDC) of the current items, and three buttons, add, edit and delete.
The DDC uses a LDM to get the list of records so that changes to the
records are reflected on each request.  

When the save button is clicked the onSubmit method is called, then the
LDM load method and then the detach method (twice).  Therefore the
changes are reflected in the list when the page refreshes.

However, when the delete button is clicked, the LDM load and detach
methods are called and then the button's onSubmit.  Therefore the
changes are not reflected in the list.  This same flow is followed by
the cancel and add buttons, but since there are no changes made, it
doesn't make a practical difference in those cases.

Is it weird that the onSubmit is called before the LDM load and detach
methods for one button and after for another?  Which is the expected
processing flow?  Is there any way to change it so that the delete
process matches the save process?

Thanks in advance!

Shelli

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



Re: Putting HTML files in src/main/webapp

2010-10-06 Thread Avraham Rosenzweig
Try this:
http://www.mkyong.com/wicket/how-do-change-the-html-file-location-wicket/

On Tue, Sep 28, 2010 at 12:45 PM, elesi jsar...@gmail.com wrote:


 Could i change html resource folder, even if my project don't have a maven
 folder structure?
 I mean no resources folder, etc.?
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Wicket-Offline-Applications-tp1883788p2716953.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




-- 
[]'s
Avraham Rosenzweig
avrah...@gmail.com


Re: wickert:id changes to attribute

2010-10-06 Thread Jeremy Thomerson
You probably have two shoptalk marks after your equals sign.

Jeremy Thomerson
http://wickettraining.com
-- sent from my smart phone, so please excuse spelling, formatting, or
compiler errors

On Oct 4, 2010 7:49 PM, Jered Myers jer...@maplewoodsoftware.com wrote:

 My markup looks like this:
...
td
div wicket:id=canvasPanelstuff/div
/td
...

When I render the code and swap in another panel via
canvasPanel.replaceWith(newPanel);, the page source looks like this:
...
td canvasPanel= 
 new panel markup
/td
...

Any ideas on why this would happen?  I looked through my markup and it looks
correct.  I have seen the wicket:id become part of the id (e.g.
id=canvasPanel0), but I have never seen a wicket:id become an attribute.

Jered


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


Re: wickert:id changes to attribute

2010-10-06 Thread Jeremy Thomerson
That should be quotation marks

Jeremy Thomerson
http://wickettraining.com
-- sent from my smart phone, so please excuse spelling, formatting, or
compiler errors

On Oct 6, 2010 5:24 PM, Jeremy Thomerson jer...@wickettraining.com
wrote:

You probably have two shoptalk marks after your equals sign.

Jeremy Thomerson
http://wickettraining.com
-- sent from my smart phone, so please excuse spelling, formatting, or
compiler errors



 On Oct 4, 2010 7:49 PM, Jered Myers jer...@maplewoodsoftware.com
wrote:

  My markup look...


Re: wickert:id changes to attribute

2010-10-06 Thread Jered Myers
 Good catch!  I must have looked at that line 20 times!  The problem 
was a missing end quote on a parent container attribute.


On 10/6/2010 3:25 PM, Jeremy Thomerson wrote:

That should be quotation marks

Jeremy Thomerson
http://wickettraining.com
-- sent from my smart phone, so please excuse spelling, formatting, or
compiler errors

On Oct 6, 2010 5:24 PM, Jeremy Thomersonjer...@wickettraining.com
wrote:

You probably have two shoptalk marks after your equals sign.

Jeremy Thomerson
http://wickettraining.com
-- sent from my smart phone, so please excuse spelling, formatting, or
compiler errors



On Oct 4, 2010 7:49 PM, Jered Myersjer...@maplewoodsoftware.com

wrote:

  My markup look...


--
Jered Myers
509-252-3550 x 109
Programmer/Analyst
Maplewood Software


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



Re: Inheritance and wicket:child / inside a component tag (Wicket 1.5)

2010-10-06 Thread Gabriel Bucher
Have you tried to use the TransparentWebMarkupContainer? based on the 
migration guide this could be a potential solution.



also have a look at this open bug
https://issues.apache.org/jira/browse/WICKET-3045
then after using the TransparentWebMarkupContainer... wicket was no 
longer able to find some of the components in extended pages from my 
parent page.


cheer gab

On 07/10/10 00:14, Alexander Morozov wrote:


Hi,

ParentPage.html:
div wicket:id=wrapper
   wicket:child/
/div

I know how it can be achieved in Wicket 1.4 (WebMarkupContainer with
overrided isTransparentResolver), but I cannot get the same behavior in case
of Wicket 1.5.

Wicket gurus, I need your advice :)

Thanks




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



urls after a form submission

2010-10-06 Thread Alex Rass
Hi.

After an on-page (wicket) form is submitted, the followed url doesn't follow
the page's URL encoding strategy (QueryStringUrlCodingStrategy or any
others).

It just becomes http://site.com/?wicket...; and loses original page

Could someone please tell me if there's a way to fix it easily? 
Is this a bug that should be fixed or a normal behavior?

I REALLY need this working. Otherwise a 200 page site becomes a class
nightmare.

- Alex 


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



Re: urls after a form submission

2010-10-06 Thread Jeremy Thomerson
On Wed, Oct 6, 2010 at 6:59 PM, Alex Rass a...@itbsllc.com wrote:

 Hi.

 After an on-page (wicket) form is submitted, the followed url doesn't
 follow
 the page's URL encoding strategy (QueryStringUrlCodingStrategy or any
 others).

 It just becomes http://site.com/?wicket...; and loses original page

 Could someone please tell me if there's a way to fix it easily?
 Is this a bug that should be fixed or a normal behavior?

 I REALLY need this working. Otherwise a 200 page site becomes a class
 nightmare.

 - Alex


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


It's standard behavior.  You're redirecting to a stateful page - with the
state of the form - when you submit the form.  If you want a bookmarkable
URL that still has state, use HybridUrlCodingStrategy.

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


Re: Inheritance and wicket:child / inside a component tag (Wicket 1.5)

2010-10-06 Thread Alexander Morozov

Gabriel, thank you for reply,


Gabriel Bucher wrote:
 
 Have you tried to use the TransparentWebMarkupContainer? based on the 
 migration guide this could be a potential solution.
 

Yep, I tried to use Transparent WebMarkupContainer and BoxBorder and got the
same issue as described in WICKET-3045. Will wait for the fix. 

Thanks :)


Gabriel Bucher wrote:
 
 also have a look at this open bug
 https://issues.apache.org/jira/browse/WICKET-3045
 then after using the TransparentWebMarkupContainer... wicket was no 
 longer able to find some of the components in extended pages from my 
 parent page.
 
 cheer gab
 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Inheritance-and-wicket-child-inside-a-component-tag-Wicket-1-5-tp2965286p2966068.html
Sent from the Users forum mailing list archive at Nabble.com.

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



RE: urls after a form submission

2010-10-06 Thread Alex Rass
But that breaks the common sense of strategy, doesn't it?
And if it works special for HybridUrlCodingStrategy, then it should also
work with the other ones, right? Consistency rule makes it a bug, right?

HybridUrlCodingStrategy  messes with the original name. I'd rather use
QueryStringUrlCodingStrategy that keeps urls proper. It's almost there
with using wicket parameter, shouldn't it be fully compliant with the
strategy of the parent? It just makes sense (to me).

- Alex 

-Original Message-
From: Jeremy Thomerson [mailto:jer...@wickettraining.com] 
Sent: Wednesday, October 06, 2010 8:13 PM
To: users@wicket.apache.org
Subject: Re: urls after a form submission

On Wed, Oct 6, 2010 at 6:59 PM, Alex Rass a...@itbsllc.com wrote:

 Hi.

 After an on-page (wicket) form is submitted, the followed url doesn't 
 follow the page's URL encoding strategy (QueryStringUrlCodingStrategy 
 or any others).

 It just becomes http://site.com/?wicket...; and loses original page

 Could someone please tell me if there's a way to fix it easily?
 Is this a bug that should be fixed or a normal behavior?

 I REALLY need this working. Otherwise a 200 page site becomes a class 
 nightmare.

 - Alex


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


It's standard behavior.  You're redirecting to a stateful page - with the
state of the form - when you submit the form.  If you want a bookmarkable
URL that still has state, use HybridUrlCodingStrategy.

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


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



Re: urls after a form submission

2010-10-06 Thread Jeremy Thomerson
On Wed, Oct 6, 2010 at 8:43 PM, Alex Rass a...@itbsllc.com wrote:

 But that breaks the common sense of strategy, doesn't it?
 And if it works special for HybridUrlCodingStrategy, then it should also
 work with the other ones, right? Consistency rule makes it a bug, right?


Wrong.  First, you have to understand what is happening behind the scenes.
 Look at the URL that actually appears in your form's action attribute -
it is a full URL to a specific component, which will invoke the
IFormSubmitListener on that component (i.e.
../?wicket:interface=:13:loginForm::IFormSubmitListener::).  After that form
is done processing, you are redirected to a URL to render whatever page is
supposed to be rendered.  If you haven't specifically called
setResponsePage(...), then this means that Wicket hast re-render the page
that your form was on.  BUT - it can't send you back to a bookmarkable URL
for that page (your pretty mount with query string parameters, etc), because
your form submission could have changed all kinds of state on the page, and
sending you to a bookmarkable URL will result in your page constructor
getting called and rendering a new page (without all of those state
changes).  So, you must be redirected to the exact version of the page that
your form just modified.  Thus, you are redirected to something like
http://localhost:8080/?wicket:interface=:13:1::: - which is a URL, not for
the form, but for the specific version of the page that should be rendered.

Now, to how HybridUrlCodingStrategy works  It doesn't just encode URLs
for bookmarkable page requests (like QueryStringUrlCodingStrategy and others
do), but it also encodes URLs for redirect requests (those that happen after
form submits, etc).  This allows it to create a bookmarkable URL to
redirect to that also has the 13.1 in it (from the example URL above).
 So, when that request comes in, it's recognized as a bookmarkable url
request, but HybridUCS also realizes that it has state version information
attached to it and tries to get that version out of the session.  If it
exists, it operates exactly like the
http://localhost:8080/?wicket:interface=:13:1::: URL would, but if it
doesn't exist, it operates exactly like a bookmarkable page request would -
creating a new page.


 HybridUrlCodingStrategy  messes with the original name. I'd rather use
 QueryStringUrlCodingStrategy that keeps urls proper.


I have no idea what you mean when you say it messes with the original
name.  Nor do I understand keeps urls proper since proper is
subjective.  I'm assuming you mean proper as in like URLs always used to
be - with question marks and ampersands.


 It's almost there
 with using wicket parameter, shouldn't it be fully compliant with the
 strategy of the parent? It just makes sense (to me).


What you're missing (and hopefully is very adequately explained above), is
that there are actually three different kinds of requests, and your strategy
is only handling one of them:

   1. bookmarkable page request (like /site/page.html?foo=1bar=2) - the
   QueryStringUCS is handling this one.  It's the one that originally renders
   the page
   2. IFormSubmitListener request (like
   ../?wicket:interface=:13:loginForm::IFormSubmitListener::) - this is where
   the form actually gets submitted.  That first 13 is the page ID -
   basically a counter in your session that means this form was on the 14th
   page created in your session (zero indexed).  The loginForm (which could
   easily be somePanel:someList:0:someForm) is a full path to the component
   that this URL needs to invoke some method on.  So, from the 14th page in
   session, get the loginForm component.  The last part,
   IFormSubmitListener, indicates what method to call on the form, which is
   onFormSubmitted (which does all the form processing and then calls onSubmit
   or onError on your actual form object.  This URL is not changed by either
   HybridUCS or QueryStringUCS.
   3. IRedirectListener (like ?wicket:interface=:13:1::: by default) - this
   is where you are being redirected to the second version (0, then 1) of the
   14th page in session.  Your QueryStringUCS is not encoding this URL, but the
   HybridUCS is to give it its functionality (see the javadocs for this class
   as well).


Hope this helps.

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


Re: Problem using wicket-extensions

2010-10-06 Thread Jeremy Thomerson
On Wed, Oct 6, 2010 at 9:04 AM, chitrabhanu.das
chitrabhanu@gmail.comwrote:


 Hi all,   I am trying to add DataTable into my wicket application. But I am
 facing is problem doing that. And the fact is that it is not giving coding
 related error. After adding wicket-extensions1.4.3.jar I am getting the
 following error:



 java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at

 org.apache.wicket.extensions.ajax.markup.html.form.upload.UploadProgressBar.clinit(UploadProgressBar.java:42)
at

 org.apache.wicket.extensions.ajax.markup.html.form.upload.UploadProgressBar$ComponentInitializer.init(UploadProgressBar.java:55)
at
 org.apache.wicket.extensions.Initializer.init(Initializer.java:36)
at
 org.apache.wicket.Application.callInitializers(Application.java:844)
at
 org.apache.wicket.Application.initializeComponents(Application.java:679)
at
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:714)
at
 org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
at
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at

 org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
at

 org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
at
 org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
at
 org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at
 org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
at org.mortbay.jetty.Server.doStart(Server.java:220)
at
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at nic.fts.Start.main(Start.java:35)
 Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at

 org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366)
at

 org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 18 more
 ERROR - log- failed
 org.mortbay.jetty.webapp.webappcont...@54777e{/,src/main/webapp}



 sl4j jar is added to the classpath. Is it a jar conflict???
 Any help will be highly appreciated Thanx.
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Problem-using-wicket-extensions-tp2965023p2965023.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



Are you using Maven?  It automatically fixes this stuff for you.  Are you
using matching versions of Wicket / Wicket Extensions?  You could always
create a (Maven) quickstart for your Wicket version and then grab the jars
from it.

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


Bean injection

2010-10-06 Thread Mauro Ciancio
Hello everyone,
  I'm using spring in one wicket project and I'm lost about how the
proxy stuff works. I've realized that the fields marked with
@springbean are injected when the component injection listener runs.

  Also, I've looked in AnnotProxyFieldValueFactory.class to find out
how the bean proxy is created and how it can be serialized.

  Now, this is my issue. The page is created by wicket, the injection
is done and I have the bean ready for use. If the page is serialized,
the bean will be reconstructed using the bean factory (through the
proxy). But, somehow when I click a non bookmarkable link in my page,
the bean is never reconstructed and I have the previous reference to
the bean (I mean, the same object).

  Is this the correct behavior? Shouldn't this bean be reconstructed
when another request arrives?

  BTW, I've defined all the beans with prototype scope, so it's not a
spring issue.

  What am I missing?

Regards.
-- 
Mauro Ciancio

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



Re: Problem using wicket-extensions

2010-10-06 Thread chitrabhanu.das

Thanks for the repley. Yes I am using maven This is my pom.xml




project xmlns=http://maven.apache.org/POM/4.0.0;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd;
modelVersion4.0.0/modelVersion
groupIdnic.fts/groupId
artifactIdFTS2/artifactId
packagingwar/packaging
version1.0-SNAPSHOT/version
!-- TODO project name  --
namequickstart/name
description/description
!--
TODO organization namecompany name/name urlcompany 
url/url
/organization
--
licenses
license
nameThe Apache Software License, Version 2.0/name

urlhttp://www.apache.org/licenses/LICENSE-2.0.txt/url
distributionrepo/distribution
/license
/licenses
dependencies
!--  WICKET DEPENDENCIES --
dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket/artifactId
version${wicket.version}/version
/dependency
dependency
groupIdorg.springframework/groupId
artifactIdspring/artifactId
version2.5.6/version
/dependency
dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket-spring/artifactId
version${wicket.version}/version
/dependency
dependency
groupIdorg.hibernate/groupId
artifactIdhibernate-core/artifactId
version3.3.2.GA/version
/dependency
dependency
groupIdjavax.persistence/groupId
artifactIdpersistence-api/artifactId
version1.0/version
/dependency
dependency
groupIdorg.hibernate/groupId
artifactIdhibernate-annotations/artifactId
version3.4.0.GA/version
/dependency
dependency
groupIdcommons-dbcp/groupId
artifactIdcommons-dbcp/artifactId
version1.2.2/version
/dependency

dependency groupIdorg.apache.wicket/groupId
artifactIdwicket-extensions/artifactId
version${wicket.version}/version 
/dependency


!-- LOGGING DEPENDENCIES - LOG4J --
dependency
groupIdorg.slf4j/groupId
artifactIdslf4j-log4j12/artifactId
version1.4.2/version
/dependency
dependency
groupIdlog4j/groupId
artifactIdlog4j/artifactId
version1.2.14/version
/dependency

!--  JUNIT DEPENDENCY FOR TESTING --
dependency
groupIdjunit/groupId
artifactIdjunit/artifactId
version3.8.2/version
scopetest/scope
/dependency

!--  JETTY DEPENDENCIES FOR TESTING  --
dependency
groupIdorg.mortbay.jetty/groupId
artifactIdjetty/artifactId
version${jetty.version}/version
scopeprovided/scope
/dependency
dependency
groupIdorg.mortbay.jetty/groupId
artifactIdjetty-util/artifactId
version${jetty.version}/version
scopeprovided/scope
/dependency
dependency
groupIdorg.mortbay.jetty/groupId
artifactIdjetty-management/artifactId
version${jetty.version}/version
scopeprovided/scope
/dependency
/dependencies
build
resources
resource
filteringfalse/filtering
directorysrc/main/resources/directory
/resource
resource
filteringfalse/filtering
directorysrc/main/java/directory
includes
include**/include
/includes