Re: RequestCycle Request and storeing objects?

2008-02-14 Thread Igor Vaynberg
yep, use request cycle metadata - that is the quicker/cleanest way

-igor


On Thu, Feb 14, 2008 at 6:14 PM, Warren <[EMAIL PROTECTED]> wrote:
> I am storieng org.apache.wicket.security.hive.authorization.Principal
>  objects that are associated with why a user was denied access to a page. I
>  then want to access the names of these Principals from my "Accessed Denied"
>  page in order to construct a "Accessed Denied" message. I want to store
>  these Principals from MySwarmStrategy object.
>
>
>
>  > -Original Message-
>  > From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  > Sent: Thursday, February 14, 2008 5:46 PM
>  > To: users@wicket.apache.org
>  > Subject: Re: RequestCycle Request and storeing objects?
>  >
>  >
>  > what is the usecase of storing something in the request?
>  >
>  > -igor
>  >
>  > On Thu, Feb 14, 2008 at 5:02 PM, Warren
>  > <[EMAIL PROTECTED]> wrote:
>  > > What is the proper way to store objects into the request and
>  > retrieve them
>  > >  in your page? Is this the correct way:
>  > >
>  > >  RequestCycle.get().getPageParameters().put("myObject", myObect);
>  > >
>  > >  And from my Page:
>  > >
>  > >  MyObject myObect =
>  > >  (MyObect)getWebRequestCycle().getPageParameters().get("myObject");
>  > >
>  > >  And can you extend WebRequest the same way you can extend Session and
>  > >  configure it in MyApp by extending newWebRequest()? And will
>  > this cause my
>  > >  app to use my extended WebRequest? I don't think I am doing
>  > something right.
>  > >
>  > >  Thanks,
>  > >
>  > >  Warren
>  > >
>  > >
>  > >  -
>  > >  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]
>  >
>
>
>  -
>  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: org.apache.wicket.protocol.http.WebSession cannot be cast to my.CustomSession

2008-02-14 Thread Nino Saturnino Martinez Vazquez Wael
You could also take a look at the blog tutorial, has the solution for 
this as I remember..


http://cwiki.apache.org/WICKET/blog-tutorial.html

From another example here:

   final ApplicationContext context = new 
ClassPathXmlApplicationContext(

   "applicationContext.xml");
   IDBDao base = (IDBDao) context.getBean("dBDao");
   dbProvider = base;
   base.generateDummyData();
   // 2. setup mock injection environment
   AnnotApplicationContextMock appctx = new 
AnnotApplicationContextMock();

   appctx.putBean("dBDao", dbProvider);

   ZeuzGroupApplication zeuzGroupApplication = new 
ZeuzGroupApplication();

   zeuzGroupApplication
   .setSpringComponentInjector(new SpringComponentInjector(
   zeuzGroupApplication, appctx));
   wicketTester = new WicketTester(zeuzGroupApplication);




Sven Schliesing wrote:

Hi,

I'm trying to set up testing for my Wicket Application but ran across this
error message:
"org.apache.wicket.protocol.http.WebSession cannot be cast to
my.CustomSession"

The page (LoginPage) I'm testing does:

(CustomSession) Session.get();

This is the point where the error message occurs.

In my CustomApplication (which extends SpringWebApplication) I've overridden
newSession():

@Override
public Session newSession(Request request, Response response) {
CustomSession session = new CustomSession(request);
return session;
}


I found a couple of threads where the solution was to create an instance of
CustomApplication and pass it to WicketTester:

tester = new WicketTester(new CustomApplication());


Unfortunately this leads to this error message:

java.lang.IllegalStateException: No WebApplicationContext found: no
ContextLoaderListener registered?
at
org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:86)
at
org.apache.wicket.spring.SpringWebApplication.internalInit(SpringWebApplication.java:77)
at
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:511)
at
org.apache.wicket.protocol.http.MockWebApplication.(MockWebApplication.java:148)
at
org.apache.wicket.util.tester.BaseWicketTester.(BaseWicketTester.java:204)
at
org.apache.wicket.util.tester.WicketTester.(WicketTester.java:308)
at
org.apache.wicket.util.tester.WicketTester.(WicketTester.java:291)
at my.LoginPageTest.setUp(LoginPageTest.java:32)


So my next approach was to override getWicketSession() in WicketTester() and
let it return my CustomSession instead of WebSession:

tester = new WicketTester() {
@Override
public WebSession getWicketSession() {
return new CustomSession(getWicketRequest());
}
};


But this method never get's called.

I started debugging and found that the WebSession get's explicitely created
in 
MockWebApplication.createRequestCycle():495

no matter if I override getWicketSession() or not. So I realized that
overriding getWicketSession() is kind of useless.


Anyone got a hint?

Thanks in advance!


Sven
  


--
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: wicketstuff-rome and authentification.

2008-02-14 Thread Nino Saturnino Martinez Vazquez Wael
It would be really cool to have such a feature.. Im, thinking on 
wicket-auth here..


Ryan Sonnek wrote:

you can mount the wicket rss feed as a "bookmarkable url" and use a
filter to ensure security.

Not sure if wicket has the concept of "securing application resources"
currently built in?

On Thu, Feb 14, 2008 at 9:55 AM, Murat Yücel <[EMAIL PROTECTED]> wrote:
  

Hi All

 I have started using the wicketstuff-rome project to generate rss feed.
 Before this was just done
 in a servlet. The servlet would check the parameters submitted. If they were
 valid then the rss feed
 would get generated.
 The parameters are username, password.

 Is it possible to add authentification in wicket to the feed? If it is how
 would you do it?
 I have created my feed using this example: wicketstuff-rome-examples

 /Murat




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


  


--
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: Wicket Quickstart maven archetype - "Archetype repository missing"

2008-02-14 Thread Nino Saturnino Martinez Vazquez Wael
Thanks. Had a million problems yesterday, thought it was because I ran 
on a windoze box.


Raphaël Piéroni wrote:

This is because of the recent release of maven archetype 2.0-alpha-1 release.

Please consider calling the old plugin version the time for the maven
team to fix the problem.

mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create ...


Cheers.

Raphaël

