RE: Link to last accessed page

2008-02-15 Thread Michael Sparer

I just get the page from the page map as follows:
// get this page's ID
int currentId = getPage().getPageMapEntry().getNumericId();
// -1 is the version number, -1 means the latest version (i think ...)
Page p = getPage().getPageMap().get((currentId-1), -1);

that works just fine and fits my needs to keep track of the last five pages
(by decrementing the currentId value).
maybe it suits your needs too ...

regards, 

Michael


Warren Bell wrote:
 
 Could you point me to some code examples?
 
 -Original Message-
 From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, February 13, 2008 1:18 PM
 To: users@wicket.apache.org
 Subject: Re: Link to last accessed page
 
 
 That is the same as pressing the back button. It is a low tech
 solution to the problem you are trying to solve :-)
 
 It is possible to gain access to the pages in the pagemap. I just
 don't have the code readily available.
 
 We use it in our system to provide users with a navigation hierarchy
 so they can jump back to a particular moment without having to press
 20 back buttons.
 
 Martijn
 
 On 2/13/08, Warren [EMAIL PROTECTED] wrote:
  Would that be the same as clicking the browser's back button? And would
  there be any instance that that would cause a problem? Also, isn't the
  PageMap where all the previous pages are stored so that the 
 back button will
  work? And if so, is there a way to access those pages from my 
 page so that I
  can link to them if needed?
 
   -Original Message-
   From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
   Sent: Wednesday, February 13, 2008 12:59 PM
   To: users@wicket.apache.org
   Subject: Re: Link to last accessed page
  
  
   you could use the following markup fragment:
  
javascript:back(); Return to previous page 
  
   (not 100% sure about the back() method, but there is a javascript
   function in the browser that does that.
  
   Martijn
  
   On 2/13/08, Warren [EMAIL PROTECTED] wrote:
The link is on an Accessed denied page. I am not sure how to
   pass anything
to it other than thru the session. I thought maybe I could get
   the last page
from the PageMap from the Session or from the PageMap from the
   Page. I have
not looked at breadcrumbs, not sure how that would work. I
   should be able to
get a hold of the last accessed page from the current page 
 and then set
setResponsePage(...) to it. I am very new to Wicket and I am
   just starting
to figure things out, so bare with me.
   
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of James Carman
 Sent: Wednesday, February 13, 2008 12:26 PM
 To: users@wicket.apache.org
 Subject: Re: Link to last accessed page


 How about using the breadcrumb component?  Would that help?

 http://wicketstuff.org/wicket13/breadcrumb/

 On 2/13/08, Warren [EMAIL PROTECTED] wrote:
  How do I create a link on a page that will go to the last
 accessed page no
  matter what that page is? I see that WebPage has a method
 homePageLink. Is
  there something simmilar that will return you to the last
 accessed page? I
  also see that the class AccessStackPageMap has a method
 lastAccessedEntry(),
  but I do not know how to get to that method from my page.
 
  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]
   
   
  
  
   --
   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]
  
 
 
  -
  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]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


-

Re: Problem on undeploy

2008-02-15 Thread Sébastien Piller

Hello,

I just tried it, and it worked :) I don't know if I can use this 
directive on my deployment server... I'll have a look with my hoster.


After some investigation, I'm now quite sure that it's a Wicket problem. 
I tried with a very simple project (Hello World) and it made the lock.


Could anybody tell me if it's a known bug or if I have to write a jira?

Thanks


TahitianGabriel a écrit :

Have you also tried the antiResourceLocking=true parameter?

That's the one I use and it works!

  


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



Re: wicket-security Custom Access Denied Page

2008-02-15 Thread Maurice Marrink
That is very strange, it should work doing it your way but my way
should work too since that is exactly what the hive itself is doing.
It might be caused by the equal or hashcode of your permission /
principal but then the authorization by the hive should fail too.
Would you mind pasting your principal and permission class here?
The hive file should not matter but could you paste it too.

Thanks,

Maurice


On Fri, Feb 15, 2008 at 4:14 AM, Warren [EMAIL PROTECTED] wrote:
 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 SetPrincipal 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 SetPrincipal 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))
 

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

2008-02-15 Thread Sven Schliesing

I think I don't get it :(

I narrowed down the problem to this test case. It would be great if you
could take a look:

---
public class WebApplicationTest {

public class CustomSession extends WebSession {
public CustomSession(Request request) {
super(request);
}
}

public class MyApplication extends SpringWebApplication {

private SpringComponentInjector springComponentInjector;

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

public void setSpringComponentInjector(SpringComponentInjector
springComponentInjector) {
this.springComponentInjector = springComponentInjector;
}


@Override
protected void init() {
if (springComponentInjector == null) {
springComponentInjector = new 
SpringComponentInjector(this);
}

addComponentInstantiationListener(springComponentInjector);
}

@Override
public Class getHomePage() {
return null;
}

}

@Test
public void test() {
AnnotApplicationContextMock mockAppCtx = new
AnnotApplicationContextMock();

MyApplication myApp = new MyApplication();
myApp.setSpringComponentInjector(new 
SpringComponentInjector(myApp,
mockAppCtx));

WicketTester wicketTester = new WicketTester(myApp);
}
}
---
-- 
View this message in context: 
http://www.nabble.com/org.apache.wicket.protocol.http.WebSession-cannot-be-cast-to-my.CustomSession-tp15480791p15496951.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: AjaxSelfUpdatingTimerBehavior, AjaxFallbackDefaultDataTable and a Form

2008-02-15 Thread Murat Yücel
Well the problem was how to keep the state when all objects was reloaded,
but i have made a minor hack.
I am placing all selected items in an arraylist and when the screen is
refreshed
the incoming list will be compared with the arraylist i keep internal.

/Murat

2008/2/14, Martin Funk [EMAIL PROTECTED]:

 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
 



update modalWindow content

2008-02-15 Thread Fredy Mesia
Hola People,

Maybe this is an easy one...

I've created a modal window with a panel inside. In the panel there's a
link. When I click this link I want the content of this modal window to be
completely changed. For that:

1) I get the enclosing window (the modal window)
2) get the content of this modal window
3) remove it
4) create the new content (a panel) with modalWindow.getContentId()
5) set the panel with modalWindow.setContent
6) show the window.

  public void onClick(AjaxRequestTarget target) {
LoaderModalWindow thisEnclosingModalWindow = (LoaderModalWindow)
TasksContent.this.getParent();
TasksContent actualContent =
(TasksContent)thisEnclosingModalWindow.get(
thisEnclosingModalWindow.getContentId());
thisEnclosingModalWindow.remove(actualContent);
SubTasksContent subTasksContent = new SubTasksContent(
thisEnclosingModalWindow.getContentId());
thisEnclosingModalWindow.setContent(subTasksContent);
thisEnclosingModalWindow.show(target);
  }

What I get when I pressed on the link is a second modalWindow!!! When I
close it, the first remains in the background. Obviously if I try to click
on any button it just crashes because the content has been removed.

I've tried to close it and reopen but the content is not refreshed.

I think that a second modal window has been started because I show it with a
new target... is this right?

How to avoid this second modal window appearance and change the content of
the existing one? Do I need to get the target the first modal window was
created with? HOW?

Gracias.

à+

Fredy


Re: wicketstuff-rome and authentification.

2008-02-15 Thread Murat Yücel
Hi Maurice

Can you point me in the right direction? What I need is the following.

http://localhost:8080/rssfeed?username=adminpassword=12345678

The username and password should be validated against the database
and if it is correct the feed should be generated. I can of course do this
with a filter but i guess this is not the wicket way

/Murat

2008/2/14, Maurice Marrink [EMAIL PROTECTED]:

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

2008-02-15 Thread Maurice Marrink
Why not use a filter?
Wicket uses them too.
I have absolutely no clue how wicketstuff-rome or rss for that matter
works but it looks like they are using a regular wicket page.
So the question is what do you want?
i can think of the following solutions, but there are probably some
more i haven't thought of
-do the authentication on the fly in your page (you do not need any
fancy security framework for this)
-put a filter in front of your app that does the validation for the
rss feed for you (you do not need any fancy security framework for
this)
-you can secure the page in the recommended way of your security
framework (wicket-auth roles or swarm)

whichever you prefer depends on a couple of things
-are you already using a wicket security-framework? or something like acegi?
-is it enough for you to authenticate the user or does he need extra
permissions to access the feed?
-do you prefer keeping everything in wicket or are you ok with
servletfilters and stuff?

So you see there is no right or wrong direction, all roads lead to
rome (pun intended)

Let me know what you prefer and we go from there.

Maurice



On Fri, Feb 15, 2008 at 11:22 AM, Murat Yücel [EMAIL PROTECTED] wrote:
 Hi Maurice

  Can you point me in the right direction? What I need is the following.

  http://localhost:8080/rssfeed?username=adminpassword=12345678

  The username and password should be validated against the database
  and if it is correct the feed should be generated. I can of course do this
  with a filter but i guess this is not the wicket way

  /Murat

  2008/2/14, Maurice Marrink [EMAIL PROTECTED]:


 
   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]
  
  


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



Model update doesn't work with TabbedPanel?

2008-02-15 Thread Martijn Lindhout
Hi all,

