RE: custom bootstrap stylesheet
That does not override the CSS file used by wicket-bootstrap. It just renders an additional CSS reference in the head section. So it might happen that either my custom or the original Style Sheet will be used depending on which one will be rendered first. Marvin Richter -Original Message- From: Gabriel Landon [mailto:glan...@piti.pf] Sent: Friday, March 21, 2014 7:34 PM To: users@wicket.apache.org Subject: Re: custom bootstrap stylesheet Here's what I'm doing with a less reference (would be the same for css). public abstract class AbstractPage extends WebPage { /** Less/css reference. */ private static final LessResourceReference MY_LESS_REFERENCE = new LessResourceReference(AbstractPage .class, css/style.less); @Override public void renderHead(final IHeaderResponse response) { super.renderHead(response); Bootstrap.renderHead(response); // Your CSS/LESS reference response.render(CssHeaderItem.forReference(MY_LESS_REFERENCE)); } } Regards, Gabriel. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/custom-bootstrap-stylesheet-tp4665044p4665079.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Best practice: JS/CSS library resource references
Hi All, Wicket uses mostly ResourceReferences to render and manage the URLs for CSS and JavaScript files to be included in the output. When we use libraries like JQuery UI, Bootstrap etc, it is often a requirement to allow the user to provide his own customized resource references. Typically, our code that integrates Wicket with these libraries provides a settings object, which contains getters and setters for resource references, as well as some other variables that manipulate the libraries behavior. eg: https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui-core/src/main/java/com/googlecode/wicket/jquery/core/settings/IJQueryLibrarySettings.java I want to propose some behavior regarding these settings objects, which will hopefully make our lives a little easier. Initially, I just want to generate discussion. We can talk and decide what is the best plan (or if any plan is needed). At the moment, the general pattern I have observed is: Settings objects are configured on the Application. renderHead() retrieves the settings object from the Application, and uses the resource reference configured that settings object to render the header items. Sometimes, if there is no Application, or no settings object registered with the application, then the default resource references packaged with the wicket integration of the library are used. The problem I have with this is that it only really allows for one set of resources references/settings per application. (Yes, I know wicket-bootstrap has theme providers etc, but I'm talking about your day to day Wicket/JS library integration that uses the pattern above). If you have page A and page B, which both use JQueryUI, for example, and both require *different* customized JQueryUI resource references, or each require different settings for the JQueryUI library, then it becomes complicated. What I have been doing recently is this: settings object are Serializable. There are default settings if no settings object can be found. Settings objects can be registered to Application using MetaData pattern (saves us having to use a special type of Application), and, importantly, settings objects can also be registered to Pages, again using the MetaData pattern. This way, you can have separate settings for each page, and have multiple pages using wildly different customizations of the library. Basically, renderHead() code looks something like this: renderHead(Component component, IHeaderResponse response) { MyLibrarySettings settings = MyLibrary.getSettings(component); // render head using MyLibrary settings. } and you have helper methods like: public class MyLibrary { private static final MetaDataKeyMyLibrarySettings key = ...; public static void setApplicationSettings(Application app, MyLibrarySettings settings) { app.setMetaData(key, settings); } public static void setPageSettings(Page page, MyLibrarySettings settings) { page.serMetaData(key, settings); } public static void getSettings(Component component, MyLibrarySettings settings) { MyLibrarySettings settings = component.getPage().getMetaData(key); if (settings == null){ settings = Application.get().getMetaData(key); } if (settings == null){ settings = getDefaultMyLibrarySettings(); } return settings; } } What do you all think? Thanks, Jesse - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Best practice: JS/CSS library resource references
Hi Jesse, On Mon, Mar 24, 2014 at 11:11 AM, Jesse Long j...@unknown.za.net wrote: Hi All, Wicket uses mostly ResourceReferences to render and manage the URLs for CSS and JavaScript files to be included in the output. When we use libraries like JQuery UI, Bootstrap etc, it is often a requirement to allow the user to provide his own customized resource references. Typically, our code that integrates Wicket with these libraries provides a settings object, which contains getters and setters for resource references, as well as some other variables that manipulate the libraries behavior. eg: https://github.com/sebfz1/wicket-jquery-ui/blob/master/ wicket-jquery-ui-core/src/main/java/com/googlecode/ wicket/jquery/core/settings/IJQueryLibrarySettings.java I want to propose some behavior regarding these settings objects, which will hopefully make our lives a little easier. Initially, I just want to generate discussion. We can talk and decide what is the best plan (or if any plan is needed). At the moment, the general pattern I have observed is: Settings objects are configured on the Application. renderHead() retrieves the settings object from the Application, and uses the resource reference configured that settings object to render the header items. Sometimes, if there is no Application, or no settings object registered with the application, then the default resource references packaged with the wicket integration of the library are used. The problem I have with this is that it only really allows for one set of resources references/settings per application. (Yes, I know wicket-bootstrap has theme providers etc, but I'm talking about your day to day Wicket/JS library integration that uses the pattern above). If you have page A and page B, which both use JQueryUI, for example, and both require *different* customized JQueryUI resource references, or each require different settings for the JQueryUI library, then it becomes complicated. What I have been doing recently is this: settings object are Serializable. There are default settings if no settings object can be found. Settings objects can be registered to Application using MetaData pattern (saves us having to use a special type of Application), and, importantly, settings objects can also be registered to Pages, again using the MetaData pattern. This way, you can have separate settings for each page, and have multiple pages using wildly different customizations of the library. Basically, renderHead() code looks something like this: renderHead(Component component, IHeaderResponse response) { MyLibrarySettings settings = MyLibrary.getSettings(component); // render head using MyLibrary settings. } and you have helper methods like: public class MyLibrary { private static final MetaDataKeyMyLibrarySettings key = ...; public static void setApplicationSettings(Application app, MyLibrarySettings settings) { app.setMetaData(key, settings); } public static void setPageSettings(Page page, MyLibrarySettings settings) { page.serMetaData(key, settings); } public static void getSettings(Component component, MyLibrarySettings settings) { MyLibrarySettings settings = component.getPage().getMetaData(key); if (settings == null){ settings = Application.get().getMetaData(key); } if (settings == null){ settings = getDefaultMyLibrarySettings(); } return settings; } } What do you all think? I like the idea. Here are the improvements I see: - use the Session in between, so you can have settings per user session - always check for Session/Application.exists() before calling #get() - extract an interface so MetaData impl can be an option when the settings are Serializable. Someone may prefer to store the settings otherwise and keep the page size smaller Thanks, Jesse - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ImageUploadPlugin of TinyMCE icon and resource problem
Hi Guys, I experienced the same problem in 6.0 and above that has been solved in 6.0-SNAPSHOT. My second problem is how to reach the uploaded image from another page than it has been uploaded. (I upload a pic into my content editor, save it and would like to display my article at another page. But because of editor's page name and the url ImageUploadPlugin generates it can't be displayed other than the editor itself). A filed an issue https://github.com/wicketstuff/core/issues/295 too. TIA., Sandor -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ImageUploadPlugin-of-TinyMCE-icon-and-resource-problem-tp4665097.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Show Excelsheet in Browser
Hi, You can use a JavaScript solution like http://handsontable.com/index.htmlto show spreadsheet like tables. I am not sure whether it supports multiple sheets. I guess there are more such JS solutions out there. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 2:56 PM, christoph.ma...@t-systems.com wrote: Hello, I want to show an excel data set by clicking on a wicket button. The sheet should be shown in the browser and this data set has multiple table-sheets. How can I do that with wicket? Mit freundlichen Grüßen Christoph Manig
AW: Show Excelsheet in Browser
Hello, iam getting an byte array from the backend and I want to send this to the browser with an outputstream. So the browser notice that he gets an excel sheet and shows this. It should be the same if you open pdfs with the browser while downloading this data. Mit freundlichen Grüßen Christoph Manig -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:03 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser Hi, You can use a JavaScript solution like http://handsontable.com/index.htmlto show spreadsheet like tables. I am not sure whether it supports multiple sheets. I guess there are more such JS solutions out there. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 2:56 PM, christoph.ma...@t-systems.com wrote: Hello, I want to show an excel data set by clicking on a wicket button. The sheet should be shown in the browser and this data set has multiple table-sheets. How can I do that with wicket? Mit freundlichen Grüßen Christoph Manig
Re: Show Excelsheet in Browser
then all you need is to set few response headers: Content-Disposition: Inline Content-type: (see http://stackoverflow.com/a/2938188/497381) See org.apache.wicket.markup.html.link.DownloadLink#onClick for an example how to do this Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 3:17 PM, christoph.ma...@t-systems.com wrote: Hello, iam getting an byte array from the backend and I want to send this to the browser with an outputstream. So the browser notice that he gets an excel sheet and shows this. It should be the same if you open pdfs with the browser while downloading this data. Mit freundlichen Grüßen Christoph Manig -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:03 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser Hi, You can use a JavaScript solution like http://handsontable.com/index.htmlto show spreadsheet like tables. I am not sure whether it supports multiple sheets. I guess there are more such JS solutions out there. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 2:56 PM, christoph.ma...@t-systems.com wrote: Hello, I want to show an excel data set by clicking on a wicket button. The sheet should be shown in the browser and this data set has multiple table-sheets. How can I do that with wicket? Mit freundlichen Grüßen Christoph Manig
AW: Show Excelsheet in Browser
The DownloadLink open the save as dialog but I want to show the data in a browser embedded excel. Are there other Wicket-Components to implement this? Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 – 209 email: christoph.ma...@t-systems.com T-SYSTEMS INTERNATIONAL GMBH Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender) Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567 -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:25 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser then all you need is to set few response headers: Content-Disposition: Inline Content-type: (see http://stackoverflow.com/a/2938188/497381) See org.apache.wicket.markup.html.link.DownloadLink#onClick for an example how to do this Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 3:17 PM, christoph.ma...@t-systems.com wrote: Hello, iam getting an byte array from the backend and I want to send this to the browser with an outputstream. So the browser notice that he gets an excel sheet and shows this. It should be the same if you open pdfs with the browser while downloading this data. Mit freundlichen Grüßen Christoph Manig -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:03 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser Hi, You can use a JavaScript solution like http://handsontable.com/index.htmlto show spreadsheet like tables. I am not sure whether it supports multiple sheets. I guess there are more such JS solutions out there. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 2:56 PM, christoph.ma...@t-systems.com wrote: Hello, I want to show an excel data set by clicking on a wicket button. The sheet should be shown in the browser and this data set has multiple table-sheets. How can I do that with wicket? Mit freundlichen Grüßen Christoph Manig
Re: Show Excelsheet in Browser
Yes, DownloadLink uses ContentDisposition.ATTACHMENT. You need #INLINE. That's why I said to use it as an example. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 3:39 PM, christoph.ma...@t-systems.com wrote: The DownloadLink open the save as dialog but I want to show the data in a browser embedded excel. Are there other Wicket-Components to implement this? Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 – 209 email: christoph.ma...@t-systems.com T-SYSTEMS INTERNATIONAL GMBH Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender) Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567 -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:25 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser then all you need is to set few response headers: Content-Disposition: Inline Content-type: (see http://stackoverflow.com/a/2938188/497381) See org.apache.wicket.markup.html.link.DownloadLink#onClick for an example how to do this Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 3:17 PM, christoph.ma...@t-systems.com wrote: Hello, iam getting an byte array from the backend and I want to send this to the browser with an outputstream. So the browser notice that he gets an excel sheet and shows this. It should be the same if you open pdfs with the browser while downloading this data. Mit freundlichen Grüßen Christoph Manig -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:03 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser Hi, You can use a JavaScript solution like http://handsontable.com/index.htmlto show spreadsheet like tables. I am not sure whether it supports multiple sheets. I guess there are more such JS solutions out there. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 2:56 PM, christoph.ma...@t-systems.com wrote: Hello, I want to show an excel data set by clicking on a wicket button. The sheet should be shown in the browser and this data set has multiple table-sheets. How can I do that with wicket? Mit freundlichen Grüßen Christoph Manig
Re: Show Excelsheet in Browser
If the browser doesn't know how to display an excel file inline, it will still open a download window. This has nothing to do really with Wicket - if you want the browser to display an actual Excel .xls file, you need a browser plugin that can do it. What you can do, for example, is parse the file on the server and generate a HTML table to show in the browser (or display it in any other way). Carl-Eric On Mon, 24 Mar 2014 15:45:24 +0200 Martin Grigorov mgrigo...@apache.org wrote: Yes, DownloadLink uses ContentDisposition.ATTACHMENT. You need #INLINE. That's why I said to use it as an example. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 3:39 PM, christoph.ma...@t-systems.com wrote: The DownloadLink open the save as dialog but I want to show the data in a browser embedded excel. Are there other Wicket-Components to implement this? Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 – 209 email: christoph.ma...@t-systems.com T-SYSTEMS INTERNATIONAL GMBH Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender) Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567 -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:25 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser then all you need is to set few response headers: Content-Disposition: Inline Content-type: (see http://stackoverflow.com/a/2938188/497381) See org.apache.wicket.markup.html.link.DownloadLink#onClick for an example how to do this Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 3:17 PM, christoph.ma...@t-systems.com wrote: Hello, iam getting an byte array from the backend and I want to send this to the browser with an outputstream. So the browser notice that he gets an excel sheet and shows this. It should be the same if you open pdfs with the browser while downloading this data. Mit freundlichen Grüßen Christoph Manig -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:03 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser Hi, You can use a JavaScript solution like http://handsontable.com/index.htmlto show spreadsheet like tables. I am not sure whether it supports multiple sheets. I guess there are more such JS solutions out there. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 2:56 PM, christoph.ma...@t-systems.com wrote: Hello, I want to show an excel data set by clicking on a wicket button. The sheet should be shown in the browser and this data set has multiple table-sheets. How can I do that with wicket? Mit freundlichen Grüßen Christoph Manig - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: Show Excelsheet in Browser
How can I change the ContentDisposition while using an DownloadLink? Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 – 209 email: christoph.ma...@t-systems.com T-SYSTEMS INTERNATIONAL GMBH Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender) Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567 -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:45 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser Yes, DownloadLink uses ContentDisposition.ATTACHMENT. You need #INLINE. That's why I said to use it as an example. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 3:39 PM, christoph.ma...@t-systems.com wrote: The DownloadLink open the save as dialog but I want to show the data in a browser embedded excel. Are there other Wicket-Components to implement this? Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 – 209 email: christoph.ma...@t-systems.com T-SYSTEMS INTERNATIONAL GMBH Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender) Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567 -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:25 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser then all you need is to set few response headers: Content-Disposition: Inline Content-type: (see http://stackoverflow.com/a/2938188/497381) See org.apache.wicket.markup.html.link.DownloadLink#onClick for an example how to do this Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 3:17 PM, christoph.ma...@t-systems.com wrote: Hello, iam getting an byte array from the backend and I want to send this to the browser with an outputstream. So the browser notice that he gets an excel sheet and shows this. It should be the same if you open pdfs with the browser while downloading this data. Mit freundlichen Grüßen Christoph Manig -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:03 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser Hi, You can use a JavaScript solution like http://handsontable.com/index.htmlto show spreadsheet like tables. I am not sure whether it supports multiple sheets. I guess there are more such JS solutions out there. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 2:56 PM, christoph.ma...@t-systems.com wrote: Hello, I want to show an excel data set by clicking on a wicket button. The sheet should be shown in the browser and this data set has multiple table-sheets. How can I do that with wicket? Mit freundlichen Grüßen Christoph Manig - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Show Excelsheet in Browser
You can't at the moment. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 4:19 PM, christoph.ma...@t-systems.com wrote: How can I change the ContentDisposition while using an DownloadLink? Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 – 209 email: christoph.ma...@t-systems.com T-SYSTEMS INTERNATIONAL GMBH Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender) Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567 -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:45 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser Yes, DownloadLink uses ContentDisposition.ATTACHMENT. You need #INLINE. That's why I said to use it as an example. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 3:39 PM, christoph.ma...@t-systems.com wrote: The DownloadLink open the save as dialog but I want to show the data in a browser embedded excel. Are there other Wicket-Components to implement this? Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 – 209 email: christoph.ma...@t-systems.com T-SYSTEMS INTERNATIONAL GMBH Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender) Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567 -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:25 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser then all you need is to set few response headers: Content-Disposition: Inline Content-type: (see http://stackoverflow.com/a/2938188/497381) See org.apache.wicket.markup.html.link.DownloadLink#onClick for an example how to do this Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 3:17 PM, christoph.ma...@t-systems.com wrote: Hello, iam getting an byte array from the backend and I want to send this to the browser with an outputstream. So the browser notice that he gets an excel sheet and shows this. It should be the same if you open pdfs with the browser while downloading this data. Mit freundlichen Grüßen Christoph Manig -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:03 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser Hi, You can use a JavaScript solution like http://handsontable.com/index.htmlto show spreadsheet like tables. I am not sure whether it supports multiple sheets. I guess there are more such JS solutions out there. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 2:56 PM, christoph.ma...@t-systems.com wrote: Hello, I want to show an excel data set by clicking on a wicket button. The sheet should be shown in the browser and this data set has multiple table-sheets. How can I do that with wicket? Mit freundlichen Grüßen Christoph Manig - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: Show Excelsheet in Browser
Sorry for so much questions but it’s the first webapp I have to develop. How can I change the ContentDisposition to show the data embedded in the browser? Which Link or button should I use. Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 – 209 email: christoph.ma...@t-systems.com T-SYSTEMS INTERNATIONAL GMBH Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender) Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567 -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 15:25 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser You can't at the moment. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 4:19 PM, christoph.ma...@t-systems.com wrote: How can I change the ContentDisposition while using an DownloadLink? Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 – 209 email: christoph.ma...@t-systems.com T-SYSTEMS INTERNATIONAL GMBH Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender) Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567 -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:45 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser Yes, DownloadLink uses ContentDisposition.ATTACHMENT. You need #INLINE. That's why I said to use it as an example. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 3:39 PM, christoph.ma...@t-systems.com wrote: The DownloadLink open the save as dialog but I want to show the data in a browser embedded excel. Are there other Wicket-Components to implement this? Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 – 209 email: christoph.ma...@t-systems.com T-SYSTEMS INTERNATIONAL GMBH Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender) Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567 -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:25 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser then all you need is to set few response headers: Content-Disposition: Inline Content-type: (see http://stackoverflow.com/a/2938188/497381) See org.apache.wicket.markup.html.link.DownloadLink#onClick for an example how to do this Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 3:17 PM, christoph.ma...@t-systems.com wrote: Hello, iam getting an byte array from the backend and I want to send this to the browser with an outputstream. So the browser notice that he gets an excel sheet and shows this. It should be the same if you open pdfs with the browser while downloading this data. Mit freundlichen Grüßen Christoph Manig -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:03 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser Hi, You can use a JavaScript solution like http://handsontable.com/index.htmlto show spreadsheet like tables. I am not sure whether it supports multiple sheets. I guess there are more such JS solutions out there. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 2:56 PM, christoph.ma...@t-systems.com wrote: Hello, I want to show an excel data set by clicking on a wicket button. The sheet should be shown in the browser and this data set has multiple table-sheets. How can I do that with wicket? Mit freundlichen Grüßen Christoph Manig - To unsubscribe,
Re: Show Excelsheet in Browser
There is no Link impl in Wicket distro that does all you need. DownloadLink is the closest but it uses ContentDisposition#ATTACHMENT to make a real download experience. I think it is OK to add a way to change the content disposition for the next version. Until then you will have to use your own Link impl for this need. Extend from DownloadLink and override its #onClick method. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 4:32 PM, christoph.ma...@t-systems.com wrote: Sorry for so much questions but it’s the first webapp I have to develop. How can I change the ContentDisposition to show the data embedded in the browser? Which Link or button should I use. Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 – 209 email: christoph.ma...@t-systems.com T-SYSTEMS INTERNATIONAL GMBH Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender) Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567 -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 15:25 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser You can't at the moment. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 4:19 PM, christoph.ma...@t-systems.com wrote: How can I change the ContentDisposition while using an DownloadLink? Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 – 209 email: christoph.ma...@t-systems.com T-SYSTEMS INTERNATIONAL GMBH Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender) Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567 -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:45 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser Yes, DownloadLink uses ContentDisposition.ATTACHMENT. You need #INLINE. That's why I said to use it as an example. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 3:39 PM, christoph.ma...@t-systems.com wrote: The DownloadLink open the save as dialog but I want to show the data in a browser embedded excel. Are there other Wicket-Components to implement this? Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 – 209 email: christoph.ma...@t-systems.com T-SYSTEMS INTERNATIONAL GMBH Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender) Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567 -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:25 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser then all you need is to set few response headers: Content-Disposition: Inline Content-type: (see http://stackoverflow.com/a/2938188/497381) See org.apache.wicket.markup.html.link.DownloadLink#onClick for an example how to do this Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 3:17 PM, christoph.ma...@t-systems.com wrote: Hello, iam getting an byte array from the backend and I want to send this to the browser with an outputstream. So the browser notice that he gets an excel sheet and shows this. It should be the same if you open pdfs with the browser while downloading this data. Mit freundlichen Grüßen Christoph Manig -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:03 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser Hi, You can use a JavaScript solution like http://handsontable.com/index.htmlto show spreadsheet like tables. I
Re: Best practice: JS/CSS library resource references
Hi, I like the idea too... Even, I am not sure to have understood the use-case about the Session scope here, but I trust you :) I've got one question... Imagine you are supplying 2 libraries, plugin1 and plugin2 for instance The libraries definitions would be IPlugin1LibrarySettings extends IJavaScriptLibrarySettings IPlugin2LibrarySettings extends IJavaScriptLibrarySettings Then, you define you custom script like: MyLibrarySettings extends JavaScriptLibrarySettings implements IPlugin1LibrarySettings, IPlugin2LibrarySettings By doing this, I *cannot* have the same getters for returning the plugin's JavaScriptResourceReference, ie: IPlugin1LibrarySettings#getPluginJavaScriptResourceReference IPlugin2LibrarySettings#getPluginJavaScriptResourceReference So, user wishing to provides its own library have to check all IxxxLibrarySettings interfaces to not overlap an existing getter name, even interfaces of satellite projects (but he will never do it of course...). Do you see the point? I think that, by writing a new strategy for loading/customizing javascript library resource references, it would be nice to solve this question in the meantime... (if you are waiting for my solution, I should tell you that I do not have it yet! ;) ) What so you think? Best regards, Sebastien. On Mon, Mar 24, 2014 at 12:12 PM, Martin Grigorov mgrigo...@apache.orgwrote: On Mon, Mar 24, 2014 at 12:59 PM, Jesse Long j...@unknown.za.net wrote: On 24/03/2014 12:05, Martin Grigorov wrote: Hi Jesse, On Mon, Mar 24, 2014 at 11:11 AM, Jesse Long j...@unknown.za.net wrote: Hi All, Wicket uses mostly ResourceReferences to render and manage the URLs for CSS and JavaScript files to be included in the output. When we use libraries like JQuery UI, Bootstrap etc, it is often a requirement to allow the user to provide his own customized resource references. Typically, our code that integrates Wicket with these libraries provides a settings object, which contains getters and setters for resource references, as well as some other variables that manipulate the libraries behavior. eg: https://github.com/sebfz1/wicket-jquery-ui/blob/master/ wicket-jquery-ui-core/src/main/java/com/googlecode/ wicket/jquery/core/settings/IJQueryLibrarySettings.java I want to propose some behavior regarding these settings objects, which will hopefully make our lives a little easier. Initially, I just want to generate discussion. We can talk and decide what is the best plan (or if any plan is needed). At the moment, the general pattern I have observed is: Settings objects are configured on the Application. renderHead() retrieves the settings object from the Application, and uses the resource reference configured that settings object to render the header items. Sometimes, if there is no Application, or no settings object registered with the application, then the default resource references packaged with the wicket integration of the library are used. The problem I have with this is that it only really allows for one set of resources references/settings per application. (Yes, I know wicket-bootstrap has theme providers etc, but I'm talking about your day to day Wicket/JS library integration that uses the pattern above). If you have page A and page B, which both use JQueryUI, for example, and both require *different* customized JQueryUI resource references, or each require different settings for the JQueryUI library, then it becomes complicated. What I have been doing recently is this: settings object are Serializable. There are default settings if no settings object can be found. Settings objects can be registered to Application using MetaData pattern (saves us having to use a special type of Application), and, importantly, settings objects can also be registered to Pages, again using the MetaData pattern. This way, you can have separate settings for each page, and have multiple pages using wildly different customizations of the library. Basically, renderHead() code looks something like this: renderHead(Component component, IHeaderResponse response) { MyLibrarySettings settings = MyLibrary.getSettings(component); // render head using MyLibrary settings. } and you have helper methods like: public class MyLibrary { private static final MetaDataKeyMyLibrarySettings key = ...; public static void setApplicationSettings(Application app, MyLibrarySettings settings) { app.setMetaData(key, settings); } public static void setPageSettings(Page page, MyLibrarySettings settings) { page.serMetaData(key, settings); } public static void getSettings(Component component, MyLibrarySettings settings) { MyLibrarySettings settings = component.getPage(). getMetaData(key); if (settings ==
AW: Show Excelsheet in Browser
Is it possible to override the onclick-method of DownloadLink and change the ContentDisposition to INLINE? Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 – 209 email: christoph.ma...@t-systems.com T-SYSTEMS INTERNATIONAL GMBH Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender) Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567 -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 15:41 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser There is no Link impl in Wicket distro that does all you need. DownloadLink is the closest but it uses ContentDisposition#ATTACHMENT to make a real download experience. I think it is OK to add a way to change the content disposition for the next version. Until then you will have to use your own Link impl for this need. Extend from DownloadLink and override its #onClick method. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 4:32 PM, christoph.ma...@t-systems.com wrote: Sorry for so much questions but it’s the first webapp I have to develop. How can I change the ContentDisposition to show the data embedded in the browser? Which Link or button should I use. Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 – 209 email: christoph.ma...@t-systems.com T-SYSTEMS INTERNATIONAL GMBH Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender) Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567 -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 15:25 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser You can't at the moment. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 4:19 PM, christoph.ma...@t-systems.com wrote: How can I change the ContentDisposition while using an DownloadLink? Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 – 209 email: christoph.ma...@t-systems.com T-SYSTEMS INTERNATIONAL GMBH Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender) Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567 -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:45 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser Yes, DownloadLink uses ContentDisposition.ATTACHMENT. You need #INLINE. That's why I said to use it as an example. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 3:39 PM, christoph.ma...@t-systems.com wrote: The DownloadLink open the save as dialog but I want to show the data in a browser embedded excel. Are there other Wicket-Components to implement this? Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 – 209 email: christoph.ma...@t-systems.com T-SYSTEMS INTERNATIONAL GMBH Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender) Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567 -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:25 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser then all you need is to set few response headers: Content-Disposition: Inline Content-type: (see
Re: Show Excelsheet in Browser
Hi, we use a ResourceLink with a ResourceReference wrapping an AbstractResource, that generates an Excel via POI in a WriteCallback implementation. The AbstractResource implementation can #setContentType() and #setContentDisposition() on the attributes object passed into #newResourceResponse(). I hope I mentioned all the relevant classes an methods involved; I also hope that someone (Martin?) corrects me if I'm wrong... Bye Stefan Martin Grigorov wrote: There is no Link impl in Wicket distro that does all you need. DownloadLink is the closest but it uses ContentDisposition#ATTACHMENT to make a real download experience. I think it is OK to add a way to change the content disposition for the next version. Until then you will have to use your own Link impl for this need. Extend from DownloadLink and override its #onClick method. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 4:32 PM, christoph.ma...@t-systems.com wrote: Sorry for so much questions but it’s the first webapp I have to develop. How can I change the ContentDisposition to show the data embedded in the browser? Which Link or button should I use. Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 – 209 email: christoph.ma...@t-systems.com T-SYSTEMS INTERNATIONAL GMBH Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender) Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567 -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 15:25 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser You can't at the moment. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 4:19 PM, christoph.ma...@t-systems.com wrote: How can I change the ContentDisposition while using an DownloadLink? Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 – 209 email: christoph.ma...@t-systems.com T-SYSTEMS INTERNATIONAL GMBH Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender) Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567 -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:45 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser Yes, DownloadLink uses ContentDisposition.ATTACHMENT. You need #INLINE. That's why I said to use it as an example. Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 3:39 PM, christoph.ma...@t-systems.com wrote: The DownloadLink open the save as dialog but I want to show the data in a browser embedded excel. Are there other Wicket-Components to implement this? Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 – 209 email: christoph.ma...@t-systems.com T-SYSTEMS INTERNATIONAL GMBH Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender) Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567 -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Montag, 24. März 2014 14:25 An: users@wicket.apache.org Betreff: Re: Show Excelsheet in Browser then all you need is to set few response headers: Content-Disposition: Inline Content-type: (see http://stackoverflow.com/a/2938188/497381) See org.apache.wicket.markup.html.link.DownloadLink#onClick for an example how to do this Martin Grigorov Wicket Training and Consulting On Mon, Mar 24, 2014 at 3:17 PM, christoph.ma...@t-systems.com wrote: Hello, iam getting an byte array from the backend and I want to send this to the browser with an outputstream. So the browser notice that he gets an excel sheet and shows this. It should be the same if you open pdfs with the browser while downloading this data. Mit freundlichen Grüßen Christoph Manig -Ursprüngliche
jQuery noConflict() and wicket 6
I wrote a simple test program to understand how jQuery.noConflict() works with Wicket 6. The program uses 2 different jQuery libraries (jQuery 1.11.0 by Wicket 6 and jQuery 1.4.4 by someone else), and can be explained in its *.html file: !DOCTYPE html html xmlns:wicket=http://wicket.apache.org; head meta charset=utf-8 / titleApache Wicket Quickstart/title /head body p click # ( ajax link ) /p /body /html decorator.js is a program implemented by another developer. It also adds jQuery 1.4.4 dynamically to the page. To simplify the code, I only included the line that causes the problem: (function($) { $(document).ready(function() { $('head').prepend(''); }); })(jQuery); Problem: Wicket Ajax link (c1-link) no longer works (onClick() is never called). jQuery object now references version 1.4.4. In Firebug, I see the following error: TypeError: jQuery(...).on is not a function jQuery(el).on(type, data, fn); //wicket...4000.js (line 169) Question: How can I reset the jQuery object to 1.11.0 for the Wicket Ajax call? Can someone explain to me the execution order of the different jQuery libraries used in the program? I tried to reset it by calling $.noConflict() after decorator.js, but that didn't work (still points to 1.4.4). I'm not too sure how to unset it since it's added dynamically after the DOM object has been created. I can update the program to use jQuery 1.7+ in place of 1.4.4 to solve the problem, but I want to understand how 2 different libraries can be used in the same page. Hoping someone can help! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/jQuery-noConflict-and-wicket-6-tp4665117.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org