Re: [Wicket-user] StringResourceModel feature or bug??
Yes that is correct Eelco. The toString method is called getString, which will fetch the i18n message again. I havent looked at why the magic number is three instead of two, but it doesnt matter as long as the feature isnt a bug :) 2007/7/11, Eelco Hillenius <[EMAIL PROTECTED]>: On 7/11/07, Johan Compagner <[EMAIL PROTECTED]> wrote: > why is that triggering 3 times? what is the difference? the log statement? public String toString() { return getString(); } - 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] StringResourceModel feature or bug??
Hi Johan I have created a jira but i have closed it again. https://issues.apache.org/jira/browse/WICKET-742 The IStringResourceLoader was only called 3 times if debug was enabled. No problem when running in a deployment environment. This method was triggering the 3 calls LoadableDetachableModel.getObject() /** * @see org.apache.wicket.model.IModel#getObject() */ public Object getObject() { if (!attached) { attached = true; transientModelObject = load(); if (log.isDebugEnabled()) { log.debug("loaded transient object " + transientModelObject + " for " + this + ", requestCycle " + RequestCycle.get()); } onAttach(); } return transientModelObject; } /Murat 2007/7/11, Johan Compagner <[EMAIL PROTECTED]>: add an issue to jira with a quickstart case On 7/11/07, Murat Yücel <[EMAIL PROTECTED]> wrote: > > Hi Johan > > It is the same key and it is being called with the same component > instance everytime. > There are no locale added to the key. > > /Murat > > 2007/7/10, Johan Compagner < [EMAIL PROTECTED]>: > > > > is the string key 3 time exactly the same? > > or is the locale added to it and then stripped down? > > > > On 7/9/07, Murat Yücel < [EMAIL PROTECTED]> wrote: > > > > > Hi All, > > > > > > I have some problems when using StringResourceModel. It seems like > > > it is calling the IStringResourceLoader 3 times. > > > > > > I am currently using wicket 1.3.0-incubator. > > > > > > Here is an example: > > > > > > CLASS: TestPage.java > > > public class TestPage extends WebPage { > > > public TestPage() { > > > StringResourceModel model = new > > > StringResourceModel("myresourcekey", this, null); > > > add(new Label("label", model)); > > > } > > > } > > > > > > MARKUP:TestPage.html > > > > > > > > > Test Page > > > > > > > > > This is a test page... > > > > > > > > > > > > > > > PROPERTY FILE:TestPage.properties > > > myresourcekey=label > > > > > > Add a breakpoint in the wicket class > > > ComponentStringResourceLoader.public String loadStringResource(final > > > Component component, final String key) > > > Trigger the webpage and you will see it be triggered 3 times. > > > > > > /Murat > > > > > > > > > - > > > 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 > > > > > > > - > 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 - 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] StringResourceModel feature or bug??
Hi Johan It is the same key and it is being called with the same component instance everytime. There are no locale added to the key. /Murat 2007/7/10, Johan Compagner <[EMAIL PROTECTED]>: is the string key 3 time exactly the same? or is the locale added to it and then stripped down? On 7/9/07, Murat Yücel < [EMAIL PROTECTED]> wrote: > Hi All, > > I have some problems when using StringResourceModel. It seems like it is > calling the IStringResourceLoader 3 times. > > I am currently using wicket 1.3.0-incubator. > > Here is an example: > > CLASS: TestPage.java > public class TestPage extends WebPage { > public TestPage() { > StringResourceModel model = new > StringResourceModel("myresourcekey", this, null); > add(new Label("label", model)); > } > } > > MARKUP:TestPage.html > > > Test Page > > > This is a test page... > > > > > PROPERTY FILE:TestPage.properties > myresourcekey=label > > Add a breakpoint in the wicket class > ComponentStringResourceLoader.public String loadStringResource(final > Component component, final String key) > Trigger the webpage and you will see it be triggered 3 times. > > /Murat > > > - > 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 - 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] StringResourceModel feature or bug??
Hi All, I have some problems when using StringResourceModel. It seems like it is calling the IStringResourceLoader 3 times. I am currently using wicket 1.3.0-incubator. Here is an example: CLASS:TestPage.java public class TestPage extends WebPage { public TestPage() { StringResourceModel model = new StringResourceModel("myresourcekey", this, null); add(new Label("label", model)); } } MARKUP:TestPage.html Test Page This is a test page... PROPERTY FILE:TestPage.properties myresourcekey=label Add a breakpoint in the wicket class ComponentStringResourceLoader.publicString loadStringResource(final Component component, final String key) Trigger the webpage and you will see it be triggered 3 times. /Murat - 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] Retrieving resourceKey in FeedbackPanel
Hi Igor It is possible to retrieve the ValidationError object when validating a form component, but it is not possible when rendering the page. All i18n messages for our application is stored in the database. I dont want to maintain all the messages for the different countries, so i have made it possible to click on the text messages when logged in as text admin. The click will open a popup window where it is possible to change the value in the database. I have made it possible to edit i18n messages for tag, label, button and link. I thought that it could be nice if they could do the same for validation messages, but then i would need the resourceKey in the feedbackpanel. I dont now whether or not am i doing the stuff above "the wicket way" but i am using a AbstractTransformerBehavior, which is adding a span with a onclick method. Well anyway thanks for the answer. If it is not possible then i will make a administration tool where it is possible to update messages in the database. Kind regards /Murat Yücel 2007/7/6, Igor Vaynberg <[EMAIL PROTECTED]>: its not possible for all messages i believe, the system is just not designed that way. for validation errors i believe you do have access to the ValidationError object that contains the untranslated key. -igor On 7/5/07, Murat Yücel <[EMAIL PROTECTED]> wrote: > Hi, > > Is is possible to retrieve the resourceKey somehow within the > FeedbackPanel. I am currently using the latest 1.3.0 incubator version. > It seems like it is only possible to get the translated message, but i > need the resourceKey for updating i18n text messages through > the GUI. > > Kind regards > > /Murat Yücel > > > - > 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 - 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] Retrieving resourceKey in FeedbackPanel
Hi, Is is possible to retrieve the resourceKey somehow within the FeedbackPanel. I am currently using the latest 1.3.0 incubator version. It seems like it is only possible to get the translated message, but i need the resourceKey for updating i18n text messages through the GUI. Kind regards /Murat Yücel - 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] Making custom MessageResolver
Well when the developers can help then i have made a hack to solve the problem :)... I am changing with wicket tag to become a span and then adding a onclick method to the span. Beware that this only works if the following flag is set to false. getMarkupSettings().setStripWicketTags(false); Since i only need this on our test environment then it is okey to set the flag to false. The flag is default false so i am only setting the flag to true if we are running on our production environment. Here is the code if anybody is interested: public static class MyLabel extends Label { private static final long serialVersionUID = 1L; /** * Construct. * * @param id * @param value */ public MyLabel(final String id, final String value) { super(id, value); setEscapeModelStrings(false); } /** * * @see wicket.Component#onComponentTag(wicket.markup.ComponentTag) */ protected void onComponentTag(ComponentTag tag) { // Convert into // ... if (tag.isOpenClose()) { tag.setType(XmlTag.OPEN); } super.onComponentTag(tag); tag.setName("span"); tag.setNamespace(null); tag.put("onclick", "editText();"); tag.put("onmouseover", "this.style.cursor='hand'; this.style.cursor='pointer';"); } } 2007/6/5, Murat Yücel <[EMAIL PROTECTED]>: Hi Juergen You are probably right about the setEscapeModelString(false) in 1.3. I am currently using 1.2.6. If i use a tag then it will confuse the developers. Because it is actually not a link it is a i18n message that i want to display. Thats why i am using the wicket:message tag. We are actually migrating a application from struts to wicket and in struts this was solved my making a i18n tag. If the user had text admin right on the session the text would become clickable. Do you have other suggestion to solve the problem above, because the link or tag is not what i want. /Murat 2007/6/5, Juergen Donnerstag < [EMAIL PROTECTED]>: > > The current implementation in 1.3 trunk does > setEscapeModelString(false) (see WicketMessageResolver(line 130) > > I haven't yet understood why you want to add either the Label and/or > the Link via the IComponentResolver? Why not make the Link a "std" > component like > > and use setVisible(boolean) to either switch it on or off depending > the user status. > > Juergen > > On 6/4/07, Murat Yücel <[EMAIL PROTECTED]> wrote: > > Hi All > > > > I have currently made a custom message resolver using the > IComponentResolver > > interface. > > The reason i have made this is because it is not possible > > setEscapeModelString(false) for > > the wicket:message tag. > > > > Well now i have another issue. If someone logon to my application as > text > > administrator then > > instead of a Label a Link with a label should be shown. > > > > Example (no rights) > > This is a text > > > > Example 2 (text admin) > > This is a text > > > > The link should include PopupSettings and in the popup it should be > able to > > change the text > > in the database. This way the business can change texts without me > getting > > involved :)... > > > > The popup part is not a issue. I just have problems with both adding a > Link > > and a Label in a > > Custom Message Resolver. > > > > Hope that you can help > > > > Kind regards > > > > /Murat Yücel > > > > > > > - > > 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 > - 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] Making custom MessageResolver
Hi Juergen You are probably right about the setEscapeModelString(false) in 1.3. I am currently using 1.2.6. If i use a tag then it will confuse the developers. Because it is actually not a link it is a i18n message that i want to display. Thats why i am using the wicket:message tag. We are actually migrating a application from struts to wicket and in struts this was solved my making a i18n tag. If the user had text admin right on the session the text would become clickable. Do you have other suggestion to solve the problem above, because the link or tag is not what i want. /Murat 2007/6/5, Juergen Donnerstag <[EMAIL PROTECTED]>: The current implementation in 1.3 trunk does setEscapeModelString(false) (see WicketMessageResolver(line 130) I haven't yet understood why you want to add either the Label and/or the Link via the IComponentResolver? Why not make the Link a "std" component like and use setVisible(boolean) to either switch it on or off depending the user status. Juergen On 6/4/07, Murat Yücel <[EMAIL PROTECTED]> wrote: > Hi All > > I have currently made a custom message resolver using the IComponentResolver > interface. > The reason i have made this is because it is not possible > setEscapeModelString(false) for > the wicket:message tag. > > Well now i have another issue. If someone logon to my application as text > administrator then > instead of a Label a Link with a label should be shown. > > Example (no rights) > This is a text > > Example 2 (text admin) > This is a text > > The link should include PopupSettings and in the popup it should be able to > change the text > in the database. This way the business can change texts without me getting > involved :)... > > The popup part is not a issue. I just have problems with both adding a Link > and a Label in a > Custom Message Resolver. > > Hope that you can help > > Kind regards > > /Murat Yücel > > > - > 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 - 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] Making custom MessageResolver
Hi All I have currently made a custom message resolver using the IComponentResolver interface. The reason i have made this is because it is not possible setEscapeModelString(false) for the wicket:message tag. Well now i have another issue. If someone logon to my application as text administrator then instead of a Label a Link with a label should be shown. Example (no rights) This is a text Example 2 (text admin) This is a text The link should include PopupSettings and in the popup it should be able to change the text in the database. This way the business can change texts without me getting involved :)... The popup part is not a issue. I just have problems with both adding a Link and a Label in a Custom Message Resolver. Hope that you can help Kind regards /Murat Yücel - 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] have problems with AjaxSelfUpdatingTimerBehavior and AjaxTabbedPanel
Hi James Thanks for the fix. It works like a charm :)... Is this something that wicket will solve in a future release? /Murat 2007/5/10, James McLaughlin <[EMAIL PROTECTED]>: erm, sorry that was: http://www.nabble.com/Re%3A-AjaxTimer-clearTimeout-p9401965.html On 5/10/07, James McLaughlin <[EMAIL PROTECTED]> wrote: > > Hi Murat, > I posted a hack to fix this several months back: > > http://www.nabble.com/AjaxTimer-clearTimeout-tf3364438.html#a9360559 > > Essentially, I have the timer check if the markup for the component it > was bound to is still in the page, and return without firing if it is not. > Hope this helps. > > best, > jim > > On 5/10/07, Murat Yücel <[EMAIL PROTECTED]> wrote: > > > Hi All > > > > I had some problem with ajax when using wicket 1.2.6. I read the > > thread with the following subject: > > Problem with concurren ajax requests on page > > > > Matej suggested that a upgrade to wicket 1.3 would solve the ajax > > problem. So i upgraded the application > > to wicket-1.3.0-incubating-SNAPSHOT. > > > > Now I have problems with AjaxSelfUpdatingTimerBehavior when using it > > together with AjaxTabbedPanel. > > > > Panel 1 includes a subpanel which has an > > AjaxSelfUpdatingTimerBehavior. > > Panel 2 has another subpanel and it doesnt include the subpanel from > > panel 1. > > > > When swithing "page" from panel 1 to panel 2 then after 5 seconds > > which is the duration of the first subpanel > > then i get the following error: > > > > org.apache.wicket.WicketRuntimeException: component > > contentpanel:menu:panel:showthreads not found on page > > dk.team.ninan.web.wicket.BasePage[id = 1], listener interface = > > [RequestListenerInterface name=IBehaviorListener, method=public abstract > > void org.apache.wicket.behavior.IBehaviorListener.onRequest()] > > at > > org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget > > (AbstractRequestCycleProcessor.java:394) > > at > > org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage( > > AbstractRequestCycleProcessor.java:440) > > at > > org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve( > > WebRequestCycleProcessor.java:137) > > > > The error message is correct because the panel showthreads is no > > longer a part of BasePage, but why doesnt the behaviour disappear > > when replacing panels? What am i doing wrong? :) > > > > /Murat > > > > > > - > > 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 - 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] have problems with AjaxSelfUpdatingTimerBehavior and AjaxTabbedPanel
Hi All I had some problem with ajax when using wicket 1.2.6. I read the thread with the following subject: Problem with concurren ajax requests on page Matej suggested that a upgrade to wicket 1.3 would solve the ajax problem. So i upgraded the application to wicket-1.3.0-incubating-SNAPSHOT. Now I have problems with AjaxSelfUpdatingTimerBehavior when using it together with AjaxTabbedPanel. Panel 1 includes a subpanel which has an AjaxSelfUpdatingTimerBehavior. Panel 2 has another subpanel and it doesnt include the subpanel from panel 1. When swithing "page" from panel 1 to panel 2 then after 5 seconds which is the duration of the first subpanel then i get the following error: org.apache.wicket.WicketRuntimeException: component contentpanel:menu:panel:showthreads not found on page dk.team.ninan.web.wicket.BasePage[id = 1], listener interface = [RequestListenerInterface name=IBehaviorListener, method=public abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()] at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget (AbstractRequestCycleProcessor.java:394) at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage( AbstractRequestCycleProcessor.java:440) at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve( WebRequestCycleProcessor.java:137) The error message is correct because the panel showthreads is no longer a part of BasePage, but why doesnt the behaviour disappear when replacing panels? What am i doing wrong? :) /Murat - 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] Test of panels
Thanks Igor. I just have to read the error message :(. You have to add the panel id to retrieve the form. For example if the panel id is: Panel panel = new Panel("panel"); Then it can be retrieved in this way. FormTester form = tester.newFormTester("panel:form"); /Murat 2007/3/7, Igor Vaynberg <[EMAIL PROTECTED]>: looks like you are passing int he wrong path to the form? -igor On 3/7/07, Murat Yücel <[EMAIL PROTECTED] > wrote: > Hi Jean > > Yes i have tried tester.newFormTester("form"). I get the following > error: > > junit.framework.AssertionFailedError: path: 'form' does no exist for > page: DummyPanelPage > at wicket.util.tester.WicketTester.getComponentFromLastRenderedPage( > WicketTester.java:399) > at wicket.util.tester.WicketTester.newFormTester(WicketTester.java > :557) > at wicket.util.tester.WicketTester.newFormTester(WicketTester.java > :540) > > Do i have to override DummyPanelPage? It seems like i dont have to > because it is a dummy > container containing the panel i want to test. > > /Murat > > 2007/3/7, Jean-Baptiste Quenot < [EMAIL PROTECTED]>: > > > > * Murat Yücel: > > > > > Is it possible to test a panel that includes a form and make use > > > of ajax? If yes how is it possible and do you have an example > > > :)... > > > > > > I am already using this method WicketTester.startPanel but i can > > > only test that the panel is rendered without any errors. I cant > > > retrieve the form element. Well i cant figure out how to > > > retrieve them :) > > > > Have you tried tester.newFormTester("form") > > -- > > Jean-Baptiste Quenot > > aka John Banana Qwerty > > http://caraldi.com/jbq/ > > > > - > > > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to > > share your > > opinions on IT & business topics through brief surveys-and earn cash > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Test of panels
Hi Jean Yes i have tried tester.newFormTester("form"). I get the following error: junit.framework.AssertionFailedError: path: 'form' does no exist for page: DummyPanelPage at wicket.util.tester.WicketTester.getComponentFromLastRenderedPage( WicketTester.java:399) at wicket.util.tester.WicketTester.newFormTester(WicketTester.java:557) at wicket.util.tester.WicketTester.newFormTester(WicketTester.java:540) Do i have to override DummyPanelPage? It seems like i dont have to because it is a dummy container containing the panel i want to test. /Murat 2007/3/7, Jean-Baptiste Quenot <[EMAIL PROTECTED]>: * Murat Yücel: > Is it possible to test a panel that includes a form and make use > of ajax? If yes how is it possible and do you have an example > :)... > > I am already using this method WicketTester.startPanel but i can > only test that the panel is rendered without any errors. I cant > retrieve the form element. Well i cant figure out how to > retrieve them :) Have you tried tester.newFormTester("form") -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Test of panels
Hi All Is it possible to test a panel that includes a form and make use of ajax? If yes how is it possible and do you have an example :)... I am already using this method WicketTester.startPanel but i can only test that the panel is rendered without any errors. I cant retrieve the form element. Well i cant figure out how to retrieve them :) Kind regards /Murat Yücel - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Resuable AddressPanel
Hi Igor Dont we convert types? The model below is converting a string to an address object, so i guess it could be called a converter. I can see in the example that you have written to Flemming that you suggest at least two models. AddressModel and AddressLineModel. Do you need the first AddressModel? Cant you just use a normal wicket Model or what is the purpose of the AddressModel? Kind regards /Murat Yücel 2007/2/28, Igor Vaynberg <[EMAIL PROTECTED]>: why use a type converter? you are not converting types... i would use a model to do this class addrlinemodel implements imodel { private imodel addrmodel; public String getobject() { address addr=addrmodel.getobject(); return addr.streetnumber+" "+addr.streetname; } public void setobject(String object) { address addr=addrmodel.getobject(); string[] parts=object.split(); //decide what goes where addr.streetname=parts[2]; ... } } -igor On 2/28/07, Flemming Boller <[EMAIL PROTECTED]> wrote: > Hi > > I have a challenge about creating a reuseable Panel for my pojo called > Address. > > class Address { > > String streetName; > String streetNumber; > String floor; > String letter; > String door; > String zipCode; > String city; > } > > > What I would like is to concatenate streetName, streetNumber, floor, > letter, door into ONE textfield (wicket:id="address") > ZipCode and city have their own TextFields and PropertyModel is used > here. > > > For concatening the fields above I have used a ITypeConverter, which > converts the one textfield into an new Address object. > My problem is that the zipCode and city is bound to the old object, so > the new Address object is missing the zipCode and city. > > > Do any of you guys know a solution to this problem? Should I use a > ITypeConverter at all? Or should I take a whole other approch. > > > Regards > Flemming > > > > - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user