I have two 'almost' identical situations, both are using a plain form
updating a simple Hibernate POJO. The same code is used for creating new
entities and editing existing ones.
One situation is really plain in the sense that it is just that, the other
one is that the form is wrapped in a TabbedPanel. The one without the
TabbedPanel creates and updates my models correctly, I see the changes in
the database. The one with the TabbedPanel works for creating new objects,
but when editing existing ones, the update's doesn't seem to propagate to my
models. I use a DetachableLoadableModel. I see the model load, but when the
Hibernate POJO is sent back to the persistence layer, it contains all
unmodified fields

Do I need to take special actions when using forms inside TabbedPanels?

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


Re: Model update doesn't work with TabbedPanel?

2008-02-15 Thread Martijn Lindhout
ok, shame on me. The two cases were not so identical as I said. This was the
problem:

The working scenario had this:

TextField naamField = new TextField(naam, new PropertyModel(getModel(), 
naam.value));

The not working one this:

INawGegevens naw = ((IMedewerker)getModel)).getNawGegevens();
TextField voornaam = new TextField(voornamen, new PropertyModel(naw, 
voornamen.value));

Of course the LoadableDetachableModel doesn't work anymore, because the
target of the model is the Hibernate POJO and not the LDM.
Everything works fine when I changed it to this:

TextField voornaam = new TextField(voornamen, new PropertyModel(getModel(),
nawGegevens.voornamen.value));

2008/2/15, Martijn Lindhout [EMAIL PROTECTED]:

 Hi all,

 I have two 'almost' identical situations, both are using a plain form
 updating a simple Hibernate POJO. The same code is used for creating new
 entities and editing existing ones.
 One situation is really plain in the sense that it is just that, the other
 one is that the form is wrapped in a TabbedPanel. The one without the
 TabbedPanel creates and updates my models correctly, I see the changes in
 the database. The one with the TabbedPanel works for creating new objects,
 but when editing existing ones, the update's doesn't seem to propagate to my
 models. I use a DetachableLoadableModel. I see the model load, but when the
 Hibernate POJO is sent back to the persistence layer, it contains all
 unmodified fields

 Do I need to take special actions when using forms inside TabbedPanels?

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




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


Re: Problem on undeploy

2008-02-15 Thread Johan Compagner
i guess this is a problem of the jvm/jdk itself
I guess this is all related to the stupid i can't close a url connection
thing because i guess it has something to
do with the IInitializers lookup that somehowe holds on the something



On Fri, Feb 15, 2008 at 9:29 AM, Sébastien Piller [EMAIL PROTECTED]
wrote:

 Hello,

 I just tried it, and it worked :) I don't know if I can use this
 directive on my deployment server... I'll have a look with my hoster.

 After some investigation, I'm now quite sure that it's a Wicket problem.
 I tried with a very simple project (Hello World) and it made the lock.

 Could anybody tell me if it's a known bug or if I have to write a jira?

 Thanks


 TahitianGabriel a écrit :
  Have you also tried the antiResourceLocking=true parameter?
 
  That's the one I use and it works!
 
 

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




RE: Problem on undeploy

2008-02-15 Thread Wang, Yuesong
It's not a wicket issue. When Tomcat has to access resources in a jar file of a 
web app, it may lock it. Another attribute your can try is antiJARLocking, 
which is a little nicer than autiResourceLocking. You really only need to set 
these attribute if you do hot redeployment, e.g. in a development environment. 
In a production environment where you will stop the server before undeployment, 
it doesn't really matter.

Yuesong

-Original Message-
From: Sébastien Piller [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 15, 2008 3:29 AM
To: users@wicket.apache.org
Subject: Re: Problem on undeploy

Hello,

I just tried it, and it worked :) I don't know if I can use this directive on 
my deployment server... I'll have a look with my hoster.

After some investigation, I'm now quite sure that it's a Wicket problem. 
I tried with a very simple project (Hello World) and it made the lock.

Could anybody tell me if it's a known bug or if I have to write a jira?

Thanks


TahitianGabriel a écrit :
 Have you also tried the antiResourceLocking=true parameter?

 That's the one I use and it works!

   

-
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: How to set no cache header

2008-02-15 Thread Martijn Dashorst
Just override the setHeaders method. I don't know what to say more.

Martijn

On 2/15/08, pnerkar [EMAIL PROTECTED] wrote:

  Hi Martijn,

  I tried but not able to find setHeader method for Page.
  Can you please explain this bit more ??

  Regards,

  Pankaj.



  Martijn Dashorst wrote:
  
   Override the setHeaders method of your page.
   Martijn
  
   On 1/23/08, Sébastien Piller [EMAIL PROTECTED] wrote:
  
   Hello guys,
  
   I would like to prevent a page to be stored on the client side. How can
   I set the Cache-Control headers?
  
   Thanks!
  
   -
   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.0 is released
   Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0
  
  


 --
  View this message in context: 
 http://www.nabble.com/How-to-set-no-cache-header-tp15044463p15502951.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: How to set no cache header

2008-02-15 Thread pnerkar

Hi Martijn,

I tried but not able to find setHeader method for Page.
Can you please explain this bit more ??

Regards,

Pankaj.


Martijn Dashorst wrote:
 
 Override the setHeaders method of your page.
 Martijn
 
 On 1/23/08, Sébastien Piller [EMAIL PROTECTED] wrote:

 Hello guys,

 I would like to prevent a page to be stored on the client side. How can
 I set the Cache-Control headers?

 Thanks!

 -
 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.0 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-set-no-cache-header-tp15044463p15502951.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]



Palette : Set Selected Value

2008-02-15 Thread vincent Renaville
Hello,

I use the Palette component and I want to set pre-selected value in the
componenent.

Soemebody have already done that ?

Thanks for your help,

Vincent


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

2008-02-15 Thread Igor Vaynberg
you need to override newsession on the app and return your subclass

-igor


On Fri, Feb 15, 2008 at 2:00 AM, Sven Schliesing
[EMAIL PROTECTED] wrote:

  I think I don't get it :(

  I narrowed down the problem to this test case. It would be great if you
  could take a look:

  ---
  public class WebApplicationTest {

 public class CustomSession extends WebSession {
 public CustomSession(Request request) {
 super(request);
 }
 }

 public class MyApplication extends SpringWebApplication {

 private SpringComponentInjector springComponentInjector;


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

 public void setSpringComponentInjector(SpringComponentInjector
  springComponentInjector) {
 this.springComponentInjector = 
 springComponentInjector;
 }


 @Override
 protected void init() {
 if (springComponentInjector == null) {
 springComponentInjector = new 
 SpringComponentInjector(this);
 }
 
 addComponentInstantiationListener(springComponentInjector);
 }

 @Override
 public Class getHomePage() {
 return null;
 }

 }

 @Test
 public void test() {
 AnnotApplicationContextMock mockAppCtx = new
  AnnotApplicationContextMock();

 MyApplication myApp = new MyApplication();
 myApp.setSpringComponentInjector(new 
 SpringComponentInjector(myApp,
  mockAppCtx));

 WicketTester wicketTester = new WicketTester(myApp);
 }
  }
  ---
  --
  View this message in context: 
 http://www.nabble.com/org.apache.wicket.protocol.http.WebSession-cannot-be-cast-to-my.CustomSession-tp15480791p15496951.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: wicket-security Custom Access Denied Page

2008-02-15 Thread Warren
Maurice,

Here is my SimpleCachingHive and my Principal. I did not extend Permissin, I
didn't think I had to. I pretty much based my implementation on you tabs
example minus the tabs. Should I extend Permission and override hashCode()
and equals(Object obj). And if I do, how do I force my hive to use my
extended Permission?

import java.util.Collection;
import java.util.Iterator;
import java.util.Set;

import org.apache.wicket.security.hive.SimpleCachingHive;
import org.apache.wicket.security.hive.authorization.Permission;
import org.apache.wicket.security.hive.authorization.Principal;
import org.apache.wicket.security.util.ManyToManyMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ScanManSimpleCachingHive extends SimpleCachingHive
{

final Logger log = 
LoggerFactory.getLogger(ScanManSimpleCachingHive.class);

public ScanManSimpleCachingHive()
{
super();
}

private ManyToManyMap hivePrincipalsAndPermissions = new 
ManyToManyMap();

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();
// Does not work
// hivePrincipalsAndPermissions.add(permission, 
principal);
// Does work
hivePrincipalsAndPermissions.add(permission.getName(), 
principal);
}
}

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

public SetPrincipal getPrincipals(Permission p)
{
// Does not work
// return hivePrincipalsAndPermissions.get(p);
// Does work
return hivePrincipalsAndPermissions.get(p.getName());
}

}


import org.apache.wicket.security.hive.authentication.Subject;
import org.apache.wicket.security.hive.authorization.Principal;

