[jira] Commented: (WICKET-1830) Include Component Path in Generated Markup
[ https://issues.apache.org/jira/browse/WICKET-1830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632098#action_12632098 ] Timo Rantalaiho commented on WICKET-1830: - Looks good, cheers Igor! > Include Component Path in Generated Markup > -- > > Key: WICKET-1830 > URL: https://issues.apache.org/jira/browse/WICKET-1830 > Project: Wicket > Issue Type: Improvement > Components: wicket >Reporter: James Carman >Assignee: Igor Vaynberg >Priority: Minor > Fix For: 1.3.5, 1.4-M4 > > > For unit testing purposes, it would be nice to know the exact ids of the > components on your wicket pages. Perhaps the generated markup could contain > a wicket:path attribute? > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-1773) DiskPageStore-FileNotFoundException
[ https://issues.apache.org/jira/browse/WICKET-1773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matej Knopp resolved WICKET-1773. - Resolution: Fixed > DiskPageStore-FileNotFoundException > --- > > Key: WICKET-1773 > URL: https://issues.apache.org/jira/browse/WICKET-1773 > Project: Wicket > Issue Type: Bug > Components: wicket >Affects Versions: 1.3.4 >Reporter: Jan Kriesten >Assignee: Matej Knopp > Fix For: 1.3.5 > > > With the current 1.3-Snapshot, I encounter problems with DiskPageStore: > ---8<--- > 09:30:43.151 ERROR [.wicket.protocol.http.pagestore.DiskPageStore] - Error > flushing page > java.lang.RuntimeException: java.io.FileNotFoundException: > /usr/local/www/services/local.silberlicht.de/html/WEB-INF/tmp/Silberlicht-filestore/abcgm_hyTIaiqgnqDNmUr/pm-null > (No such file or directory) > at > org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel(FileChannelPool.java:104) > at > org.apache.wicket.protocol.http.pagestore.FileChannelPool.getFileChannel(FileChannelPool.java:171) > at > org.apache.wicket.protocol.http.pagestore.DiskPageStore$SessionEntry.savePage(DiskPageStore.java:241) > at > org.apache.wicket.protocol.http.pagestore.DiskPageStore.flushPagesToSaveList(DiskPageStore.java:891) > at > org.apache.wicket.protocol.http.pagestore.DiskPageStore$PageSavingThread.run(DiskPageStore.java:961) > at java.lang.Thread.run(Thread.java:613) > Caused by: java.io.FileNotFoundException: > /usr/local/www/services/local.silberlicht.de/html/WEB-INF/tmp/Silberlicht-filestore/abcgm_hyTIaiqgnqDNmUr/pm-null > (No such file or directory) > at java.io.RandomAccessFile.open(Native Method) > at java.io.RandomAccessFile.(RandomAccessFile.java:212) > at > org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel(FileChannelPool.java:99) > ... 5 common frames omitted > ---8<--- > The path > /usr/local/www/services/local.silberlicht.de/html/WEB-INF/tmp/Silberlicht-filestore/ > actually exists and has the proper rights - so creation of temporary > directories/files should be possible (actually, the directory was created by > the wicket app). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-1773) DiskPageStore-FileNotFoundException
[ https://issues.apache.org/jira/browse/WICKET-1773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631923#action_12631923 ] Matej Knopp commented on WICKET-1773: - I think that's the proper behavior too. Committed change for 1.3 branch and trunk > DiskPageStore-FileNotFoundException > --- > > Key: WICKET-1773 > URL: https://issues.apache.org/jira/browse/WICKET-1773 > Project: Wicket > Issue Type: Bug > Components: wicket >Affects Versions: 1.3.4 >Reporter: Jan Kriesten >Assignee: Matej Knopp > Fix For: 1.3.5 > > > With the current 1.3-Snapshot, I encounter problems with DiskPageStore: > ---8<--- > 09:30:43.151 ERROR [.wicket.protocol.http.pagestore.DiskPageStore] - Error > flushing page > java.lang.RuntimeException: java.io.FileNotFoundException: > /usr/local/www/services/local.silberlicht.de/html/WEB-INF/tmp/Silberlicht-filestore/abcgm_hyTIaiqgnqDNmUr/pm-null > (No such file or directory) > at > org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel(FileChannelPool.java:104) > at > org.apache.wicket.protocol.http.pagestore.FileChannelPool.getFileChannel(FileChannelPool.java:171) > at > org.apache.wicket.protocol.http.pagestore.DiskPageStore$SessionEntry.savePage(DiskPageStore.java:241) > at > org.apache.wicket.protocol.http.pagestore.DiskPageStore.flushPagesToSaveList(DiskPageStore.java:891) > at > org.apache.wicket.protocol.http.pagestore.DiskPageStore$PageSavingThread.run(DiskPageStore.java:961) > at java.lang.Thread.run(Thread.java:613) > Caused by: java.io.FileNotFoundException: > /usr/local/www/services/local.silberlicht.de/html/WEB-INF/tmp/Silberlicht-filestore/abcgm_hyTIaiqgnqDNmUr/pm-null > (No such file or directory) > at java.io.RandomAccessFile.open(Native Method) > at java.io.RandomAccessFile.(RandomAccessFile.java:212) > at > org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel(FileChannelPool.java:99) > ... 5 common frames omitted > ---8<--- > The path > /usr/local/www/services/local.silberlicht.de/html/WEB-INF/tmp/Silberlicht-filestore/ > actually exists and has the proper rights - so creation of temporary > directories/files should be possible (actually, the directory was created by > the wicket app). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
svn commit: r696434 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java
Author: knopp Date: Wed Sep 17 13:23:02 2008 New Revision: 696434 URL: http://svn.apache.org/viewvc?rev=696434&view=rev Log: WICKET-1773 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java?rev=696434&r1=696433&r2=696434&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java Wed Sep 17 13:23:02 2008 @@ -834,9 +834,12 @@ else { List pages = getPagesToSaveList(sessionId); - synchronized (pages) + if (pages != null) { - flushPagesToSaveList(sessionId, pages); + synchronized (pages) + { + pages.clear(); + } entry.unbind(); } pagesToSaveAll.remove(sessionId);
svn commit: r696432 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java
Author: knopp Date: Wed Sep 17 13:21:19 2008 New Revision: 696432 URL: http://svn.apache.org/viewvc?rev=696432&view=rev Log: WICKET-1773 Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java?rev=696432&r1=696431&r2=696432&view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java Wed Sep 17 13:21:19 2008 @@ -831,9 +831,12 @@ else { List pages = getPagesToSaveList(sessionId); - synchronized (pages) + if (pages != null) { - flushPagesToSaveList(sessionId, pages); + synchronized (pages) + { + pages.clear(); + } entry.unbind(); } pagesToSaveAll.remove(sessionId); @@ -1115,8 +1118,7 @@ /** * Loads the data stripped by -* [EMAIL PROTECTED] #stripSerializedPage(org.apache.wicket.protocol.http.pagestore.DiskPageStore.SerializedPageWithSession)} -* . +* [EMAIL PROTECTED] #stripSerializedPage(org.apache.wicket.protocol.http.pagestore.DiskPageStore.SerializedPageWithSession)} . * * @param page * @return
[jira] Resolved: (WICKET-1838) AjaxLink setResponsePage to a stream = queue is not resumed after redirect.
[ https://issues.apache.org/jira/browse/WICKET-1838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matej Knopp resolved WICKET-1838. - Resolution: Fixed applied to 1.3 branch and trunk. > AjaxLink setResponsePage to a stream = queue is not resumed after redirect. > --- > > Key: WICKET-1838 > URL: https://issues.apache.org/jira/browse/WICKET-1838 > Project: Wicket > Issue Type: Bug > Components: wicket >Affects Versions: 1.3.4 > Environment: wicket 1.3.4 > tomcat 5.5.16 >Reporter: Louis Letourneau >Assignee: Matej Knopp > Attachments: wicket-ajax.patch > > > When I click on an AjaxLink that does a setResponsePage towards a > ResourceStreamRequestTarget, afetr the download, the links on the page become > non-clickable. In the Ajax debug window I get a 'Channel busy - postponing'. > Details: > I have a page with many AjaxLinks. The links check whether some data is > available. If the data is available it does a setResponsePage towards a > BookmarkablePage that can work with the data. > The Page that handles the data is mounted on a 'custom' > QueryStringUrlCodingStrategy. In 'decode()' the strategy checks if > manipulations are needed. If not the strategy answers with a > ResourceStreamRequestTarget. > So here's the path that causes the error: > onClick->setResponsePage->decode->ResourceStreamRequestTarget > Once a link has been clicked no other links are clickable on the page. > The redirect seems to happen, but only once. > Say there are 3 files to download on the page, I would need to: > click link1 -> download the file -> refresh the page -> click link2 -. etc. > I shouldn't need to refresh the page. > If I don't refresh the page, when I click link2 I'll get 'Channel busy - > postponing'. > AjaxLink Code: > > > public void onClick(AjaxRequestTarget target) > { > if(file.isOnline()) { > PageParameters params = new PageParameters(); > params.add("id", String.valueOf(typeId)); > params.add("type", type.toString()); > setResponsePage(StageableFilePage.class, params); > } > else { > modal.show(target); > } > } > > > QueryStringUrlCodingStrategy Code: > > > public IRequestTarget decode(RequestParameters requestParameters) { > [..get id and fileType and make sure the user has priviledges..] > final StageableFile file = resolveFile(id, fileType); > if(file.isOnline()) { > IResourceStream resourceStream = new FileResourceStream(file); > //Content-type will be set by the ResourceStreamRequestTarget > ResourceStreamRequestTarget rsrt = new > ResourceStreamRequestTarget(resourceStream) { > @Override > public String getFileName() { > return file.getName(); > } > }; > return rsrt; > } > else { > return super.decode(requestParameters); > } > } > > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
svn commit: r696429 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
Author: knopp Date: Wed Sep 17 13:16:08 2008 New Revision: 696429 URL: http://svn.apache.org/viewvc?rev=696429&view=rev Log: WICKET-1838 Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=696429&r1=696428&r2=696429&view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Wed Sep 17 13:16:08 2008 @@ -938,6 +938,10 @@ if (typeof(redirectUrl) != "undefined" && redirectUrl != null && redirectUrl != "") { t.onreadystatechange = Wicket.emptyFunction; + // In case the page isn't really redirected. For example say the redirect is to an octet-stream. + // A file download popup will appear but the page in the browser won't change. + this.done(); + // support/check for non-relative redirectUrl like as provided and needed in a portlet context if (redirectUrl.charAt(0)==('/')||redirectUrl.match("^http://";)=="http://";||redirectUrl.match("^https://";)=="https://";) { window.location = redirectUrl;
svn commit: r696428 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
Author: knopp Date: Wed Sep 17 13:14:45 2008 New Revision: 696428 URL: http://svn.apache.org/viewvc?rev=696428&view=rev Log: WICKET-1838 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=696428&r1=696427&r2=696428&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Wed Sep 17 13:14:45 2008 @@ -938,6 +938,10 @@ if (typeof(redirectUrl) != "undefined" && redirectUrl != null && redirectUrl != "") { t.onreadystatechange = Wicket.emptyFunction; + // In case the page isn't really redirected. For example say the redirect is to an octet-stream. + // A file download popup will appear but the page in the browser won't change. + this.done(); + // support/check for non-relative redirectUrl like as provided and needed in a portlet context if (redirectUrl.charAt(0)==('/')||redirectUrl.match("^http://";)=="http://";||redirectUrl.match("^https://";)=="https://";) { window.location = redirectUrl;
[jira] Updated: (WICKET-1837) DiskPageStore: 32k directory entries.
[ https://issues.apache.org/jira/browse/WICKET-1837?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] uwe schaefer updated WICKET-1837: - Attachment: sessionId_deep_path_revisited.patch > DiskPageStore: 32k directory entries. > - > > Key: WICKET-1837 > URL: https://issues.apache.org/jira/browse/WICKET-1837 > Project: Wicket > Issue Type: Improvement > Components: wicket >Affects Versions: 1.4-M3 > Environment: Caucho Resin 3.2 >Reporter: uwe schaefer > Attachments: sessionId_deep_path_revisited.patch > > > When using JMeter to battletest a Wicket-App, i saw 31999 directories created > (one per session) in the tmp dir to store the pagemaps. > This is a problem because the underlying filesystem might (and does in my > case) prevent wicket from creating more directory entries than that. > i appended a very very simple patch to address this by creating > /ab/cd/ef instead of /abcdef for pagemap storage. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-1837) DiskPageStore: 32k directory entries.
[ https://issues.apache.org/jira/browse/WICKET-1837?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] uwe schaefer updated WICKET-1837: - Attachment: (was: sessionId_deep_path_revisited.patch) > DiskPageStore: 32k directory entries. > - > > Key: WICKET-1837 > URL: https://issues.apache.org/jira/browse/WICKET-1837 > Project: Wicket > Issue Type: Improvement > Components: wicket >Affects Versions: 1.4-M3 > Environment: Caucho Resin 3.2 >Reporter: uwe schaefer > > When using JMeter to battletest a Wicket-App, i saw 31999 directories created > (one per session) in the tmp dir to store the pagemaps. > This is a problem because the underlying filesystem might (and does in my > case) prevent wicket from creating more directory entries than that. > i appended a very very simple patch to address this by creating > /ab/cd/ef instead of /abcdef for pagemap storage. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-1837) DiskPageStore: 32k directory entries.
[ https://issues.apache.org/jira/browse/WICKET-1837?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] uwe schaefer updated WICKET-1837: - Attachment: sessionId_deep_path_revisited.patch i added another simple patch according to your suggestions. this version should not leave garbage behind and create 3-levels of directories, which should be enough. > DiskPageStore: 32k directory entries. > - > > Key: WICKET-1837 > URL: https://issues.apache.org/jira/browse/WICKET-1837 > Project: Wicket > Issue Type: Improvement > Components: wicket >Affects Versions: 1.4-M3 > Environment: Caucho Resin 3.2 >Reporter: uwe schaefer > Attachments: sessionId_deep_path_revisited.patch > > > When using JMeter to battletest a Wicket-App, i saw 31999 directories created > (one per session) in the tmp dir to store the pagemaps. > This is a problem because the underlying filesystem might (and does in my > case) prevent wicket from creating more directory entries than that. > i appended a very very simple patch to address this by creating > /ab/cd/ef instead of /abcdef for pagemap storage. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-1837) DiskPageStore: 32k directory entries.
[ https://issues.apache.org/jira/browse/WICKET-1837?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] uwe schaefer updated WICKET-1837: - Attachment: (was: deepPath-from-sessionId.patch) > DiskPageStore: 32k directory entries. > - > > Key: WICKET-1837 > URL: https://issues.apache.org/jira/browse/WICKET-1837 > Project: Wicket > Issue Type: Improvement > Components: wicket >Affects Versions: 1.4-M3 > Environment: Caucho Resin 3.2 >Reporter: uwe schaefer > > When using JMeter to battletest a Wicket-App, i saw 31999 directories created > (one per session) in the tmp dir to store the pagemaps. > This is a problem because the underlying filesystem might (and does in my > case) prevent wicket from creating more directory entries than that. > i appended a very very simple patch to address this by creating > /ab/cd/ef instead of /abcdef for pagemap storage. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-1838) AjaxLink setResponsePage to a stream = queue is not resumed after redirect.
[ https://issues.apache.org/jira/browse/WICKET-1838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Louis Letourneau updated WICKET-1838: - Attachment: wicket-ajax.patch This patch solves the problem for me. > AjaxLink setResponsePage to a stream = queue is not resumed after redirect. > --- > > Key: WICKET-1838 > URL: https://issues.apache.org/jira/browse/WICKET-1838 > Project: Wicket > Issue Type: Bug > Components: wicket >Affects Versions: 1.3.4 > Environment: wicket 1.3.4 > tomcat 5.5.16 >Reporter: Louis Letourneau >Assignee: Matej Knopp > Attachments: wicket-ajax.patch > > > When I click on an AjaxLink that does a setResponsePage towards a > ResourceStreamRequestTarget, afetr the download, the links on the page become > non-clickable. In the Ajax debug window I get a 'Channel busy - postponing'. > Details: > I have a page with many AjaxLinks. The links check whether some data is > available. If the data is available it does a setResponsePage towards a > BookmarkablePage that can work with the data. > The Page that handles the data is mounted on a 'custom' > QueryStringUrlCodingStrategy. In 'decode()' the strategy checks if > manipulations are needed. If not the strategy answers with a > ResourceStreamRequestTarget. > So here's the path that causes the error: > onClick->setResponsePage->decode->ResourceStreamRequestTarget > Once a link has been clicked no other links are clickable on the page. > The redirect seems to happen, but only once. > Say there are 3 files to download on the page, I would need to: > click link1 -> download the file -> refresh the page -> click link2 -. etc. > I shouldn't need to refresh the page. > If I don't refresh the page, when I click link2 I'll get 'Channel busy - > postponing'. > AjaxLink Code: > > > public void onClick(AjaxRequestTarget target) > { > if(file.isOnline()) { > PageParameters params = new PageParameters(); > params.add("id", String.valueOf(typeId)); > params.add("type", type.toString()); > setResponsePage(StageableFilePage.class, params); > } > else { > modal.show(target); > } > } > > > QueryStringUrlCodingStrategy Code: > > > public IRequestTarget decode(RequestParameters requestParameters) { > [..get id and fileType and make sure the user has priviledges..] > final StageableFile file = resolveFile(id, fileType); > if(file.isOnline()) { > IResourceStream resourceStream = new FileResourceStream(file); > //Content-type will be set by the ResourceStreamRequestTarget > ResourceStreamRequestTarget rsrt = new > ResourceStreamRequestTarget(resourceStream) { > @Override > public String getFileName() { > return file.getName(); > } > }; > return rsrt; > } > else { > return super.decode(requestParameters); > } > } > > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-1841) Improvement to enable wicket-jmx-panel to work with MBeanServerConnection
[ https://issues.apache.org/jira/browse/WICKET-1841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg resolved WICKET-1841. --- Resolution: Fixed > Improvement to enable wicket-jmx-panel to work with MBeanServerConnection > - > > Key: WICKET-1841 > URL: https://issues.apache.org/jira/browse/WICKET-1841 > Project: Wicket > Issue Type: Improvement > Components: wicket-jmx >Affects Versions: 1.3.4 >Reporter: Jörn Zaefferer > Attachments: wicketstuff-jmx-panel-remote.patch > > > I'm attaching a patch that enables wicket-jmx-panel to work with a > MBeanServerConnection (super interface of MBeanServer). This is necessary to > display interact with JMX beans. The patch also enables the user to select > the MBeanServer to use, which isn't possible so far. > To illustrate the usage of my patched code, here is a simple example: > public class Admin extends WebPage { > @SpringBean > private MBeanServerConnection jmxClient; > > public Admin() { > add(new JmxPanel("jmx", JmxPanelRenderer.Tree, new > JmxMBeanServerWrapper() { > @Override protected Object load() { > return jmxClient; > } > })); > } > } > The jmxClient bean is configured via Spring, in my case with JavaConfig: > public @Bean MBeanServerConnectionFactoryBean jmxClient() throws > MalformedURLException { > MBeanServerConnectionFactoryBean factory = new > MBeanServerConnectionFactoryBean(); > factory.setConnectOnStartup(false); > > factory.setServiceUrl("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/server"); > return factory; > } > To enable the rmi jmx connector on the server: > public @Bean RmiRegistryFactoryBean rmiRegistry() throws Exception { > return new RmiRegistryFactoryBean(); > } > public @Bean(dependsOn="rmiRegistry") ConnectorServerFactoryBean jmxServer() > throws MalformedObjectNameException { > ConnectorServerFactoryBean factory = new ConnectorServerFactoryBean(); > factory.setObjectName("connector:name=rmi"); > > factory.setServiceUrl("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/tomfyweb"); > return factory; > } > Replacing RMI with a different connector/protocol is quite easy this way. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-1841) Improvement to enable wicket-jmx-panel to work with MBeanServerConnection
[ https://issues.apache.org/jira/browse/WICKET-1841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631848#action_12631848 ] Jörn Zaefferer commented on WICKET-1841: Commited in revision 4230. Please resolve as fixed. > Improvement to enable wicket-jmx-panel to work with MBeanServerConnection > - > > Key: WICKET-1841 > URL: https://issues.apache.org/jira/browse/WICKET-1841 > Project: Wicket > Issue Type: Improvement > Components: wicket-jmx >Affects Versions: 1.3.4 >Reporter: Jörn Zaefferer > Attachments: wicketstuff-jmx-panel-remote.patch > > > I'm attaching a patch that enables wicket-jmx-panel to work with a > MBeanServerConnection (super interface of MBeanServer). This is necessary to > display interact with JMX beans. The patch also enables the user to select > the MBeanServer to use, which isn't possible so far. > To illustrate the usage of my patched code, here is a simple example: > public class Admin extends WebPage { > @SpringBean > private MBeanServerConnection jmxClient; > > public Admin() { > add(new JmxPanel("jmx", JmxPanelRenderer.Tree, new > JmxMBeanServerWrapper() { > @Override protected Object load() { > return jmxClient; > } > })); > } > } > The jmxClient bean is configured via Spring, in my case with JavaConfig: > public @Bean MBeanServerConnectionFactoryBean jmxClient() throws > MalformedURLException { > MBeanServerConnectionFactoryBean factory = new > MBeanServerConnectionFactoryBean(); > factory.setConnectOnStartup(false); > > factory.setServiceUrl("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/server"); > return factory; > } > To enable the rmi jmx connector on the server: > public @Bean RmiRegistryFactoryBean rmiRegistry() throws Exception { > return new RmiRegistryFactoryBean(); > } > public @Bean(dependsOn="rmiRegistry") ConnectorServerFactoryBean jmxServer() > throws MalformedObjectNameException { > ConnectorServerFactoryBean factory = new ConnectorServerFactoryBean(); > factory.setObjectName("connector:name=rmi"); > > factory.setServiceUrl("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/tomfyweb"); > return factory; > } > Replacing RMI with a different connector/protocol is quite easy this way. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-1840) Defaults to ReloadingWicketFilter in maven's archetype and quickstart
[ https://issues.apache.org/jira/browse/WICKET-1840?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg resolved WICKET-1840. --- Resolution: Won't Fix Assignee: Igor Vaynberg we are not going to do this. the reloading filter introduces a lot of weirdness once you start adding/removing fields and also causes weird class not found exceptions like cannot cast foo.Bar to foo.Bar this can turn off a lot of newbies who use the archetype and quickstart and know nothing about the reloading filter or what it does. > Defaults to ReloadingWicketFilter in maven's archetype and quickstart > - > > Key: WICKET-1840 > URL: https://issues.apache.org/jira/browse/WICKET-1840 > Project: Wicket > Issue Type: Improvement > Components: wicket-quickstart >Affects Versions: 1.3.4, 1.4-M3 >Reporter: Bruno Borges >Assignee: Igor Vaynberg >Priority: Trivial > Fix For: 1.3.5, 1.4-M4 > > > The default filter should be ReloadingWicketFilter for both Quickstart and > Maven's Archetype projects. > Both has an web.xml in DEVELOPMENT mode. > ReloadingWicketFilter could also warn the user to NOT use it when in a > DEPLOYMENT mode. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-1781) ParentResourceEscapePathTest fails on OS X using cmd line maven
[ https://issues.apache.org/jira/browse/WICKET-1781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631839#action_12631839 ] Jörn Zaefferer commented on WICKET-1781: The test, which works fine eg. on my Windows system, specifies are reversed order for the type and src attributes, when comparing to the html template. A wild guess would be that attributes for the read html template are put into a HashMap, and the order differs between platforms due to different HashMap implementations. Not very convincing... Anyway, I'm attaching a patch that "fixes" the test, making it correctly fail. > ParentResourceEscapePathTest fails on OS X using cmd line maven > --- > > Key: WICKET-1781 > URL: https://issues.apache.org/jira/browse/WICKET-1781 > Project: Wicket > Issue Type: Bug >Affects Versions: 1.3.4 >Reporter: Martijn Dashorst > Fix For: 1.3.5 > > Attachments: org.apache.wicket.ParentResourceEscapePathTest.txt, > ParentResourceEscapePathTest-patch.diff > > > using commandline java 1.4 and maven (2.0.9) I get the attached failure. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-1781) ParentResourceEscapePathTest fails on OS X using cmd line maven
[ https://issues.apache.org/jira/browse/WICKET-1781?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jörn Zaefferer updated WICKET-1781: --- Attachment: ParentResourceEscapePathTest-patch.diff > ParentResourceEscapePathTest fails on OS X using cmd line maven > --- > > Key: WICKET-1781 > URL: https://issues.apache.org/jira/browse/WICKET-1781 > Project: Wicket > Issue Type: Bug >Affects Versions: 1.3.4 >Reporter: Martijn Dashorst > Fix For: 1.3.5 > > Attachments: org.apache.wicket.ParentResourceEscapePathTest.txt, > ParentResourceEscapePathTest-patch.diff > > > using commandline java 1.4 and maven (2.0.9) I get the attached failure. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-1841) Improvement to enable wicket-jmx-panel to work with MBeanServerConnection
[ https://issues.apache.org/jira/browse/WICKET-1841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631836#action_12631836 ] Igor Vaynberg commented on WICKET-1841: --- if you want you can get access to wicketstuff svn and make the change yourself > Improvement to enable wicket-jmx-panel to work with MBeanServerConnection > - > > Key: WICKET-1841 > URL: https://issues.apache.org/jira/browse/WICKET-1841 > Project: Wicket > Issue Type: Improvement > Components: wicket-jmx >Affects Versions: 1.3.4 >Reporter: Jörn Zaefferer > Attachments: wicketstuff-jmx-panel-remote.patch > > > I'm attaching a patch that enables wicket-jmx-panel to work with a > MBeanServerConnection (super interface of MBeanServer). This is necessary to > display interact with JMX beans. The patch also enables the user to select > the MBeanServer to use, which isn't possible so far. > To illustrate the usage of my patched code, here is a simple example: > public class Admin extends WebPage { > @SpringBean > private MBeanServerConnection jmxClient; > > public Admin() { > add(new JmxPanel("jmx", JmxPanelRenderer.Tree, new > JmxMBeanServerWrapper() { > @Override protected Object load() { > return jmxClient; > } > })); > } > } > The jmxClient bean is configured via Spring, in my case with JavaConfig: > public @Bean MBeanServerConnectionFactoryBean jmxClient() throws > MalformedURLException { > MBeanServerConnectionFactoryBean factory = new > MBeanServerConnectionFactoryBean(); > factory.setConnectOnStartup(false); > > factory.setServiceUrl("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/server"); > return factory; > } > To enable the rmi jmx connector on the server: > public @Bean RmiRegistryFactoryBean rmiRegistry() throws Exception { > return new RmiRegistryFactoryBean(); > } > public @Bean(dependsOn="rmiRegistry") ConnectorServerFactoryBean jmxServer() > throws MalformedObjectNameException { > ConnectorServerFactoryBean factory = new ConnectorServerFactoryBean(); > factory.setObjectName("connector:name=rmi"); > > factory.setServiceUrl("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/tomfyweb"); > return factory; > } > Replacing RMI with a different connector/protocol is quite easy this way. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-1770) PagingNavigation's javadoc contains malformed html snippet
[ https://issues.apache.org/jira/browse/WICKET-1770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg resolved WICKET-1770. --- Resolution: Fixed Assignee: Igor Vaynberg > PagingNavigation's javadoc contains malformed html snippet > -- > > Key: WICKET-1770 > URL: https://issues.apache.org/jira/browse/WICKET-1770 > Project: Wicket > Issue Type: Improvement >Affects Versions: 1.3.4 >Reporter: Andrea Aime >Assignee: Igor Vaynberg > Fix For: 1.3.5, 1.4-M4 > > Attachments: PagingNavigation-javadoc-patch.diff > > > PagingNavigation shows the following snippet: > {code:html} > > > 1 > > > {code} > it should be: > {code:html} > > > 1 > > > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
svn commit: r696358 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java
Author: ivaynberg Date: Wed Sep 17 09:18:29 2008 New Revision: 696358 URL: http://svn.apache.org/viewvc?rev=696358&view=rev Log: WICKET-1770 Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java?rev=696358&r1=696357&r2=696358&view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java Wed Sep 17 09:18:29 2008 @@ -32,7 +32,7 @@ * ** - * 1> + * 1 * * *
svn commit: r696357 - in /wicket/trunk/wicket: .settings/org.eclipse.jdt.core.prefs src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java
Author: ivaynberg Date: Wed Sep 17 09:18:03 2008 New Revision: 696357 URL: http://svn.apache.org/viewvc?rev=696357&view=rev Log: WICKET-1770 Modified: wicket/trunk/wicket/.settings/org.eclipse.jdt.core.prefs wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java Modified: wicket/trunk/wicket/.settings/org.eclipse.jdt.core.prefs URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/.settings/org.eclipse.jdt.core.prefs?rev=696357&r1=696356&r2=696357&view=diff == --- wicket/trunk/wicket/.settings/org.eclipse.jdt.core.prefs (original) +++ wicket/trunk/wicket/.settings/org.eclipse.jdt.core.prefs Wed Sep 17 09:18:03 2008 @@ -1,4 +1,4 @@ -#Sun May 11 13:48:44 CEST 2008 +#Wed Sep 10 11:28:56 PDT 2008 eclipse.preferences.version=1 instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true org.eclipse.jdt.core.builder.cleanOutputFolder=clean @@ -17,18 +17,24 @@ org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.deprecation=warning org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled @@ -36,34 +42,51 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nullReference=warning org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.p
[jira] Updated: (WICKET-1841) Improvement to enable wicket-jmx-panel to work with MBeanServerConnection
[ https://issues.apache.org/jira/browse/WICKET-1841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jörn Zaefferer updated WICKET-1841: --- Attachment: wicketstuff-jmx-panel-remote.patch Patch, see issue description. > Improvement to enable wicket-jmx-panel to work with MBeanServerConnection > - > > Key: WICKET-1841 > URL: https://issues.apache.org/jira/browse/WICKET-1841 > Project: Wicket > Issue Type: Improvement > Components: wicket-jmx >Affects Versions: 1.3.4 >Reporter: Jörn Zaefferer > Attachments: wicketstuff-jmx-panel-remote.patch > > > I'm attaching a patch that enables wicket-jmx-panel to work with a > MBeanServerConnection (super interface of MBeanServer). This is necessary to > display interact with JMX beans. The patch also enables the user to select > the MBeanServer to use, which isn't possible so far. > To illustrate the usage of my patched code, here is a simple example: > public class Admin extends WebPage { > @SpringBean > private MBeanServerConnection jmxClient; > > public Admin() { > add(new JmxPanel("jmx", JmxPanelRenderer.Tree, new > JmxMBeanServerWrapper() { > @Override protected Object load() { > return jmxClient; > } > })); > } > } > The jmxClient bean is configured via Spring, in my case with JavaConfig: > public @Bean MBeanServerConnectionFactoryBean jmxClient() throws > MalformedURLException { > MBeanServerConnectionFactoryBean factory = new > MBeanServerConnectionFactoryBean(); > factory.setConnectOnStartup(false); > > factory.setServiceUrl("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/server"); > return factory; > } > To enable the rmi jmx connector on the server: > public @Bean RmiRegistryFactoryBean rmiRegistry() throws Exception { > return new RmiRegistryFactoryBean(); > } > public @Bean(dependsOn="rmiRegistry") ConnectorServerFactoryBean jmxServer() > throws MalformedObjectNameException { > ConnectorServerFactoryBean factory = new ConnectorServerFactoryBean(); > factory.setObjectName("connector:name=rmi"); > > factory.setServiceUrl("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/tomfyweb"); > return factory; > } > Replacing RMI with a different connector/protocol is quite easy this way. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-367) Exception in "wicket.util.io.WicketObjectOutputStream" when using an injected @SpringBean via subclassed LocalSessionFactoryBean
[ https://issues.apache.org/jira/browse/WICKET-367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631831#action_12631831 ] Martijn Dashorst commented on WICKET-367: - No, the reason for @SpringBean is that the property *is* serialized. The @SpringBean will create a serializable proxy to the Spring bean that does a lookup in the application context upon deserialization. > Exception in "wicket.util.io.WicketObjectOutputStream" when using an injected > @SpringBean via subclassed LocalSessionFactoryBean > > > Key: WICKET-367 > URL: https://issues.apache.org/jira/browse/WICKET-367 > Project: Wicket > Issue Type: Bug > Components: wicket >Affects Versions: 1.3.0-beta1 > Environment: JDK 1.5, Win XP, Jetty >Reporter: Michel Wichers >Assignee: Johan Compagner >Priority: Minor > Fix For: 1.5-M1 > > > Hi all, > we received the following exception within a WebPage using an injected > SpringBean - Hibernate SessionFactory via subclassed LocalSessionFactoryBean : > ERROR - Objects : Error serializing object class > de.ponton.box.core.ui.detail.Detail [object=[Page class = > de.ponton.box.core.ui.detail.Detail, id = 0, version = 0]] > wicket.util.io.WicketSerializeableException: Error writing fields for > wicket.proxy.$Proxy7 > de.ponton.box.core.ui.detail.Detail->sessionFactory > NOTE: if you feel Wicket is at fault with this exception, please report > to the mailing list. You can switch to JDK based serialization by > calling: wicket.util.lang.Objects.setObjectStreamFactory(new > IObjectStreamFactory.DefaultObjectStreamFactory()) e.g. in the init > method of your application > at > wicket.util.io.WicketObjectOutputStream.writeObjectOverride(WicketObjectOutputStream.java:806) > at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298) > at > wicket.util.io.ClassStreamHandler$ObjectFieldAndIndex.writeField(ClassStreamHandler.java:860) > at > wicket.util.io.ClassStreamHandler.writeFields(ClassStreamHandler.java:387) > at > wicket.util.io.WicketObjectOutputStream.writeObjectOverride(WicketObjectOutputStream.java:779) > at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298) > at wicket.util.lang.Objects.objectToByteArray(Objects.java:1102) > at > wicket.protocol.http.FilePageStore.serializePage(FilePageStore.java:408) > at wicket.protocol.http.FilePageStore.access$1500(FilePageStore.java:49) > at > wicket.protocol.http.FilePageStore$PageSerializingThread.run(FilePageStore.java:705) > at java.lang.Thread.run(Thread.java:595) > Caused by: java.lang.NullPointerException > at > wicket.util.io.ClassStreamHandler.writeFields(ClassStreamHandler.java:397) > at > wicket.util.io.WicketObjectOutputStream.writeObjectOverride(WicketObjectOutputStream.java:779) > ... 10 more > ERROR - FilePageStore$PageSerializingThread : Error in page save thread > java.lang.NullPointerException > at > wicket.protocol.http.FilePageStore.serializePage(FilePageStore.java:413) > at wicket.protocol.http.FilePageStore.access$1500(FilePageStore.java:49) > at > wicket.protocol.http.FilePageStore$PageSerializingThread.run(FilePageStore.java:705) > at java.lang.Thread.run(Thread.java:595) > shouldn't happen > Here is the applicationContextSnippet: > ... > class="de.ponton.box.core.bootstrap.DynamicSessionFactoryBean" > singleton="true"> > > > > > we are subclassing LocalSessionFactoryBean from spring: > ... > public class DynamicSessionFactoryBean extends LocalSessionFactoryBean > { > ... > and here is the code snippet: > > @SpringBean > SessionFactory sessionFactory; > > Thanks in advance! -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (WICKET-1841) Improvement to enable wicket-jmx-panel to work with MBeanServerConnection
Improvement to enable wicket-jmx-panel to work with MBeanServerConnection - Key: WICKET-1841 URL: https://issues.apache.org/jira/browse/WICKET-1841 Project: Wicket Issue Type: Improvement Components: wicket-jmx Affects Versions: 1.3.4 Reporter: Jörn Zaefferer I'm attaching a patch that enables wicket-jmx-panel to work with a MBeanServerConnection (super interface of MBeanServer). This is necessary to display interact with JMX beans. The patch also enables the user to select the MBeanServer to use, which isn't possible so far. To illustrate the usage of my patched code, here is a simple example: public class Admin extends WebPage { @SpringBean private MBeanServerConnection jmxClient; public Admin() { add(new JmxPanel("jmx", JmxPanelRenderer.Tree, new JmxMBeanServerWrapper() { @Override protected Object load() { return jmxClient; } })); } } The jmxClient bean is configured via Spring, in my case with JavaConfig: public @Bean MBeanServerConnectionFactoryBean jmxClient() throws MalformedURLException { MBeanServerConnectionFactoryBean factory = new MBeanServerConnectionFactoryBean(); factory.setConnectOnStartup(false); factory.setServiceUrl("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/server"); return factory; } To enable the rmi jmx connector on the server: public @Bean RmiRegistryFactoryBean rmiRegistry() throws Exception { return new RmiRegistryFactoryBean(); } public @Bean(dependsOn="rmiRegistry") ConnectorServerFactoryBean jmxServer() throws MalformedObjectNameException { ConnectorServerFactoryBean factory = new ConnectorServerFactoryBean(); factory.setObjectName("connector:name=rmi"); factory.setServiceUrl("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/tomfyweb"); return factory; } Replacing RMI with a different connector/protocol is quite easy this way. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-367) Exception in "wicket.util.io.WicketObjectOutputStream" when using an injected @SpringBean via subclassed LocalSessionFactoryBean
[ https://issues.apache.org/jira/browse/WICKET-367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631826#action_12631826 ] Bruno Borges commented on WICKET-367: - Shouldn't properties annotated with @SpringBean be always transient? Is there a way to avoid serialization of those not-transient properties? > Exception in "wicket.util.io.WicketObjectOutputStream" when using an injected > @SpringBean via subclassed LocalSessionFactoryBean > > > Key: WICKET-367 > URL: https://issues.apache.org/jira/browse/WICKET-367 > Project: Wicket > Issue Type: Bug > Components: wicket >Affects Versions: 1.3.0-beta1 > Environment: JDK 1.5, Win XP, Jetty >Reporter: Michel Wichers >Assignee: Johan Compagner >Priority: Minor > Fix For: 1.5-M1 > > > Hi all, > we received the following exception within a WebPage using an injected > SpringBean - Hibernate SessionFactory via subclassed LocalSessionFactoryBean : > ERROR - Objects : Error serializing object class > de.ponton.box.core.ui.detail.Detail [object=[Page class = > de.ponton.box.core.ui.detail.Detail, id = 0, version = 0]] > wicket.util.io.WicketSerializeableException: Error writing fields for > wicket.proxy.$Proxy7 > de.ponton.box.core.ui.detail.Detail->sessionFactory > NOTE: if you feel Wicket is at fault with this exception, please report > to the mailing list. You can switch to JDK based serialization by > calling: wicket.util.lang.Objects.setObjectStreamFactory(new > IObjectStreamFactory.DefaultObjectStreamFactory()) e.g. in the init > method of your application > at > wicket.util.io.WicketObjectOutputStream.writeObjectOverride(WicketObjectOutputStream.java:806) > at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298) > at > wicket.util.io.ClassStreamHandler$ObjectFieldAndIndex.writeField(ClassStreamHandler.java:860) > at > wicket.util.io.ClassStreamHandler.writeFields(ClassStreamHandler.java:387) > at > wicket.util.io.WicketObjectOutputStream.writeObjectOverride(WicketObjectOutputStream.java:779) > at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298) > at wicket.util.lang.Objects.objectToByteArray(Objects.java:1102) > at > wicket.protocol.http.FilePageStore.serializePage(FilePageStore.java:408) > at wicket.protocol.http.FilePageStore.access$1500(FilePageStore.java:49) > at > wicket.protocol.http.FilePageStore$PageSerializingThread.run(FilePageStore.java:705) > at java.lang.Thread.run(Thread.java:595) > Caused by: java.lang.NullPointerException > at > wicket.util.io.ClassStreamHandler.writeFields(ClassStreamHandler.java:397) > at > wicket.util.io.WicketObjectOutputStream.writeObjectOverride(WicketObjectOutputStream.java:779) > ... 10 more > ERROR - FilePageStore$PageSerializingThread : Error in page save thread > java.lang.NullPointerException > at > wicket.protocol.http.FilePageStore.serializePage(FilePageStore.java:413) > at wicket.protocol.http.FilePageStore.access$1500(FilePageStore.java:49) > at > wicket.protocol.http.FilePageStore$PageSerializingThread.run(FilePageStore.java:705) > at java.lang.Thread.run(Thread.java:595) > shouldn't happen > Here is the applicationContextSnippet: > ... > class="de.ponton.box.core.bootstrap.DynamicSessionFactoryBean" > singleton="true"> > > > > > we are subclassing LocalSessionFactoryBean from spring: > ... > public class DynamicSessionFactoryBean extends LocalSessionFactoryBean > { > ... > and here is the code snippet: > > @SpringBean > SessionFactory sessionFactory; > > Thanks in advance! -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
svn commit: r696356 - /wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/request/encoder/PageInfo.java
Author: knopp Date: Wed Sep 17 09:13:14 2008 New Revision: 696356 URL: http://svn.apache.org/viewvc?rev=696356&view=rev Log: (empty) Modified: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/request/encoder/PageInfo.java Modified: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/request/encoder/PageInfo.java URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/request/encoder/PageInfo.java?rev=696356&r1=696355&r2=696356&view=diff == --- wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/request/encoder/PageInfo.java (original) +++ wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/request/encoder/PageInfo.java Wed Sep 17 09:13:14 2008 @@ -27,7 +27,7 @@ * pageId * pageId.version * pageMap (only if pageMap contains a letter) - * .pageMap + * .pageMap (for pageMap without any letter (just digits)) * pageMap.pageId.version * pageMap.pageId (only if pageMap contains a letter) *
[jira] Commented: (WICKET-1773) DiskPageStore-FileNotFoundException
[ https://issues.apache.org/jira/browse/WICKET-1773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631825#action_12631825 ] Bruno Borges commented on WICKET-1773: -- If there's no reason to write pages from an invalid session, I think that is the correct behavior to just clear the list. Any other thought ? > DiskPageStore-FileNotFoundException > --- > > Key: WICKET-1773 > URL: https://issues.apache.org/jira/browse/WICKET-1773 > Project: Wicket > Issue Type: Bug > Components: wicket >Affects Versions: 1.3.4 >Reporter: Jan Kriesten >Assignee: Matej Knopp > Fix For: 1.3.5 > > > With the current 1.3-Snapshot, I encounter problems with DiskPageStore: > ---8<--- > 09:30:43.151 ERROR [.wicket.protocol.http.pagestore.DiskPageStore] - Error > flushing page > java.lang.RuntimeException: java.io.FileNotFoundException: > /usr/local/www/services/local.silberlicht.de/html/WEB-INF/tmp/Silberlicht-filestore/abcgm_hyTIaiqgnqDNmUr/pm-null > (No such file or directory) > at > org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel(FileChannelPool.java:104) > at > org.apache.wicket.protocol.http.pagestore.FileChannelPool.getFileChannel(FileChannelPool.java:171) > at > org.apache.wicket.protocol.http.pagestore.DiskPageStore$SessionEntry.savePage(DiskPageStore.java:241) > at > org.apache.wicket.protocol.http.pagestore.DiskPageStore.flushPagesToSaveList(DiskPageStore.java:891) > at > org.apache.wicket.protocol.http.pagestore.DiskPageStore$PageSavingThread.run(DiskPageStore.java:961) > at java.lang.Thread.run(Thread.java:613) > Caused by: java.io.FileNotFoundException: > /usr/local/www/services/local.silberlicht.de/html/WEB-INF/tmp/Silberlicht-filestore/abcgm_hyTIaiqgnqDNmUr/pm-null > (No such file or directory) > at java.io.RandomAccessFile.open(Native Method) > at java.io.RandomAccessFile.(RandomAccessFile.java:212) > at > org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel(FileChannelPool.java:99) > ... 5 common frames omitted > ---8<--- > The path > /usr/local/www/services/local.silberlicht.de/html/WEB-INF/tmp/Silberlicht-filestore/ > actually exists and has the proper rights - so creation of temporary > directories/files should be possible (actually, the directory was created by > the wicket app). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
svn commit: r696353 - in /wicket/sandbox/knopp/experimental/wicket/src: main/java/org/apache/_wicket/request/encoder/ main/java/org/apache/_wicket/request/handler/impl/ test/java/org/apache/_wicket/ t
Author: knopp Date: Wed Sep 17 09:09:52 2008 New Revision: 696353 URL: http://svn.apache.org/viewvc?rev=696353&view=rev Log: Bookmarkable stuff Added: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/request/encoder/BookmarkableEncoder.java (with props) wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/request/encoder/PageParametersEncoder.java (with props) wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/request/encoder/SimplePageParametersEncoder.java (with props) wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/request/handler/impl/BookmarkableListenerInterfaceRequestHandler.java (with props) wicket/sandbox/knopp/experimental/wicket/src/test/java/org/apache/_wicket/request/encoder/AbstractEncoderTest.java (with props) wicket/sandbox/knopp/experimental/wicket/src/test/java/org/apache/_wicket/request/encoder/BookmarkableEncoderTest.java (with props) Modified: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/request/encoder/AbstractEncoder.java wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/request/encoder/PageInfo.java wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/request/encoder/PageInstanceEncoder.java wicket/sandbox/knopp/experimental/wicket/src/test/java/org/apache/_wicket/MockPage.java wicket/sandbox/knopp/experimental/wicket/src/test/java/org/apache/_wicket/request/encoder/PageInstanceEncoderTest.java wicket/sandbox/knopp/experimental/wicket/src/test/java/org/apache/_wicket/request/encoder/TestEncoderContext.java Modified: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/request/encoder/AbstractEncoder.java URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/request/encoder/AbstractEncoder.java?rev=696353&r1=696352&r2=696353&view=diff == --- wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/request/encoder/AbstractEncoder.java (original) +++ wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/request/encoder/AbstractEncoder.java Wed Sep 17 09:09:52 2008 @@ -18,10 +18,14 @@ import org.apache._wicket.IComponent; import org.apache._wicket.IPage; +import org.apache._wicket.PageParameters; import org.apache._wicket.request.RequestHandlerEncoder; +import org.apache._wicket.request.RequestParameters; import org.apache._wicket.request.Url; import org.apache._wicket.request.Url.QueryParameter; +import org.apache.wicket.Page; import org.apache.wicket.RequestListenerInterface; +import org.apache.wicket.Session; import org.apache.wicket.WicketRuntimeException; import org.apache.wicket.protocol.http.PageExpiredException; import org.apache.wicket.util.string.Strings; @@ -119,4 +123,122 @@ return component; } } + + @SuppressWarnings("unchecked") + protected Class getPageClass(String name) + { + try + { + if (Session.exists()) + { + Session s = Session.get(); + return (Class)s.getClassResolver().resolveClass(name); + + } + else + { + return (Class)Class.forName(name); + } + } + catch (ClassNotFoundException e) + { + throw new WicketRuntimeException("Error resolving bookmarkable page class", e); + } + } + + protected PageParameters extractPageParameters(Url url, RequestParameters requestParameters, + int segmentsToSkip, PageParametersEncoder encoder) + { + // strip the segments and first query parameter from URL + Url urlCopy = new Url(url); + while (segmentsToSkip > 0 && urlCopy.getSegments().isEmpty() == false) + { + urlCopy.getSegments().remove(0); + --segmentsToSkip; + } + + if (getPageComponentInfo(urlCopy) != null) + { + urlCopy.getQueryParameters().remove(0); + } + + PageParameters decoded = encoder.decodePageParameters(urlCopy); + return decoded != null ? decoded : new PageParameters(); + } + + protected Url encodePageParameters(Url url, PageParameters pageParameters, + PageParametersEncoder encoder) + { + if (pageParameters == null) + { + pageParameters = new PageParameters(); +
[jira] Created: (WICKET-1840) Defaults to ReloadingWicketFilter in maven's archetype and quickstart
Defaults to ReloadingWicketFilter in maven's archetype and quickstart - Key: WICKET-1840 URL: https://issues.apache.org/jira/browse/WICKET-1840 Project: Wicket Issue Type: Improvement Components: wicket-quickstart Affects Versions: 1.4-M3, 1.3.4 Reporter: Bruno Borges Priority: Trivial Fix For: 1.3.5, 1.4-M4 The default filter should be ReloadingWicketFilter for both Quickstart and Maven's Archetype projects. Both has an web.xml in DEVELOPMENT mode. ReloadingWicketFilter could also warn the user to NOT use it when in a DEPLOYMENT mode. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-1770) PagingNavigation's javadoc contains malformed html snippet
[ https://issues.apache.org/jira/browse/WICKET-1770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jörn Zaefferer updated WICKET-1770: --- Attachment: PagingNavigation-javadoc-patch.diff Patch fixing the closing "span". > PagingNavigation's javadoc contains malformed html snippet > -- > > Key: WICKET-1770 > URL: https://issues.apache.org/jira/browse/WICKET-1770 > Project: Wicket > Issue Type: Improvement >Affects Versions: 1.3.4 >Reporter: Andrea Aime > Fix For: 1.3.5, 1.4-M4 > > Attachments: PagingNavigation-javadoc-patch.diff > > > PagingNavigation shows the following snippet: > {code:html} > > > 1 > > > {code} > it should be: > {code:html} > > > 1 > > > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-1638) Wickets unique IDs cause problems for automated testing
[ https://issues.apache.org/jira/browse/WICKET-1638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg resolved WICKET-1638. --- Resolution: Won't Fix Fix Version/s: 1.4-M4 1.3.5 Assignee: Igor Vaynberg agreed, for now i am closing this because WICKET-1830 provides testing support. john, feel free to reopen if WICKET-1830 does not work for you > Wickets unique IDs cause problems for automated testing > --- > > Key: WICKET-1638 > URL: https://issues.apache.org/jira/browse/WICKET-1638 > Project: Wicket > Issue Type: Improvement > Components: wicket >Reporter: John Ray >Assignee: Igor Vaynberg > Fix For: 1.3.5, 1.4-M4 > > Attachments: UniqueIDs.patch > > > Wickets unique markup IDs cause problems writing automated tests. > They should be changed so that the first instance of a component with an ID > of "foo" on a page would have a generated ID of "foo", the second would be > "foo2" and so on. This would make the IDs consistent enough that they could > be used for testing. > See the following discussion for more info. > http://www.nabble.com/Wickets-unique-IDs-cause-problems-for-Selenium-td17267339.html -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[CONF] Apache Wicket: How to add tooltips (page edited)
Page Edited : WICKET : How to add tooltips How to add tooltips has been edited by Ceryl Bruitzman (Sep 17, 2008). Change summary: Changed Step 7, the PackageResourceReference is deprecated, ResourceReference isn't (View changes) Content: Table of contents Step 1: Download SweetTitles Step 2: Replace sweetTitles.js Step 3: Edit supported tags Step 4: Add the _javascript_ files to your Wicket package Step 5: Add the CSS Step 6: Add it to your HTML file Step 7: Add the _javascript_ resources Step 8: Add the tooltip Step 9: Add the tooltip text Step 10: There is no step 10 Recently I had to migrate a big web application from Wicket 1.1.1 to 1.2.1. I was using the contrib-dojo Tooltip class, which doesn't work with 1.2, so I had to find another solution. I found Igor's suggestions for tooltips and chose to go with "Sweet Titles". Sweet titles is great, but the problem is that it automatically attaches tooltips to all , and tags (correct me if I'm wrong, but I am sure about the tag). I didn't want that, though. I needed tooltips for checkboxes, and I needed to explicitly say which element should show a tooltip and which element shouldn't. So I altered the sweetTitles.js a bit and this is what I came up with: A quick and hopefully easy guide that will show you how to use pretty tooltips on your Wicket pages. Step 1: Download SweetTitles Download SweetTitles Step 2: Replace sweetTitles.js Replace sweetTitles.js with this one: /* Sweet Titles (c) Creative Commons 2005 http://creativecommons.org/licenses/by-sa/2.5/ Author: Dustin Diaz | http://www.dustindiaz.com Edited by Johannes Fahrenkrug. The script now honors the showtooltip attribute */ var sweetTitles = { xCord : 0, // @Number: x pixel value of current cursor position yCord : 0, // @Number: y pixel value of current cursor position tipElements : ['input', 'td', 'tr', 'textarea', 'select', 'span', 'div', 'a','abbr','acronym'], // @Array: Allowable elements that can have the toolTip obj : Object, // @Element: That of which you're hovering over tip : Object, // @Element: The actual toolTip itself active : 0, // @Number: 0: Not Active || 1: Active init : function() { if ( !document.getElementById || !document.createElement || !document.getElementsByTagName ) { return; } var i,j; this.tip = document.createElement('div'); this.tip.id = 'toolTip'; document.getElementsByTagName('body')[0].appendChild(this.tip); this.tip.style.top = '0'; this.tip.style.visibility = 'hidden'; var tipLen = this.tipElements.length; for ( i=0; ivar current = document.getElementsByTagName(this.tipElements[i]); var curLen = current.length; for ( j=0; jif (current[j].getAttribute('showtooltip') == 'true') { addEvent(current[j],'mouseover',this.tipOver); addEvent(current[j],'mouseout',this.tipOut); current[j].setAttribute('tip',current[j].title); current[j].removeAttribute('title'); } } } }, updateXY : function(e) { if ( document.captureEvents ) { sweetTitles.xCord = e.pageX; sweetTitles.yCord = e.pageY; } else if ( window.event.clientX ) { sweetTitles.xCord = window.event.clientX+document.documentElement.scrollLeft; sweetTitles.yCord = window.event.clientY+document.documentElement.scrollTop; } }, tipOut: function() { if ( window.tID ) { clearTimeout(tID); } if ( window.opacityID ) { clearTimeout(opacityID); } sweetTitles.tip.style.visibility = 'hidden'; }, checkNode : function() { var trueObj = this.obj; if ( this.tipElements.inArray(trueObj.nodeName.toLowerCase()) ) { return trueObj; } else { return trueObj.parentNode; } }, tipOver : function(e) { sweetTitles.obj = this; tID = window.setTimeout("sweetTitles.tipShow()",200); sweetTitles.updateXY(e); }, tipShow : function() { var scrX = Number(this.xCord); var scrY = Number(this.yCord); var tp = parseInt(scrY+15); var lt = parseInt(scrX+10); var anch = this.checkNode(); var addy = ''; var access = ''; if ( anch.nodeName.toLowerCase() == 'a' ) { addy = (anch.href.length > 25 ? anch.href.toString().substring(0,25)+"..." : anch.href); var access = ( anch.accessKey ? ' ['+anch.accessKey+'] ' : '' ); } else if (anch.firstChild){ addy = anch.firstChild.nodeValue; } else { addy = ''; } this.tip.innerHTML = ""+anch.getAttribute('tip')+""+access+addy+""; if ( parseInt(document.documentElement.clientWidth+document.documentElement.scrollLeft) < parseInt(this.tip.offsetWidth+lt) ) { this.tip.style.left = parseInt(lt-(this.tip.offsetWidth+10))+'px'; } else { this.tip.style.left = lt+'px';
[CONF] Apache Wicket: How to add tooltips (page edited)
Page Edited : WICKET : How to add tooltips How to add tooltips has been edited by Ceryl Bruitzman (Sep 17, 2008). Change summary: Changed Step 7, the PackageResourceReference is deprecated, ResourceReference isn't (View changes) Content: Table of contents Step 1: Download SweetTitles Step 2: Replace sweetTitles.js Step 3: Edit supported tags Step 4: Add the _javascript_ files to your Wicket package Step 5: Add the CSS Step 6: Add it to your HTML file Step 7: Add the _javascript_ resources Step 8: Add the tooltip Step 9: Add the tooltip text Step 10: There is no step 10 Recently I had to migrate a big web application from Wicket 1.1.1 to 1.2.1. I was using the contrib-dojo Tooltip class, which doesn't work with 1.2, so I had to find another solution. I found Igor's suggestions for tooltips and chose to go with "Sweet Titles". Sweet titles is great, but the problem is that it automatically attaches tooltips to all , and tags (correct me if I'm wrong, but I am sure about the tag). I didn't want that, though. I needed tooltips for checkboxes, and I needed to explicitly say which element should show a tooltip and which element shouldn't. So I altered the sweetTitles.js a bit and this is what I came up with: A quick and hopefully easy guide that will show you how to use pretty tooltips on your Wicket pages. Step 1: Download SweetTitles Download SweetTitles Step 2: Replace sweetTitles.js Replace sweetTitles.js with this one: /* Sweet Titles (c) Creative Commons 2005 http://creativecommons.org/licenses/by-sa/2.5/ Author: Dustin Diaz | http://www.dustindiaz.com Edited by Johannes Fahrenkrug. The script now honors the showtooltip attribute */ var sweetTitles = { xCord : 0, // @Number: x pixel value of current cursor position yCord : 0, // @Number: y pixel value of current cursor position tipElements : ['input', 'td', 'tr', 'textarea', 'select', 'span', 'div', 'a','abbr','acronym'], // @Array: Allowable elements that can have the toolTip obj : Object, // @Element: That of which you're hovering over tip : Object, // @Element: The actual toolTip itself active : 0, // @Number: 0: Not Active || 1: Active init : function() { if ( !document.getElementById || !document.createElement || !document.getElementsByTagName ) { return; } var i,j; this.tip = document.createElement('div'); this.tip.id = 'toolTip'; document.getElementsByTagName('body')[0].appendChild(this.tip); this.tip.style.top = '0'; this.tip.style.visibility = 'hidden'; var tipLen = this.tipElements.length; for ( i=0; ivar current = document.getElementsByTagName(this.tipElements[i]); var curLen = current.length; for ( j=0; jif (current[j].getAttribute('showtooltip') == 'true') { addEvent(current[j],'mouseover',this.tipOver); addEvent(current[j],'mouseout',this.tipOut); current[j].setAttribute('tip',current[j].title); current[j].removeAttribute('title'); } } } }, updateXY : function(e) { if ( document.captureEvents ) { sweetTitles.xCord = e.pageX; sweetTitles.yCord = e.pageY; } else if ( window.event.clientX ) { sweetTitles.xCord = window.event.clientX+document.documentElement.scrollLeft; sweetTitles.yCord = window.event.clientY+document.documentElement.scrollTop; } }, tipOut: function() { if ( window.tID ) { clearTimeout(tID); } if ( window.opacityID ) { clearTimeout(opacityID); } sweetTitles.tip.style.visibility = 'hidden'; }, checkNode : function() { var trueObj = this.obj; if ( this.tipElements.inArray(trueObj.nodeName.toLowerCase()) ) { return trueObj; } else { return trueObj.parentNode; } }, tipOver : function(e) { sweetTitles.obj = this; tID = window.setTimeout("sweetTitles.tipShow()",200); sweetTitles.updateXY(e); }, tipShow : function() { var scrX = Number(this.xCord); var scrY = Number(this.yCord); var tp = parseInt(scrY+15); var lt = parseInt(scrX+10); var anch = this.checkNode(); var addy = ''; var access = ''; if ( anch.nodeName.toLowerCase() == 'a' ) { addy = (anch.href.length > 25 ? anch.href.toString().substring(0,25)+"..." : anch.href); var access = ( anch.accessKey ? ' ['+anch.accessKey+'] ' : '' ); } else if (anch.firstChild){ addy = anch.firstChild.nodeValue; } else { addy = ''; } this.tip.innerHTML = ""+anch.getAttribute('tip')+""+access+addy+""; if ( parseInt(document.documentElement.clientWidth+document.documentElement.scrollLeft) < parseInt(this.tip.offsetWidth+lt) ) { this.tip.style.left = parseInt(lt-(this.tip.offsetWidth+10))+'px'; } else { this.tip.style.left = lt+'px';
[CONF] Apache Wicket: How to add tooltips (page edited)
Page Edited : WICKET : How to add tooltips How to add tooltips has been edited by Ceryl Bruitzman (Sep 17, 2008). Change summary: Changed Step 7, the PackageResourceReference is deprecated, ResourceReference isn't (View changes) Content: Table of contents Step 1: Download SweetTitles Step 2: Replace sweetTitles.js Step 3: Edit supported tags Step 4: Add the _javascript_ files to your Wicket package Step 5: Add the CSS Step 6: Add it to your HTML file Step 7: Add the _javascript_ resources Step 8: Add the tooltip Step 9: Add the tooltip text Step 10: There is no step 10 Recently I had to migrate a big web application from Wicket 1.1.1 to 1.2.1. I was using the contrib-dojo Tooltip class, which doesn't work with 1.2, so I had to find another solution. I found Igor's suggestions for tooltips and chose to go with "Sweet Titles". Sweet titles is great, but the problem is that it automatically attaches tooltips to all , and tags (correct me if I'm wrong, but I am sure about the tag). I didn't want that, though. I needed tooltips for checkboxes, and I needed to explicitly say which element should show a tooltip and which element shouldn't. So I altered the sweetTitles.js a bit and this is what I came up with: A quick and hopefully easy guide that will show you how to use pretty tooltips on your Wicket pages. Step 1: Download SweetTitles Download SweetTitles Step 2: Replace sweetTitles.js Replace sweetTitles.js with this one: /* Sweet Titles (c) Creative Commons 2005 http://creativecommons.org/licenses/by-sa/2.5/ Author: Dustin Diaz | http://www.dustindiaz.com Edited by Johannes Fahrenkrug. The script now honors the showtooltip attribute */ var sweetTitles = { xCord : 0, // @Number: x pixel value of current cursor position yCord : 0, // @Number: y pixel value of current cursor position tipElements : ['input', 'td', 'tr', 'textarea', 'select', 'span', 'div', 'a','abbr','acronym'], // @Array: Allowable elements that can have the toolTip obj : Object, // @Element: That of which you're hovering over tip : Object, // @Element: The actual toolTip itself active : 0, // @Number: 0: Not Active || 1: Active init : function() { if ( !document.getElementById || !document.createElement || !document.getElementsByTagName ) { return; } var i,j; this.tip = document.createElement('div'); this.tip.id = 'toolTip'; document.getElementsByTagName('body')[0].appendChild(this.tip); this.tip.style.top = '0'; this.tip.style.visibility = 'hidden'; var tipLen = this.tipElements.length; for ( i=0; ivar current = document.getElementsByTagName(this.tipElements[i]); var curLen = current.length; for ( j=0; jif (current[j].getAttribute('showtooltip') == 'true') { addEvent(current[j],'mouseover',this.tipOver); addEvent(current[j],'mouseout',this.tipOut); current[j].setAttribute('tip',current[j].title); current[j].removeAttribute('title'); } } } }, updateXY : function(e) { if ( document.captureEvents ) { sweetTitles.xCord = e.pageX; sweetTitles.yCord = e.pageY; } else if ( window.event.clientX ) { sweetTitles.xCord = window.event.clientX+document.documentElement.scrollLeft; sweetTitles.yCord = window.event.clientY+document.documentElement.scrollTop; } }, tipOut: function() { if ( window.tID ) { clearTimeout(tID); } if ( window.opacityID ) { clearTimeout(opacityID); } sweetTitles.tip.style.visibility = 'hidden'; }, checkNode : function() { var trueObj = this.obj; if ( this.tipElements.inArray(trueObj.nodeName.toLowerCase()) ) { return trueObj; } else { return trueObj.parentNode; } }, tipOver : function(e) { sweetTitles.obj = this; tID = window.setTimeout("sweetTitles.tipShow()",200); sweetTitles.updateXY(e); }, tipShow : function() { var scrX = Number(this.xCord); var scrY = Number(this.yCord); var tp = parseInt(scrY+15); var lt = parseInt(scrX+10); var anch = this.checkNode(); var addy = ''; var access = ''; if ( anch.nodeName.toLowerCase() == 'a' ) { addy = (anch.href.length > 25 ? anch.href.toString().substring(0,25)+"..." : anch.href); var access = ( anch.accessKey ? ' ['+anch.accessKey+'] ' : '' ); } else if (anch.firstChild){ addy = anch.firstChild.nodeValue; } else { addy = ''; } this.tip.innerHTML = ""+anch.getAttribute('tip')+""+access+addy+""; if ( parseInt(document.documentElement.clientWidth+document.documentElement.scrollLeft) < parseInt(this.tip.offsetWidth+lt) ) { this.tip.style.left = parseInt(lt-(this.tip.offsetWidth+10))+'px'; } else { this.tip.style.left = lt+'px';
[CONF] Apache Wicket: Use wicket as template engine (page edited)
Page Edited : WICKET : Use wicket as template engine Use wicket as template engine has been edited by Anatoly Kupriyanov (Sep 17, 2008). (View changes) Content: It's possible to use most wicket components just to generate an output. Say to generate html page for email and send via javax.mail. It takes TemplatePage (child of wicket.Page) implementation and writes result to given java.io.Writer. All stuff like sessions, versioning, request parameters are disabled, TemplatePage is always stateless. Yes, web page is not the same as email, but very-very close. Of course, it's nearly impossible to reuse the same WebPage, but you can reuse some your components both on WebPage and TemplatePage. And of course it's possible to use most standard wicket components like wicket:border, wicket:extend, repeaters, etc... Yet another great benefits, but I've not done it yet: it's possible to make auto-linking of resources. Say, if you have on your page, the generated email will have the image attached and properly linked as "cid:" resource. if you have a link in email to your web-site back, it could be properly handled and checked if it actually links to correct Page. Draft source code is here: http://files.rsdn.ru/20380/WicketTemplater.rar Powered by Atlassian Confluence (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request Unsubscribe or edit your notifications preferences
[CONF] Apache Wicket: Use wicket as template engine (page created)
Page Created : WICKET : Use wicket as template engine Use wicket as template engine has been created by Anatoly Kupriyanov (Sep 17, 2008). Content: It's possible to use most wicket components just to generate an output. Say to generate html page for email and send via javax.mail. It takes TemplatePage (child of wicket.Page) implementation and writes result to given java.io.Writer. All stuff like sessions, versioning, request parameters are disabled, TemplatePage is always stateless. Yes, web page is not the same as email, but very-very close. Of course, it's nearly impossible to reuse the same WebPage, but you can reuse some your components both on WebPage and TemplatePage. And of course it's possible to use most standard wicket components like wicket:border, wicket:extend, repeaters, etc... Yet another great benefits, but I've not done it yet: it's possible to make auto-linking of resources. Say, if you have on your page, the generated email will have the image attached and properly linked as "cid:" resource. if you have a link in email to your web-site back, it could be properly handled and checked if it actually links to correct Page. Powered by Atlassian Confluence (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request Unsubscribe or edit your notifications preferences
[jira] Updated: (WICKET-1839) IAjaxIndicatorAware/WicketAjaxIndicatorAppender with AutoCompleteTextField doesn't work
[ https://issues.apache.org/jira/browse/WICKET-1839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jan Kriesten updated WICKET-1839: - Attachment: indicator-test.tar.gz Test case. > IAjaxIndicatorAware/WicketAjaxIndicatorAppender with AutoCompleteTextField > doesn't work > --- > > Key: WICKET-1839 > URL: https://issues.apache.org/jira/browse/WICKET-1839 > Project: Wicket > Issue Type: Bug > Components: wicket-extensions >Affects Versions: 1.3.4 > Environment: Any >Reporter: Jan Kriesten > Fix For: 1.3.5 > > Attachments: indicator-test.tar.gz > > > When adding IAjaxIndicatorAware/WicketAjaxIndicatorAppender to an > AutoCompleteTextField to indicate loading of remote data, the Indicator isn't > activated. > On a side note: AbstractAutoCompleteBehavior#onBind adds another > AbstractDefaultAjaxBehavior which is unnecessary since > AbstractAutoCompleteBehavior extends that already. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (WICKET-1839) IAjaxIndicatorAware/WicketAjaxIndicatorAppender with AutoCompleteTextField doesn't work
IAjaxIndicatorAware/WicketAjaxIndicatorAppender with AutoCompleteTextField doesn't work --- Key: WICKET-1839 URL: https://issues.apache.org/jira/browse/WICKET-1839 Project: Wicket Issue Type: Bug Components: wicket-extensions Affects Versions: 1.3.4 Environment: Any Reporter: Jan Kriesten Fix For: 1.3.5 When adding IAjaxIndicatorAware/WicketAjaxIndicatorAppender to an AutoCompleteTextField to indicate loading of remote data, the Indicator isn't activated. On a side note: AbstractAutoCompleteBehavior#onBind adds another AbstractDefaultAjaxBehavior which is unnecessary since AbstractAutoCompleteBehavior extends that already. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-1625) ajax update brakes Form in ModalWindow
[ https://issues.apache.org/jira/browse/WICKET-1625?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matej Knopp resolved WICKET-1625. - Resolution: Fixed Added form to modal window itself. > ajax update brakes Form in ModalWindow > -- > > Key: WICKET-1625 > URL: https://issues.apache.org/jira/browse/WICKET-1625 > Project: Wicket > Issue Type: Bug > Components: wicket, wicket-extensions >Affects Versions: 1.3.3 > Environment: tested in IE7, FF2 and FF3 >Reporter: david r. >Assignee: Matej Knopp >Priority: Critical > Attachments: wicket-quickstart-form-modal-bug.zip > > > When a Form contained by a ModalWindow is updated via AJAX (for example to > perform field validation), the AJAX response is correct (the full correct > form is in the response) but the final HTML code (after the Ajax update) is > erroneous. > A consequence is that a second attempt to submit the same Form via AJAX > generates a JavaScript error: wicket-ajax.js, line 456, "element has no > properties". > In other words, "element" is NULL at this point. > A possible reason for this: > By looking at the HTML with Firebug, one can see that before the first AJAX > call, the page looks like ... id="bar">... and after the request > (i.e. after the AJAX update of the Form) the code is > .. : the "form" tags disappeared > from the HTML code... -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-1312) Generic inter-component event mechanism
[ https://issues.apache.org/jira/browse/WICKET-1312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631687#action_12631687 ] Stefan Fussenegger commented on WICKET-1312: Hi Timo, thanks for your comments. 1) You're right. But I feel that differentiating between events should be up to the framework users not the framework itself. For instance: you propose an IntegerChangeEvent, I use such things as NewCommentEvents. These are two completely different layers of abstractions that heavily depend on what you try to do with those events in your application. I only want to add components if another component receives an ajax call and maybe add the new comment to the list of comments first. I'm not sure what you use those IntegerChangeEvents for but I am sure you have very valid reasons for them ;) However, both ways of using events may be cut down to one common thing: the event broadcasting mechanism! I feel that this is enough to be included in the framework together with some common events. (Just the way the events are used in the java beans spec: java.util.EventObject as root for all events and common events like PropertyChangeEvent that are often used) 2) I didn't spend much though on testing yet. But isn't it possible to assume (i.e. test) behavior of the sending end using a specialized receiver? This way, you would just test wheter you received the events you expected and everything should be fine. I would really appreciate a final solution that is similar to the usage of events by the java beans spec. There you have one "root event" (java.util.EventObject), some commonly used events (e.g. PropertyChangeEvent) and a naming convention used for introspection. On first look I really, really, really didn't like your use of reflection in you EventBroadcaster. I'd also vote for using a much simpler approach as outlined by Martin above. On second look, I might like an approach that is base on java bean spec's naming convention: to handle a FooEvent one would have to implement the FooEventListener interface with a method 'void fooEvent(FooEvent e)'. I'm currently not sure though whether what I'm saying is completely correct, but it's at least close enough ;) Furthermore, I think that we could take the usage of events another step further (Just some raw ideas here, but maybe worth looking at): Maybe we (and some core devs) could brainstorm on another thing: Who is responsible for firing events? This could not only be the user but also the framework itself. This way, one could implement something like the VetoableChangeListeners where you can constrain (or validate) model values by dropping in another component (an event is fired for every model change). I could even imagine, that an event is fired automatically when one component of a page receives an ajax call. > Generic inter-component event mechanism > --- > > Key: WICKET-1312 > URL: https://issues.apache.org/jira/browse/WICKET-1312 > Project: Wicket > Issue Type: New Feature > Components: wicket-extensions >Affects Versions: 1.3.0-final >Reporter: Timo Rantalaiho > Fix For: 1.5-M1 > > Attachments: event-handler-with-testcase.zip, > Generic_EventBroadcaster.patch, > Generic_EventBroadcaster_glued_in_Component.patch > > > The attached patch provides a generic mechanism for transmitting > inter-component events within a page. This has grown primarily from the need > to repaint all relevant ajax components after an event, but can be used also > in non-ajax environments such as after normal form submits. > The basic idea is to fire an IVisitor on the page of the component sending an > event, giving as an argument an event-specific listener interface that must > be implemented by the components willing to receive the events. They can then > do whatever they need such as add themselves to the AjaxRequestTarget that > can be supplied in the event. > Sometimes the basic Wicket mechanisms such as sharing a model are not enough; > particularly repainting all relevant components in Ajax events gets tedious > if the components are far away from each other in a complex DOM tree. > The benefits of this approach are > - loose coupling between the sending and receiving end > - however, because of strong static typing it's easy enough to find with an > IDE from where the events are broadcasted and where they are received > - good testability (EventBroadcaster can be mocked on the sending end, and > event handlers tested directly on the receiving end, possibly with mock > events) > - no need the keep references to Component instances or their paths (which > could have been problematic on repeaters) > (This is not a real observer or listener pattern implementation because the > components cannot registe
[jira] Commented: (WICKET-1638) Wickets unique IDs cause problems for automated testing
[ https://issues.apache.org/jira/browse/WICKET-1638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631678#action_12631678 ] Martin Grigorov commented on WICKET-1638: - See WICKET-1830. Maybe this resolves this ticket. > Wickets unique IDs cause problems for automated testing > --- > > Key: WICKET-1638 > URL: https://issues.apache.org/jira/browse/WICKET-1638 > Project: Wicket > Issue Type: Improvement > Components: wicket >Reporter: John Ray > Attachments: UniqueIDs.patch > > > Wickets unique markup IDs cause problems writing automated tests. > They should be changed so that the first instance of a component with an ID > of "foo" on a page would have a generated ID of "foo", the second would be > "foo2" and so on. This would make the IDs consistent enough that they could > be used for testing. > See the following discussion for more info. > http://www.nabble.com/Wickets-unique-IDs-cause-problems-for-Selenium-td17267339.html -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.