2008/2/14, OliZilla <[EMAIL PROTECTED]>:
  

 Currently when I run the mvn quickstart command provided by the quickstart
 web page, maven complains:


 ...
 [INFO] [archetype:create]
 [INFO] Archetype repository missing. Using the one from
 [org.apache.wicket:wicket-archetype-quickstart:1.3.0-beta3 ->
 http://repo1.maven.org/maven2] found in catalog internal
 Define value for version: :


 Where it then waits for user input.
 I wasn't sure what was going on, as this had never happened before, so i
 just blindly hit return a couple of times. Of course the build then failed
 with the following message:


 [ERROR] BUILD ERROR
 [INFO]
 
 [INFO] The archetype generation must be configured here


 I found that if i entered "1.3.1" where it asked for a "value of version:"
 and then "com.yournamehere" where it asks for "value for package:" then my
 quickstart project was created successfully with the following log:


 Define value for version: : 1.3.1
 Define value for package: : com.myfrikinpackage
 Confirm properties configuration:
 groupId: com.mycompany
 artifactId: myproject3
 version: 1.3.1
 package: com.myfrikinpackage
  Y: : y
 [INFO]
 
 [INFO] Using following parameters for creating OldArchetype:
 wicket-archetype-quickstart:1.3.1
 [INFO]
 
 [INFO] Parameter: groupId, Value: com.mycompany
 [INFO] Parameter: packageName, Value: com.myfrikinpackage
 [INFO] Parameter: basedir, Value: /Users/oli/temp
 [INFO] Parameter: package, Value: com.myfrikinpackage
 [INFO] Parameter: version, Value: 1.3.1
 [INFO] Parameter: artifactId, Value: myproject3
 [INFO] * End of debug info from resources from generated
 POM ***
 [INFO] OldArchetype created in dir: /Users/oli/temp/myproject3
 [INFO]
 
 [INFO] BUILD SUCCESSFUL
 [INFO]
 


 A bit of googling would suggest this is a maven issue, see:
 
http://www.nabble.com/Archetype-repository-missing-and-asking-for-a-version-and-package-td15446552s2369.html
 
http://www.nabble.com/Archetype-repository-missing-and-asking-for-a-version-and-package-td15446552s2369.html


 on the appfuse mailing list, someone is having the same problem. I have
 tried clearing the offending part of my local repos, but I still can't run
 the command without some user input.


 The solution is very simple, but its not immediately obvious, so may put off
 new users (I discovered it trying to convince a collegue how easy it was to
 get up and running on Wicket, which was slightly embarrassing). Is any one
 else experiencing this, or know what is going on?


 Oli

--
 View this message in context: 
http://www.nabble.com/Wicket-Quickstart-maven-archetype---%22Archetype-repository-missing%22-tp15481228p15481228.html
 Sent from the Wicket - User mailing list archive at Nabble.com.




--
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: wicket-security Custom Access Denied Page

2008-02-14 Thread Warren
Maurice,

I had to make some changes in order for it to work. I added the Permission
names to the ManyToManyMap instead of the Permission itself and then query
the map by the Permission name. It would not return any Principals the
original way. The hive file I am testing with only has three Principals with
one Permission each. Will there be a problem doing it this way? Other than
that it seems to be working ok.

I am doing this:

public void addPrincipal(Principal principal, Collection permissions)
{
super.addPrincipal(principal, permissions);
boolean debug = log.isDebugEnabled();
Iterator iterator = permissions.iterator();
Permission permission = null;
while (iterator.hasNext())
{
permission = (Permission)iterator.next();
hivePrincipalsAndPermissions.add(permission.getName(), 
principal);
}
}

public void addPermission(Principal principal, Permission permission)
{
super.addPermission(principal, permission);
hivePrincipalsAndPermissions.add(permission.getName(), 
principal);
}

public Set getPrincipals(Permission p)
{
return hivePrincipalsAndPermissions.get(p.getName());
}

Instead of this:

public void addPrincipal(Principal principal, Collection permissions)
{
super.addPrincipal(principal, permissions);
boolean debug = log.isDebugEnabled();
Iterator iterator = permissions.iterator();
Permission permission = null;
while (iterator.hasNext())
{
permission = (Permission)iterator.next();
hivePrincipalsAndPermissions.add(permission, principal);
}
}

public void addPermission(Principal principal, Permission permission)
{
super.addPermission(principal, permission);
hivePrincipalsAndPermissions.add(permission, principal);
}

public Set getPrincipals(Permission p)
{
return hivePrincipalsAndPermissions.get(p);
}

Thanks,

> -Original Message-
> From: Maurice Marrink [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 14, 2008 11:37 AM
> To: users@wicket.apache.org
> Subject: Re: wicket-security Custom Access Denied Page
>
>
> Nope, you are correct.
> My mind must have been on vacation when i wrote that :)
>
> Sorry for the confusion.
>
> Maurice
>
> On Thu, Feb 14, 2008 at 8:32 PM, Warren
> <[EMAIL PROTECTED]> wrote:
> > Maurice,
> >
> >  When you say:
> >
> >
> >  > Also don't forget to filter the principals from the hive with the
> >  > principals contained in your subject. you are only interested in the
> >  > principals not contained in your hive.
> >
> >  Haven't we allready done that when we check if the permission
> has failed
> >  when the super.hasPermission(...) returns false. And when we call
> >  ((MySimpleCachingHive)getHive()).getPrincipals(p) we are going
> to get all
> >  the Principals that have the Permission p in it from the hive
> that do not
> >  belong to the Subject since that Permission has allready been
> checked to see
> >  if it belongs to a Principal that belongs to the Subect in the
> >  super.hasPermission(...). Or am I missing how this all works?
> >
> >
> >  > -Original Message-
> >  > From: Maurice Marrink [mailto:[EMAIL PROTECTED]
> >
> > > Sent: Thursday, February 14, 2008 10:49 AM
> >  > To: users@wicket.apache.org
> >  > Subject: Re: wicket-security Custom Access Denied Page
> >  >
> >  >
> >
> >
> > > On Thu, Feb 14, 2008 at 7:13 PM, Warren
> >  > <[EMAIL PROTECTED]> wrote:
> >  > > Maurice,
> >  > >
> >  > >  I have a couple more questions. In my MySwarmStrategy
> >  > hasPermission(...)
> >  > >  method I only have to look up the principals that have the
> >  > denied permission
> >  > >  in them, correct?
> >  >
> >  > Correct
> >  >
> >  > >Here is my overide hasPermission(...) method:
> >  > >
> >  > >
> >  > > public boolean hasPermission(Permission p)
> >  > > {
> >  > > if (!super.hasPermission(p))
> >  > > {
> >  > > if
> >  > (getHive().getClass().isInstance(MySimpleCachingHive.class))
> >  > > {
> >  > > Set hivePrincipals =
> >  > >  ((MySimpleCachingHive)getHive()).getPrincipals(p);
> >  > > // Place Set of Principals in
> >  > the requestcycle or should I just place
> >  > >  the Principal names in  //
> >  > requestcycle ?
> >  >
> >  > This depends on how much information you want to use in your
> >  > accessdenied page if the name is all you need then by all means just
> >  > pass the names.
> >  > Also don

RE: RequestCycle Request and storeing objects?

2008-02-14 Thread Warren
I am storieng org.apache.wicket.security.hive.authorization.Principal
objects that are associated with why a user was denied access to a page. I
then want to access the names of these Principals from my "Accessed Denied"
page in order to construct a "Accessed Denied" message. I want to store
these Principals from MySwarmStrategy object.

> -Original Message-
> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 14, 2008 5:46 PM
> To: users@wicket.apache.org
> Subject: Re: RequestCycle Request and storeing objects?
>
>
> what is the usecase of storing something in the request?
>
> -igor
>
> On Thu, Feb 14, 2008 at 5:02 PM, Warren
> <[EMAIL PROTECTED]> wrote:
> > What is the proper way to store objects into the request and
> retrieve them
> >  in your page? Is this the correct way:
> >
> >  RequestCycle.get().getPageParameters().put("myObject", myObect);
> >
> >  And from my Page:
> >
> >  MyObject myObect =
> >  (MyObect)getWebRequestCycle().getPageParameters().get("myObject");
> >
> >  And can you extend WebRequest the same way you can extend Session and
> >  configure it in MyApp by extending newWebRequest()? And will
> this cause my
> >  app to use my extended WebRequest? I don't think I am doing
> something right.
> >
> >  Thanks,
> >
> >  Warren
> >
> >
> >  -
> >  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]
>


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



Re: RequestCycle Request and storeing objects?

2008-02-14 Thread Matej Knopp
You can use request cycle metadata (RequestCycle.setMetaData)

-Matej

On Fri, Feb 15, 2008 at 2:45 AM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> what is the usecase of storing something in the request?
>
>  -igor
>
>
>
>  On Thu, Feb 14, 2008 at 5:02 PM, Warren <[EMAIL PROTECTED]> wrote:
>  > What is the proper way to store objects into the request and retrieve them
>  >  in your page? Is this the correct way:
>  >
>  >  RequestCycle.get().getPageParameters().put("myObject", myObect);
>  >
>  >  And from my Page:
>  >
>  >  MyObject myObect =
>  >  (MyObect)getWebRequestCycle().getPageParameters().get("myObject");
>  >
>  >  And can you extend WebRequest the same way you can extend Session and
>  >  configure it in MyApp by extending newWebRequest()? And will this cause my
>  >  app to use my extended WebRequest? I don't think I am doing something 
> right.
>  >
>  >  Thanks,
>  >
>  >  Warren
>  >
>  >
>  >  -
>  >  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]
>
>



-- 
Resizable and reorderable grid components.
http://www.inmethod.com

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



Re: RequestCycle Request and storeing objects?

2008-02-14 Thread Igor Vaynberg
what is the usecase of storing something in the request?

-igor

On Thu, Feb 14, 2008 at 5:02 PM, Warren <[EMAIL PROTECTED]> wrote:
> What is the proper way to store objects into the request and retrieve them
>  in your page? Is this the correct way:
>
>  RequestCycle.get().getPageParameters().put("myObject", myObect);
>
>  And from my Page:
>
>  MyObject myObect =
>  (MyObect)getWebRequestCycle().getPageParameters().get("myObject");
>
>  And can you extend WebRequest the same way you can extend Session and
>  configure it in MyApp by extending newWebRequest()? And will this cause my
>  app to use my extended WebRequest? I don't think I am doing something right.
>
>  Thanks,
>
>  Warren
>
>
>  -
>  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]



RequestCycle Request and storeing objects?

2008-02-14 Thread Warren
What is the proper way to store objects into the request and retrieve them
in your page? Is this the correct way:

RequestCycle.get().getPageParameters().put("myObject", myObect);

And from my Page:

MyObject myObect =
(MyObect)getWebRequestCycle().getPageParameters().get("myObject");

And can you extend WebRequest the same way you can extend Session and
configure it in MyApp by extending newWebRequest()? And will this cause my
app to use my extended WebRequest? I don't think I am doing something right.

Thanks,

Warren


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



Re: Problem on undeploy

2008-02-14 Thread TahitianGabriel

Have you also tried the antiResourceLocking=true parameter?

That's the one I use and it works!



Pills wrote:
> 
>  
> 
> 
> Yes, I made a syntax error... but even with the syntax bellow, the
> problem stills... 
> 
>  antiJARLocking="true"> 
>  
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Problem-on-undeploy-tp15477946p15492542.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: How to NOT use wicket's Role class

2008-02-14 Thread Jonathan Locke


sorry, i really just ran out of time writing the auth-roles package and so
it's closer to an example than something fully reusable.  in my own projects
i don't use auth-roles exactly as is.  instead, i use a Role enum and keep a
Set of those role objects in my User object stored via hibernate.  you do
lose type safety in your hasAnyRole() implementation comparing with the
string role annotations (would be great if you could specify a list of Role
values!) but it's not a big deal for my projects so i just compare with each
enum's toString() value.


Bruce McGuire-2 wrote:
> 
> Hello.
> 
>  
> 
> My application has a need for more roles than user and admin.
> 
>  
> 
> Can someone point me to links etc. on the simplest method of using more
> than
> these roles please?  This class seems to be final, so extending it won't
> do
> the trick. Something of a similar complexity is desired, though.
> 
>  
> 
> Thanks,
> 
>  
> 
> Bruce.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-NOT-use-wicket%27s-Role-class-tp15487694p15491831.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: Disabling Modal Unload Confirmation

2008-02-14 Thread Mats Norén

UPBrandon wrote:

I have a page that uses ModalWindows and I would like to disable the
JavaScript confirmation that is displayed when you try to leave the page
while a modal window is open.  As recommended by developers here, I added
"Wicket.Window.unloadConfirmation = false;" in my page header to disable
those confirmations.  However, when the page loads, the browser gives me an
error say that Wicket.Window doesn't have any properties.  As you might
expect, the confirmation dialog is not not disabled.

Looking at the source for my page, it looks like my code, which was declared
inside of a  tag, is called before Wicket's modal.js.  I assume
that including modal.js before "Wicket.Window.unloadConfirmation = false"
would fix the problem but I'm not sure how to do that. Does anyone know of a
way to fix this?


You could try to add the "Wicket.Window.unloadConfirmation = false" in 
the a IHeaderContributor and use response.addOnDomReadyJavaScript(...).


That way the script is executed when everything is ready.

/Mats



-Brandon



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



Disabling Modal Unload Confirmation

2008-02-14 Thread UPBrandon

I have a page that uses ModalWindows and I would like to disable the
JavaScript confirmation that is displayed when you try to leave the page
while a modal window is open.  As recommended by developers here, I added
"Wicket.Window.unloadConfirmation = false;" in my page header to disable
those confirmations.  However, when the page loads, the browser gives me an
error say that Wicket.Window doesn't have any properties.  As you might
expect, the confirmation dialog is not not disabled.

Looking at the source for my page, it looks like my code, which was declared
inside of a  tag, is called before Wicket's modal.js.  I assume
that including modal.js before "Wicket.Window.unloadConfirmation = false"
would fix the problem but I'm not sure how to do that. Does anyone know of a
way to fix this?

-Brandon
-- 
View this message in context: 
http://www.nabble.com/Disabling-Modal-Unload-Confirmation-tp15491041p15491041.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: Overlay div on ajax call

2008-02-14 Thread JulianS


Martijn Dashorst wrote:
> 
> See wicketstuff-minis' veil
> 
> Martijn
> 
Thanks for the suggestion. I've tried it, and it works fine when you are
trying to veil a component in response to an action, then unveil it in
response to another, However, if I try to enable the veil at the start of an
ajax submit, then disable it at the end, the mask is never displayed because
all the processing happens before the ajax targets are updated. I have a
feeling that this could be fixed by having VeilResources extend
AbstractAjaxBehavior instead of AbstractBehavior but I don't know how to do
it.

Julian


-- 
View this message in context: 
http://www.nabble.com/Overlay-div-on-ajax-call-tp15485027p15489970.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: AjaxRequestTarget and dynamic form component

2008-02-14 Thread Igor Vaynberg
you shouldnt rerender the entire form, just some div that surrounds
the area you are changing

i have something similar going, and there i have a div that is around
the label+editor, so i repaint that diff when i need to swap it out
with a different editor...

-igor


On Thu, Feb 14, 2008 at 12:39 PM, Jay Hogan <[EMAIL PROTECTED]> wrote:
> Timo,
>
>  Thanks for your response. Here's a practical example of how this component
>  will be used.
>
>  Let's say I have an employee table out in some database that has firstName,
>  lastName and department fields. I need to give HR a web page that allows
>  them to search for employees based on firstName, lastName and/or department.
>  Now I could easily design a page that has a search form with 3 TextField's
>  and a submit button to simply get the job done. But what if I have 30 or 40
>  tables and all of those tables require search pagesI don't want to
>  recreate the wheel each time if I can get away with it. So I design a
>  component (thanks to wicket) that accepts general search parameters and
>  handles the grunt work. Plus, I can make the search panel more powerful by
>  allowing the user to select how they want to search (using =, >, <, LIKE, IN
>  etc...).
>
>  Getting back to the employees example, I want the search form to look
>  something like this:
>
>  First Name:  [Textfield to hold
>  search criteria entered by user]
>  Last Name:  [Textfield to hold
>  search criteria entered by user]
>  Department:  [Textfield to hold
>  search criteria entered by user]
>  [SearchButton]
>
>  Here is where I am stuck. If the user chooses to search by department using
>  the "in list" operator, I want to be able to replace, using AJAX, the
>  TextField component with a MultipleListChoice component so they can select 1
>  or more departments. I don't really need the form to be submitted every time
>  the search operator is changed but when I add the form to
>  AjaxRequestTarget.addComponent() the form is re-rendered and my changes are
>  lost.
>
>  Am I making any sense?
>
>  Thanks,
>  Jay
>
>  On Thu, Feb 14, 2008 at 3:12 PM, Timo Rantalaiho <[EMAIL PROTECTED]>
>  wrote:
>
>
>
>  > On Thu, 14 Feb 2008, Jay Hogan wrote:
>  > > Here's what I'm trying to do. I'm designing a SearchPanel component that
>  > > accepts a List and renders these items on a search form.
>  > The
>  > > SearchField object has properties for search field name, search operator
>  > (an
>  > > enum), search value and a list of allowed search operators. I am
>  > following
>  > > the dynamic form
>  > > elements  > >example
>  >
>  > Wow, that's a complicated search! I hope that you have a lot
>  > of data behind it.
>  >
>  > > This is where I run into problems. If I add the form component to the
>  > > AjaxRequestTarget provided by AjaxEditableChoiceLabel.onSubmit, any
>  > dirty
>  > > form components lose their values. I've tried to add a call to
>  >
>  > Hmm, so are you submitting the entire form when any
>  > AjaxEditableChoiceLabel is edited? Have you checked that it
>  > does submit the form? If not you might be better off by
>  > rolling your own component with AjaxFormSubmittingBehavior.
>  >
>  > > form.processin the
>  > > AjaxEditableChoiceLabel.onSubmit method in attempt to force the form to
>  > > update it's model, but that doesn't work. I also tried just adding the
>  > > ListItem to the AjaxRequestTarget but the component is not re-rendered
>  > by
>  > > the target.
>  >
>  > Have you tried adding a feedback panel to see if there are
>  > validation errors?
>  >
>  > I didn't understand very well what was the expected behavior
>  > of each input element and the form (a practical example would
>  > be handy).
>  >
>  > Best wishes,
>  > Timo
>  >
>  > --
>  > Timo Rantalaiho
>  > Reaktor Innovations Oyhttp://www.ri.fi/ >
>  >
>  > -
>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>
>
>  --
>  
>  Computer Science: solving today's problems tomorrow.
>

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



Re: AjaxRequestTarget and dynamic form component

2008-02-14 Thread Jay Hogan
Timo,

Thanks for your response. Here's a practical example of how this component
will be used.

Let's say I have an employee table out in some database that has firstName,
lastName and department fields. I need to give HR a web page that allows
them to search for employees based on firstName, lastName and/or department.
Now I could easily design a page that has a search form with 3 TextField's
and a submit button to simply get the job done. But what if I have 30 or 40
tables and all of those tables require search pagesI don't want to
recreate the wheel each time if I can get away with it. So I design a
component (thanks to wicket) that accepts general search parameters and
handles the grunt work. Plus, I can make the search panel more powerful by
allowing the user to select how they want to search (using =, >, <, LIKE, IN
etc...).

Getting back to the employees example, I want the search form to look
something like this:

First Name:  [Textfield to hold
search criteria entered by user]
Last Name:  [Textfield to hold
search criteria entered by user]
Department:  [Textfield to hold
search criteria entered by user]
[SearchButton]

Here is where I am stuck. If the user chooses to search by department using
the "in list" operator, I want to be able to replace, using AJAX, the
TextField component with a MultipleListChoice component so they can select 1
or more departments. I don't really need the form to be submitted every time
the search operator is changed but when I add the form to
AjaxRequestTarget.addComponent() the form is re-rendered and my changes are
lost.

Am I making any sense?

Thanks,
Jay

On Thu, Feb 14, 2008 at 3:12 PM, Timo Rantalaiho <[EMAIL PROTECTED]>
wrote:

> On Thu, 14 Feb 2008, Jay Hogan wrote:
> > Here's what I'm trying to do. I'm designing a SearchPanel component that
> > accepts a List and renders these items on a search form.
> The
> > SearchField object has properties for search field name, search operator
> (an
> > enum), search value and a list of allowed search operators. I am
> following
> > the dynamic form
> > elements >example
>
> Wow, that's a complicated search! I hope that you have a lot
> of data behind it.
>
> > This is where I run into problems. If I add the form component to the
> > AjaxRequestTarget provided by AjaxEditableChoiceLabel.onSubmit, any
> dirty
> > form components lose their values. I've tried to add a call to
>
> Hmm, so are you submitting the entire form when any
> AjaxEditableChoiceLabel is edited? Have you checked that it
> does submit the form? If not you might be better off by
> rolling your own component with AjaxFormSubmittingBehavior.
>
> > form.processin the
> > AjaxEditableChoiceLabel.onSubmit method in attempt to force the form to
> > update it's model, but that doesn't work. I also tried just adding the
> > ListItem to the AjaxRequestTarget but the component is not re-rendered
> by
> > the target.
>
> Have you tried adding a feedback panel to see if there are
> validation errors?
>
> I didn't understand very well what was the expected behavior
> of each input element and the form (a practical example would
> be handy).
>
> Best wishes,
> Timo
>
> --
> Timo Rantalaiho
> Reaktor Innovations Oyhttp://www.ri.fi/ >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 

Computer Science: solving today's problems tomorrow.


Re: Overlay div on ajax call

2008-02-14 Thread JulianS


Timo Rantalaiho wrote:
> 
> We've done it a bit differently -- all styling (including 
> the high z-index) in CSS, and just the visibility control
> by IAjaxIndicatorAware.
> 
Hi Timo

If you have an example you can share I'd appreciate it.

Julian

-- 
View this message in context: 
http://www.nabble.com/Overlay-div-on-ajax-call-tp15485027p15488665.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: AjaxRequestTarget and dynamic form component

2008-02-14 Thread Timo Rantalaiho
On Thu, 14 Feb 2008, Jay Hogan wrote:
> Here's what I'm trying to do. I'm designing a SearchPanel component that
> accepts a List and renders these items on a search form. The
> SearchField object has properties for search field name, search operator (an
> enum), search value and a list of allowed search operators. I am following
> the dynamic form
> elementsexample

Wow, that's a complicated search! I hope that you have a lot 
of data behind it.

> This is where I run into problems. If I add the form component to the
> AjaxRequestTarget provided by AjaxEditableChoiceLabel.onSubmit, any dirty
> form components lose their values. I've tried to add a call to

Hmm, so are you submitting the entire form when any 
AjaxEditableChoiceLabel is edited? Have you checked that it 
does submit the form? If not you might be better off by 
rolling your own component with AjaxFormSubmittingBehavior.

> form.processin the
> AjaxEditableChoiceLabel.onSubmit method in attempt to force the form to
> update it's model, but that doesn't work. I also tried just adding the
> ListItem to the AjaxRequestTarget but the component is not re-rendered by
> the target.

Have you tried adding a feedback panel to see if there are 
validation errors?

I didn't understand very well what was the expected behavior 
of each input element and the form (a practical example would 
be handy).

Best wishes,
Timo

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

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



Re: Overlay div on ajax call

2008-02-14 Thread Timo Rantalaiho
On Thu, 14 Feb 2008, JulianS wrote:
> I am trying to overlay a mask div during an ajax call but there is obviously
> something I don't understand. I would appreciate any advice.

We've done it a bit differently -- all styling (including 
the high z-index) in CSS, and just the visibility control
by IAjaxIndicatorAware.

Best wishes,
Timo

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

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



Re: Wicket.Tree has no properties

2008-02-14 Thread Juan Gabriel Arias
I know, this is really weird... but if i put an empty js file, the tree
stops working.
I finally moved the code from myFile.js to the HTML page, and its working
fine...