public class ScanManPrincipal implements Principal
{
private static final long serialVersionUID = 1L;
private String name;

/**
 *
 * Construct.
 *
 * @param name
 */
public ScanManPrincipal(String name)
{
super();
this.name = name;
if (name == null)
throw new IllegalArgumentException(Name must be 
specified);
}

/**
 * @see 
org.apache.wicket.security.hive.authorization.Principal#getName()
 */
public String getName()
{
return name;
}

/**
 * @see
org.apache.wicket.security.hive.authorization.Principal#implies(Subject)
 */
public boolean implies(Subject subject)
{
// no inheritance structure in these principals.
return false;
}

/**
 *
 * @see java.lang.Object#toString()
 */
public String toString()
{
return getClass().getName() + :  + getName();
}

/**
 * generated hash based on class and name.
 *
 * @see java.lang.Object#hashCode()
 */
public int hashCode()
{
final int PRIME = 31;
int result = 1;
result = PRIME * result + ((name == null) ? 0 : 
name.hashCode());
result = PRIME * result + getClass().hashCode();
return result;
}

/**
 *
 *
 * @see java.lang.Object#equals(java.lang.Object)
 */
public boolean equals(Object obj)
{
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
final ScanManPrincipal other = (ScanManPrincipal)obj;
if (name == null)
{
if (other.name != null)
return false;
}
else if (!name.equals(other.name))
return false;
return true;
}
}

 -Original Message-
 From: Maurice Marrink [mailto:[EMAIL PROTECTED]
 Sent: Friday, February 15, 2008 12:49 AM
 To: users@wicket.apache.org
 

RE: Link to last accessed page

2008-02-15 Thread Warren
Thanks, I will give it a try

 -Original Message-
 From: Michael Sparer [mailto:[EMAIL PROTECTED]
 Sent: Friday, February 15, 2008 1:25 AM
 To: users@wicket.apache.org
 Subject: RE: Link to last accessed page



 I just get the page from the page map as follows:
 // get this page's ID
 int currentId = getPage().getPageMapEntry().getNumericId();
 // -1 is the version number, -1 means the latest version (i think ...)
 Page p = getPage().getPageMap().get((currentId-1), -1);

 that works just fine and fits my needs to keep track of the last
 five pages
 (by decrementing the currentId value).
 maybe it suits your needs too ...

 regards,

 Michael


 Warren Bell wrote:
 
  Could you point me to some code examples?
 
  -Original Message-
  From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, February 13, 2008 1:18 PM
  To: users@wicket.apache.org
  Subject: Re: Link to last accessed page
 
 
  That is the same as pressing the back button. It is a low tech
  solution to the problem you are trying to solve :-)
 
  It is possible to gain access to the pages in the pagemap. I just
  don't have the code readily available.
 
  We use it in our system to provide users with a navigation hierarchy
  so they can jump back to a particular moment without having to press
  20 back buttons.
 
  Martijn
 
  On 2/13/08, Warren [EMAIL PROTECTED] wrote:
   Would that be the same as clicking the browser's back
 button? And would
   there be any instance that that would cause a problem? Also,
 isn't the
   PageMap where all the previous pages are stored so that the
  back button will
   work? And if so, is there a way to access those pages from my
  page so that I
   can link to them if needed?
  
-Original Message-
From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 13, 2008 12:59 PM
To: users@wicket.apache.org
Subject: Re: Link to last accessed page
   
   
you could use the following markup fragment:
   
 javascript:back(); Return to previous page
   
(not 100% sure about the back() method, but there is a javascript
function in the browser that does that.
   
Martijn
   
On 2/13/08, Warren [EMAIL PROTECTED] wrote:
 The link is on an Accessed denied page. I am not sure how to
pass anything
 to it other than thru the session. I thought maybe I could get
the last page
 from the PageMap from the Session or from the PageMap from the
Page. I have
 not looked at breadcrumbs, not sure how that would work. I
should be able to
 get a hold of the last accessed page from the current page
  and then set
 setResponsePage(...) to it. I am very new to Wicket and I am
just starting
 to figure things out, so bare with me.

  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] Behalf Of James Carman
  Sent: Wednesday, February 13, 2008 12:26 PM
  To: users@wicket.apache.org
  Subject: Re: Link to last accessed page
 
 
  How about using the breadcrumb component?  Would that help?
 
  http://wicketstuff.org/wicket13/breadcrumb/
 
  On 2/13/08, Warren [EMAIL PROTECTED] wrote:
   How do I create a link on a page that will go to the last
  accessed page no
   matter what that page is? I see that WebPage has a method
  homePageLink. Is
   there something simmilar that will return you to the last
  accessed page? I
   also see that the class AccessStackPageMap has a method
  lastAccessedEntry(),
   but I do not know how to get to that method from my page.
  
   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]


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

Re: back button issue with AjaxSelfUpdatingTimerBehavior, anyone had the same problem?

2008-02-15 Thread cemeterygate

i overload the setHeads method but still no luck.
response.setHeader(Pragma, no-cache);
response.setHeader(Cache-Control, no-cache, max-age=0,must-revalidate,
no-store);

i had the impressied that i must change the url (maybe by adding anchor has)
when search result panel is freshed in order for IE to cache the page
correctly. But I don't mind some quick workaround if there is any. thanks


Matej Knopp-2 wrote:
 
 Problem is that your browser is caching a wrong version of DOM tree.
 You need to serve the pages with Cache-Control: no-store to force
 browser reload the page on back button. See
 WebPage#setHeaders(WebResponse response).
 
 -Matej
 
 On Fri, Feb 15, 2008 at 6:14 PM, cemeterygate [EMAIL PROTECTED]
 wrote:

  I am using AjaxSelfUpdatingTimerBehavior to refresh the search result
 panel.
  I go to one of the search result, then hit back button, the search
 result
  panel is disappear. I thought back button is supported by wicket
 natively,
  but appearantly it doesn't in this case. So, what's the work around
 folks.
  please help. Thanks
  --
  View this message in context:
 http://www.nabble.com/back-button-issue-with-AjaxSelfUpdatingTimerBehavior%2C-anyone-had-the-same-problem--tp15503953p15503953.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]


 
 
 
 -- 
 Resizable and reorderable grid components.
 http://www.inmethod.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/back-button-issue-with-AjaxSelfUpdatingTimerBehavior%2C-anyone-had-the-same-problem--tp15503953p15507601.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-15 Thread Jason Anderson
you might take a look at how IndicatingAjaxLink/Button show/hide the
ajax loading indicator or just use it to show your hidden veil during
an ajax operation

On Thu, Feb 14, 2008 at 1:43 PM, JulianS [EMAIL PROTECTED] wrote:


  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]



-
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-15 Thread Timo Rantalaiho
On Fri, 15 Feb 2008, Igor Vaynberg wrote:
 you need to override newsession on the app and return your subclass

But he did it here, no?

  public class MyApplication extends SpringWebApplication {
 
  private SpringComponentInjector springComponentInjector;
 
 
  @Override
  public Session newSession(Request request, Response 
  response) {
  return new CustomSession(request);
  }
...
  MyApplication myApp = new MyApplication();
  myApp.setSpringComponentInjector(new 
  SpringComponentInjector(myApp,
   mockAppCtx));
 
  WicketTester wicketTester = new WicketTester(myApp);

Best wishes,

Timo

-- 
Timo Rantalaiho   
Reaktor Innovations OyURL: http://www.ri.fi/ 

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



Multiple Homepage Mountpoints for Localization

2008-02-15 Thread oliverw

Hi

I just wanted to make sure that my idea makes some sense if implemented this
way. My prerequisites:

1. I want to mount my homepage and all it's children (which are not that
many) multiple times at different mountpoints
2. Each mountpoint is prefixed with a language identifier which ultimately
decides in which language the content is presented (the site consists to 95%
of dynamic content which resides pre-localized in a database). Example: 

http://domain.com - homepage english
http://domain.com/items - item info page english

http://domain.com/de - homepage german
http://domain.com/de/items- item info page german

In order to achieve the desired behavior I've subclassed the WebRequestCycle
like shown below. Since I'm still pretty new to wicket, I would like to know
if this is how it should be done the Wicket Way or if there's a better
solution. 

class MyRequestCycle extends WebRequestCycle
{
public MyRequestCycle(WebApplication application, WebRequest request,
Response response)
{
super(application, request, response);

// init locale map
mapPatch2Locale = new HashMapString, Locale();
mapPatch2Locale.put(de, Locale.GERMAN);
mapPatch2Locale.put(fr, Locale.FRENCH);
mapPatch2Locale.put(es, new Locale(es));
}

/** Maps Request Path to associated Locale **/
HashMapString, Locale mapPatch2Locale;

protected void onBeginRequest()
{
super.onBeginRequest();

// adjust locale to url prefix
String path = getRequest().getPath();
Locale locale = null;

SetString keys = mapPatch2Locale.keySet();
while(keys.iterator().hasNext())
{
String _path = keys.iterator().next();
if(path.equals(_path) || path.startsWith(_path + /))
{
locale = mapPatch2Locale.get(_path);
break;
}
}

// default is english
if(locale == null)
locale = Locale.ENGLISH;

// setup locale for this request
getSession().setLocale(locale);
}
}

-- 
View this message in context: 
http://www.nabble.com/Multiple-Homepage-Mountpoints-for-Localization-tp15507606p15507606.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: back button issue with AjaxSelfUpdatingTimerBehavior, anyone had the same problem?

2008-02-15 Thread cemeterygate

i tried that, still no luck. After i hit back button on user detail page, the
research result is gone.

Here is what i did,

I have a search page which contains two panels, a search form panel and a
search result panel.

upon click on submit button, the AjaxSelfUpdatingTimerBehavior kicks in and
refresh the search result panel until there is search result available. 

I override the setHeaders SearchPage.java, what am i doing wrong here?
protected void setHeaders(WebResponse response) {
response.setHeader(Cache-Control, no-store);
}

much appreciated!!!


