Re: [Wicket-user] AuthenticatedWebApplication - Component Level Authentication
Please do, yesterday i checked in some changes that should redirect you to the login page if you place secure components on a non secure page. All the documentation and examples are still work in progress but you could check out the junit tests and the documentation here http://wicketstuff.org/confluence/display/STUFFWIKI/Getting+started+with+Swarm and here http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Security Maurice On 6/3/07, mchack <[EMAIL PROTECTED]> wrote: > > The override of onUnauthorizedPage didn't work because the framework was > throwing the UnauthorizedInstantiationException because the page itself was > not secure, but the component was. I was able to handle this by overriding > the WebRequestCycle to handle exceptions explicitly as indicated in the > previous post: > > http://www.nabble.com/Exception-Strategy-in-1.3-tf3793570.html#a10790773 > > My reason for doing this is that I have a fairly generic bookmarkable page > (single class) that will serve up varied content (markup) depending upon the > URL. I also have a dynamic mechanism using resolve() to detect wicket:id's > that have behavior of my choosing. So, my motivation is that while the pages > themselves are not declared "secure", the HTML developer could inadvertantly > reference a secured component. Hence my desire to trap instantiation issues > at the component level and then do proper redirection to either the login > page or error page. > > While not a classic use of the framework, I think it has some merit. I will > also check out the WASP and SWARM projects. > > > > Eelco Hillenius wrote: > > > > Hi, > > > > On 6/3/07, Maurice Marrink <[EMAIL PROTECTED]> wrote: > >> Not sure if it is the preferred way of doing things (since this is > >> Eelco's framework) > > > > That part is actually Jonathan's > > > >> but you could override the init() method and set up > >> a different authorizationstrategy and or instantiationlistener, all > >> you have to do for that is skip the call to super and do something > >> similar yourself. > > > > Imho, that class is better viewed as an example. > > > >> Or you can ask Eelco nice and maybe he will remove the final :) > > > > I don't think that's needed though. How about overriding > > onUnauthorizedPage? As long as a user isn't logged in, the strategy > > will redirect to the page that is returned by getSignInPageClass. > > After that, onUnauthorizedPage is called when a user tries to access a > > page he/ she isn't authorized for. > > > > Eelco > > > > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > -- > View this message in context: > http://www.nabble.com/AuthenticatedWebApplication---Component-Level-Authentication-tf3854757.html#a10939875 > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] A couple of issues while handling bookmarkable pages....
Problem 1: In my application, I have mounted a couple of urls. Steps: 1> log on using bookmarkable url 2> click on a link in that page which presents me with different panel which replaces an exisiting panel. [ So basically the view that a user gets is different from when he logs in after clicking this link] 3>Do an operation in this new panel which causes a pop up to be shown to the user. 4> Do a save operation in the pop up window and using javascript refresh the base window. The problem is that when the base window refreshes, user is shown the panel he is first shown i.e after logging in. The expected behaviour should have been to show the view contaning the new panel from which pop up was launched. In other words the user is not presented with same view in the browser when the base window refreshes. I understand the problem is because the URL was mounted ; because it works properly if it is not mounted. [ The request target again becomes a bookmarkablepagerequesttarget which actually just sends the user back to where the page was mounted to I suppose. ] Can anyone suggest the best way to show the correct view to the user i.e the code should take care of both scenarios - mounted and not mounted. I was thinking of replacing the first panel with the second if this kind of action happends. that is I have to store somewhere that the user did a save from the popup . I am not sure whether this is really a good way to do it. Any better ideas ?? Problem 2: This is to do with images . If the page is mounted, images are not shown otherwise images are shown. It appears that images do not get picked up if I mount a page. Otherwise if i click on a link in some other page [ which is not mounted] and which takes me to the page i am interested in , I am able to view the images ... Any ideas here? -Regards swaroop belur - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Bug in 1.3? HeaderContributor.forCss(String)
Patch is attached to https://issues.apache.org/jira/browse/WICKET-612 Jeremy Thomerson On 6/3/07, Jeremy Thomerson <[EMAIL PROTECTED]> wrote: It's what was done in 1.2.6, but no longer in 1.3. 1.3 converts it to a path relative to your context. Sorry, my last post was probably confusing. If I put "/foo/bar.css" - foo is NOT my context. My context for the app could be anything (but not foo). Foo would be the root folder off of my domain that I want the request to be sent for. ( i.e.. www.mydomain.com/app/SomeWicketPage includes the style sheet at www.mydomain.com/foo/bar.css). I do this and pair it with an Apache alias that directs "/foo" to that folder within my webapp so that Apache (not my servlet container) will serve static resources. As of 1.2.6, it works fine. As of 1.3, I can no longer do that without adding my domain name ( add(HeaderContributor.forCss(" http://www.mydomain.com/resources/styles/global.css";)); ), which is NOT desirable - I should not have to add my domain name to be able to add the resource relative to my domain root. I opened JIRA https://issues.apache.org/jira/browse/WICKET-612 for this. I will attach a patch to it as soon as I can get my environment set up to work on Wicket. Jeremy Thomerson On 6/3/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > > Sort of - but Wicket doesn't have to handle the prepending of it. If > I use > > "/foo/bar.css", Wicket should generate my link tag using exactly that > > string, without modifying it in any way. > > I actually think this is what we do now. Dunno, should look at it. > However, I think it is a bad idea to hard-code your context patch in > your applications. > > Eelco > > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Prototype scoped Spring beans
Right, here it is: https://issues.apache.org/jira/browse/WICKET-613 Thanks for checking this out. Rüdiger 2007/6/3, Eelco Hillenius <[EMAIL PROTECTED]>: > Could you please open up a JIRA issue for this with a link to this > discussion? I think it is something Igor might have an idea about (but > he's no a vacation now). > > Eelco > > > On 6/3/07, Rüdiger Schulz <[EMAIL PROTECTED]> wrote: > > I put a breakpoint in the constructor of my Form, which has the > > @SpringBean annotation on ia property named logic. > > > > Before the super() call, logic is null. > > > > After that, it is set to $Proxy39, with a h-attribute to a > > org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler. The target > > property of the handler is null. > > > > After the next line, where I call a method from logic, the target > > property is set to the bean instance. > > > > So it seems that the reference gets lost in the first call. > > > > > > But, as you said that the bean is transient anyway, I think that > > prototype beans could not be used that way for holding state of wicket > > components, because that state should certainly also be kept when > > using the back button. > > > > I'm not sure what is best then. I could get a reference to the spring > > bean directly from ApplicationContext, and just keep it. But then I > > would face the problem of serialization. > > > > The best thing would be IMHO if the proxy could somehow do an > > automatic re-lookup from Spring for prototype beans, so that not a new > > instance is fetched from the container, but the same as before. But I > > don't know enough about Spring to say if that is even possible. > > > > > > > > 2007/6/3, Eelco Hillenius <[EMAIL PROTECTED]>: > > > I'm not that familiar with the code, but the interesting thing is that > > > LazyInitProxyFactory$JdkHandler does cache the bean it located: > > > > > > if (target == null) > > > { > > > target = locator.locateProxyTarget(); > > > } > > > return proxy.invoke(target, args); > > > > > > The target is a transient member of JdkHandler and judging from the > > > code, once the bean is located it should just be reused until the page > > > is serialized/ deserialized (for backbutton support or when > > > clustered). > > > > > > Can you use you debugger to find out what exactly happens? > > > > > > Eelco > > > > > > On 6/1/07, Rüdiger Schulz <[EMAIL PROTECTED]> wrote: > > > > Right, forgot the Stacktraces: > > > > > > > > The first when calling super(): > > > > at KitManagementBean.(KitManagementBean.java:34) > > > > at > > > > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > > > > at > > > > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > > > > at > > > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > > > > at > > > > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > > > at > > > > org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85) > > > > at > > > > org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61) > > > > at > > > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:732) > > > > at > > > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:720) > > > > at > > > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:386) > > > > at > > > > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:270) > > > > at > > > > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) > > > > at > > > > org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:707) > > > > at > > > > org.apache.wicket.spring.SpringBeanLocator.lookupSpringBean(SpringBeanLocator.java:240) > > > > at > > > > org.apache.wicket.spring.SpringBeanLocator.locateProxyTarget(SpringBeanLocator.java:163) > > > > at > > > > org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.testLocator(AnnotProxyFieldValueFactory.java:124) > > > > at > > > > org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getFieldValue(AnnotProxyFieldValueFactory.java:99) > > > > at > > > > org.apache.wicket.injection.Injector.inject(Injector.java:109) > > > > at > > > > org.apache.wicket.injection.ConfigurableInjector.inject(ConfigurableInjector.java:40) > > > > at > > > > org.apache.wicket.injection.ComponentInjector.onInstantiation(Compon
Re: [Wicket-user] Bug in 1.3? HeaderContributor.forCss(String)
It's what was done in 1.2.6, but no longer in 1.3. 1.3 converts it to a path relative to your context. Sorry, my last post was probably confusing. If I put "/foo/bar.css" - foo is NOT my context. My context for the app could be anything (but not foo). Foo would be the root folder off of my domain that I want the request to be sent for. (i.e.. www.mydomain.com/app/SomeWicketPage includes the style sheet at www.mydomain.com/foo/bar.css). I do this and pair it with an Apache alias that directs "/foo" to that folder within my webapp so that Apache (not my servlet container) will serve static resources. As of 1.2.6, it works fine. As of 1.3, I can no longer do that without adding my domain name ( add(HeaderContributor.forCss(" http://www.mydomain.com/resources/styles/global.css";)); ), which is NOT desirable - I should not have to add my domain name to be able to add the resource relative to my domain root. I opened JIRA https://issues.apache.org/jira/browse/WICKET-612 for this. I will attach a patch to it as soon as I can get my environment set up to work on Wicket. Jeremy Thomerson On 6/3/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > Sort of - but Wicket doesn't have to handle the prepending of it. If I use > "/foo/bar.css", Wicket should generate my link tag using exactly that > string, without modifying it in any way. I actually think this is what we do now. Dunno, should look at it. However, I think it is a bad idea to hard-code your context patch in your applications. Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Bug in 1.3? HeaderContributor.forCss(String)
> Sort of - but Wicket doesn't have to handle the prepending of it. If I use > "/foo/bar.css", Wicket should generate my link tag using exactly that > string, without modifying it in any way. I actually think this is what we do now. Dunno, should look at it. However, I think it is a bad idea to hard-code your context patch in your applications. Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Bug in 1.3? HeaderContributor.forCss(String)
Sort of - but Wicket doesn't have to handle the prepending of it. If I use "/foo/bar.css", Wicket should generate my link tag using exactly that string, without modifying it in any way. Then the browser handles submitting that request to the domain. It never actually has to be prepended. I'm assuming this is what you meant as well. I'll look at the JIRA issue sent in a later reply and see if I can assist. Jeremy Thomerson On 6/3/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > I think if someone uses an absolute slash - it should treat it as absolute. > That is what the standard is anywhere else within a web app, console > environment, you name it. If you want relative to where you are, you leave > the slash off. If you want absolute, you use the slash. With the bug I > mention below, I have no way of forcing an absolute URL - Wicket takes that > away from me and makes it where I would have to inject the actual domain > into my application to be able to accomplish this. That sounds reasonable to me, though Al currently is the one who has got the best knowledge on how this impacts things. Another note is that absolute without a protocol prefix is still relative as you want the context path prepended, correct? Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Tree and Panel - refresh problem (1.3b1)
> >Can you give some code fragments? > >Eelco On HomePage there are two divs, with tree and panel. HomePage.html ... show clicked node tree ... HomePage.java public class HomePage extends WebPage { private static final long serialVersionUID = 5775904098165685837L; private Tree tree; private Panel testPanel; TestPanelBean tpb; public HomePage() { add(HeaderContributor.forCss("/css/netport.css")); // testPanel tpb = new TestPanelBean("---"); testPanel = new TestPanel("testpanel", tpb); testPanel.setOutputMarkupId(true); add(testPanel); tree = new Tree("tree", createTreeModel()) { protected String renderNode(TreeNode node) { ModelBean bean = (ModelBean) ((DefaultMutableTreeNode) node).getUserObject(); return bean.getProperty1(); } protected void onNodeLinkClicked(AjaxRequestTarget target, TreeNode node) { super.onNodeLinkClicked(target, node); ModelBean mtn = (ModelBean) ((DefaultMutableTreeNode) node).getUserObject(); updatePanel("Node: " + mtn.getProperty1() + " :clicked"); target.addComponent(tree); target.addComponent(testPanel); } }; // end new TreeTable tree.getTreeState().setAllowSelectMultiple(false); //tree.setLinkType(LinkType.AJAX); add(tree); tree.getTreeState().collapseAll(); } private void updatePanel(String txt) { tpb.setNodeName(txt); //remove(testPanel); //testPanel = new TestPanel("testpanel", tpb); //testPanel.setOutputMarkupId(true); //add(testPanel); } protected TreeModel createTreeModel() { ... // code copied from examples ... } } For Tree I've used code and model from SimpleTree from ajax examples. For Panel I have ths code: TestPanel.java public class TestPanel extends Panel { public TestPanel(String id, TestPanelBean tpb) { super(id); add(new Label("text", tpb.getNodeName())); } } TestPanel.html Text:--node-- TestPaneBean.java (which holds text to be displayed in TestPanel) public class TestPanelBean { private String nodeName; public TestPanelBean(String nodeName) { this.nodeName = nodeName; } public String getNodeName() { return nodeName; } public void setNodeName(String nodeName) { this.nodeName = nodeName; } } So, even a set: target.addComponent(testPanel); testPanel is not refreshed. :( For now, I want to display node name in the panel. In the future, I'll like to instantiate different panel components regarding to clicked tree node type (if node represents image, show that image information and so on). -- View this message in context: http://www.nabble.com/Tree-and-Panel---refresh-problem-%281.3b1%29-tf3858753.html#a10940029 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Javascript: Deletion Link
> I have read some suggestions about adding JavaScript to Links but I > think this is a very basic behaviour that should be added to Wicket itself. You could create such a component and add it (or propose to add it) to wicket minis (wicket-stff project). Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Javascript: Deletion Link
Hi Johannes, I haven't used it, but something like below will move you in the right direction: (You might need to do something in the decorateScript method to prevent the onclick from bubbling) public class ConfirmationLink extends AjaxFallbackLink { public ConfirmationLink(String id) { super(id); } @Override public void onClick(AjaxRequestTarget target) { if(null == target) { setResponsePage(new AreYouSurePage(getModel())); } // else you know javascript works and they really want this } @Override protected IAjaxCallDecorator getAjaxCallDecorator() { return new AjaxCallDecorator() { @Override public CharSequence decorateScript(CharSequence script) { return "if(confirm('Are you sure?')) { " + script + "};"; } }; } } best, jim On 6/3/07, Johannes Schneider <[EMAIL PROTECTED]> wrote: > Hi, > > I want to create a link that shall delete an object on click. > It would be great if there was shown a confirmation dialog (using > javascript) before the onClick-method is called. > > I have read some suggestions about adding JavaScript to Links but I > think this is a very basic behaviour that should be added to Wicket itself. > > It would also be great, if this link pointed to a HTML based > confirmation page if no JavaScript is available... > > > Cheers, > > Johannes Schneider > -- > Johannes Schneider > Im Lindenwasen 15 > 72810 Gomaringen > > Fon +49 7072 9229972 > Fax +49 7072 50 > Mobil +49 178 1364488 > > [EMAIL PROTECTED] > http://www.johannes-schneider.info > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Javascript: Deletion Link
Hi, I want to create a link that shall delete an object on click. It would be great if there was shown a confirmation dialog (using javascript) before the onClick-method is called. I have read some suggestions about adding JavaScript to Links but I think this is a very basic behaviour that should be added to Wicket itself. It would also be great, if this link pointed to a HTML based confirmation page if no JavaScript is available... Cheers, Johannes Schneider -- Johannes Schneider Im Lindenwasen 15 72810 Gomaringen Fon +49 7072 9229972 Fax +49 7072 50 Mobil +49 178 1364488 [EMAIL PROTECTED] http://www.johannes-schneider.info smime.p7s Description: S/MIME Cryptographic Signature - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Escaping German Umlauts
Hi, I think it works as expected. Thanks for the fast change. Johannes Schneider Eelco Hillenius wrote: On 5/31/07, Jean-Baptiste Quenot <[EMAIL PROTECTED]> wrote: * Johannes Schneider: can anyone tell me how I can escape German umlauts when using TextFields or Labels? Component.setEscapeModelStrings( true) does not replace them. And I really don't want to create a custom IModel for every component I add Have a look at Strings#escapeMarkup(String, boolean, boolean) The last argument is called convertToHtmlUnicodeEscapes and by reading the Javadoc I think it does what you want. I just changed getModelObjectAsString: if (getFlag(FLAG_ESCAPE_MODEL_STRINGS)) { // Escape it return Strings.escapeMarkup(modelString, false, true).toString(); } This seems to better anyway, and I couldn't find any nasty side effects, nor did any of the unit tests fail. Johannes, can you confirm this fixes your problem? Thanks, Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- Johannes Schneider Im Lindenwasen 15 72810 Gomaringen Fon +49 7072 9229972 Fax +49 7072 50 Mobil +49 178 1364488 [EMAIL PROTECTED] http://www.johannes-schneider.info smime.p7s Description: S/MIME Cryptographic Signature - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] DatePicker and ModalWindow
I'm not sure whether this (doing header contributions via Ajax) was ever build into 1.2, but it's one of the things that are certainly possible with Wicket 1.3. As an example, I added DateTimeField to org.apache.wicket.examples.ajax.builtin.modal.ModalContent1Page Eelco On 6/3/07, Nili Adoram <[EMAIL PROTECTED]> wrote: > Hi all, > I have a ModalWindow that displays some panel with a date picker. > When the ModalWindow is opened via ajax request all java script > references required by this panel and its date picker are missing. > Is there a way to tell the Modal window to load all javascript requires > by its content even before it is rendered? > Thanks > Nili > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] AuthenticatedWebApplication - Component Level Authentication
The override of onUnauthorizedPage didn't work because the framework was throwing the UnauthorizedInstantiationException because the page itself was not secure, but the component was. I was able to handle this by overriding the WebRequestCycle to handle exceptions explicitly as indicated in the previous post: http://www.nabble.com/Exception-Strategy-in-1.3-tf3793570.html#a10790773 My reason for doing this is that I have a fairly generic bookmarkable page (single class) that will serve up varied content (markup) depending upon the URL. I also have a dynamic mechanism using resolve() to detect wicket:id's that have behavior of my choosing. So, my motivation is that while the pages themselves are not declared "secure", the HTML developer could inadvertantly reference a secured component. Hence my desire to trap instantiation issues at the component level and then do proper redirection to either the login page or error page. While not a classic use of the framework, I think it has some merit. I will also check out the WASP and SWARM projects. Eelco Hillenius wrote: > > Hi, > > On 6/3/07, Maurice Marrink <[EMAIL PROTECTED]> wrote: >> Not sure if it is the preferred way of doing things (since this is >> Eelco's framework) > > That part is actually Jonathan's > >> but you could override the init() method and set up >> a different authorizationstrategy and or instantiationlistener, all >> you have to do for that is skip the call to super and do something >> similar yourself. > > Imho, that class is better viewed as an example. > >> Or you can ask Eelco nice and maybe he will remove the final :) > > I don't think that's needed though. How about overriding > onUnauthorizedPage? As long as a user isn't logged in, the strategy > will redirect to the page that is returned by getSignInPageClass. > After that, onUnauthorizedPage is called when a user tries to access a > page he/ she isn't authorized for. > > Eelco > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > -- View this message in context: http://www.nabble.com/AuthenticatedWebApplication---Component-Level-Authentication-tf3854757.html#a10939875 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Tree and Panel - refresh problem (1.3b1)
Can you give some code fragments? Eelco On 6/2/07, Vatroslav <[EMAIL PROTECTED]> wrote: > > Hi, > I'm trying to update (refresh) Panel from Ajax tree (by clicking tree item) > but without success. :( > I've checked, Panel's model is changed. > > If I put a Label component instead of Panel, and inside > onNodeLinkClicked(AjaxRequestTarget target, TreeNode node) method modify > Label's model and then refresh Label with target.addComponent(myLabel); > everything is OK. > > But I can't do that with Panel component. > Why?? > > Thanks, > vatroslav > > > -- > View this message in context: > http://www.nabble.com/Tree-and-Panel---refresh-problem-%281.3b1%29-tf3858753.html#a10932128 > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] AuthenticatedWebApplication - Component Level Authentication
Hi, On 6/3/07, Maurice Marrink <[EMAIL PROTECTED]> wrote: > Not sure if it is the preferred way of doing things (since this is > Eelco's framework) That part is actually Jonathan's > but you could override the init() method and set up > a different authorizationstrategy and or instantiationlistener, all > you have to do for that is skip the call to super and do something > similar yourself. Imho, that class is better viewed as an example. > Or you can ask Eelco nice and maybe he will remove the final :) I don't think that's needed though. How about overriding onUnauthorizedPage? As long as a user isn't logged in, the strategy will redirect to the page that is returned by getSignInPageClass. After that, onUnauthorizedPage is called when a user tries to access a page he/ she isn't authorized for. Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Forms locale(europe) and numbers does not
> class USNumberConverter extends SimpleConverterAdapter { > public String toString(Object value) { > return > NumberFormat.getInstance(Locale.US).format((Number) value); > } > public Object toObject(String value) { > try { > return NumberFormat.getInstance(Locale.US) > .parse((String) value); > } catch (ParseException e) { > throw new RuntimeException(e); > } > } > } Note that SimpleConverterAdapter was kind of a hack in 1.2 and is removed in 1.3. In 1.2 (and before) converters were too generic, making them too hard to use. In 1.3 you can best implement IConverter directly. Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Forms locale(europe) and numbers does not
On 5/29/07, Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]> wrote: > Hi I have a form > > > id="longtitudeNE"> > > > > java part: > > gMapUpdatingForm.add(new HiddenField("longtitudeCenter", new > PropertyModel( > gMap.getCenter(), "longtitude"))); > > > If I am in US locale numbers are interpreted okay, however if in > european locale they dont. Thats because the value are in US locale so > how do I tell that these two fields should be interpereted as US. I have > tried overiding the getlocale, but it does not seem to work? I'm surprised that doesn't work for you... I've just tested this in the InputForm example: add(new RequiredTextField("doubleProperty") { @Override public Locale getLocale() { return Locale.US; } }); and that works like expected (change the locales, the double field will still display numbers with the dot). Can you debug and see whether getLocale is called in your case? Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Escaping German Umlauts
On 5/31/07, Jean-Baptiste Quenot <[EMAIL PROTECTED]> wrote: > * Johannes Schneider: > > > can anyone tell me how I can escape German umlauts when using > > TextFields or Labels? Component.setEscapeModelStrings( true) > > does not replace them. And I really don't want to create a > > custom IModel for every component I add > > Have a look at Strings#escapeMarkup(String, boolean, boolean) > > The last argument is called convertToHtmlUnicodeEscapes and by > reading the Javadoc I think it does what you want. I just changed getModelObjectAsString: if (getFlag(FLAG_ESCAPE_MODEL_STRINGS)) { // Escape it return Strings.escapeMarkup(modelString, false, true).toString(); } This seems to better anyway, and I couldn't find any nasty side effects, nor did any of the unit tests fail. Johannes, can you confirm this fixes your problem? Thanks, Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Prototype scoped Spring beans
Could you please open up a JIRA issue for this with a link to this discussion? I think it is something Igor might have an idea about (but he's no a vacation now). Eelco On 6/3/07, Rüdiger Schulz <[EMAIL PROTECTED]> wrote: > I put a breakpoint in the constructor of my Form, which has the > @SpringBean annotation on ia property named logic. > > Before the super() call, logic is null. > > After that, it is set to $Proxy39, with a h-attribute to a > org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler. The target > property of the handler is null. > > After the next line, where I call a method from logic, the target > property is set to the bean instance. > > So it seems that the reference gets lost in the first call. > > > But, as you said that the bean is transient anyway, I think that > prototype beans could not be used that way for holding state of wicket > components, because that state should certainly also be kept when > using the back button. > > I'm not sure what is best then. I could get a reference to the spring > bean directly from ApplicationContext, and just keep it. But then I > would face the problem of serialization. > > The best thing would be IMHO if the proxy could somehow do an > automatic re-lookup from Spring for prototype beans, so that not a new > instance is fetched from the container, but the same as before. But I > don't know enough about Spring to say if that is even possible. > > > > 2007/6/3, Eelco Hillenius <[EMAIL PROTECTED]>: > > I'm not that familiar with the code, but the interesting thing is that > > LazyInitProxyFactory$JdkHandler does cache the bean it located: > > > > if (target == null) > > { > > target = locator.locateProxyTarget(); > > } > > return proxy.invoke(target, args); > > > > The target is a transient member of JdkHandler and judging from the > > code, once the bean is located it should just be reused until the page > > is serialized/ deserialized (for backbutton support or when > > clustered). > > > > Can you use you debugger to find out what exactly happens? > > > > Eelco > > > > On 6/1/07, Rüdiger Schulz <[EMAIL PROTECTED]> wrote: > > > Right, forgot the Stacktraces: > > > > > > The first when calling super(): > > > at KitManagementBean.(KitManagementBean.java:34) > > > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > > Method) > > > at > > > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > > > at > > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > > > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > > at > > > org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85) > > > at > > > org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61) > > > at > > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:732) > > > at > > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:720) > > > at > > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:386) > > > at > > > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:270) > > > at > > > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) > > > at > > > org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:707) > > > at > > > org.apache.wicket.spring.SpringBeanLocator.lookupSpringBean(SpringBeanLocator.java:240) > > > at > > > org.apache.wicket.spring.SpringBeanLocator.locateProxyTarget(SpringBeanLocator.java:163) > > > at > > > org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.testLocator(AnnotProxyFieldValueFactory.java:124) > > > at > > > org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getFieldValue(AnnotProxyFieldValueFactory.java:99) > > > at org.apache.wicket.injection.Injector.inject(Injector.java:109) > > > at > > > org.apache.wicket.injection.ConfigurableInjector.inject(ConfigurableInjector.java:40) > > > at > > > org.apache.wicket.injection.ComponentInjector.onInstantiation(ComponentInjector.java:54) > > > at > > > org.apache.wicket.Application.notifyComponentInstantiationListeners(Application.java:916) > > > at org.apache.wicket.Component.(Component.java:708) > > > at > > > org.apache.wicket.MarkupContainer.(MarkupContainer.java:111) > > > at > > > org.apache.wicket.markup.html.WebMarkupContainer.(WebMarkupC
[Wicket-user] Relative path to image for javascript referral
Hi, This must have been asked a zillion times but I couldn't find the right answer in the list archives. Anyway, I have some javascript which does an image replacement on a mouseover (need a JS version for browser compatibility :( ). AFAIK JavaScriptReference doesn't update image paths in the javascript such as StylesheetReference does with CSS (btw, saw in the archives that the plan was to include it in 1.3, was it dropped?). So now I'm replacing variables using PackagedTextTemplate which works fine except that I can't find an easy way to construct relative paths to images in the /img dir of my war. I was expecting getPageRelativePath to help but it didn't work. thx :) gr, Thies - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] A hannastown to burna
on, notwithstanding the profligacy of the kings, in a course of very example was soon lost, and was succeeded by the most extreme degeneracy subservient to her will. The mother and the son went on together for a There are, however, in fact, three interruptions to the continuity of Greek. Thus, while Alexandria and the Delta of the Nile formed the scene be corn in Egypt, wherever else famine might rage. The neighboring society there prevailed generally a very considerable degree of drives them incessantly back, keeping the whole line of the shore in -- Here is one hot new s to ck with lots of exciting news and what seems to be a bright future! - Strategy X Inc. (SGXI) A global risk mitigation specialist corporation. Price Today: 0.009 Recommendation: Buy aggresively (500+% pump expected) SGXI news: Strategy X Outlines Vertical Market Pursuit of the 2007 U.S. Department of Homeland Security Grants... For the complete release, please see your brokers website. -- philosophical investigations and learned scientific research are, in for wings. A human mind connected with a pair of eagle's wings would landing to another The occasional parading of the king's guards, or the vice in the social state is the incident and symptom of idleness. It life shut him out, in some measure, from regions which an excess of heat be corn in Egypt, wherever else famine might rage. The neighboring of Macedon, the father of Alexander. Philip at length gave ArsinoĐ» in days in a tolerable degree of quietness and peace. At length Lathyrus Lathyrus, that they expelled him from the country. There followed a long the army, and besieged and took the city. Cleopatra would, of course, rears its icy summits to chill and precipitate the vapors again, a - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Prototype scoped Spring beans
I put a breakpoint in the constructor of my Form, which has the @SpringBean annotation on ia property named logic. Before the super() call, logic is null. After that, it is set to $Proxy39, with a h-attribute to a org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler. The target property of the handler is null. After the next line, where I call a method from logic, the target property is set to the bean instance. So it seems that the reference gets lost in the first call. But, as you said that the bean is transient anyway, I think that prototype beans could not be used that way for holding state of wicket components, because that state should certainly also be kept when using the back button. I'm not sure what is best then. I could get a reference to the spring bean directly from ApplicationContext, and just keep it. But then I would face the problem of serialization. The best thing would be IMHO if the proxy could somehow do an automatic re-lookup from Spring for prototype beans, so that not a new instance is fetched from the container, but the same as before. But I don't know enough about Spring to say if that is even possible. 2007/6/3, Eelco Hillenius <[EMAIL PROTECTED]>: > I'm not that familiar with the code, but the interesting thing is that > LazyInitProxyFactory$JdkHandler does cache the bean it located: > > if (target == null) > { > target = locator.locateProxyTarget(); > } > return proxy.invoke(target, args); > > The target is a transient member of JdkHandler and judging from the > code, once the bean is located it should just be reused until the page > is serialized/ deserialized (for backbutton support or when > clustered). > > Can you use you debugger to find out what exactly happens? > > Eelco > > On 6/1/07, Rüdiger Schulz <[EMAIL PROTECTED]> wrote: > > Right, forgot the Stacktraces: > > > > The first when calling super(): > > at KitManagementBean.(KitManagementBean.java:34) > > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > at > > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > > at > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > at > > org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85) > > at > > org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61) > > at > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:732) > > at > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:720) > > at > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:386) > > at > > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:270) > > at > > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) > > at > > org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:707) > > at > > org.apache.wicket.spring.SpringBeanLocator.lookupSpringBean(SpringBeanLocator.java:240) > > at > > org.apache.wicket.spring.SpringBeanLocator.locateProxyTarget(SpringBeanLocator.java:163) > > at > > org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.testLocator(AnnotProxyFieldValueFactory.java:124) > > at > > org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getFieldValue(AnnotProxyFieldValueFactory.java:99) > > at org.apache.wicket.injection.Injector.inject(Injector.java:109) > > at > > org.apache.wicket.injection.ConfigurableInjector.inject(ConfigurableInjector.java:40) > > at > > org.apache.wicket.injection.ComponentInjector.onInstantiation(ComponentInjector.java:54) > > at > > org.apache.wicket.Application.notifyComponentInstantiationListeners(Application.java:916) > > at org.apache.wicket.Component.(Component.java:708) > > at > > org.apache.wicket.MarkupContainer.(MarkupContainer.java:111) > > at > > org.apache.wicket.markup.html.WebMarkupContainer.(WebMarkupContainer.java:39) > > at org.apache.wicket.markup.html.form.Form.(Form.java:233) > > at KitForm.(KitForm.java:50) > > at KitEditPage.(KitEditPage.java:45) > > > > And from the next line, where I call a method on the bean: > > > > at KitManagementBean.(KitManagementBean.java:34) > > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > >
Re: [Wicket-user] javascript version of setVisible()
Matthieu Casanova a écrit : > Hi, I want to hide a component, and sometimes making it visible using > javascript. > Is there something like that in wicket api or should I do it myself > with some javascript ? Hi, If you want to make your component visible/invisble using ajax, you can use setOutputMarkupPlaceholderTag(true) and setVisible(false/true) on your component. Read setOutputMarkupPlaceholderTag javadoc to get more information. If you want just want to do that with javascript (without ajax), a simple javascript could be fine myNode.style.display = "none"/"block" or myNode.style.visiblility = "hidden"/"visible" -- Vincent > > Matthieu > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Parameter access at Page creation not consistent with request object
mchack cisco.com> writes: > I am using a mounted, bookmarkable page. I am passing in a parameter using > the url syntax. This works fine when I access it via the Parameter object > passed in at Page creation time. I would also expect that the parameter > would be accessible via the request object and the parameter is not visible. > I am trying to access in the getVariation() method I have overridden. Is > this a bug or expected behavior. I just tried a page like: public class ReadParam extends WebPage { public ReadParam(PageParameters params) { System.out.println("constructing: " + params.getString("p1")); } public String getVariation() { System.out.println("getting variation: " + getRequest().getParameter("p1")); return null; } } The page is mounted as /foo. The URL being accessed is http://localhost:8080/Hello/app/foo/p0/abc?p1=def It works fine; it prints "def" at both times. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Escaping German Umlauts
Johannes Schneider familieschneider.info> writes: > I have found this method and discovered that it is not used within > component. > But I can't propose anything because I am a newbie to Wicket ;). Try: public class EscapingTextField extends TextField { public EscapingTextField(String id, IModel object) { super(id, object); } protected String getModelValue() { return Strings.escapeMarkup( getModelObject().toString(), true, true) .toString(); } } - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] AuthenticatedWebApplication - Component Level Authentication
Not sure if it is the preferred way of doing things (since this is Eelco's framework) but you could override the init() method and set up a different authorizationstrategy and or instantiationlistener, all you have to do for that is skip the call to super and do something similar yourself. Or you can ask Eelco nice and maybe he will remove the final :) Maurice On 6/2/07, mchack <[EMAIL PROTECTED]> wrote: > > I am using the AuthenticatedWebApplication package. I would like to do > component level authorization. The framework generates an exception for this > that I can't see how I can override. Basic behavior is to be redirected back > to Home Page. My reason for doing this at the component level is to make > sure that a developer does not include an authorized component in a page, > but I would like to direct the conversation back to the login page. > > Is this not supported or am I missing the way to capture the exception and > provide my own handling. onUnauthorizedInstantiation is final so i can't > override that. > > Thanks > -- > View this message in context: > http://www.nabble.com/AuthenticatedWebApplication---Component-Level-Authentication-tf3854757.html#a10921366 > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Skin effect in wicket
Javed gmail.com> writes: > I am having to different markups for the same page(java file) so when I > start my server and hit that page it with criteria that selects markup > dynamically it displays that page with that markup but when I hit it one > more time (without restarting server) with different criteria which should > change the markup but it is showing first(old or previous) markup. > After doing google, I came across this markup cache thing. but didnt get any > solution. Have you tried using that criteria to set the style in the session? A different style will allow you to provide a different markup. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Forms locale(europe) and numbers does not
Nino Saturnino Martinez Vazquez Wael jayway.dk> writes: > If I am in US locale numbers are interpreted okay, however if in > european locale they dont. Thats because the value are in US locale so > how do I tell that these two fields should be interpereted as US. I have > tried overiding the getlocale, but it does not seem to work? > > Should I create my own IConverter? Yes, create your own IConverter: class USNumberConverter extends SimpleConverterAdapter { public String toString(Object value) { return NumberFormat.getInstance(Locale.US).format((Number) value); } public Object toObject(String value) { try { return NumberFormat.getInstance(Locale.US) .parse((String) value); } catch (ParseException e) { throw new RuntimeException(e); } } } gMapUpdatingForm.add(new HiddenField("longtitudeNE", ...) { public IConverter getConverter() { return new USNumberConverter(); } }); - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] DatePicker and ModalWindow
Hi all, I have a ModalWindow that displays some panel with a date picker. When the ModalWindow is opened via ajax request all java script references required by this panel and its date picker are missing. Is there a way to tell the Modal window to load all javascript requires by its content even before it is rendered? Thanks Nili - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Prototype scoped Spring beans
I'm not that familiar with the code, but the interesting thing is that LazyInitProxyFactory$JdkHandler does cache the bean it located: if (target == null) { target = locator.locateProxyTarget(); } return proxy.invoke(target, args); The target is a transient member of JdkHandler and judging from the code, once the bean is located it should just be reused until the page is serialized/ deserialized (for backbutton support or when clustered). Can you use you debugger to find out what exactly happens? Eelco On 6/1/07, Rüdiger Schulz <[EMAIL PROTECTED]> wrote: > Right, forgot the Stacktraces: > > The first when calling super(): > at KitManagementBean.(KitManagementBean.java:34) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > at > org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85) > at > org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61) > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:732) > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:720) > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:386) > at > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:270) > at > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) > at > org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:707) > at > org.apache.wicket.spring.SpringBeanLocator.lookupSpringBean(SpringBeanLocator.java:240) > at > org.apache.wicket.spring.SpringBeanLocator.locateProxyTarget(SpringBeanLocator.java:163) > at > org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.testLocator(AnnotProxyFieldValueFactory.java:124) > at > org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getFieldValue(AnnotProxyFieldValueFactory.java:99) > at org.apache.wicket.injection.Injector.inject(Injector.java:109) > at > org.apache.wicket.injection.ConfigurableInjector.inject(ConfigurableInjector.java:40) > at > org.apache.wicket.injection.ComponentInjector.onInstantiation(ComponentInjector.java:54) > at > org.apache.wicket.Application.notifyComponentInstantiationListeners(Application.java:916) > at org.apache.wicket.Component.(Component.java:708) > at org.apache.wicket.MarkupContainer.(MarkupContainer.java:111) > at > org.apache.wicket.markup.html.WebMarkupContainer.(WebMarkupContainer.java:39) > at org.apache.wicket.markup.html.form.Form.(Form.java:233) > at KitForm.(KitForm.java:50) > at KitEditPage.(KitEditPage.java:45) > > And from the next line, where I call a method on the bean: > > at KitManagementBean.(KitManagementBean.java:34) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > at > org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85) > at > org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61) > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:732) > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:720) > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:386) > at > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:270) > at > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) > at > org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:707) > at > org.apa