Juan

On Thu, Feb 14, 2008 at 3:46 PM, Juan Gabriel Arias <[EMAIL PROTECTED]>
wrote:

> Yes.
> The problem occurs when i add a javascript file in the html header
>
> 
>
> No matter the content of the file, the tree fails if i have this in my
> markup. Any idea?
>
> Juan
>


Re: How to NOT use wicket's Role class

2008-02-14 Thread Igor Vaynberg
you can always copy and paste that code into your project and hack
away at it. wicket-roles is really just an example project.

-igor


On Thu, Feb 14, 2008 at 11:39 AM, Bruce McGuire <[EMAIL PROTECTED]> wrote:
> Hello.
>
>
>
>  My application has a need for more roles than user and admin.
>
>
>
>  Can someone point me to links etc. on the simplest method of using more than
>  these roles please?  This class seems to be final, so extending it won't do
>  the trick. Something of a similar complexity is desired, though.
>
>
>
>  Thanks,
>
>
>
>  Bruce.
>
>

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



Re: How to NOT use wicket's Role class

2008-02-14 Thread Janos Cserep
Bruce,

Just use simpel strings as your role names:

Roles roles = new Roles("OWNER,SUPERVISOR");

roles.hasAnyRole(new Roles("OWNER)) - this will be true

I usually put these as public final static Strings into my WebApplication
class...

Janos

On Thu, Feb 14, 2008 at 8:39 PM, Bruce McGuire <[EMAIL PROTECTED]> wrote:

> Hello.
>
>
>
> My application has a need for more roles than user and admin.
>
>
>
> Can someone point me to links etc. on the simplest method of using more
> than
> these roles please?  This class seems to be final, so extending it won't
> do
> the trick. Something of a similar complexity is desired, though.
>
>
>
> Thanks,
>
>
>
> Bruce.
>
>


-- 
János Cserép - [EMAIL PROTECTED]
Web: http://www.szeretgom.hu
Skype: cserepj


How to NOT use wicket's Role class

2008-02-14 Thread Bruce McGuire
Hello.

 

My application has a need for more roles than user and admin.

 

Can someone point me to links etc. on the simplest method of using more than
these roles please?  This class seems to be final, so extending it won't do
the trick. Something of a similar complexity is desired, though.

 

Thanks,

 

Bruce.



Re: wicket-security Custom Access Denied Page

2008-02-14 Thread Maurice Marrink
Nope, you are correct.
My mind must have been on vacation when i wrote that :)

Sorry for the confusion.

Maurice

On Thu, Feb 14, 2008 at 8:32 PM, Warren <[EMAIL PROTECTED]> wrote:
> Maurice,
>
>  When you say:
>
>
>  > Also don't forget to filter the principals from the hive with the
>  > principals contained in your subject. you are only interested in the
>  > principals not contained in your hive.
>
>  Haven't we allready done that when we check if the permission has failed
>  when the super.hasPermission(...) returns false. And when we call
>  ((MySimpleCachingHive)getHive()).getPrincipals(p) we are going to get all
>  the Principals that have the Permission p in it from the hive that do not
>  belong to the Subject since that Permission has allready been checked to see
>  if it belongs to a Principal that belongs to the Subect in the
>  super.hasPermission(...). Or am I missing how this all works?
>
>
>  > -Original Message-
>  > From: Maurice Marrink [mailto:[EMAIL PROTECTED]
>
> > Sent: Thursday, February 14, 2008 10:49 AM
>  > To: users@wicket.apache.org
>  > Subject: Re: wicket-security Custom Access Denied Page
>  >
>  >
>
>
> > On Thu, Feb 14, 2008 at 7:13 PM, Warren
>  > <[EMAIL PROTECTED]> wrote:
>  > > Maurice,
>  > >
>  > >  I have a couple more questions. In my MySwarmStrategy
>  > hasPermission(...)
>  > >  method I only have to look up the principals that have the
>  > denied permission
>  > >  in them, correct?
>  >
>  > Correct
>  >
>  > >Here is my overide hasPermission(...) method:
>  > >
>  > >
>  > > public boolean hasPermission(Permission p)
>  > > {
>  > > if (!super.hasPermission(p))
>  > > {
>  > > if
>  > (getHive().getClass().isInstance(MySimpleCachingHive.class))
>  > > {
>  > > Set hivePrincipals =
>  > >  ((MySimpleCachingHive)getHive()).getPrincipals(p);
>  > > // Place Set of Principals in
>  > the requestcycle or should I just place
>  > >  the Principal names in  //
>  > requestcycle ?
>  >
>  > This depends on how much information you want to use in your
>  > accessdenied page if the name is all you need then by all means just
>  > pass the names.
>  > Also don't forget to filter the principals from the hive with the
>  > principals contained in your subject. you are only interested in the
>  > principals not contained in your hive.
>  >
>  > > }
>  > > return false;
>  > > }
>  > > return true;
>  > > }
>  > >
>  > >  I had to copy the whole PolicyFileHiveFactory I don't think I
>  > could get to
>  > >  "private Set inputStreams" or "private Set inputReaders" correctly.
>  >
>  > There are getStreams and getReaders methods but they return a read
>  > only view and thus will not allow you to clear them, ok.
>  >
>  > >Here is
>  > >  my createHive() method:
>  > >
>  > > public Hive createHive()
>  > > {
>  > > BasicHive hive;
>  > > if (isUsingHiveCache())
>  > > hive = new MySimpleCachingHive();
>  > > else
>  > > hive = new BasicHive();
>  > > ...
>  > > }
>  > >
>  > >  I only changed the one line above. In my app I am doing this:
>  > >
>  > >
>  > > MyPolicyFileHiveFactory factory = new MyPolicyFileHiveFactory();
>  > > factory.useHiveCache(true);
>  > >
>  > >  Will the line above make sure that my MySimpleCachingHive will
>  > be used or is
>  > >  it possible for useHiveCache(false) to be used somewhere else?
>  >
>  > This will do fine, remember you are the only one in control of the
>  > policy factory. As soon as you pass it to HiveMind.registerHive the
>  > createHive method is called, after that it is discarded.
>  > BTW the default setting for useCache is true, but it does not hurt to
>  > explicitly set it.
>  >
>  > >
>  > >  Last question. I am not quite sure what to do in
>  > MySimpleCachingHive. I know
>  > >  this is an unrelated question, but I am not sure how to use your
>  > >  ManyToManyMap. I also am not sure when the addPrincipal(...) and
>  > >  addPermission(...) methods are called. Do one or the other get
>  > called per
>  > >  Principal that is in the hive? And, will I Load up the
>  > ManyToManyMap within
>  > >  these two methods ending up with this ManyToManyMap that will
>  > have all the
>  > >  Pricipals of the hive with their associated Permissions in them?
>  >
>  > Either or both are called once or multiple times for each principal,
>  > depending on how your policy is set up.
>  > Anyway it does not matter how often each method is called since the
>  > ManyToManyMap will fold everything together for you.
>  >
>  > >
>  > >  Here is my MySimpleCachingHive:
>  > >
>  > >  public class MySimpleCa

RE: wicket-security Custom Access Denied Page

2008-02-14 Thread Warren
Maurice,

When you say:

> Also don't forget to filter the principals from the hive with the
> principals contained in your subject. you are only interested in the
> principals not contained in your hive.

Haven't we allready done that when we check if the permission has failed
when the super.hasPermission(...) returns false. And when we call
((MySimpleCachingHive)getHive()).getPrincipals(p) we are going to get all
the Principals that have the Permission p in it from the hive that do not
belong to the Subject since that Permission has allready been checked to see
if it belongs to a Principal that belongs to the Subect in the
super.hasPermission(...). Or am I missing how this all works?

> -Original Message-
> From: Maurice Marrink [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 14, 2008 10:49 AM
> To: users@wicket.apache.org
> Subject: Re: wicket-security Custom Access Denied Page
>
>
> On Thu, Feb 14, 2008 at 7:13 PM, Warren
> <[EMAIL PROTECTED]> wrote:
> > Maurice,
> >
> >  I have a couple more questions. In my MySwarmStrategy
> hasPermission(...)
> >  method I only have to look up the principals that have the
> denied permission
> >  in them, correct?
>
> Correct
>
> >Here is my overide hasPermission(...) method:
> >
> >
> > public boolean hasPermission(Permission p)
> > {
> > if (!super.hasPermission(p))
> > {
> > if
> (getHive().getClass().isInstance(MySimpleCachingHive.class))
> > {
> > Set hivePrincipals =
> >  ((MySimpleCachingHive)getHive()).getPrincipals(p);
> > // Place Set of Principals in
> the requestcycle or should I just place
> >  the Principal names in  //
> requestcycle ?
>
> This depends on how much information you want to use in your
> accessdenied page if the name is all you need then by all means just
> pass the names.
> Also don't forget to filter the principals from the hive with the
> principals contained in your subject. you are only interested in the
> principals not contained in your hive.
>
> > }
> > return false;
> > }
> > return true;
> > }
> >
> >  I had to copy the whole PolicyFileHiveFactory I don't think I
> could get to
> >  "private Set inputStreams" or "private Set inputReaders" correctly.
>
> There are getStreams and getReaders methods but they return a read
> only view and thus will not allow you to clear them, ok.
>
> >Here is
> >  my createHive() method:
> >
> > public Hive createHive()
> > {
> > BasicHive hive;
> > if (isUsingHiveCache())
> > hive = new MySimpleCachingHive();
> > else
> > hive = new BasicHive();
> > ...
> > }
> >
> >  I only changed the one line above. In my app I am doing this:
> >
> >
> > MyPolicyFileHiveFactory factory = new MyPolicyFileHiveFactory();
> > factory.useHiveCache(true);
> >
> >  Will the line above make sure that my MySimpleCachingHive will
> be used or is
> >  it possible for useHiveCache(false) to be used somewhere else?
>
> This will do fine, remember you are the only one in control of the
> policy factory. As soon as you pass it to HiveMind.registerHive the
> createHive method is called, after that it is discarded.
> BTW the default setting for useCache is true, but it does not hurt to
> explicitly set it.
>
> >
> >  Last question. I am not quite sure what to do in
> MySimpleCachingHive. I know
> >  this is an unrelated question, but I am not sure how to use your
> >  ManyToManyMap. I also am not sure when the addPrincipal(...) and
> >  addPermission(...) methods are called. Do one or the other get
> called per
> >  Principal that is in the hive? And, will I Load up the
> ManyToManyMap within
> >  these two methods ending up with this ManyToManyMap that will
> have all the
> >  Pricipals of the hive with their associated Permissions in them?
>
> Either or both are called once or multiple times for each principal,
> depending on how your policy is set up.
> Anyway it does not matter how often each method is called since the
> ManyToManyMap will fold everything together for you.
>
> >
> >  Here is my MySimpleCachingHive:
> >
> >  public class MySimpleCachingHive extends SimpleCachingHive
> >  {
> > ...
> >
> > private ManyToManyMap hivePrincipalsAndPermissions;
> >
> > public void addPrincipal(Principal principal,
> Collection permissions)
> > {
> > super.addPrincipal(principal, permissions);
> > // Load hivePrincipalsAndPermissions ?
>
>   Iterator it = permissions.iterator();
>   Permission next = null;
>   boolean debug = log.isDebugEnabled();
>   while (it.hasNext())
>  

AjaxRequestTarget and dynamic form component

2008-02-14 Thread Jay Hogan
Hello wicket-users,

Here's what I'm trying to do. I'm designing a SearchPanel component that
accepts a List and renders these items on a search form. The
SearchField object has properties for search field name, search operator (an
enum), search value and a list of allowed search operators. I am following
the dynamic form
elementsexample
on the wiki which uses a ListView (with itemReuse = true) to render
an abitrary number of elements. This part works great - I have a field
label, a search operator selector (an AjaxEditableChoiceLabel) and search
value widget that can be a TextField, DropDownChoice or DatePicker, etc...,
wrapped in a Panel. In the onSubmit method of the operator component (an
AjaxEditableChoiceLabel), I want to be able to swap out the search value
panel based on the operator the user chose. For instance, if the user
selects "equal to", a TextFieldPanel is added but if the user chooses "in
list", a ListChoicePanel is used.

This is where I run into problems. If I add the form component to the
AjaxRequestTarget provided by AjaxEditableChoiceLabel.onSubmit, any dirty
form components lose their values. I've tried to add a call to
form.processin the
AjaxEditableChoiceLabel.onSubmit method in attempt to force the form to
update it's model, but that doesn't work. I also tried just adding the
ListItem to the AjaxRequestTarget but the component is not re-rendered by
the target.

private Form searchForm;
...
private class SearchItemList extends ListView {
...
@Override
protected void populateItem(final ListItem item) {
final SearchField field = (SearchField)item.getModelObject();
item.setOutputMarkupId(true);
item.add(new Label("label", field.getLabel()));
item.add(new AjaxEditableChoiceLabel("operator", new
PropertyModel(field,"operator"), field.getAllowedOperators()) {
private static final long serialVersionUID = 1L;
@Override
protected void onSubmit(AjaxRequestTarget target) {
super.onSubmit(target);
target.addComponent(addOrReplaceValuePanel(item,field));
target.addComponent(searchForm);
}
});
// addOrReplaceValuePanel is simply a case statement that adds the
appropriate Value panel based on field.getoperator.
addOrReplaceValuePanel(item,field)
}
}

Any ideas? Am I taking the wrong approach? Am I making a
stupid-wicket-newbie mistake? I'm open to suggestions.

Cheers,
Jay


Re: Overlay div on ajax call

2008-02-14 Thread Martijn Dashorst
See wicketstuff-minis' veil

Martijn

On 2/14/08, JulianS <[EMAIL PROTECTED]> wrote:
>
>  I am trying to overlay a mask div during an ajax call but there is obviously
>  something I don't understand. I would appreciate any advice.
>
>  If I do the following in my ajax button subclass, the mask gets displayed
>  but never hidden. The order of the script parameter versus my style string
>  makes no difference:
>
>  @Override
>  protected IAjaxCallDecorator getAjaxCallDecorator()
>  {
> return new IAjaxCallDecorator()
> {
> public CharSequence decorateScript(CharSequence script)
> {
> return
>  "document.getElementById('progressmask').style.zIndex='2';"+script;
> }
> public CharSequence decorateOnFailureScript(CharSequence 
> script)
> {
> return
>  script+"document.getElementById('progressmask').style.zIndex='-1';";
> }
> public CharSequence decorateOnSuccessScript(CharSequence 
> script)
> {
> return
>  script+"document.getElementById('progressmask').style.zIndex='-1';";
> }
> };
>  }
>
>  If I do the following, the mask is never displayed because all the
>  processing happens before the ajax targets are updated:
>
>  Page constructor:
>
>  bodyContainer.add(progressMask = new WebMarkupContainer("progressmask"));
>  progressMask.setOutputMarkupId(true);
>  progressMask.add(new AttributeModifier("class", new PropertyModel(this,
>  "progressMaskClass")));
>
>  Where progressMaskClass sets the CSS class to one that contains either
>  "z-index:2" or "z-index:-1".
>
>  My ajax button calls this method in the page class at the start of its
>  onSubmit:
>
>  public void showProgress(AjaxRequestTarget target)
>  {
> progressMaskClass = "progressMaskVisible";
> target.addComponent(progressMask);
>  }
>
>  My ajax button calls this method in the page class at the end of its
>  onSubmit:
>
>  public void closeProgress(AjaxRequestTarget target)
>  {
> progressMaskClass = "progressMaskHidden";
> target.addComponent(progressMask);
>  }
>
>  What am I doing wrong?
>  Thanks,
>  Julian
>
>
>  --
>  View this message in context: 
> http://www.nabble.com/Overlay-div-on-ajax-call-tp15485027p15485027.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]
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1

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



Re: AjaxSelfUpdatingTimerBehavior, AjaxFallbackDefaultDataTable and a Form

2008-02-14 Thread Martin Funk
How about using an AjaxCheckBox? That way a state change in the checkbox
will be propagated to the server immediately.

mf

2008/2/14, Murat Yücel <[EMAIL PROTECTED]>:
>
> Hi All
>
> I have some problem with the combination written in the subject.
>
> I have a panel which has a form. On that form i append a
> AjaxFallbackDefaultDataTable. One of the
> columns include a checkbox so i can submit the selected values. This was
> working just fine until
> i wanted the table to be auto updated.
>
> So when I added AjaxSelfUpdatingTimerBehavior to the panel then the
> datatable was updated but
> so was the selected checkboxes. Which means that when i select a checkbox
> then it will be cleared
> because it gets reloaded.
>
> Is it possible some how to reuse only the checkbox part? Or should i use
> something else to auto
> refresh the panel.
>
>
> /Murat
>


Re: wicket-security Custom Access Denied Page

2008-02-14 Thread Maurice Marrink
On Thu, Feb 14, 2008 at 7:13 PM, Warren <[EMAIL PROTECTED]> wrote:
> Maurice,
>
>  I have a couple more questions. In my MySwarmStrategy hasPermission(...)
>  method I only have to look up the principals that have the denied permission
>  in them, correct?

Correct

>Here is my overide hasPermission(...) method:
>
>
> public boolean hasPermission(Permission p)
> {
> if (!super.hasPermission(p))
> {
> if 
> (getHive().getClass().isInstance(MySimpleCachingHive.class))
> {
> Set hivePrincipals =
>  ((MySimpleCachingHive)getHive()).getPrincipals(p);
> // Place Set of Principals in the 
> requestcycle or should I just place
>  the Principal names in  // requestcycle ?

This depends on how much information you want to use in your
accessdenied page if the name is all you need then by all means just
pass the names.
Also don't forget to filter the principals from the hive with the
principals contained in your subject. you are only interested in the
principals not contained in your hive.

> }
> return false;
> }
> return true;
> }
>
>  I had to copy the whole PolicyFileHiveFactory I don't think I could get to
>  "private Set inputStreams" or "private Set inputReaders" correctly.

There are getStreams and getReaders methods but they return a read
only view and thus will not allow you to clear them, ok.

>Here is
>  my createHive() method:
>
> public Hive createHive()
> {
> BasicHive hive;
> if (isUsingHiveCache())
> hive = new MySimpleCachingHive();
> else
> hive = new BasicHive();
> ...
> }
>
>  I only changed the one line above. In my app I am doing this:
>
>
> MyPolicyFileHiveFactory factory = new MyPolicyFileHiveFactory();
> factory.useHiveCache(true);
>
>  Will the line above make sure that my MySimpleCachingHive will be used or is
>  it possible for useHiveCache(false) to be used somewhere else?

This will do fine, remember you are the only one in control of the
policy factory. As soon as you pass it to HiveMind.registerHive the
createHive method is called, after that it is discarded.
BTW the default setting for useCache is true, but it does not hurt to
explicitly set it.

>
>  Last question. I am not quite sure what to do in MySimpleCachingHive. I know
>  this is an unrelated question, but I am not sure how to use your
>  ManyToManyMap. I also am not sure when the addPrincipal(...) and
>  addPermission(...) methods are called. Do one or the other get called per
>  Principal that is in the hive? And, will I Load up the ManyToManyMap within
>  these two methods ending up with this ManyToManyMap that will have all the
>  Pricipals of the hive with their associated Permissions in them?

Either or both are called once or multiple times for each principal,
depending on how your policy is set up.
Anyway it does not matter how often each method is called since the
ManyToManyMap will fold everything together for you.

>
>  Here is my MySimpleCachingHive:
>
>  public class MySimpleCachingHive extends SimpleCachingHive
>  {
> ...
>
> private ManyToManyMap hivePrincipalsAndPermissions;
>
> public void addPrincipal(Principal principal, Collection permissions)
> {
> super.addPrincipal(principal, permissions);
> // Load hivePrincipalsAndPermissions ?

Iterator it = permissions.iterator();
Permission next = null;
boolean debug = log.isDebugEnabled();
while (it.hasNext())
{
next = (Permission)it.next();
hivePrincipalsAndPermissions.add(next, principal);
}

> }
>
> public void addPermission(Principal principal, Permission permission)
> {
> super.addPermission(principal, permission);
> // Load hivePrincipalsAndPermissions ?

hivePrincipalsAndPermissions .add(permission, 
principal);

> }
>
> public Set getPrincipals(Permission p)
> {
> // Return Set of Principals related to permission

return hivePrincipalsAndPermissions.get(p)
> }
>
>  }

Maurice

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



Overlay div on ajax call

2008-02-14 Thread JulianS

I am trying to overlay a mask div during an ajax call but there is obviously
something I don't understand. I would appreciate any advice.

If I do the following in my ajax button subclass, the mask gets displayed
but never hidden. The order of the script parameter versus my style string
makes no difference:

@Override
protected IAjaxCallDecorator getAjaxCallDecorator()
{
return new IAjaxCallDecorator()
{
public CharSequence decorateScript(CharSequence script)
{
return
"document.getElementById('progressmask').style.zIndex='2';"+script;
}
public CharSequence decorateOnFailureScript(CharSequence script)
{
return
script+"document.getElementById('progressmask').style.zIndex='-1';";
}
public CharSequence decorateOnSuccessScript(CharSequence script)
{
return
script+"document.getElementById('progressmask').style.zIndex='-1';";
}
};
}

If I do the following, the mask is never displayed because all the
processing happens before the ajax targets are updated:

Page constructor:

bodyContainer.add(progressMask = new WebMarkupContainer("progressmask"));
progressMask.setOutputMarkupId(true);
progressMask.add(new AttributeModifier("class", new PropertyModel(this,
"progressMaskClass")));

Where progressMaskClass sets the CSS class to one that contains either
"z-index:2" or "z-index:-1".

My ajax button calls this method in the page class at the start of its
onSubmit: 

public void showProgress(AjaxRequestTarget target)
{
progressMaskClass = "progressMaskVisible";
target.addComponent(progressMask);
}

My ajax button calls this method in the page class at the end of its
onSubmit: 

public void closeProgress(AjaxRequestTarget target)
{
progressMaskClass = "progressMaskHidden";
target.addComponent(progressMask);
}

What am I doing wrong?
Thanks,
Julian

-- 
View this message in context: 
http://www.nabble.com/Overlay-div-on-ajax-call-tp15485027p15485027.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-security Custom Access Denied Page

2008-02-14 Thread Warren
Maurice,

I have a couple more questions. In my MySwarmStrategy hasPermission(...)
method I only have to look up the principals that have the denied permission
in them, correct? Here is my overide hasPermission(...) method:

public boolean hasPermission(Permission p)
{
if (!super.hasPermission(p))
{
if 
(getHive().getClass().isInstance(MySimpleCachingHive.class))
{
Set hivePrincipals =
((MySimpleCachingHive)getHive()).getPrincipals(p);
// Place Set of Principals in the requestcycle 
or should I just place
the Principal names in  // requestcycle ?
}
return false;
}
return true;
}

I had to copy the whole PolicyFileHiveFactory I don't think I could get to
"private Set inputStreams" or "private Set inputReaders" correctly. Here is
my createHive() method:

public Hive createHive()
{
BasicHive hive;
if (isUsingHiveCache())
hive = new MySimpleCachingHive();
else
hive = new BasicHive();
...
}

I only changed the one line above. In my app I am doing this:

MyPolicyFileHiveFactory factory = new MyPolicyFileHiveFactory();
factory.useHiveCache(true);

Will the line above make sure that my MySimpleCachingHive will be used or is
it possible for useHiveCache(false) to be used somewhere else?

Last question. I am not quite sure what to do in MySimpleCachingHive. I know
this is an unrelated question, but I am not sure how to use your
ManyToManyMap. I also am not sure when the addPrincipal(...) and
addPermission(...) methods are called. Do one or the other get called per
Principal that is in the hive? And, will I Load up the ManyToManyMap within
these two methods ending up with this ManyToManyMap that will have all the
Pricipals of the hive with their associated Permissions in them?

Here is my MySimpleCachingHive:

public class MySimpleCachingHive extends SimpleCachingHive
{
...

private ManyToManyMap hivePrincipalsAndPermissions;

public void addPrincipal(Principal principal, Collection permissions)
{
super.addPrincipal(principal, permissions);
// Load hivePrincipalsAndPermissions ?
}

public void addPermission(Principal principal, Permission permission)
{
super.addPermission(principal, permission);
// Load hivePrincipalsAndPermissions ?
}

public Set getPrincipals(Permission p)
{
// Return Set of Principals related to permission
}

}

Thank you for your time, you have been a great help.

Warren,

> -Original Message-
> From: Maurice Marrink [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 13, 2008 11:57 PM
> To: users@wicket.apache.org
> Subject: Re: wicket-security Custom Access Denied Page
>
>
> Use cache is default true (i think by the constructor but i don't have
> the code with me right now)
>
> So you don't have to worry about that.
>
> Maurice
> thod
> On Thu, Feb 14, 2008 at 4:04 AM, Warren
> <[EMAIL PROTECTED]> wrote:
> > I have started implementing your sugestions and I have a
> question. When I
> >  overide the method createHive() in PolicyFileHiveFactory do I
> need to set
> >  useHiveCache(true) if I am extending SimpleCachingHive.
> >
> > public Hive createHive()
> > {
> > // Do I need to do this
> > super.useHiveCache(true);
> > BasicHive hive = new MySimpleCachingHive();
> > ...
> > }
> >
> >  Or should I set this method in my app after I create the factory.
> >
> >  MyPolicyFileHiveFactory factory = new MyPolicyFileHiveFactory();
> >  factory.useHiveCache(true);
> >
> >  Or should I even worry about this?
> >
> >
> >
> >  > -Original Message-
> >  > From: Warren [mailto:[EMAIL PROTECTED]
> >  > Sent: Wednesday, February 13, 2008 4:30 PM
> >  > To: users@wicket.apache.org
> >
> >
> > > Subject: RE: wicket-security Custom Access Denied Page
> >  >
> >  >
> >  > I think I am following your example correctly. What I will
> end up with is
> >  > the names of one or more principals that have the permission that was
> >  > denied. Those one or more principals will not belong to the
> >  > current subject.
> >  > Then I can use the names of those principals to construct a
> message. You
> >  > could end up with a permission that does not belong to any
> >  > principal. Strike
> >  > that, that would mean that no one would be able to access that
> >  > component. I
> >  > will give this a try. I am sure I will have more questions.
> >  >
> >  > Thanks,
> >  >
> >  > > -Original Message-
> >  > > From: Maurice

Re: Wicket.Tree has no properties

2008-02-14 Thread Juan Gabriel Arias
Yes.
The problem occurs when i add a javascript file in the html header



No matter the content of the file, the tree fails if i have this in my
markup. Any idea?

Juan


Re: Custom tag processing

2008-02-14 Thread Igor Vaynberg
see MapVariableInterpolator/PropertyVariableInterpolator

-igor


On Thu, Feb 14, 2008 at 7:54 AM, behlma <[EMAIL PROTECTED]> wrote:
>
>  Hi there,
>  I'm looking for a hint if the following can be done easily *without* the use
>  of a templating language like FreeMarker or Velocity, as I think Wicket
>  itself is a pretty good templating engine. Suppose I have a TextArea field
>  and want to create an email on the fly, with certain parameters:
>
>  "Hello ${name}, thanks for registering...blabla."
>
>  I basically want to do:
>
>  WicketMail mail = new WicketMail(textarea.getInput(), new
>  CompoundPropertyModel(user));
>
>  i.e. use whatever model I want to populate the email template string.
>
>  Any hints on where to start?
>
>  Kind regards
>
>
>
>
>
>
>
>
>  --
>  View this message in context: 
> http://www.nabble.com/Custom-tag-processing-tp15481234p15481234.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: Problem to nest list within data DefaultDataTable which already have data provider

2008-02-14 Thread Igor Vaynberg
you should put a list in a panel or in a fragment, and then add that
to th ecolumn's cell instead of adding the listview directly.

-igor


On Thu, Feb 14, 2008 at 6:37 AM, wiki <[EMAIL PROTECTED]> wrote:
>
>  I want to nest list of answers in Data Table which already have data provider
>  .Below code  gives error
>  IColumn[] columns= { new PropertyColumn(new Model("ID"),"questiontext"),
> new AbstractColumn(new Model("Answer Body"))
> {
> public void populateItem(Item cell,String componentId,IModel
>  rowmodel)
> {
> MCSSQuestion q=(MCSSQuestion)rowmodel.getObject();
> List a=q.getMcssans();
> ListView view=new ListView("lists",a)
> {
> protected void populateItem(ListItem item)
> {
> final MCSSAns ans=(MCSSAns)item.getModelObject();
>
> item.setModel(new CompoundPropertyModel(ans));
> item.add(new Label("ansbody"));
>
> }
> };
>cell.add(view);
> }
>
>  igor.vaynberg wrote:
>  >
>  > see ListDataProvider
>  >
>  > -igor
>  >
>  > On Feb 13, 2008 7:44 AM, wiki <[EMAIL PROTECTED]> wrote:
>  >>
>  >> Hi I have a little problem with displaying list inside datatable.
>  >> I have a list of questions and each question has a list of answers.My
>  >> design
>  >> requirement is to  display one question per page(that's why used Data
>  >> Provider) and within that page I have to display list of relevant
>  >> answers.I
>  >> have a java classes(User,Questionaire,Questions,Answers) User class has
>  >> List
>  >> of Questionaire and that(Questionaire) has list of questions Then
>  >> Question
>  >> class has a list of Answers.So from Lecturer  WebPage I can click a
>  >> questionaire link to go to questionaire Page which display list of
>  >> questionaire(using ListView).From questionaire I did manage to display
>  >> Questions.Could anybody   know how to embed list in Data Table to display
>  >> answers.
>  >>
>  >> Thanks
>  >>
>  >> public class ShowQuestions extends WebPage
>  >>
>  >> {
>  >>
>  >> //
>  >> ///** Creates a new instance of ShowQuestions */
>  >> //List questions=qaire.getMcssquestion();
>  >> //ListView list=new ListView("questionaire",questions)
>  >> //{
>  >> //protected void populateItem(ListItem item)
>  >> //{
>  >> //final MCSSQuestion
>  >> mcssquestion=(MCSSQuestion)item.getModelObject();
>  >> //
>  >> //item.setModel(new CompoundPropertyModel(mcssquestion));
>  >> //item.add(new Label("questiontext"));
>  >> //item.add(new Label("questionaire.Title"));
>  >> //
>  >> //
>  >> //}
>  >> //
>  >> //};
>  >> //add(list);
>  >> //}
>  >> public ShowQuestions(final Questionaire qaire)
>  >> {
>  >>
>  >> SortableDataProvider provider= new SortableDataProvider()
>  >> {
>  >> // Return how many rows there are
>  >> public int size()
>  >> {
>  >> return qaire.getMcssquestion().size();
>  >> }
>  >> // convert each row object as a model
>  >> public IModel model(Object object)
>  >> {
>  >> MCSSQuestion mcss=(MCSSQuestion)object;
>  >> return new Model((Serializable) mcss);
>  >> }
>  >> public Iterator iterator(int first, int count)
>  >> {
>  >> return qaire.selectEntries(first,count).iterator();
>  >> }
>  >> };
>  >> IColumn[] columns= { new PropertyColumn(new
>  >> Model("ID"),"questiontext")
>  >> };
>  >>
>  >> DefaultDataTable datatable=new
>  >> DefaultDataTable("eachentry",columns,provider,1);
>  >> add(datatable);
>  >> }
>  >>
>  >> --
>  >> View this message in context:
>  >> 
> http://www.nabble.com/How-to-Display-List-in-DataTable-tp15459611p15459611.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/How-to-Display-List-in-DataTable-tp15459611p15480790.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: annotated class

2008-02-14 Thread Igor Vaynberg
isnt this a question for the spring list?

-igor


On Thu, Feb 14, 2008 at 1:04 AM, freak182 <[EMAIL PROTECTED]> wrote:
>
>  Hello,
>  Im developing an app using hibernate annotations.My problem is when i
>  configure my appContext.xml the annotated class cannot be found. here is the
>  code snippet of appContext.xml found in WEB-INF/config.
>
>  
> 
>  
> class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"
> id="sessionFactory">
> 
> 
> 
> 
> org.hibernate.dialect.MySQL5Dialect
> 
> 
> org.hibernate.cache.OSCacheProvider
> 
> 
>  key="hibernate.c3p0.acquire_increment">2
>  key="hibernate.c3p0.idle_test_period">300
> 100
> 
> after_statement
> 
> 5
> 
> select 1
> 
>  key="hibernate.c3p0.testConnectionOnCheckout">
> true
> 
>  key="hibernate.hbm2ddl.auto">update
>  
> key="hibernate.bytecode.use_reflection_optimizer">
> true
> 
> 
> 
> 
> 
> 
> com.test.server.model.Test
> com.test.server.model.Test2
> 
> 
> 
> 
> com.test.server
> 
> 
> 
>
>  My question is, the appContext.xml should be put in the classpath or
>  /WEB-INF/config ?is there is difference between the two? Any idea.
>  Thanks a lot.
>  Cheers
>  --
>  View this message in context: 
> http://www.nabble.com/annotated-class-tp15476390p15476390.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: Doubt about getList().indexOf() usage in ListView.moveUpLink, moveDownLink, removeLink

2008-02-14 Thread Igor Vaynberg
because the problem is that between the time the list was rendered and
the time you click the link the underlying list might have changed, so
the move operation might be invoked on the wrong item...i think we
just chose a safer default...

-igor


On Thu, Feb 14, 2008 at 1:58 AM, Henrik Lundahl
<[EMAIL PROTECTED]> wrote:
> Hi
>
>  Yes, but why can't ListItem.getIndex() be used? I can't see any
>  drawbacks, but one advantage is that you can use the same model object
>  twice in the list. It's not unlikely that I've missed something,
>  though.
>
>
>  Regards,
>  Henrik
>
>
>
>  2008/2/14, Igor Vaynberg <[EMAIL PROTECTED]>:
>
>
> > you can always roll your own link, you dont have to use the one
>  >  provided with ListView - there is nothing special it does that you
>  >  cannot do yourself. Of course we should have used item.getindex() if
>  >  there was some common interface that all items that were put in list
>  >  had to implement...but since there is no such thing we do the best we
>  >  can without it but leave you plenty of freedom to implement your own.
>  >
>  >
>  >  -igor
>  >
>  >
>  >
>  >  On Feb 13, 2008 8:05 PM, Lan Boon Ping <[EMAIL PROTECTED]> wrote:
>  >  > Hi,
>  >  >
>  >  > Taking a look at ListView.moveUpLink as example, I doubt that this
>  >  > getList().indexOf() will return a correct index if we have duplicate
>  >  > items with same identity in getList(). Should not it uses
>  >  > item.getIndex() instead?
>  >  >
>  >  > public final Link moveUpLink(final String id, final ListItem item)
>  >  > {
>  >  > return new Link(id)
>  >  > {
>  >  > private static final long serialVersionUID = 1L;
>  >  >
>  >  > public void onClick()
>  >  > {
>  >  > final int index = 
> getList().indexOf(item.getModelObject()); // use
>  >  > item.getIndex() instead?
>  >  >
>  >  > Thank You.
>  >  >
>  >  > Regards
>  >  > Boon Ping
>  >  >
>  >  > -
>  >  > 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]
>  >
>  >
>
>  -
>  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: org.apache.wicket.protocol.http.WebSession cannot be cast to my.CustomSession

2008-02-14 Thread Timo Rantalaiho
On Thu, 14 Feb 2008, Sven Schliesing wrote:
> java.lang.IllegalStateException: No WebApplicationContext found: no
> ContextLoaderListener registered?

Yep, you should provide it an ApplicationContext more
suitable for testing. There is the handy MockContext in 
wicket-spring that you can use.

We have typically made a subclass (anonymous or named) of
our real application-specific Application class and in 
there instantiated the Spring component injector with
MockContext (you can make an overridable protected method
in your Application class for this).

Best wishes,
Timo

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

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



Re: wicketstuff-rome and authentification.

2008-02-14 Thread Maurice Marrink
For swarm 1.3.1 i am working on this. It allows you to use the same
authorization / authentication mechanism as your wicket app. in effect
the policy files.
You can try it out by letting your pom get the latest 1.3-SNAPSHOT.
Some feedback is welcome.

Maurice

On Thu, Feb 14, 2008 at 5:03 PM, Ryan Sonnek <[EMAIL PROTECTED]> wrote:
> you can mount the wicket rss feed as a "bookmarkable url" and use a
>  filter to ensure security.
>
>  Not sure if wicket has the concept of "securing application resources"
>  currently built in?
>
>
>
>  On Thu, Feb 14, 2008 at 9:55 AM, Murat Yücel <[EMAIL PROTECTED]> wrote:
>  > Hi All
>  >
>  >  I have started using the wicketstuff-rome project to generate rss feed.
>  >  Before this was just done
>  >  in a servlet. The servlet would check the parameters submitted. If they 
> were
>  >  valid then the rss feed
>  >  would get generated.
>  >  The parameters are username, password.
>  >
>  >  Is it possible to add authentification in wicket to the feed? If it is how
>  >  would you do it?
>  >  I have created my feed using this example: wicketstuff-rome-examples
>  >
>  >  /Murat
>  >
>
>  -
>  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: Is serialVersionUID really required?

2008-02-14 Thread Johan Compagner
if you redeploy a new version
where you did some changes in components that would now generate another id
then the sessions that are on disk cant be loaded anymore
so you loose your sessions

if you had an id. And you dont change it because you want to be able to
deserialize
because you dont added a field or what ever and you know that the
deseralized object
works perfectly with the new object then it can be loaded in and you wont
loose sessions

johan



On Thu, Feb 14, 2008 at 5:23 PM, Wang, Yuesong <[EMAIL PROTECTED]> wrote:

> Johan,
>
> Thanks for the reply. Just need some further comfirmation.
>
> Here is my scenario:
> 1) The app is packaged in a single war.
> 2) No distributed deployment - everything is on the app server (Tomcat
> 6.0).
> 3) Only user agent is web browser. No remote client (RMI, java web start
> etc.).
> 4) Same JVM across all servers in cluster.
> 5) When deploying a new release, all servers will be
> stopped/undeployed/deployed/started at the same time.
>
> Is that enough to avoid potential serialization issues that may be
> caused by not supplying serialVersionUID?
>
> Yuesong
>
> -Original Message-
> From: Johan Compagner [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 14, 2008 11:06 AM
> To: users@wicket.apache.org
> Subject: Re: Is serialVersionUID really required?
>
> not that importand
> it is just easier to cluster over different jvms (which doesnt happen a
> lot) but it is also easier to upgrade an existing code. Because the
> generated serialVersionUID does change for the most stupid ways (i guess
> they have to do that but most of the time i don;t care if i added a
> method)
>
> without the id serialization just breaks (can't deserialize) just way
> more often
>
> johan
>
>
>
> On Thu, Feb 14, 2008 at 4:09 PM, Wang, Yuesong <[EMAIL PROTECTED]>
> wrote:
>
> > Hi,
> >
> > In theory, all Serializable classes should have a serialVersionUID,
> > but to provide one to every annonymous inner class used everywhere in
> > a Wicket app is just too much. So I decided to turn off that warning
> > in Eclipse, and not to use serialVersionUID any more, but what is the
> > implication? For example, will I run into any problem during
> > deployment/undeployment? What about clustering?
> >
> > Thanks,
> >
> > Yuesong
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: Is serialVersionUID really required?

2008-02-14 Thread Wang, Yuesong
Johan,

Thanks for the reply. Just need some further comfirmation.

Here is my scenario:
1) The app is packaged in a single war.
2) No distributed deployment - everything is on the app server (Tomcat
6.0).
3) Only user agent is web browser. No remote client (RMI, java web start
etc.).
4) Same JVM across all servers in cluster.
5) When deploying a new release, all servers will be
stopped/undeployed/deployed/started at the same time.

Is that enough to avoid potential serialization issues that may be
caused by not supplying serialVersionUID?

Yuesong

-Original Message-
From: Johan Compagner [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 14, 2008 11:06 AM
To: users@wicket.apache.org
Subject: Re: Is serialVersionUID really required?

not that importand
it is just easier to cluster over different jvms (which doesnt happen a
lot) but it is also easier to upgrade an existing code. Because the
generated serialVersionUID does change for the most stupid ways (i guess
they have to do that but most of the time i don;t care if i added a
method)

without the id serialization just breaks (can't deserialize) just way
more often

johan



On Thu, Feb 14, 2008 at 4:09 PM, Wang, Yuesong <[EMAIL PROTECTED]>
wrote:

> Hi,
>
> In theory, all Serializable classes should have a serialVersionUID, 
> but to provide one to every annonymous inner class used everywhere in 
> a Wicket app is just too much. So I decided to turn off that warning 
> in Eclipse, and not to use serialVersionUID any more, but what is the 
> implication? For example, will I run into any problem during 
> deployment/undeployment? What about clustering?
>
> Thanks,
>
> Yuesong
>

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



Re: Wicket Ideal Bandwidth

2008-02-14 Thread Johan Compagner
optimize your website for 33k6 !
(then it will workr on 128kbs)

Where are the old days where pages where normal sizes...
Currently nobody cares anymore (currently looking at the mobile e90
webbrowser)

johan



On Wed, Feb 13, 2008 at 10:47 AM, carloc <[EMAIL PROTECTED]> wrote:

>
> Hi guys,
>
> What do you think will be the ideal bandwidth to use when you are using
> Wicket?
> Will it work good on a 128kbps connection?
>
> what's the beset bandwidth that you could recommend?
>
> carlo
> --
> View this message in context:
> http://www.nabble.com/Wicket-Ideal-Bandwidth-tp15452645p15452645.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 on undeploy

2008-02-14 Thread Sébastien Piller




Yes, I made a syntax error... but even with the syntax bellow, the
problem stills...




Sébastien Piller a écrit :

  
But the problem stills Have I done a syntax error?




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



Re: Is serialVersionUID really required?

2008-02-14 Thread Johan Compagner
not that importand
it is just easier to cluster over different jvms (which doesnt happen a lot)
but it is also easier to upgrade an existing code. Because the generated
serialVersionUID
does change for the most stupid ways (i guess they have to do that but most
of the time i don;t care if i added a method)

without the id serialization just breaks (can't deserialize) just way more
often

johan



On Thu, Feb 14, 2008 at 4:09 PM, Wang, Yuesong <[EMAIL PROTECTED]> wrote:

> Hi,
>
> In theory, all Serializable classes should have a serialVersionUID, but
> to provide one to every annonymous inner class used everywhere in a
> Wicket app is just too much. So I decided to turn off that warning in
> Eclipse, and not to use serialVersionUID any more, but what is the
> implication? For example, will I run into any problem during
> deployment/undeployment? What about clustering?
>
> Thanks,
>
> Yuesong
>


Re: wicketstuff-rome and authentification.

2008-02-14 Thread Ryan Sonnek
you can mount the wicket rss feed as a "bookmarkable url" and use a
filter to ensure security.

Not sure if wicket has the concept of "securing application resources"
currently built in?

On Thu, Feb 14, 2008 at 9:55 AM, Murat Yücel <[EMAIL PROTECTED]> wrote:
> Hi All
>
>  I have started using the wicketstuff-rome project to generate rss feed.
>  Before this was just done
>  in a servlet. The servlet would check the parameters submitted. If they were
>  valid then the rss feed
>  would get generated.
>  The parameters are username, password.
>
>  Is it possible to add authentification in wicket to the feed? If it is how
>  would you do it?
>  I have created my feed using this example: wicketstuff-rome-examples
>
>  /Murat
>

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



Re: Wicket Quickstart maven archetype - "Archetype repository missing"

2008-02-14 Thread Raphaël Piéroni
This is because of the recent release of maven archetype 2.0-alpha-1 release.

Please consider calling the old plugin version the time for the maven
team to fix the problem.

mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create ...


Cheers.

Raphaël

2008/2/14, OliZilla <[EMAIL PROTECTED]>:
>
>  Currently when I run the mvn quickstart command provided by the quickstart
>  web page, maven complains:
>
>
>  ...
>  [INFO] [archetype:create]
>  [INFO] Archetype repository missing. Using the one from
>  [org.apache.wicket:wicket-archetype-quickstart:1.3.0-beta3 ->
>  http://repo1.maven.org/maven2] found in catalog internal
>  Define value for version: :
>
>
>  Where it then waits for user input.
>  I wasn't sure what was going on, as this had never happened before, so i
>  just blindly hit return a couple of times. Of course the build then failed
>  with the following message:
>
>
>  [ERROR] BUILD ERROR
>  [INFO]
>  
>  [INFO] The archetype generation must be configured here
>
>
>  I found that if i entered "1.3.1" where it asked for a "value of version:"
>  and then "com.yournamehere" where it asks for "value for package:" then my
>  quickstart project was created successfully with the following log:
>
>
>  Define value for version: : 1.3.1
>  Define value for package: : com.myfrikinpackage
>  Confirm properties configuration:
>  groupId: com.mycompany
>  artifactId: myproject3
>  version: 1.3.1
>  package: com.myfrikinpackage
>   Y: : y
>  [INFO]
>  
>  [INFO] Using following parameters for creating OldArchetype:
>  wicket-archetype-quickstart:1.3.1
>  [INFO]
>  
>  [INFO] Parameter: groupId, Value: com.mycompany
>  [INFO] Parameter: packageName, Value: com.myfrikinpackage
>  [INFO] Parameter: basedir, Value: /Users/oli/temp
>  [INFO] Parameter: package, Value: com.myfrikinpackage
>  [INFO] Parameter: version, Value: 1.3.1
>  [INFO] Parameter: artifactId, Value: myproject3
>  [INFO] * End of debug info from resources from generated
>  POM ***
>  [INFO] OldArchetype created in dir: /Users/oli/temp/myproject3
>  [INFO]
>  
>  [INFO] BUILD SUCCESSFUL
>  [INFO]
>  
>
>
>  A bit of googling would suggest this is a maven issue, see:
>  
> http://www.nabble.com/Archetype-repository-missing-and-asking-for-a-version-and-package-td15446552s2369.html
>  
> http://www.nabble.com/Archetype-repository-missing-and-asking-for-a-version-and-package-td15446552s2369.html
>
>
>  on the appfuse mailing list, someone is having the same problem. I have
>  tried clearing the offending part of my local repos, but I still can't run
>  the command without some user input.
>
>
>  The solution is very simple, but its not immediately obvious, so may put off
>  new users (I discovered it trying to convince a collegue how easy it was to
>  get up and running on Wicket, which was slightly embarrassing). Is any one
>  else experiencing this, or know what is going on?
>
>
>  Oli
>
> --
>  View this message in context: 
> http://www.nabble.com/Wicket-Quickstart-maven-archetype---%22Archetype-repository-missing%22-tp15481228p15481228.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>


wicketstuff-rome and authentification.

2008-02-14 Thread Murat Yücel
Hi All

I have started using the wicketstuff-rome project to generate rss feed.
Before this was just done
in a servlet. The servlet would check the parameters submitted. If they were
valid then the rss feed
would get generated.
The parameters are username, password.

Is it possible to add authentification in wicket to the feed? If it is how
would you do it?
I have created my feed using this example: wicketstuff-rome-examples

/Murat


AjaxSelfUpdatingTimerBehavior, AjaxFallbackDefaultDataTable and a Form

2008-02-14 Thread Murat Yücel
Hi All

I have some problem with the combination written in the subject.

I have a panel which has a form. On that form i append a
AjaxFallbackDefaultDataTable. One of the
columns include a checkbox so i can submit the selected values. This was
working just fine until
i wanted the table to be auto updated.

So when I added AjaxSelfUpdatingTimerBehavior to the panel then the
datatable was updated but
so was the selected checkboxes. Which means that when i select a checkbox
then it will be cleared
because it gets reloaded.

Is it possible some how to reuse only the checkbox part? Or should i use
something else to auto
refresh the panel.

/Murat


Custom tag processing

2008-02-14 Thread behlma

Hi there,
I'm looking for a hint if the following can be done easily *without* the use
of a templating language like FreeMarker or Velocity, as I think Wicket
itself is a pretty good templating engine. Suppose I have a TextArea field
and want to create an email on the fly, with certain parameters:

"Hello ${name}, thanks for registering...blabla."

I basically want to do:

WicketMail mail = new WicketMail(textarea.getInput(), new
CompoundPropertyModel(user));

i.e. use whatever model I want to populate the email template string.

Any hints on where to start?

Kind regards








-- 
View this message in context: 
http://www.nabble.com/Custom-tag-processing-tp15481234p15481234.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 Quickstart maven archetype - "Archetype repository missing"

2008-02-14 Thread OliZilla

Currently when I run the mvn quickstart command provided by the quickstart
web page, maven complains:


...
[INFO] [archetype:create]
[INFO] Archetype repository missing. Using the one from
[org.apache.wicket:wicket-archetype-quickstart:1.3.0-beta3 ->
http://repo1.maven.org/maven2] found in catalog internal
Define value for version: :


Where it then waits for user input. 
I wasn't sure what was going on, as this had never happened before, so i
just blindly hit return a couple of times. Of course the build then failed
with the following message:


[ERROR] BUILD ERROR
[INFO]

[INFO] The archetype generation must be configured here


I found that if i entered "1.3.1" where it asked for a "value of version:"
and then "com.yournamehere" where it asks for "value for package:" then my
quickstart project was created successfully with the following log:


Define value for version: : 1.3.1
Define value for package: : com.myfrikinpackage
Confirm properties configuration:
groupId: com.mycompany
artifactId: myproject3
version: 1.3.1
package: com.myfrikinpackage
 Y: : y
[INFO]

[INFO] Using following parameters for creating OldArchetype:
wicket-archetype-quickstart:1.3.1
[INFO]

[INFO] Parameter: groupId, Value: com.mycompany
[INFO] Parameter: packageName, Value: com.myfrikinpackage
[INFO] Parameter: basedir, Value: /Users/oli/temp
[INFO] Parameter: package, Value: com.myfrikinpackage
[INFO] Parameter: version, Value: 1.3.1
[INFO] Parameter: artifactId, Value: myproject3
[INFO] * End of debug info from resources from generated
POM ***
[INFO] OldArchetype created in dir: /Users/oli/temp/myproject3
[INFO]

[INFO] BUILD SUCCESSFUL
[INFO]



A bit of googling would suggest this is a maven issue, see: 
http://www.nabble.com/Archetype-repository-missing-and-asking-for-a-version-and-package-td15446552s2369.html
http://www.nabble.com/Archetype-repository-missing-and-asking-for-a-version-and-package-td15446552s2369.html
 


on the appfuse mailing list, someone is having the same problem. I have
tried clearing the offending part of my local repos, but I still can't run
the command without some user input.


The solution is very simple, but its not immediately obvious, so may put off
new users (I discovered it trying to convince a collegue how easy it was to
get up and running on Wicket, which was slightly embarrassing). Is any one
else experiencing this, or know what is going on?


Oli 
-- 
View this message in context: 
http://www.nabble.com/Wicket-Quickstart-maven-archetype---%22Archetype-repository-missing%22-tp15481228p15481228.html
Sent from the Wicket - User mailing list archive at Nabble.com.


Re: Business/Domain objects used as wicket model object - opinions please

2008-02-14 Thread James Carman
Most (again I say most; Amazon doesn't) shopping carts die with your
session.  If you don't place your order and you close your browser,
you lose what you've collected thus far.  So, you could store your
shopping cart (Order) information in your session if that sort of
functionality is o.k. with your requirements.

If you wish to persist the Order data between sessions so that a user
can come back and continue working on their order, then I'd just put a
status on their Order saying that it's "in progress" and then when
they submit it, you set its status to "submitted" or something.  Then,
when someone logs in and tries to add something to their order, you
add it to their "in progress" Order object in the database (create one
if necessary I would guess).


On 2/14/08, Martijn Lindhout <[EMAIL PROTECTED]> wrote:
> the scenario you sketched is right. The order is persisted and some
>  orderlines also. The point is, when I click the 'add line' or 'remove line',
>  a request cycle is executed, the LoadableDetachableModel is loaded, items
>  are removed and/or added and I have to commit that to the database. Or where
>  do I keep those changes until I'm finally finished? Must cases are simply
>  indeed, but I have some really complex edit scenario's that takes really
>  time from the user, and I want to give them the possibillity to back out in
>  case they rethink. It's a realworld scenario.
>
>  Or am I really thinking to difficult? Remember: I don't want to fall back to
>  DTO's. (I'm still at the point trying to avoid DTO's at all cost, but that's
>  another question).
>
>  2008/2/14, James Carman <[EMAIL PROTECTED]>:
>
> >
>  > I don't know that the Memento design pattern will necessarily solve
>  > the problem you're talking about.  So, you have a persistent Order
>  > entity object in your application (is the order saved to the db
>  > already)?  And you want to add OrderLine objects (also persistent) to
>  > it, but you don't want that persisted to the database?  Sure, you can
>  > take a memento of the Order from before you started adding/removing
>  > stuff, but won't the adds/removes actually get persisted?  If they
>  > aren't, then why do you need the memento in the first place?  You can
>  > just reload the object from the database if you want to get back to
>  > its pre-edit state?
>  >
>  >
>  > On 2/14/08, Martijn Lindhout <[EMAIL PROTECTED]> wrote:
>  > > Hi Nick,
>  > >
>  > >  I prefer the same approach as you, because my domain model is rich and
>  > gives
>  > >  me direct feedback of what goes wrong when somebody wants to change the
>  > >  model state. This works well for editing simple domain objects, but one
>  > of
>  > >  the challenges I'm facing now is: how do I implement multiaction edits
>  > that
>  > >  are not directly propagated to the database? Again I take the good old
>  > >  Order/OrderLine example, where I want to add and remove lines at will,
>  > and
>  > >  finally commit them in the DB (or let the user cancel it). I asked a
>  > similar
>  > >  question a few days ago, and someone suggests using the Memento
>  > pattern,
>  > >  which I'm implementing now.
>  > >
>  > >  My question to you is: how do you approach this scenario?
>  > >
>  > >  2008/2/14, Nick Heudecker <[EMAIL PROTECTED]>:
>  > >
>  > > >
>  > >  > I always use business objects as my model objects unless the data is
>  > some
>  > >  > form of aggregate, like a summary table.
>  > >  >
>  > >
>  > >
>  > >
>  > >
>  > > --
>  > >  Martijn Lindhout
>  > >  JointEffort IT Services
>  > >  http://www.jointeffort.nl
>  > >  [EMAIL PROTECTED]
>  > >  +31 (0)6 18 47 25 29
>  > >
>  >
>  >
>
> > -
>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>
>
>  --
>
> Martijn Lindhout
>  JointEffort IT Services
>  http://www.jointeffort.nl
>  [EMAIL PROTECTED]
>  +31 (0)6 18 47 25 29
>

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



Re: Business/Domain objects used as wicket model object - opinions please

2008-02-14 Thread Martijn Lindhout
the scenario you sketched is right. The order is persisted and some
orderlines also. The point is, when I click the 'add line' or 'remove line',
a request cycle is executed, the LoadableDetachableModel is loaded, items
are removed and/or added and I have to commit that to the database. Or where
do I keep those changes until I'm finally finished? Must cases are simply
indeed, but I have some really complex edit scenario's that takes really
time from the user, and I want to give them the possibillity to back out in
case they rethink. It's a realworld scenario.

Or am I really thinking to difficult? Remember: I don't want to fall back to
DTO's. (I'm still at the point trying to avoid DTO's at all cost, but that's
another question).

2008/2/14, James Carman <[EMAIL PROTECTED]>:
>
> I don't know that the Memento design pattern will necessarily solve
> the problem you're talking about.  So, you have a persistent Order
> entity object in your application (is the order saved to the db
> already)?  And you want to add OrderLine objects (also persistent) to
> it, but you don't want that persisted to the database?  Sure, you can
> take a memento of the Order from before you started adding/removing
> stuff, but won't the adds/removes actually get persisted?  If they
> aren't, then why do you need the memento in the first place?  You can
> just reload the object from the database if you want to get back to
> its pre-edit state?
>
>
> On 2/14/08, Martijn Lindhout <[EMAIL PROTECTED]> wrote:
> > Hi Nick,
> >
> >  I prefer the same approach as you, because my domain model is rich and
> gives
> >  me direct feedback of what goes wrong when somebody wants to change the
> >  model state. This works well for editing simple domain objects, but one
> of
> >  the challenges I'm facing now is: how do I implement multiaction edits
> that
> >  are not directly propagated to the database? Again I take the good old
> >  Order/OrderLine example, where I want to add and remove lines at will,
> and
> >  finally commit them in the DB (or let the user cancel it). I asked a
> similar
> >  question a few days ago, and someone suggests using the Memento
> pattern,
> >  which I'm implementing now.
> >
> >  My question to you is: how do you approach this scenario?
> >
> >  2008/2/14, Nick Heudecker <[EMAIL PROTECTED]>:
> >
> > >
> >  > I always use business objects as my model objects unless the data is
> some
> >  > form of aggregate, like a summary table.
> >  >
> >
> >
> >
> >
> > --
> >  Martijn Lindhout
> >  JointEffort IT Services
> >  http://www.jointeffort.nl
> >  [EMAIL PROTECTED]
> >  +31 (0)6 18 47 25 29
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Martijn Lindhout
JointEffort IT Services
http://www.jointeffort.nl
[EMAIL PROTECTED]
+31 (0)6 18 47 25 29


Re: Business/Domain objects used as wicket model object - opinions please

2008-02-14 Thread James Carman
I don't know that the Memento design pattern will necessarily solve
the problem you're talking about.  So, you have a persistent Order
entity object in your application (is the order saved to the db
already)?  And you want to add OrderLine objects (also persistent) to
it, but you don't want that persisted to the database?  Sure, you can
take a memento of the Order from before you started adding/removing
stuff, but won't the adds/removes actually get persisted?  If they
aren't, then why do you need the memento in the first place?  You can
just reload the object from the database if you want to get back to
its pre-edit state?

On 2/14/08, Martijn Lindhout <[EMAIL PROTECTED]> wrote:
> Hi Nick,
>
>  I prefer the same approach as you, because my domain model is rich and gives
>  me direct feedback of what goes wrong when somebody wants to change the
>  model state. This works well for editing simple domain objects, but one of
>  the challenges I'm facing now is: how do I implement multiaction edits that
>  are not directly propagated to the database? Again I take the good old
>  Order/OrderLine example, where I want to add and remove lines at will, and
>  finally commit them in the DB (or let the user cancel it). I asked a similar
>  question a few days ago, and someone suggests using the Memento pattern,
>  which I'm implementing now.
>
>  My question to you is: how do you approach this scenario?
>
>  2008/2/14, Nick Heudecker <[EMAIL PROTECTED]>:
>
> >
>  > I always use business objects as my model objects unless the data is some
>  > form of aggregate, like a summary table.
>  >
>
>
>
>
> --
>  Martijn Lindhout
>  JointEffort IT Services
>  http://www.jointeffort.nl
>  [EMAIL PROTECTED]
>  +31 (0)6 18 47 25 29
>

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



Is serialVersionUID really required?

2008-02-14 Thread Wang, Yuesong
Hi,
 
In theory, all Serializable classes should have a serialVersionUID, but
to provide one to every annonymous inner class used everywhere in a
Wicket app is just too much. So I decided to turn off that warning in
Eclipse, and not to use serialVersionUID any more, but what is the
implication? For example, will I run into any problem during
deployment/undeployment? What about clustering?
 
Thanks,
 
Yuesong


Re: Business/Domain objects used as wicket model object - opinions please

2008-02-14 Thread Martijn Lindhout
Hi Nick,

I prefer the same approach as you, because my domain model is rich and gives
me direct feedback of what goes wrong when somebody wants to change the
model state. This works well for editing simple domain objects, but one of
the challenges I'm facing now is: how do I implement multiaction edits that
are not directly propagated to the database? Again I take the good old
Order/OrderLine example, where I want to add and remove lines at will, and
finally commit them in the DB (or let the user cancel it). I asked a similar
question a few days ago, and someone suggests using the Memento pattern,
which I'm implementing now.

My question to you is: how do you approach this scenario?

2008/2/14, Nick Heudecker <[EMAIL PROTECTED]>:
>
> I always use business objects as my model objects unless the data is some
> form of aggregate, like a summary table.
>



-- 
Martijn Lindhout
JointEffort IT Services
http://www.jointeffort.nl
[EMAIL PROTECTED]
+31 (0)6 18 47 25 29


Re: Wicket.Tree has no properties

2008-02-14 Thread Matej Knopp
Looks like the tree javascript has not been loaded. Can you create a
quickstart that reproduces this?

-Matej

On Thu, Feb 14, 2008 at 2:55 PM, Juan Gabriel Arias
<[EMAIL PROTECTED]> wrote:
> Hi all,
>  i'm getting this error in my Ajax Debug Window.
>
>  ]]>*INFO: *
>  Response parsed. Now invoking steps...
>  *ERROR: *Exception evaluating javascript: TypeError: Wicket.Tree
>   has no properties
>  *INFO: *Response processed successfully.
>
>
>  I have a simple LinkTree, filled with a bunch of nodes (less than 50). If i
>  expand a node, it works ok.
>  The problem arise when i collapse a node. Wicket logs that error, and the
>  node stays expanded.
>  If I click the plus icon again, it adds the nodes again, duplicated.
>
>  Is there any way of making the Ajax Debug more verbose or something like
>  that?
>  Does it rings any bell for someone?
>
>  Thanks in advance!
>  Juan
>



-- 
Resizable and reorderable grid components.
http://www.inmethod.com

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



Re: Problem on undeploy

2008-02-14 Thread Sébastien Piller




Hello,

thank you for your answer. I wrote a */META-INF/context.xml* file with
that in it:

  
      
      antiJARLocking
      true
      
  

But the problem stills Have I done a syntax error?


C S a écrit :

  Have you tried the antiLocking options (antiJARLocking and
antiResourceLocking)? 
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html  I haven't but
they seem to speak to your problem with the left over jars




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



org.apache.wicket.protocol.http.WebSession cannot be cast to my.CustomSession

2008-02-14 Thread Sven Schliesing

Hi,

I'm trying to set up testing for my Wicket Application but ran across this
error message:
"org.apache.wicket.protocol.http.WebSession cannot be cast to
my.CustomSession"

The page (LoginPage) I'm testing does:

(CustomSession) Session.get();

This is the point where the error message occurs.

In my CustomApplication (which extends SpringWebApplication) I've overridden
newSession():

@Override
public Session newSession(Request request, Response response) {
CustomSession session = new CustomSession(request);
return session;
}


I found a couple of threads where the solution was to create an instance of
CustomApplication and pass it to WicketTester:

tester = new WicketTester(new CustomApplication());


Unfortunately this leads to this error message:

java.lang.IllegalStateException: No WebApplicationContext found: no
ContextLoaderListener registered?
at
org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:86)
at
org.apache.wicket.spring.SpringWebApplication.internalInit(SpringWebApplication.java:77)
at
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:511)
at
org.apache.wicket.protocol.http.MockWebApplication.(MockWebApplication.java:148)
at
org.apache.wicket.util.tester.BaseWicketTester.(BaseWicketTester.java:204)
at
org.apache.wicket.util.tester.WicketTester.(WicketTester.java:308)
at
org.apache.wicket.util.tester.WicketTester.(WicketTester.java:291)
at my.LoginPageTest.setUp(LoginPageTest.java:32)


So my next approach was to override getWicketSession() in WicketTester() and
let it return my CustomSession instead of WebSession:

tester = new WicketTester() {
@Override
public WebSession getWicketSession() {
return new CustomSession(getWicketRequest());
}
};


But this method never get's called.

I started debugging and found that the WebSession get's explicitely created
in 
MockWebApplication.createRequestCycle():495
no matter if I override getWicketSession() or not. So I realized that
overriding getWicketSession() is kind of useless.


Anyone got a hint?

Thanks in advance!


Sven
-- 
View this message in context: 
http://www.nabble.com/org.apache.wicket.protocol.http.WebSession-cannot-be-cast-to-my.CustomSession-tp15480791p15480791.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 to nest list within data DefaultDataTable which already have data provider

2008-02-14 Thread wiki

I want to nest list of answers in Data Table which already have data provider
.Below code  gives error
IColumn[] columns= { new PropertyColumn(new Model("ID"),"questiontext"),
new AbstractColumn(new Model("Answer Body"))
{
public void populateItem(Item cell,String componentId,IModel
rowmodel)
{
MCSSQuestion q=(MCSSQuestion)rowmodel.getObject();
List a=q.getMcssans();
ListView view=new ListView("lists",a)
{
protected void populateItem(ListItem item)
{
final MCSSAns ans=(MCSSAns)item.getModelObject();

item.setModel(new CompoundPropertyModel(ans));
item.add(new Label("ansbody"));

}
};
   cell.add(view);
}

igor.vaynberg wrote:
> 
> see ListDataProvider
> 
> -igor
> 
> On Feb 13, 2008 7:44 AM, wiki <[EMAIL PROTECTED]> wrote:
>>
>> Hi I have a little problem with displaying list inside datatable.
>> I have a list of questions and each question has a list of answers.My
>> design
>> requirement is to  display one question per page(that's why used Data
>> Provider) and within that page I have to display list of relevant
>> answers.I
>> have a java classes(User,Questionaire,Questions,Answers) User class has
>> List
>> of Questionaire and that(Questionaire) has list of questions Then
>> Question
>> class has a list of Answers.So from Lecturer  WebPage I can click a
>> questionaire link to go to questionaire Page which display list of
>> questionaire(using ListView).From questionaire I did manage to display
>> Questions.Could anybody   know how to embed list in Data Table to display
>> answers.
>>
>> Thanks
>>
>> public class ShowQuestions extends WebPage
>>
>> {
>>
>> //
>> ///** Creates a new instance of ShowQuestions */
>> //List questions=qaire.getMcssquestion();
>> //ListView list=new ListView("questionaire",questions)
>> //{
>> //protected void populateItem(ListItem item)
>> //{
>> //final MCSSQuestion
>> mcssquestion=(MCSSQuestion)item.getModelObject();
>> //
>> //item.setModel(new CompoundPropertyModel(mcssquestion));
>> //item.add(new Label("questiontext"));
>> //item.add(new Label("questionaire.Title"));
>> //
>> //
>> //}
>> //
>> //};
>> //add(list);
>> //}
>> public ShowQuestions(final Questionaire qaire)
>> {
>>
>> SortableDataProvider provider= new SortableDataProvider()
>> {
>> // Return how many rows there are
>> public int size()
>> {
>> return qaire.getMcssquestion().size();
>> }
>> // convert each row object as a model
>> public IModel model(Object object)
>> {
>> MCSSQuestion mcss=(MCSSQuestion)object;
>> return new Model((Serializable) mcss);
>> }
>> public Iterator iterator(int first, int count)
>> {
>> return qaire.selectEntries(first,count).iterator();
>> }
>> };
>> IColumn[] columns= { new PropertyColumn(new
>> Model("ID"),"questiontext")
>> };
>>
>> DefaultDataTable datatable=new
>> DefaultDataTable("eachentry",columns,provider,1);
>> add(datatable);
>> }
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-Display-List-in-DataTable-tp15459611p15459611.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/How-to-Display-List-in-DataTable-tp15459611p15480790.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: AjaxTabbedPanel notworking in IE 6

2008-02-14 Thread Martijn Dashorst
OK, please make a JIRA issue with a quickstart [1] attached that
exhibits this problem.

Martijn

[1] http://wicket.apache.org/quickstart.html

On 2/14/08, rik rik <[EMAIL PROTECTED]> wrote:
> I've noticed the same behaviour using ie7
>  Using AjaxTabbedPanel the first tab works, the second works, but the third 
> doesn't work,
>  in the ajax debug inspector I have the same message indicated by Wen.
>  If I use TabbedPanel, it works perfectly on ie, too.
>
>  I've noticed the same message also when I use windowclosedcallback, so I 
> think that this is a common problem
>  of AjaxRequestTarget only on ie.
>
>  Regards,
>
>  Rik
>
>
>
>
>  > Date: Mon, 11 Feb 2008 07:59:23 -0800> From: [EMAIL PROTECTED]> Subject: 
> Re: AjaxTabbedPanel notworking in IE 6> To: users@wicket.apache.org> > > Hi 
> Martijn,> > Its the tab that doesn't work when you click it. The ajax debug 
> inspector says:> > [some HTML response]> > ERROR: Error while parsing 
> response: Object required> INFO: Invoking post-call handler(s)...> INFO: 
> Invoking failure handler(s)...> > But it works perfectly in firefox.> > 
> Regards,> Wen Tong> > --> The only constant in life is change.> > - 
> Original Message > From: Martijn Dashorst <[EMAIL PROTECTED]>> To: 
> users@wicket.apache.org> Sent: Sunday, February 10, 2008 6:10:43 AM> Subject: 
> Re: AjaxTabbedPanel notworking in IE 6> > > What > doesn't > work? > Have > 
> you > looked > in > the > ajax > debug > inspector? > In > the> application > 
> logs?> Martijn> > On > 2/9/08, > Beyonder > Unknown > <[EMAIL PROTECTED]> > 
> wrote:> >> >> > > Hi > All,> >> > > Have > you > guys > encountered > problem 
> > with > AjaxTabbedPanel? > The > link > doesn't> > > work. > And > when > i 
> > changed > it > to > TabbedPanel > it > worked!> >> > > Thoughts?> >> > > 
> Best,> > > Wen > Tong> >> > > --> > > The > only > constant > in > life > is 
> > change.> >> >> >> >> >> > > > > > 
> >
>  > > Never > miss > a > thing. > Make > Yahoo > your > home > page.> > > 
> http://www.yahoo.com/r/hs> >> > > 
> -> > > To 
> > unsubscribe, > e-mail: > [EMAIL PROTECTED]> > > For > additional > 
> commands, > e-mail: > [EMAIL PROTECTED]> >> >> > > -- > Buy > Wicket > in > 
> Action: > http://manning.com/dashorst> Apache > Wicket > 1.3.1 > is > 
> released> Get > it > now: > 
> http://www.apache.org/dyn/closer.cgi/wicket/1.3.1> > > > > > 
> >
>  Be a better friend, newshound, and > know-it-all with Yahoo! Mobile. Try it 
> now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > > > 
> -> To 
> unsubscribe, e-mail: [EMAIL PROTECTED]> For additional commands, e-mail: 
> [EMAIL PROTECTED]>
>
> _
>  Scarica GRATIS la versione personalizzata MSN di Internet Explorer 7!
>  http://optimizedie7.msn.com/default.aspx?mkt=it-it


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1

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



Re: annotated class

2008-02-14 Thread C S

Here's another example of what to put in WEB-INF/web.xml


contextConfigLocation

classpath:applicationContext.xml
classpath:applicationContext-acegi-security.xml



Then put your appContext.xml in the classpath obviously.  I usually put mine
in the root source folder with no problems.



Ned Collyer wrote:
> 
> What I've done is as follows
> 
> In WEB-INF/web.xml i have the following  listeners and params.
> 
> 
> contextConfigLocation
> ${myConfigDir}/applicationContext.xml
> 
> 
> Configures Log4J for this web app.
>
> org.springframework.web.util.Log4jConfigListener
> 
> 
> Configures spring with this web app.
>
> org.springframework.web.context.ContextLoaderListener
> 
> 
> This means that via a property I can tell the app to keep the
> applicationContext.xml anywhere. (eg,
> JETTY_OPTS="-DmyConfigDir=file:/someDirectory")
> 
> If you use this it should ... hopefully work for you.  I cant remember the
> setup in too much detail, but it works :)
> 
> * Please note, this is to do with spring and the context file location,
> nothing to do with hibernate mappings not finding classes - so sorry if it
> doesn't cover that :)
> 
> 
> freak182 wrote:
>> 
>> My question is, the appContext.xml should be put in the classpath or
>> /WEB-INF/config ?is there is difference between the two? Any idea.
>> Thanks a lot.
>> Cheers
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/annotated-class-tp15476390p15480763.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: AjaxTabbedPanel notworking in IE 6

2008-02-14 Thread rik rik
I've noticed the same behaviour using ie7
Using AjaxTabbedPanel the first tab works, the second works, but the third 
doesn't work, 
in the ajax debug inspector I have the same message indicated by Wen.
If I use TabbedPanel, it works perfectly on ie, too.
 
I've noticed the same message also when I use windowclosedcallback, so I think 
that this is a common problem
of AjaxRequestTarget only on ie.
 
Regards,
 
Rik
 



> Date: Mon, 11 Feb 2008 07:59:23 -0800> From: [EMAIL PROTECTED]> Subject: Re: 
> AjaxTabbedPanel notworking in IE 6> To: users@wicket.apache.org> > > Hi 
> Martijn,> > Its the tab that doesn't work when you click it. The ajax debug 
> inspector says:> > [some HTML response]> > ERROR: Error while parsing 
> response: Object required> INFO: Invoking post-call handler(s)...> INFO: 
> Invoking failure handler(s)...> > But it works perfectly in firefox.> > 
> Regards,> Wen Tong> > --> The only constant in life is change.> > - 
> Original Message > From: Martijn Dashorst <[EMAIL PROTECTED]>> To: 
> users@wicket.apache.org> Sent: Sunday, February 10, 2008 6:10:43 AM> Subject: 
> Re: AjaxTabbedPanel notworking in IE 6> > > What > doesn't > work? > Have > 
> you > looked > in > the > ajax > debug > inspector? > In > the> application > 
> logs?> Martijn> > On > 2/9/08, > Beyonder > Unknown > <[EMAIL PROTECTED]> > 
> wrote:> >> >> > > Hi > All,> >> > > Have > you > guys > encountered > problem 
> > with > AjaxTabbedPanel? > The > link > doesn't> > > work. > And > when > i 
> > changed > it > to > TabbedPanel > it > worked!> >> > > Thoughts?> >> > > 
> Best,> > > Wen > Tong> >> > > --> > > The > only > constant > in > life > is 
> > change.> >> >> >> >> >> > > > > > 
> >
>  > > Never > miss > a > thing. > Make > Yahoo > your > home > page.> > > 
> http://www.yahoo.com/r/hs> >> > > 
> -> > > To 
> > unsubscribe, > e-mail: > [EMAIL PROTECTED]> > > For > additional > 
> commands, > e-mail: > [EMAIL PROTECTED]> >> >> > > -- > Buy > Wicket > in > 
> Action: > http://manning.com/dashorst> Apache > Wicket > 1.3.1 > is > 
> released> Get > it > now: > 
> http://www.apache.org/dyn/closer.cgi/wicket/1.3.1> > > > > > 
> >
>  Be a better friend, newshound, and > know-it-all with Yahoo! Mobile. Try it 
> now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > > > 
> -> To 
> unsubscribe, e-mail: [EMAIL PROTECTED]> For additional commands, e-mail: 
> [EMAIL PROTECTED]> 
_
Scarica GRATIS la versione personalizzata MSN di Internet Explorer 7!
http://optimizedie7.msn.com/default.aspx?mkt=it-it

Re: Problem on undeploy

2008-02-14 Thread C S

Have you tried the antiLocking options (antiJARLocking and
antiResourceLocking)? 
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html  I haven't but
they seem to speak to your problem with the left over jars.



-- 
View this message in context: 
http://www.nabble.com/Problem-on-undeploy-tp15477946p15480678.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.Tree has no properties

2008-02-14 Thread Juan Gabriel Arias
Hi all,
i'm getting this error in my Ajax Debug Window.

]]>*INFO: *
Response parsed. Now invoking steps...
*ERROR: *Exception evaluating javascript: TypeError: Wicket.Tree
 has no properties
*INFO: *Response processed successfully.


I have a simple LinkTree, filled with a bunch of nodes (less than 50). If i
expand a node, it works ok.
The problem arise when i collapse a node. Wicket logs that error, and the
node stays expanded.
If I click the plus icon again, it adds the nodes again, duplicated.

Is there any way of making the Ajax Debug more verbose or something like
that?
Does it rings any bell for someone?

Thanks in advance!
Juan


Re: Business/Domain objects used as wicket model object - opinions please

2008-02-14 Thread Bohtvaroh

Hello.

I your case you will suffer from weak domain model rules. Look at
http://martinfowler.com/bliki/AnemicDomainModel.html for more info. DTOs -
is the best approach, but there must be some best practices for using them.

Alexander


Martijn Dashorst wrote:
> 
> You could do that. If you are paid by the lines of code you write, it
> might be even profitable. A lot of people prefer the direct binding
> (which IMO is a POJO) instead of making a GUI bean (which would be a
> DTO).
> 
> Martijn
> 

-- 
View this message in context: 
http://www.nabble.com/Business-Domain-objects-used-as-wicket-model-object---opinions-please-tp15462661p15479381.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 on undeploy

2008-02-14 Thread Sébastien Piller




Here is a Thread dump from Tomcat (after I have undeployed my app). It
doesn't speak about PageSavingThread, but if anybody see something
wrong

[2008-02-14 12:43:17] [1334 prunsrv.c] [debug] Procrun
log initialized
  [2008-02-14 12:43:17] [info] Procrun (2.0.3.0) started
  [2008-02-14 12:43:17] [info] Debugging Service...
  [2008-02-14 12:43:17] [1158 prunsrv.c] [debug] Inside
ServiceMain...
  [2008-02-14 12:43:17] [info] Starting service...
  [2008-02-14 12:43:17] [385  javajni.c] [debug] Jvm Option[0]
-Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 6.0
  [2008-02-14 12:43:17] [385  javajni.c] [debug] Jvm Option[1]
-Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 6.0
  [2008-02-14 12:43:17] [385  javajni.c] [debug] Jvm Option[2]
-Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat
6.0\common\endorsed
  [2008-02-14 12:43:17] [385  javajni.c] [debug] Jvm Option[3]
-Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat
6.0\temp
  [2008-02-14 12:43:18] [385  javajni.c] [debug] Jvm Option[4]
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
  [2008-02-14 12:43:18] [385  javajni.c] [debug] Jvm Option[5]
-Djava.util.logging.config.file=C:\Program Files\Apache Software
Foundation\Tomcat 6.0\conf\logging.properties
  [2008-02-14 12:43:18] [385  javajni.c] [debug] Jvm Option[6]
-Djava.class.path=C:\Program Files\Apache Software Foundation\Tomcat
6.0\bin\bootstrap.jar
  [2008-02-14 12:43:18] [385  javajni.c] [debug] Jvm Option[7]
vfprintf
  [2008-02-14 12:43:18] [471  javajni.c] [debug] argv[0] = start
  [2008-02-14 12:43:19] [1007 prunsrv.c] [debug] Java started
org/apache/catalina/startup/Bootstrap
  [2008-02-14 12:43:19] [info] Service started in 2312 ms.
  [2008-02-14 12:43:20] [1250 prunsrv.c] [debug] Waiting worker to
finish...
  [2008-02-14 12:45:34] [info] Console CTRL+BREAK event signaled
  [2008-02-14 12:45:34] [info] 2008-02-14 12:45:34
  [2008-02-14 12:45:34] [info] Full thread dump Java HotSpot(TM)
Client VM (1.6.0_03-b05 mixed mode, sharing):
  [2008-02-14 12:45:34] [info] 
  [2008-02-14 12:45:35] [info] "http-8080-3" 
  [2008-02-14 12:45:35] [info] daemon 
  [2008-02-14 12:45:35] [info] prio=6 tid=0x02fcdc00 
  [2008-02-14 12:45:35] [info] nid=0x115c 
  [2008-02-14 12:45:35] [info] in Object.wait() 
  [2008-02-14 12:45:35] [info] [0x0384f000..0x0384fc14]
  [2008-02-14 12:45:35] [info]    java.lang.Thread.State: WAITING
(on object monitor)
  [2008-02-14 12:45:35] [info]     at java.lang.Object.wait(Native
Method)
  [2008-02-14 12:45:35] [info]     - waiting on <0x2312b2f0> 
  [2008-02-14 12:45:36] [info] (a
org.apache.tomcat.util.net.JIoEndpoint$Worker)
  [2008-02-14 12:45:36] [info]     at
java.lang.Object.wait(Object.java:485)
  [2008-02-14 12:45:36] [info]     at
org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:416)
  [2008-02-14 12:45:36] [info]     - locked <0x2312b2f0> 
  [2008-02-14 12:45:36] [info] (a
org.apache.tomcat.util.net.JIoEndpoint$Worker)
  [2008-02-14 12:45:36] [info]     at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:442)
  [2008-02-14 12:45:36] [info]     at java.lang.Thread.run(Unknown
Source)
  [2008-02-14 12:45:37] [info] 
  [2008-02-14 12:45:37] [info] "http-8080-2" 
  [2008-02-14 12:45:37] [info] daemon 
  [2008-02-14 12:45:37] [info] prio=6 tid=0x02fcd800 
  [2008-02-14 12:45:37] [info] nid=0x1630 
  [2008-02-14 12:45:37] [info] in Object.wait() 
  [2008-02-14 12:45:37] [info] [0x0380f000..0x0380fc94]
  [2008-02-14 12:45:37] [info]    java.lang.Thread.State: WAITING
(on object monitor)
  [2008-02-14 12:45:37] [info]     at java.lang.Object.wait(Native
Method)
  [2008-02-14 12:45:37] [info]     - waiting on <0x2312b378> 
  [2008-02-14 12:45:38] [info] (a
org.apache.tomcat.util.net.JIoEndpoint$Worker)
  [2008-02-14 12:45:38] [info]     at
java.lang.Object.wait(Object.java:485)
  [2008-02-14 12:45:38] [info]     at
org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:416)
  [2008-02-14 12:45:38] [info]     - locked <0x2312b378> 
  [2008-02-14 12:45:38] [info] (a
org.apache.tomcat.util.net.JIoEndpoint$Worker)
  [2008-02-14 12:45:38] [info]     at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:442)
  [2008-02-14 12:45:38] [info]     at java.lang.Thread.run(Unknown
Source)
  [2008-02-14 12:45:38] [info] 
  [2008-02-14 12:45:38] [info]