igor.vaynberg wrote:
 
 response.setHeader(Cache-Control, no-store);
 
 -igor
 
 
 On Fri, Feb 15, 2008 at 10:44 AM, cemeterygate [EMAIL PROTECTED]
 wrote:

  i overload the setHeads method but still no luck.
  response.setHeader(Pragma, no-cache);
  response.setHeader(Cache-Control, no-cache,
 max-age=0,must-revalidate,
  no-store);

  i had the impressied that i must change the url (maybe by adding anchor
 has)
  when search result panel is freshed in order for IE to cache the page
  correctly. But I don't mind some quick workaround if there is any.
 thanks




  Matej Knopp-2 wrote:
  
   Problem is that your browser is caching a wrong version of DOM tree.
   You need to serve the pages with Cache-Control: no-store to force
   browser reload the page on back button. See
   WebPage#setHeaders(WebResponse response).
  
   -Matej
  
   On Fri, Feb 15, 2008 at 6:14 PM, cemeterygate [EMAIL PROTECTED]
   wrote:
  
I am using AjaxSelfUpdatingTimerBehavior to refresh the search
 result
   panel.
I go to one of the search result, then hit back button, the search
   result
panel is disappear. I thought back button is supported by wicket
   natively,
but appearantly it doesn't in this case. So, what's the work around
   folks.
please help. Thanks
--
View this message in context:
  
 http://www.nabble.com/back-button-issue-with-AjaxSelfUpdatingTimerBehavior%2C-anyone-had-the-same-problem--tp15503953p15503953.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]
  
  
  
  
  
   --
   Resizable and reorderable grid components.
   http://www.inmethod.com
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  

  --
  View this message in context:
 http://www.nabble.com/back-button-issue-with-AjaxSelfUpdatingTimerBehavior%2C-anyone-had-the-same-problem--tp15503953p15507601.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/back-button-issue-with-AjaxSelfUpdatingTimerBehavior%2C-anyone-had-the-same-problem--tp15503953p15508043.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: back button issue with AjaxSelfUpdatingTimerBehavior, anyone had the same problem?

2008-02-15 Thread Igor Vaynberg
response.setHeader(Cache-Control, no-store);

-igor


On Fri, Feb 15, 2008 at 10:44 AM, cemeterygate [EMAIL PROTECTED] wrote:

  i overload the setHeads method but still no luck.
  response.setHeader(Pragma, no-cache);
  response.setHeader(Cache-Control, no-cache, max-age=0,must-revalidate,
  no-store);

  i had the impressied that i must change the url (maybe by adding anchor has)
  when search result panel is freshed in order for IE to cache the page
  correctly. But I don't mind some quick workaround if there is any. thanks




  Matej Knopp-2 wrote:
  
   Problem is that your browser is caching a wrong version of DOM tree.
   You need to serve the pages with Cache-Control: no-store to force
   browser reload the page on back button. See
   WebPage#setHeaders(WebResponse response).
  
   -Matej
  
   On Fri, Feb 15, 2008 at 6:14 PM, cemeterygate [EMAIL PROTECTED]
   wrote:
  
I am using AjaxSelfUpdatingTimerBehavior to refresh the search result
   panel.
I go to one of the search result, then hit back button, the search
   result
panel is disappear. I thought back button is supported by wicket
   natively,
but appearantly it doesn't in this case. So, what's the work around
   folks.
please help. Thanks
--
View this message in context:
   
 http://www.nabble.com/back-button-issue-with-AjaxSelfUpdatingTimerBehavior%2C-anyone-had-the-same-problem--tp15503953p15503953.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]
  
  
  
  
  
   --
   Resizable and reorderable grid components.
   http://www.inmethod.com
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  

  --
  View this message in context: 
 http://www.nabble.com/back-button-issue-with-AjaxSelfUpdatingTimerBehavior%2C-anyone-had-the-same-problem--tp15503953p15507601.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]



back button issue with AjaxSelfUpdatingTimerBehavior, anyone had the same problem?

2008-02-15 Thread cemeterygate

I am using AjaxSelfUpdatingTimerBehavior to refresh the search result panel.
I go to one of the search result, then hit back button, the search result
panel is disappear. I thought back button is supported by wicket natively,
but appearantly it doesn't in this case. So, what's the work around folks.
please help. Thanks
-- 
View this message in context: 
http://www.nabble.com/back-button-issue-with-AjaxSelfUpdatingTimerBehavior%2C-anyone-had-the-same-problem--tp15503953p15503953.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-15 Thread Timo Rantalaiho
On Thu, 14 Feb 2008, JulianS wrote:
 If you have an example you can share I'd appreciate it.

Sorry, I don't have a practical example to share just now,
but it was nearly basic IAjaxIndicatorAware usage, just 
check that out. 

I think that maybe after the place of the indicator in HTML
we sometimes put

  scriptwicketShow('ajaxIndicatorsId');/script

because sometimes the overlay was otherwise shown by default,
but that was that.

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations OyURL: http://www.ri.fi/ 

-
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-15 Thread Igor Vaynberg
right, missed it. i guess the next step would be to set a breakpoint
there and see if its ever called. if not, set a breakpoint in
websession constructor and see why that is invoked instead of the
overridden factory.

-igor


On Fri, Feb 15, 2008 at 10:25 AM, Timo Rantalaiho [EMAIL PROTECTED] wrote:
 On Fri, 15 Feb 2008, Igor Vaynberg wrote:
   you need to override newsession on the app and return your subclass

  But he did it here, no?


public class MyApplication extends SpringWebApplication {
   
private SpringComponentInjector springComponentInjector;
   
   
@Override
public Session newSession(Request request, Response 
 response) {
return new CustomSession(request);
}
  ...

   MyApplication myApp = new MyApplication();
myApp.setSpringComponentInjector(new 
 SpringComponentInjector(myApp,
 mockAppCtx));
   
WicketTester wicketTester = new WicketTester(myApp);


 Best wishes,

  Timo

  --
  Timo Rantalaiho
  Reaktor Innovations OyURL: http://www.ri.fi/ 

  -


 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: back button issue with AjaxSelfUpdatingTimerBehavior, anyone had the same problem?

2008-02-15 Thread James Carman
Perhaps we could set up some utility class for these hard-coded
values.  Something like...

HeaderUtils.setCacheControl(HeaderUtils.CACHE_NO_STORE);

If we're JDK5+, then I'd make a CacheControl enum maybe.

On 2/15/08, Igor Vaynberg [EMAIL PROTECTED] wrote:
 response.setHeader(Cache-Control, no-store);


  -igor



  On Fri, Feb 15, 2008 at 10:44 AM, cemeterygate [EMAIL PROTECTED] wrote:
  
i overload the setHeads method but still no luck.
response.setHeader(Pragma, no-cache);
response.setHeader(Cache-Control, no-cache, max-age=0,must-revalidate,
no-store);
  
i had the impressied that i must change the url (maybe by adding anchor 
 has)
when search result panel is freshed in order for IE to cache the page
correctly. But I don't mind some quick workaround if there is any. thanks
  
  
  
  
Matej Knopp-2 wrote:

 Problem is that your browser is caching a wrong version of DOM tree.
 You need to serve the pages with Cache-Control: no-store to force
 browser reload the page on back button. See
 WebPage#setHeaders(WebResponse response).

 -Matej

 On Fri, Feb 15, 2008 at 6:14 PM, cemeterygate [EMAIL PROTECTED]
 wrote:

  I am using AjaxSelfUpdatingTimerBehavior to refresh the search result
 panel.
  I go to one of the search result, then hit back button, the search
 result
  panel is disappear. I thought back button is supported by wicket
 natively,
  but appearantly it doesn't in this case. So, what's the work around
 folks.
  please help. Thanks
  --
  View this message in context:
 
 http://www.nabble.com/back-button-issue-with-AjaxSelfUpdatingTimerBehavior%2C-anyone-had-the-same-problem--tp15503953p15503953.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]





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

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



  
--
View this message in context: 
 http://www.nabble.com/back-button-issue-with-AjaxSelfUpdatingTimerBehavior%2C-anyone-had-the-same-problem--tp15503953p15507601.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]



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



Re: Multiple Homepage Mountpoints for Localization

2008-02-15 Thread Jonathan Locke


what about writing or subclassing a url coding strategy to use the first
part of the url to set the session's locale?


oliverw wrote:
 
 Hi
 
 I just wanted to make sure that my idea makes some sense if implemented
 this way. My prerequisites:
 
 1. I want to mount my homepage and all it's children (which are not that
 many) multiple times at different mountpoints
 2. Each mountpoint is prefixed with a language identifier which ultimately
 decides in which language the content is presented (the site consists to
 95% of dynamic content which resides pre-localized in a database).
 Example: 
 
 http://domain.com - homepage english
 http://domain.com/items - item info page english
 
 http://domain.com/de - homepage german
 http://domain.com/de/items- item info page german
 
 In order to achieve the desired behavior I've subclassed the
 WebRequestCycle like shown below. Since I'm still pretty new to wicket, I
 would like to know if this is how it should be done the Wicket Way or if
 there's a better solution. 
 
 class MyRequestCycle extends WebRequestCycle
 {
   public MyRequestCycle(WebApplication application, WebRequest request,
 Response response)
   {
   super(application, request, response);
 
   // init locale map
   mapPatch2Locale = new HashMapString, Locale();
   mapPatch2Locale.put(de, Locale.GERMAN);
   mapPatch2Locale.put(fr, Locale.FRENCH);
   mapPatch2Locale.put(es, new Locale(es));
   }
 
   /** Maps Request Path to associated Locale **/
   HashMapString, Locale mapPatch2Locale;
 
   protected void onBeginRequest()
   {
   super.onBeginRequest();
 
   // adjust locale to url prefix
   String path = getRequest().getPath();
   Locale locale = null;
 
   SetString keys = mapPatch2Locale.keySet();
   while(keys.iterator().hasNext())
   {
   String _path = keys.iterator().next();
   if(path.equals(_path) || path.startsWith(_path + /))
   {
   locale = mapPatch2Locale.get(_path);
   break;
   }
   }
 
   // default is english
   if(locale == null)
   locale = Locale.ENGLISH;
 
   // setup locale for this request
   getSession().setLocale(locale);
   }
 }
 
 