"com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2" 
  [2008-02-14 12:45:39] [info] daemon 
  [2008-02-14 12:45:39] [info] prio=6 tid=0x02eab800 
  [2008-02-14 12:45:39] [info] nid=0x14c8 
  [2008-02-14 12:45:39] [info] in Object.wait() 
  [2008-02-14 12:45:39] [info] [0x0378f000..0x0378fa14]
  [2008-02-14 12:45:39] [info]    java.lang.Thread.State:
TIMED_WAITING (on object monitor)
  [2008-02-14 12:45:39] [info]     at java.lang.Object.wait(Native
Method)
  [2008-02-14 12:45:39] [info]     - waiting on <0x230a9498> 
  [2008-02-14 12:45:40] [info] (a
com.mchange.v2.asy

Problem on undeploy

2008-02-14 Thread Sébastien Piller

Hello guys,

I have a problem with wicket when I undeploy my application. Tomcat 
tries to undeploy everything, but he fails to delete the wicket's API 
librairies (wicket-1.3.1.jar, wicket-extensions-1.3.1.jar, etc.).


It seems to the same issue as this one:
http://mail-archives.apache.org/mod_mbox/wicket-commits/200801.mbox/[EMAIL 
PROTECTED]

Is there a workaround for this? I really need to be able to redeploy my 
application without restarting Tomcat...


Thanks

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



Re: Problem with bad CSS path after validation

2008-02-14 Thread dfernandez


Ok, I found it and it was my fault. I leave it here so that anyone
experiencing this same problem can know:

The problem is, this applicacion I am developing was Struts-based before,
and there was an "index.jsp" page in the root of the web application (which
of course had rendered useless with wicket, but I forgot to delete it).

When I did a request to the "/" of my webapp context, Tomcat noticed that no
servlet applied to that URL, but that I had an index.jsp standing there
which is the default "welcome file" name. I hadn't configured this in
web.xml, but anyway that seems to be a standard name and a page with such a
name will be considered welcome file even if not explicitly configured in
web.xml.

When this happened, Tomcat automatically set the "servlet path" (returned by
request.getServletPath()) to "/index.jsp" instead of "/", which is what
would happen if that file weren't there. 

And from then on, having "/index.jsp" as a servlet path, everything went
wrong, as Wicket was not able to compute the paths for resources or CSS
files correctly...

Hope this helps someone.

Regards,
Daniel.




dfernandez wrote:
> 
> 
> Hello all,
> 
> I am having problems with the path that Wicket builds for my CSS sheet. I
> have a "BasePage" which has:
> 
> add(HeaderContributor.forCss("css/styles.css"));
> 
> And a sign-in page that extends this BasePage is mounted like this at the
> Application "init()" method:
> 
> mountBookmarkablePage("/aaa/signIn",  SignInPage.class);
> 
> The problem is, when I load this page I get a correct CSS path, like this:
> 
> 
> 
> And when I input incorrect data in the form, I get a message in my
> feedback panel and I am redirected to the same page, but this time the URL
> is not "/aaa/signIn", but "/?wicket:interface=:5".
> 
> This time the page renders correctly, but there is no CSS! And that is
> because, if I see the HTML, the  tag for this CSS sheet is:
> 
> 
> 
> Instead of what it should be: "css/styles.css"
> 
> What can be happening here?
> 
> In case this helps, I am applying the Wicket filter to "/*".
> 
> Many thanks,
> Daniel.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Problem-with-bad-CSS-path-after-validation-tp15455620p15477313.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: Doubt about getList().indexOf() usage in ListView.moveUpLink, moveDownLink, removeLink