-- 
View this message in context: 
http://www.nabble.com/Multiple-Homepage-Mountpoints-for-Localization-tp15507606p15508899.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]



AjaxFallbackDefaultDataTable not refreshing in IE6

2008-02-15 Thread Beyonder Unknown

Hi Guys,

The AjaxFallbackDefaultDataTable (with SortableDataProvider) component that I'm 
using is not refreshing in IE6, but works fine with firefox. The Wicket Ajax 
Debugger says:

ERROR: Error while parsing response: Object required
INFO: Invoking post-call handler(s)...
INFO: invoking failure handler(s)...


Have any of you encountered this before?  Any help will be greatly appreciated.

Best,
Wen Tong
 
--
The only constant in life is change.




  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

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



Re: back button issue with AjaxSelfUpdatingTimerBehavior, anyone had the same problem?

2008-02-15 Thread cemeterygate

maybe the problem lies on SearchPage is a home page. So when user hit back
button, wicket create a new instance of SearchPage. What do you guys think?



cemeterygate wrote:
 
 i tried that, still no luck. After i hit back button on user detail page,
 the research result is gone.
 
 Here is what i did,
 
 I have a search page which contains two panels, a search form panel and a
 search result panel.
 
 upon click on submit button, the AjaxSelfUpdatingTimerBehavior kicks in
 and refresh the search result panel until there is search result
 available. 
 
 I override the setHeaders SearchPage.java, what am i doing wrong here?
 protected void setHeaders(WebResponse response) {
 response.setHeader(Cache-Control, no-store);
 }
 
 much appreciated!!!
 
 
 igor.vaynberg wrote:
 
 response.setHeader(Cache-Control, no-store);
 
 -igor
 
 
 On Fri, Feb 15, 2008 at 10:44 AM, cemeterygate [EMAIL PROTECTED]
 wrote:

  i overload the setHeads method but still no luck.
  response.setHeader(Pragma, no-cache);
  response.setHeader(Cache-Control, no-cache,
 max-age=0,must-revalidate,
  no-store);

  i had the impressied that i must change the url (maybe by adding anchor
 has)
  when search result panel is freshed in order for IE to cache the page
  correctly. But I don't mind some quick workaround if there is any.
 thanks




  Matej Knopp-2 wrote:
  
   Problem is that your browser is caching a wrong version of DOM tree.
   You need to serve the pages with Cache-Control: no-store to force
   browser reload the page on back button. See
   WebPage#setHeaders(WebResponse response).
  
   -Matej
  
   On Fri, Feb 15, 2008 at 6:14 PM, cemeterygate
 [EMAIL PROTECTED]
   wrote:
  
I am using AjaxSelfUpdatingTimerBehavior to refresh the search
 result
   panel.
I go to one of the search result, then hit back button, the search
   result
panel is disappear. I thought back button is supported by wicket
   natively,
but appearantly it doesn't in this case. So, what's the work around
   folks.
please help. Thanks
--
View this message in context:
  
 http://www.nabble.com/back-button-issue-with-AjaxSelfUpdatingTimerBehavior%2C-anyone-had-the-same-problem--tp15503953p15503953.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]
  
  
  
  
  
   --
   Resizable and reorderable grid components.
   http://www.inmethod.com
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  

  --
  View this message in context:
 http://www.nabble.com/back-button-issue-with-AjaxSelfUpdatingTimerBehavior%2C-anyone-had-the-same-problem--tp15503953p15507601.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/back-button-issue-with-AjaxSelfUpdatingTimerBehavior%2C-anyone-had-the-same-problem--tp15503953p15509269.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 set no cache header

2008-02-15 Thread Maurice Marrink
public class BasePage extends WebPage
{
protected void setHeaders(WebResponse response)
{
response.setHeader(Pragma, no-cache);
response.setHeader(Cache-Control, no-cache, max-age=0,
must-revalidate, no-store);
}
}

Maurice

On Fri, Feb 15, 2008 at 5:39 PM, Martijn Dashorst
[EMAIL PROTECTED] wrote:
 Just override the setHeaders method. I don't know what to say more.

  Martijn


  On 2/15/08, pnerkar [EMAIL PROTECTED] wrote:
  
Hi Martijn,
  
I tried but not able to find setHeader method for Page.
Can you please explain this bit more ??
  
Regards,
  
Pankaj.
  
  
  
Martijn Dashorst wrote:

 Override the setHeaders method of your page.
 Martijn

 On 1/23/08, Sébastien Piller [EMAIL PROTECTED] wrote:

 Hello guys,

 I would like to prevent a page to be stored on the client side. How can
 I set the Cache-Control headers?

 Thanks!

 -
 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.0 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0


  
  
   --
View this message in context: 
 http://www.nabble.com/How-to-set-no-cache-header-tp15044463p15502951.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]



-
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-15 Thread Nino Saturnino Martinez Vazquez Wael
Yeah, put some break points in there, and if you still have trouble 
provide a quickstart...


regards Nino

Sven Schliesing wrote:

I think I don't get it :(

I narrowed down the problem to this test case. It would be great if you
could take a look:

---
public class WebApplicationTest {

public class CustomSession extends WebSession {
public CustomSession(Request request) {
super(request);
}
}

public class MyApplication extends SpringWebApplication {

private SpringComponentInjector springComponentInjector;

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

public void setSpringComponentInjector(SpringComponentInjector
springComponentInjector) {
this.springComponentInjector = springComponentInjector;
}


@Override
protected void init() {
if (springComponentInjector == null) {
springComponentInjector = new 
SpringComponentInjector(this);
}

addComponentInstantiationListener(springComponentInjector);
}

@Override
public Class getHomePage() {
return null;
}

}

@Test
public void test() {
AnnotApplicationContextMock mockAppCtx = new
AnnotApplicationContextMock();

MyApplication myApp = new MyApplication();
myApp.setSpringComponentInjector(new 
SpringComponentInjector(myApp,
mockAppCtx));

WicketTester wicketTester = new WicketTester(myApp);
}
}
---
  


--
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: AjaxFallbackDefaultDataTable not refreshing in IE6

2008-02-15 Thread Igor Vaynberg
please enter a bug report along with a quickstart

-igor


On Fri, Feb 15, 2008 at 1:12 PM, Beyonder Unknown [EMAIL PROTECTED] wrote:
 Hi Igor,

  Its wicket 1.3.1.

  Thanks,
  Allan


  --
  The only constant in life is change.

  - Original Message 


 From: Igor Vaynberg [EMAIL PROTECTED]
  To: users@wicket.apache.org
  Sent: Friday, February 15, 2008 12:40:53 PM
  Subject: Re: AjaxFallbackDefaultDataTable not refreshing in IE6

  what wicket version is doing that?

  -igor


  On Fri, Feb 15, 2008 at 12:16 PM, Beyonder Unknown [EMAIL PROTECTED] wrote:
  
One thing I noticed is that the javascript generated is appended with 
 ^. Could it be that IE is not parsing this properly?
  
excerpt from Wicket Ajax Debug Window
  
  
   for (var i=0; iformLen; i++) {
   var elm = formObj.elements[i]^;
   if (elm.type == checkbox  elm.className == 
 parent) {
   elm.checked = state;
   return;
   }
   }
  
  
  
Thanks,
  
   Wen Tong
  
--
The only constant in life is change.
  
  
  
   - Original Message 
From: Beyonder Unknown [EMAIL PROTECTED]
To: WICKET USER users@wicket.apache.org
Sent: Friday, February 15, 2008 12:00:41 PM
Subject: AjaxFallbackDefaultDataTable not refreshing in IE6
  
  
Hi Guys,
  
The AjaxFallbackDefaultDataTable (with SortableDataProvider) component 
 that I'm using is not refreshing in IE6, but works fine with firefox. The 
 Wicket Ajax Debugger says:
  
ERROR: Error while parsing response: Object required
INFO: Invoking post-call handler(s)...
INFO: invoking failure handler(s)...
  
  
Have any of you encountered this before?  Any help will be greatly 
 appreciated.
  
Best,
Wen Tong
  
--
The only constant in life is change.
  
  
  
  
 
 
Looking for last minute shopping deals?
Find them fast with Yahoo! Search.  
 http://tools.search.yahoo.com/newsearch/category.php?category=shopping
  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
  
  
  
 
 
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]
  
  

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






   
 
  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]



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



Exception redirecting to source page

2008-02-15 Thread Cristiano Kliemann

Hi!

I have some business runtime exceptions that I want to be automatically
catched and its message rendered in the same page that threw it instead of
redirecting to an error page.

Is there a safe way to do that?

These 'business exceptions' are usually thrown in some specific methods like
onSubmit and onClick. Extending the specific components is not an option for
me.

I did something I think it dangerous. Something like:

public Page onRuntimeException(Page page, RuntimeException e) {

Throwable current = e;
while (current != null  !(current instanceof MyBusinessException)) {
current = current.getCause();
}
if (current != null) {
// MyBusinessException detected
page.error(Error:  + current.getMessage());
return page;
} else {
return super.onRuntimeException(page, e);
}
}

When as exception is thrown, all the execution flow breaks, making some
things not happen. The question is: is the above code safe assuming that
MyException could be thrown only by methods like onSubmit and onClick?
-- 
View this message in context: 
http://www.nabble.com/Exception-redirecting-to-source-page-tp15510198p15510198.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: AjaxFallbackDefaultDataTable not refreshing in IE6

2008-02-15 Thread Igor Vaynberg
argh, then its fine. do view source and see if its actually in the html source.

-igor



On Fri, Feb 15, 2008 at 1:15 PM, Beyonder Unknown [EMAIL PROTECTED] wrote:
 Btw, the javascript that im referring to is my javascript found in the 
 markup. But when I see the ajax debug it appends the ^ character.


  Thanks,
  Wen Tong

  --
  The only constant in life is change.

  - Original Message 
  From: Beyonder Unknown [EMAIL PROTECTED]

 To: users@wicket.apache.org


 Sent: Friday, February 15, 2008 1:12:18 PM
  Subject: Re: AjaxFallbackDefaultDataTable not refreshing in IE6

  Hi Igor,

  Its wicket 1.3.1.

  Thanks,
  Allan

  --
  The only constant in life is change.

  - Original Message 
  From: Igor Vaynberg [EMAIL PROTECTED]
  To: users@wicket.apache.org
  Sent: Friday, February 15, 2008 12:40:53 PM
  Subject: Re: AjaxFallbackDefaultDataTable not refreshing in IE6

  what wicket version is doing that?

  -igor


  On Fri, Feb 15, 2008 at 12:16 PM, Beyonder Unknown [EMAIL PROTECTED] wrote:
  
One thing I noticed is that the javascript generated is appended with 
 ^. Could it be that IE is not parsing this properly?
  
excerpt from Wicket Ajax Debug Window
  
  
   for (var i=0; iformLen; i++) {
   var elm = formObj.elements[i]^;
   if (elm.type == checkbox  elm.className == 
 parent) {
   elm.checked = state;
   return;
   }
   }
  
  
  
Thanks,
  
   Wen Tong
  
--
The only constant in life is change.
  
  
  
   - Original Message 
From: Beyonder Unknown [EMAIL PROTECTED]
To: WICKET USER users@wicket.apache.org
Sent: Friday, February 15, 2008 12:00:41 PM
Subject: AjaxFallbackDefaultDataTable not refreshing in IE6
  
  
Hi Guys,
  
The AjaxFallbackDefaultDataTable (with SortableDataProvider) component 
 that I'm using is not refreshing in IE6, but works fine with firefox. The 
 Wicket Ajax Debugger says:
  
ERROR: Error while parsing response: Object required
INFO: Invoking post-call handler(s)...
INFO: invoking failure handler(s)...
  
  
Have any of you encountered this before?  Any help will be greatly 
 appreciated.
  
Best,
Wen Tong
  
--
The only constant in life is change.
  
  
  
  
 
 
Looking for last minute shopping deals?
Find them fast with Yahoo! Search.  
 http://tools.search.yahoo.com/newsearch/category.php?category=shopping
  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
  
  
  
 
 
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]
  
  

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






   
 
  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]







   
 
  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]



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



Re: AjaxFallbackDefaultDataTable not refreshing in IE6

2008-02-15 Thread Beyonder Unknown

Will do.  ( https://issues.apache.org/jira/browse/WICKET-1349 )

Thanks,
Wen Tong
 
--
The only constant in life is change.

- Original Message 
From: Igor Vaynberg [EMAIL PROTECTED]
To: users@wicket.apache.org
Sent: Friday, February 15, 2008 1:15:52 PM
Subject: Re: AjaxFallbackDefaultDataTable not refreshing in IE6

please enter a bug report along with a quickstart

-igor


On Fri, Feb 15, 2008 at 1:12 PM, Beyonder Unknown [EMAIL PROTECTED] wrote:
 Hi Igor,

  Its wicket 1.3.1.

  Thanks,
  Allan


  --
  The only constant in life is change.

  - Original Message 


 From: Igor Vaynberg [EMAIL PROTECTED]
  To: users@wicket.apache.org
  Sent: Friday, February 15, 2008 12:40:53 PM
  Subject: Re: AjaxFallbackDefaultDataTable not refreshing in IE6

  what wicket version is doing that?

  -igor


  On Fri, Feb 15, 2008 at 12:16 PM, Beyonder Unknown [EMAIL PROTECTED] wrote:
  
One thing I noticed is that the javascript generated is appended with 
 ^. Could it be that IE is not parsing this properly?
  
excerpt from Wicket Ajax Debug Window
  
  
   for (var i=0; iformLen; i++) {
   var elm = formObj.elements[i]^;
   if (elm.type == checkbox  elm.className == 
 parent) {
   elm.checked = state;
   return;
   }
   }
  
  
  
Thanks,
  
   Wen Tong
  
--
The only constant in life is change.
  
  
  
   - Original Message 
From: Beyonder Unknown [EMAIL PROTECTED]
To: WICKET USER users@wicket.apache.org
Sent: Friday, February 15, 2008 12:00:41 PM
Subject: AjaxFallbackDefaultDataTable not refreshing in IE6
  
  
Hi Guys,
  
The AjaxFallbackDefaultDataTable (with SortableDataProvider) component 
 that I'm using is not refreshing in IE6, but works fine with firefox. The 
 Wicket Ajax Debugger says:
  
ERROR: Error while parsing response: Object required
INFO: Invoking post-call handler(s)...
INFO: invoking failure handler(s)...
  
  
Have any of you encountered this before?  Any help will be greatly 
 appreciated.
  
Best,
Wen Tong
  
--
The only constant in life is change.
  
  
  
  
 
 
Looking for last minute shopping deals?
Find them fast with Yahoo! Search.  
 http://tools.search.yahoo.com/newsearch/category.php?category=shopping
  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
  
  
  
 
 
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]
  
  

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






   
 
  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]



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






  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

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



Re: AjaxFallbackDefaultDataTable not refreshing in IE6

2008-02-15 Thread Beyonder Unknown

It's not in the HTML. So that's probably just in the Ajax Debugger window. What 
does it mean to IE when this error occur? 

ERROR: Error while parsing response: Object required
INFO: Invoking post-call handler(s)...
INFO: invoking failure handler(s)...


Regards,
Wen Tong
 
--
The only constant in life is change.

- Original Message 
From: Igor Vaynberg [EMAIL PROTECTED]
To: users@wicket.apache.org
Sent: Friday, February 15, 2008 1:20:11 PM
Subject: Re: AjaxFallbackDefaultDataTable not refreshing in IE6

argh, then its fine. do view source and see if its actually in the html source.

-igor



On Fri, Feb 15, 2008 at 1:15 PM, Beyonder Unknown [EMAIL PROTECTED] wrote:
 Btw, the javascript that im referring to is my javascript found in the 
 markup. But when I see the ajax debug it appends the ^ character.


  Thanks,
  Wen Tong

  --
  The only constant in life is change.

  - Original Message 
  From: Beyonder Unknown [EMAIL PROTECTED]

 To: users@wicket.apache.org


 Sent: Friday, February 15, 2008 1:12:18 PM
  Subject: Re: AjaxFallbackDefaultDataTable not refreshing in IE6

  Hi Igor,

  Its wicket 1.3.1.

  Thanks,
  Allan

  --
  The only constant in life is change.

  - Original Message 
  From: Igor Vaynberg [EMAIL PROTECTED]
  To: users@wicket.apache.org
  Sent: Friday, February 15, 2008 12:40:53 PM
  Subject: Re: AjaxFallbackDefaultDataTable not refreshing in IE6

  what wicket version is doing that?

  -igor


  On Fri, Feb 15, 2008 at 12:16 PM, Beyonder Unknown [EMAIL PROTECTED] wrote:
  
One thing I noticed is that the javascript generated is appended with 
 ^. Could it be that IE is not parsing this properly?
  
excerpt from Wicket Ajax Debug Window
  
  
   for (var i=0; iformLen; i++) {
   var elm = formObj.elements[i]^;
   if (elm.type == checkbox  elm.className == 
 parent) {
   elm.checked = state;
   return;
   }
   }
  
  
  
Thanks,
  
   Wen Tong
  
--
The only constant in life is change.
  
  
  
   - Original Message 
From: Beyonder Unknown [EMAIL PROTECTED]
To: WICKET USER users@wicket.apache.org
Sent: Friday, February 15, 2008 12:00:41 PM
Subject: AjaxFallbackDefaultDataTable not refreshing in IE6
  
  
Hi Guys,
  
The AjaxFallbackDefaultDataTable (with SortableDataProvider) component 
 that I'm using is not refreshing in IE6, but works fine with firefox. The 
 Wicket Ajax Debugger says:
  
ERROR: Error while parsing response: Object required
INFO: Invoking post-call handler(s)...
INFO: invoking failure handler(s)...
  
  
Have any of you encountered this before?  Any help will be greatly 
 appreciated.
  