2008-02-14 Thread Henrik Lundahl
Hi

Yes, but why can't ListItem.getIndex() be used? I can't see any
drawbacks, but one advantage is that you can use the same model object
twice in the list. It's not unlikely that I've missed something,
though.


Regards,
Henrik



2008/2/14, Igor Vaynberg <[EMAIL PROTECTED]>:
> you can always roll your own link, you dont have to use the one
>  provided with ListView - there is nothing special it does that you
>  cannot do yourself. Of course we should have used item.getindex() if
>  there was some common interface that all items that were put in list
>  had to implement...but since there is no such thing we do the best we
>  can without it but leave you plenty of freedom to implement your own.
>
>
>  -igor
>
>
>
>  On Feb 13, 2008 8:05 PM, Lan Boon Ping <[EMAIL PROTECTED]> wrote:
>  > Hi,
>  >
>  > Taking a look at ListView.moveUpLink as example, I doubt that this
>  > getList().indexOf() will return a correct index if we have duplicate
>  > items with same identity in getList(). Should not it uses
>  > item.getIndex() instead?
>  >
>  > public final Link moveUpLink(final String id, final ListItem item)
>  > {
>  > return new Link(id)
>  > {
>  > private static final long serialVersionUID = 1L;
>  >
>  > public void onClick()
>  > {
>  > final int index = 
> getList().indexOf(item.getModelObject()); // use
>  > item.getIndex() instead?
>  >
>  > Thank You.
>  >
>  > Regards
>  > Boon Ping
>  >
>  > -
>  > 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]
>
>

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



Re: annotated class

2008-02-14 Thread Ned Collyer

What I've done is as follows

In WEB-INF/web.xml i have the following  listeners and params.


contextConfigLocation
${myConfigDir}/applicationContext.xml


Configures Log4J for this web app.
   
org.springframework.web.util.Log4jConfigListener


Configures spring with this web app.
   
org.springframework.web.context.ContextLoaderListener


This means that via a property I can tell the app to keep the
applicationContext.xml anywhere. (eg,
JETTY_OPTS="-DmyConfigDir=file:/someDirectory")

If you use this it should ... hopefully work for you.  I cant remember the
setup in too much detail, but it works :)


freak182 wrote:
> 
> My question is, the appContext.xml should be put in the classpath or
> /WEB-INF/config ?is there is difference between the two? Any idea.
> Thanks a lot.
> Cheers
> 

-- 
View this message in context: 
http://www.nabble.com/annotated-class-tp15476390p15476513.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: annotated class

2008-02-14 Thread Nino Saturnino Martinez Vazquez Wael

Do you use maven to build with?

com.test.server.model.Test
com.test.server.model.Test2



freak182 wrote:

Hello,
Im developing an app using hibernate annotations.My problem is when i
configure my appContext.xml the annotated class cannot be found. here is the
code snippet of appContext.xml found in WEB-INF/config.







org.hibernate.dialect.MySQL5Dialect


org.hibernate.cache.OSCacheProvider


2
300
100

after_statement

5

select 1


true

update

true




  

com.test.server.model.Test
com.test.server.model.Test2




com.test.server




My question is, the appContext.xml should be put in the classpath or
/WEB-INF/config ?is there is difference between the two? Any idea.
Thanks a lot.
Cheers
  


--
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]



annotated class

2008-02-14 Thread freak182

Hello,
Im developing an app using hibernate annotations.My problem is when i
configure my appContext.xml the annotated class cannot be found. here is the
code snippet of appContext.xml found in WEB-INF/config.







org.hibernate.dialect.MySQL5Dialect


org.hibernate.cache.OSCacheProvider


2
300
100

after_statement

5

select 1


true

update

true




  

com.test.server.model.Test
com.test.server.model.Test2




com.test.server




My question is, the appContext.xml should be put in the classpath or
/WEB-INF/config ?is there is difference between the two? Any idea.
Thanks a lot.
Cheers
-- 
View this message in context: 
http://www.nabble.com/annotated-class-tp15476390p15476390.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]