Best,
Wen Tong
  
--
The only constant in life is change.
  
  
  
  
 
 
Looking for last minute shopping deals?
Find them fast with Yahoo! Search.  
 http://tools.search.yahoo.com/newsearch/category.php?category=shopping
  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
  
  
  
 
 
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]
  
  

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






   
 
  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]







   
 
  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]



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






  

Re: AjaxFallbackDefaultDataTable not refreshing in IE6

2008-02-15 Thread Igor Vaynberg
it doesnt mean anything to IE.

it probably means you have invalid markup somewhere, for example a div
inside a span.

-igor


On Fri, Feb 15, 2008 at 1:35 PM, Beyonder Unknown [EMAIL PROTECTED] wrote:

  It's not in the HTML. So that's probably just in the Ajax Debugger window. 
 What does it mean to IE when this error occur?


  ERROR: Error while parsing response: Object required
  INFO: Invoking post-call handler(s)...
  INFO: invoking failure handler(s)...


  Regards,

 Wen Tong

  --
  The only constant in life is change.

  - Original Message 
  From: Igor Vaynberg [EMAIL PROTECTED]
  To: users@wicket.apache.org

 Sent: Friday, February 15, 2008 1:20:11 PM
  Subject: Re: AjaxFallbackDefaultDataTable not refreshing in IE6


 argh, then its fine. do view source and see if its actually in the html 
 source.

  -igor




  On Fri, Feb 15, 2008 at 1:15 PM, Beyonder Unknown [EMAIL PROTECTED] wrote:
   Btw, the javascript that im referring to is my javascript found in the 
 markup. But when I see the ajax debug it appends the ^ character.
  
  

   Thanks,
Wen Tong
  
--
The only constant in life is change.
  
- Original Message 
From: Beyonder Unknown [EMAIL PROTECTED]
  

  To: users@wicket.apache.org
  
  

  Sent: Friday, February 15, 2008 1:12:18 PM
Subject: Re: AjaxFallbackDefaultDataTable not refreshing in IE6
  


   Hi Igor,
  
Its wicket 1.3.1.
  
Thanks,
Allan
  
--
The only constant in life is change.
  
- Original Message 
From: Igor Vaynberg [EMAIL PROTECTED]
To: users@wicket.apache.org
Sent: Friday, February 15, 2008 12:40:53 PM
Subject: Re: AjaxFallbackDefaultDataTable not refreshing in IE6
  
what wicket version is doing that?
  
-igor
  
  
On Fri, Feb 15, 2008 at 12:16 PM, Beyonder Unknown [EMAIL PROTECTED] 
 wrote:

  One thing I noticed is that the javascript generated is appended with 
 ^. Could it be that IE is not parsing this properly?

  excerpt from Wicket Ajax Debug Window


 for (var i=0; iformLen; i++) {
 var elm = formObj.elements[i]^;
 if (elm.type == checkbox  elm.className == 
 parent) {
 elm.checked = state;
 return;
 }
 }



  Thanks,

 Wen Tong

  --
  The only constant in life is change.



 - Original Message 
  From: Beyonder Unknown [EMAIL PROTECTED]
  To: WICKET USER users@wicket.apache.org
  Sent: Friday, February 15, 2008 12:00:41 PM
  Subject: AjaxFallbackDefaultDataTable not refreshing in IE6


  Hi Guys,

  The AjaxFallbackDefaultDataTable (with SortableDataProvider) component 
 that I'm using is not refreshing in IE6, but works fine with firefox. The 
 Wicket Ajax Debugger says:

  ERROR: Error while parsing response: Object required
  INFO: Invoking post-call handler(s)...
  INFO: invoking failure handler(s)...


  Have any of you encountered this before?  Any help will be greatly 
 appreciated.

  Best,
  Wen Tong

  --
  The only constant in life is change.




   
 
  Looking for last minute shopping deals?
  Find them fast with Yahoo! Search.  
 http://tools.search.yahoo.com/newsearch/category.php?category=shopping

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







   
 
  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]


  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
  
  
 
 
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]
  
  
  
  
  
  
  


  

Spring applicationContext.xml error

2008-02-15 Thread rmattler

I'm trying to get a Hibernate Spring Wicket app working and I'm stuck.  Don't
know where to start.  Any help would be appreciated.  If this is the wrong
forum let me know.  Thanks is advance.  

I'm get the following error:

Error creating bean with name 'txManagerBean' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean
'entMgrFactoryBean' while setting bean property 'entityManagerFactory';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'entMgrFactoryBean' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]: Invocation of init method
failed; nested exception is java.lang.NoClassDefFoundError:
org/objectweb/asm/MethodVisitor


Here is my applicationContext.xml File:


bean
id=txManagerBean
class=org.springframework.orm.jpa.JpaTransactionManager
property
name=entityManagerFactory 
ref=entMgrFactoryBean/
/bean
bean
id=entMgrFactoryBean

class=org.springframework.orm.jpa.LocalEntityManagerFactoryBean
property
name=persistenceUnitName 
value=bank/
/bean
tx:annotation-driven transaction-manager=txManagerBean/

bean
class=org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor/

bean id=customerDAO
class=com.xxx.bank.DAO.HibernateCustomerDAO
/bean

-- 
View this message in context: 
http://www.nabble.com/Spring-applicationContext.xml-error-tp15510193p15510193.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: back button issue with AjaxSelfUpdatingTimerBehavior, anyone had the same problem?

2008-02-15 Thread cemeterygate

I just did, it turned out the back button is creating a new instance of the
page. Therefore, nothing is display on the page. I am trying to figure out
how to return an instance instead of class when home page is loaded. I will
look into hybridurlcodingstrategy. Thank you.


igor.vaynberg wrote:
 
 why dont you set a breakpoint in the searchpage's constructor and check?
 
 if its a bookmarkable url then yes, thats what will happen. you need
 to mount it using a hybridurlcodingstrategy to avoid that.
 
 -igor
 
 
 On Fri, Feb 15, 2008 at 12:21 PM, cemeterygate [EMAIL PROTECTED]
 wrote:

  maybe the problem lies on SearchPage is a home page. So when user hit
 back
  button, wicket create a new instance of SearchPage. What do you guys
 think?





  cemeterygate wrote:
  
   i tried that, still no luck. After i hit back button on user detail
 page,
   the research result is gone.
  
   Here is what i did,
  
   I have a search page which contains two panels, a search form panel
 and a
   search result panel.
  
   upon click on submit button, the AjaxSelfUpdatingTimerBehavior kicks
 in
   and refresh the search result panel until there is search result
   available.
  
   I override the setHeaders SearchPage.java, what am i doing wrong here?
   protected void setHeaders(WebResponse response) {
   response.setHeader(Cache-Control, no-store);
   }
  
   much appreciated!!!
  
  
   igor.vaynberg wrote:
  
   response.setHeader(Cache-Control, no-store);
  
   -igor
  
  
   On Fri, Feb 15, 2008 at 10:44 AM, cemeterygate
 [EMAIL PROTECTED]
   wrote:
  
i overload the setHeads method but still no luck.
response.setHeader(Pragma, no-cache);
response.setHeader(Cache-Control, no-cache,
   max-age=0,must-revalidate,
no-store);
  
i had the impressied that i must change the url (maybe by adding
 anchor
   has)
when search result panel is freshed in order for IE to cache the
 page
correctly. But I don't mind some quick workaround if there is any.
   thanks
  
  
  
  
Matej Knopp-2 wrote:

 Problem is that your browser is caching a wrong version of DOM
 tree.
 You need to serve the pages with Cache-Control: no-store to force
 browser reload the page on back button. See
 WebPage#setHeaders(WebResponse response).

 -Matej

 On Fri, Feb 15, 2008 at 6:14 PM, cemeterygate
   [EMAIL PROTECTED]
 wrote:

  I am using AjaxSelfUpdatingTimerBehavior to refresh the search
   result
 panel.
  I go to one of the search result, then hit back button, the
 search
 result
  panel is disappear. I thought back button is supported by
 wicket
 natively,
  but appearantly it doesn't in this case. So, what's the work
 around
 folks.
  please help. Thanks
  --
  View this message in context:

  
 http://www.nabble.com/back-button-issue-with-AjaxSelfUpdatingTimerBehavior%2C-anyone-had-the-same-problem--tp15503953p15503953.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]





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


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



  
--
View this message in context:
  
 http://www.nabble.com/back-button-issue-with-AjaxSelfUpdatingTimerBehavior%2C-anyone-had-the-same-problem--tp15503953p15507601.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/back-button-issue-with-AjaxSelfUpdatingTimerBehavior%2C-anyone-had-the-same-problem--tp15503953p15509269.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/back-button-issue-with-AjaxSelfUpdatingTimerBehavior%2C-anyone-had-the-same-problem--tp15503953p15510143.html
Sent from the Wicket - User mailing list archive at Nabble.com.



RE: How to NOT use wicket's Role class

2008-02-15 Thread Bruce McGuire
Hi Jonathan.

Thanks for the information, no need for the apology. I am loving developing
in Wicket. I just wish I had started earlier.

Bruce.

-Original Message-
From: Jonathan Locke [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 14 February, 2008 03:25 PM
To: users@wicket.apache.org
Subject: Re: How to NOT use wicket's Role class



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-tp15487694p154918
31.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: AjaxFallbackDefaultDataTable not refreshing in IE6

2008-02-15 Thread Beyonder Unknown
Btw, the javascript that im referring to is my javascript found in the markup. 
But when I see the ajax debug it appends the ^ character.

Thanks,
Wen Tong 
 
--
The only constant in life is change.

- Original Message 
From: Beyonder Unknown [EMAIL PROTECTED]
To: users@wicket.apache.org
Sent: Friday, February 15, 2008 1:12:18 PM
Subject: Re: AjaxFallbackDefaultDataTable not refreshing in IE6

Hi Igor,

Its wicket 1.3.1.

Thanks,
Allan
 
--
The only constant in life is change.

- Original Message 
From: Igor Vaynberg [EMAIL PROTECTED]
To: users@wicket.apache.org
Sent: Friday, February 15, 2008 12:40:53 PM
Subject: Re: AjaxFallbackDefaultDataTable not refreshing in IE6

what wicket version is doing that?

-igor


On Fri, Feb 15, 2008 at 12:16 PM, Beyonder Unknown [EMAIL PROTECTED] wrote:

  One thing I noticed is that the javascript generated is appended with ^. 
 Could it be that IE is not parsing this properly?

  excerpt from Wicket Ajax Debug Window


 for (var i=0; iformLen; i++) {
 var elm = formObj.elements[i]^;
 if (elm.type == checkbox  elm.className == 
 parent) {
 elm.checked = state;
 return;
 }
 }



  Thanks,

 Wen Tong

  --
  The only constant in life is change.



 - Original Message 
  From: Beyonder Unknown [EMAIL PROTECTED]
  To: WICKET USER users@wicket.apache.org
  Sent: Friday, February 15, 2008 12:00:41 PM
  Subject: AjaxFallbackDefaultDataTable not refreshing in IE6


  Hi Guys,

  The AjaxFallbackDefaultDataTable (with SortableDataProvider) component that 
 I'm using is not refreshing in IE6, but works fine with firefox. The Wicket 
 Ajax Debugger says:

  ERROR: Error while parsing response: Object required
  INFO: Invoking post-call handler(s)...
  INFO: invoking failure handler(s)...


  Have any of you encountered this before?  Any help will be greatly 
 appreciated.

  Best,
  Wen Tong

  --
  The only constant in life is change.




   
 
  Looking for last minute shopping deals?
  Find them fast with Yahoo! Search.  
 http://tools.search.yahoo.com/newsearch/category.php?category=shopping

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







   
 
  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]



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






  

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]






  

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]



Linking two DropDownChoices

2008-02-15 Thread Bruce McGuire
Hello.

 

I have two DropDownChoices, both with Models (Databinder's
HibernateObjectModel). One is subordinate to the other, in that when the
first one's value changes, I would like to clear the second one, forcing the
user to select from the second one, or perhaps setting the second one to a
default value.

 

However, I am stumped as to how to accomplish this.

 

Any hints you have would be greatly appreciated.

 

Thanks,

 

Bruce.



Re: Spring applicationContext.xml error

2008-02-15 Thread James Carman
You need to check your classpath.  The asm library is required for
Hibernate.  Download hibernate and check the lib directory.  It has a
file that explains when/why you need certain dependencies.

On 2/15/08, rmattler [EMAIL PROTECTED] wrote:

  I'm trying to get a Hibernate Spring Wicket app working and I'm stuck.  Don't
  know where to start.  Any help would be appreciated.  If this is the wrong
  forum let me know.  Thanks is advance.

  I'm get the following error:

  Error creating bean with name 'txManagerBean' defined in ServletContext
  resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean
  'entMgrFactoryBean' while setting bean property 'entityManagerFactory';
  nested exception is org.springframework.beans.factory.BeanCreationException:
  Error creating bean with name 'entMgrFactoryBean' defined in ServletContext
  resource [/WEB-INF/applicationContext.xml]: Invocation of init method
  failed; nested exception is java.lang.NoClassDefFoundError:
  org/objectweb/asm/MethodVisitor


  Here is my applicationContext.xml File:


 bean
 id=txManagerBean
 class=org.springframework.orm.jpa.JpaTransactionManager
 property
 name=entityManagerFactory
 ref=entMgrFactoryBean/
 /bean
 bean
 id=entMgrFactoryBean
 
 class=org.springframework.orm.jpa.LocalEntityManagerFactoryBean
 property
 name=persistenceUnitName
 value=bank/
 /bean
 tx:annotation-driven transaction-manager=txManagerBean/

 bean
  
 class=org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor/

 bean id=customerDAO
 class=com.xxx.bank.DAO.HibernateCustomerDAO
 /bean


  --
  View this message in context: 
 http://www.nabble.com/Spring-applicationContext.xml-error-tp15510193p15510193.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: Multiple Homepage Mountpoints for Localization

2008-02-15 Thread oliverw

Possible. Although I have to admit that the HybridUrlCodingStrategy source
code looks quite intimidating :) Without debugging through the whole thing I
do not even know where to begin.


Jonathan Locke wrote:
 
 
 what about writing or subclassing a url coding strategy to use the first
 part of the url to set the session's locale?
 
 
 oliverw wrote:
 
 Hi
 
 I just wanted to make sure that my idea makes some sense if implemented
 this way. My prerequisites:
 
 1. I want to mount my homepage and all it's children (which are not that
 many) multiple times at different mountpoints
 2. Each mountpoint is prefixed with a language identifier which
 ultimately decides in which language the content is presented (the site
 consists to 95% of dynamic content which resides pre-localized in a
 database). Example: 
 
 http://domain.com - homepage english
 http://domain.com/items - item info page english
 
 http://domain.com/de - homepage german
 http://domain.com/de/items- item info page german
 
 In order to achieve the desired behavior I've subclassed the
 WebRequestCycle like shown below. Since I'm still pretty new to wicket, I
 would like to know if this is how it should be done the Wicket Way or
 if there's a better solution. 
 
 class MyRequestCycle extends WebRequestCycle
 {
  public MyRequestCycle(WebApplication application, WebRequest request,
 Response response)
  {
  super(application, request, response);
 
  // init locale map
  mapPatch2Locale = new HashMapString, Locale();
  mapPatch2Locale.put(de, Locale.GERMAN);
  mapPatch2Locale.put(fr, Locale.FRENCH);
  mapPatch2Locale.put(es, new Locale(es));
  }
 
  /** Maps Request Path to associated Locale **/
  HashMapString, Locale mapPatch2Locale;
 
  protected void onBeginRequest()
  {
  super.onBeginRequest();
 
  // adjust locale to url prefix
  String path = getRequest().getPath();
  Locale locale = null;
 
  SetString keys = mapPatch2Locale.keySet();
  while(keys.iterator().hasNext())
  {
  String _path = keys.iterator().next();
  if(path.equals(_path) || path.startsWith(_path + /))
  {
  locale = mapPatch2Locale.get(_path);
  break;
  }
  }
 
  // default is english
  if(locale == null)
  locale = Locale.ENGLISH;
 
  // setup locale for this request
  getSession().setLocale(locale);
  }
 }
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Multiple-Homepage-Mountpoints-for-Localization-tp15507606p15509840.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-15 Thread Jonathan Locke


well, spread the word!  ;-)


Bruce McGuire-2 wrote:
 
 Hi Jonathan.
 
 Thanks for the information, no need for the apology. I am loving
 developing
 in Wicket. I just wish I had started earlier.
 
 Bruce.
 
 -Original Message-
 From: Jonathan Locke [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, 14 February, 2008 03:25 PM
 To: users@wicket.apache.org
 Subject: Re: How to NOT use wicket's Role class
 
 
 
 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-tp15487694p154918
 31.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-NOT-use-wicket%27s-Role-class-tp15487694p15512777.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]



Best way of dashboard panels to be customised as part of a user profile.

2008-02-15 Thread Ned Collyer

Hi,

If i have a dashboard (kinda like how Jira has its dashboards), if i want to
persist the arrangement of panels, and the type .. what are my options?

At the moment I'm thinking of using a list of widgets which will consist of
the fully qualified dashboard widget class name, and a list of
intitialising parameters - then using reflection to instantiate the panels
on subsequent visits to the page.

Each of these WidgetsPanel will extend Panel

What are some alternatives.

What I have feels ... a bit too reflectiony - but i suppose will work quite
well with unknown panels, eg at config/deploy time.
-- 
View this message in context: 
http://www.nabble.com/Best-way-of-%22dashboard%22-panels-to-be-customised-as-part-of-a-user-profile.-tp15513304p15513304.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-15 Thread James Carman
Speaking of spreading the word, I'm planning on giving a talk on
Wicket to our local Java users group next month.  Are there any
resources out there that you would suggest that I use?

On 2/15/08, Jonathan Locke [EMAIL PROTECTED] wrote:


  well, spread the word!  ;-)



  Bruce McGuire-2 wrote:
  
   Hi Jonathan.
  
   Thanks for the information, no need for the apology. I am loving
   developing
   in Wicket. I just wish I had started earlier.
  
   Bruce.
  
   -Original Message-
   From: Jonathan Locke [mailto:[EMAIL PROTECTED]
   Sent: Thursday, 14 February, 2008 03:25 PM
   To: users@wicket.apache.org
   Subject: Re: How to NOT use wicket's Role class
  
  
  
   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-tp15487694p154918
   31.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-NOT-use-wicket%27s-Role-class-tp15487694p15512777.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]