Jack Bakker 11 Years Ago Great intro David ; theme coordination across Vaadin and Liferay is interesting.. I have looked at Chameleon but have instead gone the distance to reference Vaadin style classes in Liferay themes in order to put styling in the hands of a 'common' theme developer. Please sign in to reply. Reply as... Cancel David H Nebinger Jack Bakker 11 Years Ago Themes have, at least for me, proven to be the biggest pain in using Vaadin. Because of the Vaadin CSS classes, the Liferay themes are not usable. And it is not so easy to map from existing Liferay themes into a Vaadin theme either.I ended up maintaining two separate themes, a Liferay theme (for styling the overall portal) and a Vaadin theme (for styling Vaadin). Please sign in to reply. Reply as... Cancel
David H Nebinger Jack Bakker 11 Years Ago Themes have, at least for me, proven to be the biggest pain in using Vaadin. Because of the Vaadin CSS classes, the Liferay themes are not usable. And it is not so easy to map from existing Liferay themes into a Vaadin theme either.I ended up maintaining two separate themes, a Liferay theme (for styling the overall portal) and a Vaadin theme (for styling Vaadin). Please sign in to reply. Reply as... Cancel
Jack Bakker 11 Years Ago Vaadin is still a bit of an island available to live within Liferay. A very attractive island in my view and I use it much as you do. Very cool. If the island is to be welcomed even more into the Liferay fold, there is the theme challenge, mixing with Liferay searchcontainers, etc. that need consideration. Also when it comes to responsive layouts, I would rather do MVCPortlet than Vaadin. Side comment: I really 'dig' Struts2. Side comment: there is also developer expertise available. Sooo many php developers, but .. less MVCPortlet developers and even less Vaadin - though I am with you, Vaadin (leveraging GWT) in Liferay is awesome. Dare I say cool yet again. Please sign in to reply. Reply as... Cancel David H Nebinger Jack Bakker 11 Years Ago You're absolutely right about Vaadin being an island. That's why I'm going to blog about it and hopefully get the word out to expand the usage base. I think the shortage of Vaadin resources is certainly true here in the US, but I believe there is a bigger base in Europe.Vaadin does have their TouchKit extension to support mobile development... Responsive layouts are one thing, but getting mobile touch enhancements within a portlet might be worth it... Please sign in to reply. Reply as... Cancel
David H Nebinger Jack Bakker 11 Years Ago You're absolutely right about Vaadin being an island. That's why I'm going to blog about it and hopefully get the word out to expand the usage base. I think the shortage of Vaadin resources is certainly true here in the US, but I believe there is a bigger base in Europe.Vaadin does have their TouchKit extension to support mobile development... Responsive layouts are one thing, but getting mobile touch enhancements within a portlet might be worth it... Please sign in to reply. Reply as... Cancel
Jeffrey Handa 11 Years Ago Great post. Thanks for sharing your experience and I am looking forward to the post on development! Please sign in to reply. Reply as... Cancel
Nono Carballo 10 Years Ago Have you tried Vaadin 7 for portlet development? Please sign in to reply. Reply as... Cancel
Nono Carballo 10 Years Ago Have you tried Vaadin 7 for portlet development? Please sign in to reply. Reply as... Cancel
Nono Carballo 10 Years Ago Have you tried Vaadin 7 for portlet development? Please sign in to reply. Reply as... Cancel
Nono Carballo 10 Years Ago Have you tried Vaadin 7 for portlet development? Please sign in to reply. Reply as... Cancel David H Nebinger Nono Carballo 10 Years Ago Yes, but it does have a few bugs (the biggest one I found is that setting a height of 100% causes the widgets not to be rendered).Requires a new control panel that is compatible with Vaadin 7. There was a RC of one created for Vaadin, and I actually have one that I've been working on for putting into the LR marketplace, but I've been waiting for 7.1 to stabilize so I can test 7.1 compatibility. The control panel has special security needs, so at this point it cannot go to the marketplace until 6.2 is released... Please sign in to reply. Reply as... Cancel
David H Nebinger Nono Carballo 10 Years Ago Yes, but it does have a few bugs (the biggest one I found is that setting a height of 100% causes the widgets not to be rendered).Requires a new control panel that is compatible with Vaadin 7. There was a RC of one created for Vaadin, and I actually have one that I've been working on for putting into the LR marketplace, but I've been waiting for 7.1 to stabilize so I can test 7.1 compatibility. The control panel has special security needs, so at this point it cannot go to the marketplace until 6.2 is released... Please sign in to reply. Reply as... Cancel
Nono Carballo 10 Years Ago Thanks David, I wanted to try Vaadin for portlet development, but after read your comment, I´ll wait to the next version. Please sign in to reply. Reply as... Cancel David H Nebinger Nono Carballo 10 Years Ago No need to wait. Vaadin 6 is very powerful and stable and works quite well. We have been very pleased with it, and leverage V6 and the V6 addons successfully. Please sign in to reply. Reply as... Cancel Nono Carballo David H Nebinger 10 Years Ago Ok, thanks David, I´ll start with Vaadin 6, but will I have troubles when migration to Vaadin 7? Please sign in to reply. Reply as... Cancel David H Nebinger Nono Carballo 10 Years Ago There's some significant underlying changes between V6 and V7, so there is some migration from V6 to V7. But if you're fully versed in V6 you'll find the changes easy to do when it comes time to... Please sign in to reply. Reply as... Cancel Nono Carballo David H Nebinger 10 Years Ago Thanks David. Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago Hi all,Please, why all people are talking about the beauty of Liferay and Vaadin togheter, and no one man in the world wrote a clear and simple example to build a CRUD portlet for Liferay using Vaadin and data persistence managed by Liferay's service layer ?Why no one is able to show and example using Vaadin user interface and services classes generated by Liferay's Service Builder ?Thank you for any comments on this !Ivano C. Please sign in to reply. Reply as... Cancel David H Nebinger Ivano Carrara 9 Years Ago Vaadin is a great framework for building a responsive portlet application, but it doesn't negate the need to leverage existing Liferay knowledge to build applications. CRUD portlets are 1/2 SB implementation in LR and 1/2 user interface developed in Vaadin. There's no magic involved, you create a form in Vaadin w/ a "Save" button, then on the ClickListener of the button, you add the Liferay API calls to create and add the entity to the database. You can add verification/validation logic either at the field level (set immediate to true to validate on the fly) or at the form level (as part of your ClickListener implementation).I have created many CRUD portlets leveraging Vaadin and SB. There's nothing magical or difficult to them, they just aren't really that interesting. Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago Hi David, thank you for your reply ...I think that the most interesting example can be how Vaadin can manage a complete example, starting from load and list the Liferay's users table (the same as Liferay's Search Container), then how to manage the edit and delete of elements, then how to manage the insert of a new User.I'm sure that no one published a project using Vaadin equivalent of a portlet listing data based on Liferay's Search Container then edit/delete/insert operationsStill, the strange thing is that many men told they wrote CRUD portlets but no one publish a simple example on that ...I mean that no one published Java code, only long explanatons, but no code.Thank you in advance for comments ...Ivano C. Please sign in to reply. Reply as... Cancel David H Nebinger Ivano Carrara 9 Years Ago Normally I try not to muddy the waters... If you have something you're doing through Liferay tools such as search or user administration, it's usually better off leaving the work to those tools.That said, adding a user is done through the UserLocalServiceUtil.addUser() method. For the Vaadin side, you would create your form or forms to collect all of the information needed to pass through to the call.So the interesting stuff on the Vaadin side would be, for example, validating an email address. You can set the email field to immediate, then add a ValueChangedListener to it. Inside of your listener implementation, you get the value of the email field and then you can use UserLocalServiceUtil.fetchUserByEmailAddress() to see if there's already a user registered with that address, then you can display a notification or something so the user has to go and fix the email address...That's why I said it's not very interesting. You're presenting a form, you validate and verify user has entered into the form, and then you invoke the appropriate Liferay API to persist the data.Even in the case of adding a User, it just tends not to be very interesting although it is completely doable.But I do see your point in that more examples would be nice. I'm a little busy this week, but I'll try to get an example posted up here this coming weekend. Hopefully that will work for you?Also I'll be at the Liferay Symposium in Boston coming up in October; if you're going to be around, please look me up and we can talk Vaadin over a beer or something Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago Dear David, you are so gentle and your frequent posts in Liferay's' forum and blog are very useful...Thank you also for your actual effort to explain me ...I think that the real critical point is about how to load some thousand of records from a Liferay's managed database into a pagination control of Vaadin... It loads all records in memory and after a few users do the same I think the memory is full.I know that there is a Lazy loader control to do that but no one explained how to link data returned from some sort of MyEntityLocalServiceUtil.getAllRecords(...) to a Vaadin control to paginate the data ...I hope to read soon a new post from you about this secret !! :-)Thank you in advance for your valuable support ...Ivano C. Please sign in to reply. Reply as... Cancel David H Nebinger Ivano Carrara 9 Years Ago Ah, now paged results is a black art...So Vaadin has support for paged retrievals using direct JDBC, but there is no support for paged results using Liferay's methods.In general I try to avoid Vaadin's natural table handling because, like you pointed out, it is quite easy to exhaust server side resources when users are viewing tables with large row counts.Instead I tend to fall back to manually handling pagination. You can leverage Liferay's APIs (most list methods from Liferay have a corresponding windowed version to grab a subset of rows). You can grab the row count, handle moving forwards and backwards, all without the pitfalls of oversized table handling.Now if I absolutely had to support in in Liferay, I'd extend SQLContainer and override methods that access JDBC to use the corresponding Liferay API to get the total row count and retrieve records, By extending SQLContainer, you can leverage the examples from the Book of Vaadin that demonstrate how to use SQLContainer. Please sign in to reply. Reply as... Cancel Jack Bakker David H Nebinger 9 Years Ago I see two mind the gaps when using Vaadin in Liferay: 1) reducing overhead for larger datasets with many users (in Table component for example) 2) coordinating Liferay and Vaadin themes. A good CRUD example might address these. Please sign in to reply. Reply as... Cancel David H Nebinger Jack Bakker 9 Years Ago - Edited #1 is handled by manually paging the records. UserLocalServiceUtil, for example, has getUsersCount() method to get the number of users, and getUsers(int start, int end) grabs a subset of those users. Many of the Liferay APIs support similar things. For your own custom entities, the persistence classes always has paging methods, you just need to expose them in EntityLocalServiceImpl. So you manually support paging the dataset, each page forward increases your start/end values by the number of records you display, ... It is not elegant, but it does the trick and limits the server side overhead/impact.#2, well there is no coordination. In Vaadin you have to create your vaadin theme, and often times you have to undo what Liferay styles the default tags with. Vaadin uses it's own classes for styling, so you have to style the vaadin classes in a separate Vaadin theme. Unfortunately this means you create a Liferay theme for styling your site, then you have to recreate the theme as a Vaadin theme bringing your colors, etc. over to the Vaadin theme. Yes, this is ugly, but there is no other choice. Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago #1 No, I think that the best solution is to use Lazy Query Container Vaadin add on.The QueryFactory and Query interface implementations are designed to be application specific and should invoke a data source like WebService client, JDBC connection, JPA context or Java service class to read and write data items. The data source has to support querying data in batches.#2 I hope the Valo Vaadin Theme can help us.At the end, I hope that some Liferay and Vaadin people can help us to understand the beauty of their products !Thank you for your comments ...Ivano C. Please sign in to reply. Reply as... Cancel David Nebinger Ivano Carrara 9 Years Ago Lazy query container works, and I've posted a response to your forum thread about usage. I do worry though about server side impact of caching many records by many simultaneous users. I guess it takes an understanding of your environment and users to determine if it will be an impact or not.Valo is not going to be much of a help... It is a responsive theme design for Vaadin, but it still has the same issues the other themes have, namely their own custom class names and expectation that there is no underlying theme to build from. You'll still end up creating a custom theme (or perhaps a concept of a valo color scheme or something, I haven't figured out how they handle the color scheme changes) to bring consistency to both your Liferay environment and Vaadin portlets. Please sign in to reply. Reply as... Cancel
David H Nebinger Nono Carballo 10 Years Ago No need to wait. Vaadin 6 is very powerful and stable and works quite well. We have been very pleased with it, and leverage V6 and the V6 addons successfully. Please sign in to reply. Reply as... Cancel Nono Carballo David H Nebinger 10 Years Ago Ok, thanks David, I´ll start with Vaadin 6, but will I have troubles when migration to Vaadin 7? Please sign in to reply. Reply as... Cancel David H Nebinger Nono Carballo 10 Years Ago There's some significant underlying changes between V6 and V7, so there is some migration from V6 to V7. But if you're fully versed in V6 you'll find the changes easy to do when it comes time to... Please sign in to reply. Reply as... Cancel Nono Carballo David H Nebinger 10 Years Ago Thanks David. Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago Hi all,Please, why all people are talking about the beauty of Liferay and Vaadin togheter, and no one man in the world wrote a clear and simple example to build a CRUD portlet for Liferay using Vaadin and data persistence managed by Liferay's service layer ?Why no one is able to show and example using Vaadin user interface and services classes generated by Liferay's Service Builder ?Thank you for any comments on this !Ivano C. Please sign in to reply. Reply as... Cancel David H Nebinger Ivano Carrara 9 Years Ago Vaadin is a great framework for building a responsive portlet application, but it doesn't negate the need to leverage existing Liferay knowledge to build applications. CRUD portlets are 1/2 SB implementation in LR and 1/2 user interface developed in Vaadin. There's no magic involved, you create a form in Vaadin w/ a "Save" button, then on the ClickListener of the button, you add the Liferay API calls to create and add the entity to the database. You can add verification/validation logic either at the field level (set immediate to true to validate on the fly) or at the form level (as part of your ClickListener implementation).I have created many CRUD portlets leveraging Vaadin and SB. There's nothing magical or difficult to them, they just aren't really that interesting. Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago Hi David, thank you for your reply ...I think that the most interesting example can be how Vaadin can manage a complete example, starting from load and list the Liferay's users table (the same as Liferay's Search Container), then how to manage the edit and delete of elements, then how to manage the insert of a new User.I'm sure that no one published a project using Vaadin equivalent of a portlet listing data based on Liferay's Search Container then edit/delete/insert operationsStill, the strange thing is that many men told they wrote CRUD portlets but no one publish a simple example on that ...I mean that no one published Java code, only long explanatons, but no code.Thank you in advance for comments ...Ivano C. Please sign in to reply. Reply as... Cancel David H Nebinger Ivano Carrara 9 Years Ago Normally I try not to muddy the waters... If you have something you're doing through Liferay tools such as search or user administration, it's usually better off leaving the work to those tools.That said, adding a user is done through the UserLocalServiceUtil.addUser() method. For the Vaadin side, you would create your form or forms to collect all of the information needed to pass through to the call.So the interesting stuff on the Vaadin side would be, for example, validating an email address. You can set the email field to immediate, then add a ValueChangedListener to it. Inside of your listener implementation, you get the value of the email field and then you can use UserLocalServiceUtil.fetchUserByEmailAddress() to see if there's already a user registered with that address, then you can display a notification or something so the user has to go and fix the email address...That's why I said it's not very interesting. You're presenting a form, you validate and verify user has entered into the form, and then you invoke the appropriate Liferay API to persist the data.Even in the case of adding a User, it just tends not to be very interesting although it is completely doable.But I do see your point in that more examples would be nice. I'm a little busy this week, but I'll try to get an example posted up here this coming weekend. Hopefully that will work for you?Also I'll be at the Liferay Symposium in Boston coming up in October; if you're going to be around, please look me up and we can talk Vaadin over a beer or something Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago Dear David, you are so gentle and your frequent posts in Liferay's' forum and blog are very useful...Thank you also for your actual effort to explain me ...I think that the real critical point is about how to load some thousand of records from a Liferay's managed database into a pagination control of Vaadin... It loads all records in memory and after a few users do the same I think the memory is full.I know that there is a Lazy loader control to do that but no one explained how to link data returned from some sort of MyEntityLocalServiceUtil.getAllRecords(...) to a Vaadin control to paginate the data ...I hope to read soon a new post from you about this secret !! :-)Thank you in advance for your valuable support ...Ivano C. Please sign in to reply. Reply as... Cancel David H Nebinger Ivano Carrara 9 Years Ago Ah, now paged results is a black art...So Vaadin has support for paged retrievals using direct JDBC, but there is no support for paged results using Liferay's methods.In general I try to avoid Vaadin's natural table handling because, like you pointed out, it is quite easy to exhaust server side resources when users are viewing tables with large row counts.Instead I tend to fall back to manually handling pagination. You can leverage Liferay's APIs (most list methods from Liferay have a corresponding windowed version to grab a subset of rows). You can grab the row count, handle moving forwards and backwards, all without the pitfalls of oversized table handling.Now if I absolutely had to support in in Liferay, I'd extend SQLContainer and override methods that access JDBC to use the corresponding Liferay API to get the total row count and retrieve records, By extending SQLContainer, you can leverage the examples from the Book of Vaadin that demonstrate how to use SQLContainer. Please sign in to reply. Reply as... Cancel Jack Bakker David H Nebinger 9 Years Ago I see two mind the gaps when using Vaadin in Liferay: 1) reducing overhead for larger datasets with many users (in Table component for example) 2) coordinating Liferay and Vaadin themes. A good CRUD example might address these. Please sign in to reply. Reply as... Cancel David H Nebinger Jack Bakker 9 Years Ago - Edited #1 is handled by manually paging the records. UserLocalServiceUtil, for example, has getUsersCount() method to get the number of users, and getUsers(int start, int end) grabs a subset of those users. Many of the Liferay APIs support similar things. For your own custom entities, the persistence classes always has paging methods, you just need to expose them in EntityLocalServiceImpl. So you manually support paging the dataset, each page forward increases your start/end values by the number of records you display, ... It is not elegant, but it does the trick and limits the server side overhead/impact.#2, well there is no coordination. In Vaadin you have to create your vaadin theme, and often times you have to undo what Liferay styles the default tags with. Vaadin uses it's own classes for styling, so you have to style the vaadin classes in a separate Vaadin theme. Unfortunately this means you create a Liferay theme for styling your site, then you have to recreate the theme as a Vaadin theme bringing your colors, etc. over to the Vaadin theme. Yes, this is ugly, but there is no other choice. Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago #1 No, I think that the best solution is to use Lazy Query Container Vaadin add on.The QueryFactory and Query interface implementations are designed to be application specific and should invoke a data source like WebService client, JDBC connection, JPA context or Java service class to read and write data items. The data source has to support querying data in batches.#2 I hope the Valo Vaadin Theme can help us.At the end, I hope that some Liferay and Vaadin people can help us to understand the beauty of their products !Thank you for your comments ...Ivano C. Please sign in to reply. Reply as... Cancel David Nebinger Ivano Carrara 9 Years Ago Lazy query container works, and I've posted a response to your forum thread about usage. I do worry though about server side impact of caching many records by many simultaneous users. I guess it takes an understanding of your environment and users to determine if it will be an impact or not.Valo is not going to be much of a help... It is a responsive theme design for Vaadin, but it still has the same issues the other themes have, namely their own custom class names and expectation that there is no underlying theme to build from. You'll still end up creating a custom theme (or perhaps a concept of a valo color scheme or something, I haven't figured out how they handle the color scheme changes) to bring consistency to both your Liferay environment and Vaadin portlets. Please sign in to reply. Reply as... Cancel
Nono Carballo David H Nebinger 10 Years Ago Ok, thanks David, I´ll start with Vaadin 6, but will I have troubles when migration to Vaadin 7? Please sign in to reply. Reply as... Cancel David H Nebinger Nono Carballo 10 Years Ago There's some significant underlying changes between V6 and V7, so there is some migration from V6 to V7. But if you're fully versed in V6 you'll find the changes easy to do when it comes time to... Please sign in to reply. Reply as... Cancel Nono Carballo David H Nebinger 10 Years Ago Thanks David. Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago Hi all,Please, why all people are talking about the beauty of Liferay and Vaadin togheter, and no one man in the world wrote a clear and simple example to build a CRUD portlet for Liferay using Vaadin and data persistence managed by Liferay's service layer ?Why no one is able to show and example using Vaadin user interface and services classes generated by Liferay's Service Builder ?Thank you for any comments on this !Ivano C. Please sign in to reply. Reply as... Cancel David H Nebinger Ivano Carrara 9 Years Ago Vaadin is a great framework for building a responsive portlet application, but it doesn't negate the need to leverage existing Liferay knowledge to build applications. CRUD portlets are 1/2 SB implementation in LR and 1/2 user interface developed in Vaadin. There's no magic involved, you create a form in Vaadin w/ a "Save" button, then on the ClickListener of the button, you add the Liferay API calls to create and add the entity to the database. You can add verification/validation logic either at the field level (set immediate to true to validate on the fly) or at the form level (as part of your ClickListener implementation).I have created many CRUD portlets leveraging Vaadin and SB. There's nothing magical or difficult to them, they just aren't really that interesting. Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago Hi David, thank you for your reply ...I think that the most interesting example can be how Vaadin can manage a complete example, starting from load and list the Liferay's users table (the same as Liferay's Search Container), then how to manage the edit and delete of elements, then how to manage the insert of a new User.I'm sure that no one published a project using Vaadin equivalent of a portlet listing data based on Liferay's Search Container then edit/delete/insert operationsStill, the strange thing is that many men told they wrote CRUD portlets but no one publish a simple example on that ...I mean that no one published Java code, only long explanatons, but no code.Thank you in advance for comments ...Ivano C. Please sign in to reply. Reply as... Cancel David H Nebinger Ivano Carrara 9 Years Ago Normally I try not to muddy the waters... If you have something you're doing through Liferay tools such as search or user administration, it's usually better off leaving the work to those tools.That said, adding a user is done through the UserLocalServiceUtil.addUser() method. For the Vaadin side, you would create your form or forms to collect all of the information needed to pass through to the call.So the interesting stuff on the Vaadin side would be, for example, validating an email address. You can set the email field to immediate, then add a ValueChangedListener to it. Inside of your listener implementation, you get the value of the email field and then you can use UserLocalServiceUtil.fetchUserByEmailAddress() to see if there's already a user registered with that address, then you can display a notification or something so the user has to go and fix the email address...That's why I said it's not very interesting. You're presenting a form, you validate and verify user has entered into the form, and then you invoke the appropriate Liferay API to persist the data.Even in the case of adding a User, it just tends not to be very interesting although it is completely doable.But I do see your point in that more examples would be nice. I'm a little busy this week, but I'll try to get an example posted up here this coming weekend. Hopefully that will work for you?Also I'll be at the Liferay Symposium in Boston coming up in October; if you're going to be around, please look me up and we can talk Vaadin over a beer or something Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago Dear David, you are so gentle and your frequent posts in Liferay's' forum and blog are very useful...Thank you also for your actual effort to explain me ...I think that the real critical point is about how to load some thousand of records from a Liferay's managed database into a pagination control of Vaadin... It loads all records in memory and after a few users do the same I think the memory is full.I know that there is a Lazy loader control to do that but no one explained how to link data returned from some sort of MyEntityLocalServiceUtil.getAllRecords(...) to a Vaadin control to paginate the data ...I hope to read soon a new post from you about this secret !! :-)Thank you in advance for your valuable support ...Ivano C. Please sign in to reply. Reply as... Cancel David H Nebinger Ivano Carrara 9 Years Ago Ah, now paged results is a black art...So Vaadin has support for paged retrievals using direct JDBC, but there is no support for paged results using Liferay's methods.In general I try to avoid Vaadin's natural table handling because, like you pointed out, it is quite easy to exhaust server side resources when users are viewing tables with large row counts.Instead I tend to fall back to manually handling pagination. You can leverage Liferay's APIs (most list methods from Liferay have a corresponding windowed version to grab a subset of rows). You can grab the row count, handle moving forwards and backwards, all without the pitfalls of oversized table handling.Now if I absolutely had to support in in Liferay, I'd extend SQLContainer and override methods that access JDBC to use the corresponding Liferay API to get the total row count and retrieve records, By extending SQLContainer, you can leverage the examples from the Book of Vaadin that demonstrate how to use SQLContainer. Please sign in to reply. Reply as... Cancel Jack Bakker David H Nebinger 9 Years Ago I see two mind the gaps when using Vaadin in Liferay: 1) reducing overhead for larger datasets with many users (in Table component for example) 2) coordinating Liferay and Vaadin themes. A good CRUD example might address these. Please sign in to reply. Reply as... Cancel David H Nebinger Jack Bakker 9 Years Ago - Edited #1 is handled by manually paging the records. UserLocalServiceUtil, for example, has getUsersCount() method to get the number of users, and getUsers(int start, int end) grabs a subset of those users. Many of the Liferay APIs support similar things. For your own custom entities, the persistence classes always has paging methods, you just need to expose them in EntityLocalServiceImpl. So you manually support paging the dataset, each page forward increases your start/end values by the number of records you display, ... It is not elegant, but it does the trick and limits the server side overhead/impact.#2, well there is no coordination. In Vaadin you have to create your vaadin theme, and often times you have to undo what Liferay styles the default tags with. Vaadin uses it's own classes for styling, so you have to style the vaadin classes in a separate Vaadin theme. Unfortunately this means you create a Liferay theme for styling your site, then you have to recreate the theme as a Vaadin theme bringing your colors, etc. over to the Vaadin theme. Yes, this is ugly, but there is no other choice. Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago #1 No, I think that the best solution is to use Lazy Query Container Vaadin add on.The QueryFactory and Query interface implementations are designed to be application specific and should invoke a data source like WebService client, JDBC connection, JPA context or Java service class to read and write data items. The data source has to support querying data in batches.#2 I hope the Valo Vaadin Theme can help us.At the end, I hope that some Liferay and Vaadin people can help us to understand the beauty of their products !Thank you for your comments ...Ivano C. Please sign in to reply. Reply as... Cancel David Nebinger Ivano Carrara 9 Years Ago Lazy query container works, and I've posted a response to your forum thread about usage. I do worry though about server side impact of caching many records by many simultaneous users. I guess it takes an understanding of your environment and users to determine if it will be an impact or not.Valo is not going to be much of a help... It is a responsive theme design for Vaadin, but it still has the same issues the other themes have, namely their own custom class names and expectation that there is no underlying theme to build from. You'll still end up creating a custom theme (or perhaps a concept of a valo color scheme or something, I haven't figured out how they handle the color scheme changes) to bring consistency to both your Liferay environment and Vaadin portlets. Please sign in to reply. Reply as... Cancel
David H Nebinger Nono Carballo 10 Years Ago There's some significant underlying changes between V6 and V7, so there is some migration from V6 to V7. But if you're fully versed in V6 you'll find the changes easy to do when it comes time to... Please sign in to reply. Reply as... Cancel Nono Carballo David H Nebinger 10 Years Ago Thanks David. Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago Hi all,Please, why all people are talking about the beauty of Liferay and Vaadin togheter, and no one man in the world wrote a clear and simple example to build a CRUD portlet for Liferay using Vaadin and data persistence managed by Liferay's service layer ?Why no one is able to show and example using Vaadin user interface and services classes generated by Liferay's Service Builder ?Thank you for any comments on this !Ivano C. Please sign in to reply. Reply as... Cancel David H Nebinger Ivano Carrara 9 Years Ago Vaadin is a great framework for building a responsive portlet application, but it doesn't negate the need to leverage existing Liferay knowledge to build applications. CRUD portlets are 1/2 SB implementation in LR and 1/2 user interface developed in Vaadin. There's no magic involved, you create a form in Vaadin w/ a "Save" button, then on the ClickListener of the button, you add the Liferay API calls to create and add the entity to the database. You can add verification/validation logic either at the field level (set immediate to true to validate on the fly) or at the form level (as part of your ClickListener implementation).I have created many CRUD portlets leveraging Vaadin and SB. There's nothing magical or difficult to them, they just aren't really that interesting. Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago Hi David, thank you for your reply ...I think that the most interesting example can be how Vaadin can manage a complete example, starting from load and list the Liferay's users table (the same as Liferay's Search Container), then how to manage the edit and delete of elements, then how to manage the insert of a new User.I'm sure that no one published a project using Vaadin equivalent of a portlet listing data based on Liferay's Search Container then edit/delete/insert operationsStill, the strange thing is that many men told they wrote CRUD portlets but no one publish a simple example on that ...I mean that no one published Java code, only long explanatons, but no code.Thank you in advance for comments ...Ivano C. Please sign in to reply. Reply as... Cancel David H Nebinger Ivano Carrara 9 Years Ago Normally I try not to muddy the waters... If you have something you're doing through Liferay tools such as search or user administration, it's usually better off leaving the work to those tools.That said, adding a user is done through the UserLocalServiceUtil.addUser() method. For the Vaadin side, you would create your form or forms to collect all of the information needed to pass through to the call.So the interesting stuff on the Vaadin side would be, for example, validating an email address. You can set the email field to immediate, then add a ValueChangedListener to it. Inside of your listener implementation, you get the value of the email field and then you can use UserLocalServiceUtil.fetchUserByEmailAddress() to see if there's already a user registered with that address, then you can display a notification or something so the user has to go and fix the email address...That's why I said it's not very interesting. You're presenting a form, you validate and verify user has entered into the form, and then you invoke the appropriate Liferay API to persist the data.Even in the case of adding a User, it just tends not to be very interesting although it is completely doable.But I do see your point in that more examples would be nice. I'm a little busy this week, but I'll try to get an example posted up here this coming weekend. Hopefully that will work for you?Also I'll be at the Liferay Symposium in Boston coming up in October; if you're going to be around, please look me up and we can talk Vaadin over a beer or something Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago Dear David, you are so gentle and your frequent posts in Liferay's' forum and blog are very useful...Thank you also for your actual effort to explain me ...I think that the real critical point is about how to load some thousand of records from a Liferay's managed database into a pagination control of Vaadin... It loads all records in memory and after a few users do the same I think the memory is full.I know that there is a Lazy loader control to do that but no one explained how to link data returned from some sort of MyEntityLocalServiceUtil.getAllRecords(...) to a Vaadin control to paginate the data ...I hope to read soon a new post from you about this secret !! :-)Thank you in advance for your valuable support ...Ivano C. Please sign in to reply. Reply as... Cancel David H Nebinger Ivano Carrara 9 Years Ago Ah, now paged results is a black art...So Vaadin has support for paged retrievals using direct JDBC, but there is no support for paged results using Liferay's methods.In general I try to avoid Vaadin's natural table handling because, like you pointed out, it is quite easy to exhaust server side resources when users are viewing tables with large row counts.Instead I tend to fall back to manually handling pagination. You can leverage Liferay's APIs (most list methods from Liferay have a corresponding windowed version to grab a subset of rows). You can grab the row count, handle moving forwards and backwards, all without the pitfalls of oversized table handling.Now if I absolutely had to support in in Liferay, I'd extend SQLContainer and override methods that access JDBC to use the corresponding Liferay API to get the total row count and retrieve records, By extending SQLContainer, you can leverage the examples from the Book of Vaadin that demonstrate how to use SQLContainer. Please sign in to reply. Reply as... Cancel Jack Bakker David H Nebinger 9 Years Ago I see two mind the gaps when using Vaadin in Liferay: 1) reducing overhead for larger datasets with many users (in Table component for example) 2) coordinating Liferay and Vaadin themes. A good CRUD example might address these. Please sign in to reply. Reply as... Cancel David H Nebinger Jack Bakker 9 Years Ago - Edited #1 is handled by manually paging the records. UserLocalServiceUtil, for example, has getUsersCount() method to get the number of users, and getUsers(int start, int end) grabs a subset of those users. Many of the Liferay APIs support similar things. For your own custom entities, the persistence classes always has paging methods, you just need to expose them in EntityLocalServiceImpl. So you manually support paging the dataset, each page forward increases your start/end values by the number of records you display, ... It is not elegant, but it does the trick and limits the server side overhead/impact.#2, well there is no coordination. In Vaadin you have to create your vaadin theme, and often times you have to undo what Liferay styles the default tags with. Vaadin uses it's own classes for styling, so you have to style the vaadin classes in a separate Vaadin theme. Unfortunately this means you create a Liferay theme for styling your site, then you have to recreate the theme as a Vaadin theme bringing your colors, etc. over to the Vaadin theme. Yes, this is ugly, but there is no other choice. Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago #1 No, I think that the best solution is to use Lazy Query Container Vaadin add on.The QueryFactory and Query interface implementations are designed to be application specific and should invoke a data source like WebService client, JDBC connection, JPA context or Java service class to read and write data items. The data source has to support querying data in batches.#2 I hope the Valo Vaadin Theme can help us.At the end, I hope that some Liferay and Vaadin people can help us to understand the beauty of their products !Thank you for your comments ...Ivano C. Please sign in to reply. Reply as... Cancel David Nebinger Ivano Carrara 9 Years Ago Lazy query container works, and I've posted a response to your forum thread about usage. I do worry though about server side impact of caching many records by many simultaneous users. I guess it takes an understanding of your environment and users to determine if it will be an impact or not.Valo is not going to be much of a help... It is a responsive theme design for Vaadin, but it still has the same issues the other themes have, namely their own custom class names and expectation that there is no underlying theme to build from. You'll still end up creating a custom theme (or perhaps a concept of a valo color scheme or something, I haven't figured out how they handle the color scheme changes) to bring consistency to both your Liferay environment and Vaadin portlets. Please sign in to reply. Reply as... Cancel
Nono Carballo David H Nebinger 10 Years Ago Thanks David. Please sign in to reply. Reply as... Cancel
Ivano Carrara David H Nebinger 9 Years Ago Hi all,Please, why all people are talking about the beauty of Liferay and Vaadin togheter, and no one man in the world wrote a clear and simple example to build a CRUD portlet for Liferay using Vaadin and data persistence managed by Liferay's service layer ?Why no one is able to show and example using Vaadin user interface and services classes generated by Liferay's Service Builder ?Thank you for any comments on this !Ivano C. Please sign in to reply. Reply as... Cancel David H Nebinger Ivano Carrara 9 Years Ago Vaadin is a great framework for building a responsive portlet application, but it doesn't negate the need to leverage existing Liferay knowledge to build applications. CRUD portlets are 1/2 SB implementation in LR and 1/2 user interface developed in Vaadin. There's no magic involved, you create a form in Vaadin w/ a "Save" button, then on the ClickListener of the button, you add the Liferay API calls to create and add the entity to the database. You can add verification/validation logic either at the field level (set immediate to true to validate on the fly) or at the form level (as part of your ClickListener implementation).I have created many CRUD portlets leveraging Vaadin and SB. There's nothing magical or difficult to them, they just aren't really that interesting. Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago Hi David, thank you for your reply ...I think that the most interesting example can be how Vaadin can manage a complete example, starting from load and list the Liferay's users table (the same as Liferay's Search Container), then how to manage the edit and delete of elements, then how to manage the insert of a new User.I'm sure that no one published a project using Vaadin equivalent of a portlet listing data based on Liferay's Search Container then edit/delete/insert operationsStill, the strange thing is that many men told they wrote CRUD portlets but no one publish a simple example on that ...I mean that no one published Java code, only long explanatons, but no code.Thank you in advance for comments ...Ivano C. Please sign in to reply. Reply as... Cancel David H Nebinger Ivano Carrara 9 Years Ago Normally I try not to muddy the waters... If you have something you're doing through Liferay tools such as search or user administration, it's usually better off leaving the work to those tools.That said, adding a user is done through the UserLocalServiceUtil.addUser() method. For the Vaadin side, you would create your form or forms to collect all of the information needed to pass through to the call.So the interesting stuff on the Vaadin side would be, for example, validating an email address. You can set the email field to immediate, then add a ValueChangedListener to it. Inside of your listener implementation, you get the value of the email field and then you can use UserLocalServiceUtil.fetchUserByEmailAddress() to see if there's already a user registered with that address, then you can display a notification or something so the user has to go and fix the email address...That's why I said it's not very interesting. You're presenting a form, you validate and verify user has entered into the form, and then you invoke the appropriate Liferay API to persist the data.Even in the case of adding a User, it just tends not to be very interesting although it is completely doable.But I do see your point in that more examples would be nice. I'm a little busy this week, but I'll try to get an example posted up here this coming weekend. Hopefully that will work for you?Also I'll be at the Liferay Symposium in Boston coming up in October; if you're going to be around, please look me up and we can talk Vaadin over a beer or something Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago Dear David, you are so gentle and your frequent posts in Liferay's' forum and blog are very useful...Thank you also for your actual effort to explain me ...I think that the real critical point is about how to load some thousand of records from a Liferay's managed database into a pagination control of Vaadin... It loads all records in memory and after a few users do the same I think the memory is full.I know that there is a Lazy loader control to do that but no one explained how to link data returned from some sort of MyEntityLocalServiceUtil.getAllRecords(...) to a Vaadin control to paginate the data ...I hope to read soon a new post from you about this secret !! :-)Thank you in advance for your valuable support ...Ivano C. Please sign in to reply. Reply as... Cancel David H Nebinger Ivano Carrara 9 Years Ago Ah, now paged results is a black art...So Vaadin has support for paged retrievals using direct JDBC, but there is no support for paged results using Liferay's methods.In general I try to avoid Vaadin's natural table handling because, like you pointed out, it is quite easy to exhaust server side resources when users are viewing tables with large row counts.Instead I tend to fall back to manually handling pagination. You can leverage Liferay's APIs (most list methods from Liferay have a corresponding windowed version to grab a subset of rows). You can grab the row count, handle moving forwards and backwards, all without the pitfalls of oversized table handling.Now if I absolutely had to support in in Liferay, I'd extend SQLContainer and override methods that access JDBC to use the corresponding Liferay API to get the total row count and retrieve records, By extending SQLContainer, you can leverage the examples from the Book of Vaadin that demonstrate how to use SQLContainer. Please sign in to reply. Reply as... Cancel Jack Bakker David H Nebinger 9 Years Ago I see two mind the gaps when using Vaadin in Liferay: 1) reducing overhead for larger datasets with many users (in Table component for example) 2) coordinating Liferay and Vaadin themes. A good CRUD example might address these. Please sign in to reply. Reply as... Cancel David H Nebinger Jack Bakker 9 Years Ago - Edited #1 is handled by manually paging the records. UserLocalServiceUtil, for example, has getUsersCount() method to get the number of users, and getUsers(int start, int end) grabs a subset of those users. Many of the Liferay APIs support similar things. For your own custom entities, the persistence classes always has paging methods, you just need to expose them in EntityLocalServiceImpl. So you manually support paging the dataset, each page forward increases your start/end values by the number of records you display, ... It is not elegant, but it does the trick and limits the server side overhead/impact.#2, well there is no coordination. In Vaadin you have to create your vaadin theme, and often times you have to undo what Liferay styles the default tags with. Vaadin uses it's own classes for styling, so you have to style the vaadin classes in a separate Vaadin theme. Unfortunately this means you create a Liferay theme for styling your site, then you have to recreate the theme as a Vaadin theme bringing your colors, etc. over to the Vaadin theme. Yes, this is ugly, but there is no other choice. Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago #1 No, I think that the best solution is to use Lazy Query Container Vaadin add on.The QueryFactory and Query interface implementations are designed to be application specific and should invoke a data source like WebService client, JDBC connection, JPA context or Java service class to read and write data items. The data source has to support querying data in batches.#2 I hope the Valo Vaadin Theme can help us.At the end, I hope that some Liferay and Vaadin people can help us to understand the beauty of their products !Thank you for your comments ...Ivano C. Please sign in to reply. Reply as... Cancel David Nebinger Ivano Carrara 9 Years Ago Lazy query container works, and I've posted a response to your forum thread about usage. I do worry though about server side impact of caching many records by many simultaneous users. I guess it takes an understanding of your environment and users to determine if it will be an impact or not.Valo is not going to be much of a help... It is a responsive theme design for Vaadin, but it still has the same issues the other themes have, namely their own custom class names and expectation that there is no underlying theme to build from. You'll still end up creating a custom theme (or perhaps a concept of a valo color scheme or something, I haven't figured out how they handle the color scheme changes) to bring consistency to both your Liferay environment and Vaadin portlets. Please sign in to reply. Reply as... Cancel
David H Nebinger Ivano Carrara 9 Years Ago Vaadin is a great framework for building a responsive portlet application, but it doesn't negate the need to leverage existing Liferay knowledge to build applications. CRUD portlets are 1/2 SB implementation in LR and 1/2 user interface developed in Vaadin. There's no magic involved, you create a form in Vaadin w/ a "Save" button, then on the ClickListener of the button, you add the Liferay API calls to create and add the entity to the database. You can add verification/validation logic either at the field level (set immediate to true to validate on the fly) or at the form level (as part of your ClickListener implementation).I have created many CRUD portlets leveraging Vaadin and SB. There's nothing magical or difficult to them, they just aren't really that interesting. Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago Hi David, thank you for your reply ...I think that the most interesting example can be how Vaadin can manage a complete example, starting from load and list the Liferay's users table (the same as Liferay's Search Container), then how to manage the edit and delete of elements, then how to manage the insert of a new User.I'm sure that no one published a project using Vaadin equivalent of a portlet listing data based on Liferay's Search Container then edit/delete/insert operationsStill, the strange thing is that many men told they wrote CRUD portlets but no one publish a simple example on that ...I mean that no one published Java code, only long explanatons, but no code.Thank you in advance for comments ...Ivano C. Please sign in to reply. Reply as... Cancel David H Nebinger Ivano Carrara 9 Years Ago Normally I try not to muddy the waters... If you have something you're doing through Liferay tools such as search or user administration, it's usually better off leaving the work to those tools.That said, adding a user is done through the UserLocalServiceUtil.addUser() method. For the Vaadin side, you would create your form or forms to collect all of the information needed to pass through to the call.So the interesting stuff on the Vaadin side would be, for example, validating an email address. You can set the email field to immediate, then add a ValueChangedListener to it. Inside of your listener implementation, you get the value of the email field and then you can use UserLocalServiceUtil.fetchUserByEmailAddress() to see if there's already a user registered with that address, then you can display a notification or something so the user has to go and fix the email address...That's why I said it's not very interesting. You're presenting a form, you validate and verify user has entered into the form, and then you invoke the appropriate Liferay API to persist the data.Even in the case of adding a User, it just tends not to be very interesting although it is completely doable.But I do see your point in that more examples would be nice. I'm a little busy this week, but I'll try to get an example posted up here this coming weekend. Hopefully that will work for you?Also I'll be at the Liferay Symposium in Boston coming up in October; if you're going to be around, please look me up and we can talk Vaadin over a beer or something Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago Dear David, you are so gentle and your frequent posts in Liferay's' forum and blog are very useful...Thank you also for your actual effort to explain me ...I think that the real critical point is about how to load some thousand of records from a Liferay's managed database into a pagination control of Vaadin... It loads all records in memory and after a few users do the same I think the memory is full.I know that there is a Lazy loader control to do that but no one explained how to link data returned from some sort of MyEntityLocalServiceUtil.getAllRecords(...) to a Vaadin control to paginate the data ...I hope to read soon a new post from you about this secret !! :-)Thank you in advance for your valuable support ...Ivano C. Please sign in to reply. Reply as... Cancel David H Nebinger Ivano Carrara 9 Years Ago Ah, now paged results is a black art...So Vaadin has support for paged retrievals using direct JDBC, but there is no support for paged results using Liferay's methods.In general I try to avoid Vaadin's natural table handling because, like you pointed out, it is quite easy to exhaust server side resources when users are viewing tables with large row counts.Instead I tend to fall back to manually handling pagination. You can leverage Liferay's APIs (most list methods from Liferay have a corresponding windowed version to grab a subset of rows). You can grab the row count, handle moving forwards and backwards, all without the pitfalls of oversized table handling.Now if I absolutely had to support in in Liferay, I'd extend SQLContainer and override methods that access JDBC to use the corresponding Liferay API to get the total row count and retrieve records, By extending SQLContainer, you can leverage the examples from the Book of Vaadin that demonstrate how to use SQLContainer. Please sign in to reply. Reply as... Cancel Jack Bakker David H Nebinger 9 Years Ago I see two mind the gaps when using Vaadin in Liferay: 1) reducing overhead for larger datasets with many users (in Table component for example) 2) coordinating Liferay and Vaadin themes. A good CRUD example might address these. Please sign in to reply. Reply as... Cancel David H Nebinger Jack Bakker 9 Years Ago - Edited #1 is handled by manually paging the records. UserLocalServiceUtil, for example, has getUsersCount() method to get the number of users, and getUsers(int start, int end) grabs a subset of those users. Many of the Liferay APIs support similar things. For your own custom entities, the persistence classes always has paging methods, you just need to expose them in EntityLocalServiceImpl. So you manually support paging the dataset, each page forward increases your start/end values by the number of records you display, ... It is not elegant, but it does the trick and limits the server side overhead/impact.#2, well there is no coordination. In Vaadin you have to create your vaadin theme, and often times you have to undo what Liferay styles the default tags with. Vaadin uses it's own classes for styling, so you have to style the vaadin classes in a separate Vaadin theme. Unfortunately this means you create a Liferay theme for styling your site, then you have to recreate the theme as a Vaadin theme bringing your colors, etc. over to the Vaadin theme. Yes, this is ugly, but there is no other choice. Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago #1 No, I think that the best solution is to use Lazy Query Container Vaadin add on.The QueryFactory and Query interface implementations are designed to be application specific and should invoke a data source like WebService client, JDBC connection, JPA context or Java service class to read and write data items. The data source has to support querying data in batches.#2 I hope the Valo Vaadin Theme can help us.At the end, I hope that some Liferay and Vaadin people can help us to understand the beauty of their products !Thank you for your comments ...Ivano C. Please sign in to reply. Reply as... Cancel David Nebinger Ivano Carrara 9 Years Ago Lazy query container works, and I've posted a response to your forum thread about usage. I do worry though about server side impact of caching many records by many simultaneous users. I guess it takes an understanding of your environment and users to determine if it will be an impact or not.Valo is not going to be much of a help... It is a responsive theme design for Vaadin, but it still has the same issues the other themes have, namely their own custom class names and expectation that there is no underlying theme to build from. You'll still end up creating a custom theme (or perhaps a concept of a valo color scheme or something, I haven't figured out how they handle the color scheme changes) to bring consistency to both your Liferay environment and Vaadin portlets. Please sign in to reply. Reply as... Cancel
Ivano Carrara David H Nebinger 9 Years Ago Hi David, thank you for your reply ...I think that the most interesting example can be how Vaadin can manage a complete example, starting from load and list the Liferay's users table (the same as Liferay's Search Container), then how to manage the edit and delete of elements, then how to manage the insert of a new User.I'm sure that no one published a project using Vaadin equivalent of a portlet listing data based on Liferay's Search Container then edit/delete/insert operationsStill, the strange thing is that many men told they wrote CRUD portlets but no one publish a simple example on that ...I mean that no one published Java code, only long explanatons, but no code.Thank you in advance for comments ...Ivano C. Please sign in to reply. Reply as... Cancel David H Nebinger Ivano Carrara 9 Years Ago Normally I try not to muddy the waters... If you have something you're doing through Liferay tools such as search or user administration, it's usually better off leaving the work to those tools.That said, adding a user is done through the UserLocalServiceUtil.addUser() method. For the Vaadin side, you would create your form or forms to collect all of the information needed to pass through to the call.So the interesting stuff on the Vaadin side would be, for example, validating an email address. You can set the email field to immediate, then add a ValueChangedListener to it. Inside of your listener implementation, you get the value of the email field and then you can use UserLocalServiceUtil.fetchUserByEmailAddress() to see if there's already a user registered with that address, then you can display a notification or something so the user has to go and fix the email address...That's why I said it's not very interesting. You're presenting a form, you validate and verify user has entered into the form, and then you invoke the appropriate Liferay API to persist the data.Even in the case of adding a User, it just tends not to be very interesting although it is completely doable.But I do see your point in that more examples would be nice. I'm a little busy this week, but I'll try to get an example posted up here this coming weekend. Hopefully that will work for you?Also I'll be at the Liferay Symposium in Boston coming up in October; if you're going to be around, please look me up and we can talk Vaadin over a beer or something Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago Dear David, you are so gentle and your frequent posts in Liferay's' forum and blog are very useful...Thank you also for your actual effort to explain me ...I think that the real critical point is about how to load some thousand of records from a Liferay's managed database into a pagination control of Vaadin... It loads all records in memory and after a few users do the same I think the memory is full.I know that there is a Lazy loader control to do that but no one explained how to link data returned from some sort of MyEntityLocalServiceUtil.getAllRecords(...) to a Vaadin control to paginate the data ...I hope to read soon a new post from you about this secret !! :-)Thank you in advance for your valuable support ...Ivano C. Please sign in to reply. Reply as... Cancel David H Nebinger Ivano Carrara 9 Years Ago Ah, now paged results is a black art...So Vaadin has support for paged retrievals using direct JDBC, but there is no support for paged results using Liferay's methods.In general I try to avoid Vaadin's natural table handling because, like you pointed out, it is quite easy to exhaust server side resources when users are viewing tables with large row counts.Instead I tend to fall back to manually handling pagination. You can leverage Liferay's APIs (most list methods from Liferay have a corresponding windowed version to grab a subset of rows). You can grab the row count, handle moving forwards and backwards, all without the pitfalls of oversized table handling.Now if I absolutely had to support in in Liferay, I'd extend SQLContainer and override methods that access JDBC to use the corresponding Liferay API to get the total row count and retrieve records, By extending SQLContainer, you can leverage the examples from the Book of Vaadin that demonstrate how to use SQLContainer. Please sign in to reply. Reply as... Cancel Jack Bakker David H Nebinger 9 Years Ago I see two mind the gaps when using Vaadin in Liferay: 1) reducing overhead for larger datasets with many users (in Table component for example) 2) coordinating Liferay and Vaadin themes. A good CRUD example might address these. Please sign in to reply. Reply as... Cancel David H Nebinger Jack Bakker 9 Years Ago - Edited #1 is handled by manually paging the records. UserLocalServiceUtil, for example, has getUsersCount() method to get the number of users, and getUsers(int start, int end) grabs a subset of those users. Many of the Liferay APIs support similar things. For your own custom entities, the persistence classes always has paging methods, you just need to expose them in EntityLocalServiceImpl. So you manually support paging the dataset, each page forward increases your start/end values by the number of records you display, ... It is not elegant, but it does the trick and limits the server side overhead/impact.#2, well there is no coordination. In Vaadin you have to create your vaadin theme, and often times you have to undo what Liferay styles the default tags with. Vaadin uses it's own classes for styling, so you have to style the vaadin classes in a separate Vaadin theme. Unfortunately this means you create a Liferay theme for styling your site, then you have to recreate the theme as a Vaadin theme bringing your colors, etc. over to the Vaadin theme. Yes, this is ugly, but there is no other choice. Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago #1 No, I think that the best solution is to use Lazy Query Container Vaadin add on.The QueryFactory and Query interface implementations are designed to be application specific and should invoke a data source like WebService client, JDBC connection, JPA context or Java service class to read and write data items. The data source has to support querying data in batches.#2 I hope the Valo Vaadin Theme can help us.At the end, I hope that some Liferay and Vaadin people can help us to understand the beauty of their products !Thank you for your comments ...Ivano C. Please sign in to reply. Reply as... Cancel David Nebinger Ivano Carrara 9 Years Ago Lazy query container works, and I've posted a response to your forum thread about usage. I do worry though about server side impact of caching many records by many simultaneous users. I guess it takes an understanding of your environment and users to determine if it will be an impact or not.Valo is not going to be much of a help... It is a responsive theme design for Vaadin, but it still has the same issues the other themes have, namely their own custom class names and expectation that there is no underlying theme to build from. You'll still end up creating a custom theme (or perhaps a concept of a valo color scheme or something, I haven't figured out how they handle the color scheme changes) to bring consistency to both your Liferay environment and Vaadin portlets. Please sign in to reply. Reply as... Cancel
David H Nebinger Ivano Carrara 9 Years Ago Normally I try not to muddy the waters... If you have something you're doing through Liferay tools such as search or user administration, it's usually better off leaving the work to those tools.That said, adding a user is done through the UserLocalServiceUtil.addUser() method. For the Vaadin side, you would create your form or forms to collect all of the information needed to pass through to the call.So the interesting stuff on the Vaadin side would be, for example, validating an email address. You can set the email field to immediate, then add a ValueChangedListener to it. Inside of your listener implementation, you get the value of the email field and then you can use UserLocalServiceUtil.fetchUserByEmailAddress() to see if there's already a user registered with that address, then you can display a notification or something so the user has to go and fix the email address...That's why I said it's not very interesting. You're presenting a form, you validate and verify user has entered into the form, and then you invoke the appropriate Liferay API to persist the data.Even in the case of adding a User, it just tends not to be very interesting although it is completely doable.But I do see your point in that more examples would be nice. I'm a little busy this week, but I'll try to get an example posted up here this coming weekend. Hopefully that will work for you?Also I'll be at the Liferay Symposium in Boston coming up in October; if you're going to be around, please look me up and we can talk Vaadin over a beer or something Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago Dear David, you are so gentle and your frequent posts in Liferay's' forum and blog are very useful...Thank you also for your actual effort to explain me ...I think that the real critical point is about how to load some thousand of records from a Liferay's managed database into a pagination control of Vaadin... It loads all records in memory and after a few users do the same I think the memory is full.I know that there is a Lazy loader control to do that but no one explained how to link data returned from some sort of MyEntityLocalServiceUtil.getAllRecords(...) to a Vaadin control to paginate the data ...I hope to read soon a new post from you about this secret !! :-)Thank you in advance for your valuable support ...Ivano C. Please sign in to reply. Reply as... Cancel David H Nebinger Ivano Carrara 9 Years Ago Ah, now paged results is a black art...So Vaadin has support for paged retrievals using direct JDBC, but there is no support for paged results using Liferay's methods.In general I try to avoid Vaadin's natural table handling because, like you pointed out, it is quite easy to exhaust server side resources when users are viewing tables with large row counts.Instead I tend to fall back to manually handling pagination. You can leverage Liferay's APIs (most list methods from Liferay have a corresponding windowed version to grab a subset of rows). You can grab the row count, handle moving forwards and backwards, all without the pitfalls of oversized table handling.Now if I absolutely had to support in in Liferay, I'd extend SQLContainer and override methods that access JDBC to use the corresponding Liferay API to get the total row count and retrieve records, By extending SQLContainer, you can leverage the examples from the Book of Vaadin that demonstrate how to use SQLContainer. Please sign in to reply. Reply as... Cancel Jack Bakker David H Nebinger 9 Years Ago I see two mind the gaps when using Vaadin in Liferay: 1) reducing overhead for larger datasets with many users (in Table component for example) 2) coordinating Liferay and Vaadin themes. A good CRUD example might address these. Please sign in to reply. Reply as... Cancel David H Nebinger Jack Bakker 9 Years Ago - Edited #1 is handled by manually paging the records. UserLocalServiceUtil, for example, has getUsersCount() method to get the number of users, and getUsers(int start, int end) grabs a subset of those users. Many of the Liferay APIs support similar things. For your own custom entities, the persistence classes always has paging methods, you just need to expose them in EntityLocalServiceImpl. So you manually support paging the dataset, each page forward increases your start/end values by the number of records you display, ... It is not elegant, but it does the trick and limits the server side overhead/impact.#2, well there is no coordination. In Vaadin you have to create your vaadin theme, and often times you have to undo what Liferay styles the default tags with. Vaadin uses it's own classes for styling, so you have to style the vaadin classes in a separate Vaadin theme. Unfortunately this means you create a Liferay theme for styling your site, then you have to recreate the theme as a Vaadin theme bringing your colors, etc. over to the Vaadin theme. Yes, this is ugly, but there is no other choice. Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago #1 No, I think that the best solution is to use Lazy Query Container Vaadin add on.The QueryFactory and Query interface implementations are designed to be application specific and should invoke a data source like WebService client, JDBC connection, JPA context or Java service class to read and write data items. The data source has to support querying data in batches.#2 I hope the Valo Vaadin Theme can help us.At the end, I hope that some Liferay and Vaadin people can help us to understand the beauty of their products !Thank you for your comments ...Ivano C. Please sign in to reply. Reply as... Cancel David Nebinger Ivano Carrara 9 Years Ago Lazy query container works, and I've posted a response to your forum thread about usage. I do worry though about server side impact of caching many records by many simultaneous users. I guess it takes an understanding of your environment and users to determine if it will be an impact or not.Valo is not going to be much of a help... It is a responsive theme design for Vaadin, but it still has the same issues the other themes have, namely their own custom class names and expectation that there is no underlying theme to build from. You'll still end up creating a custom theme (or perhaps a concept of a valo color scheme or something, I haven't figured out how they handle the color scheme changes) to bring consistency to both your Liferay environment and Vaadin portlets. Please sign in to reply. Reply as... Cancel
Ivano Carrara David H Nebinger 9 Years Ago Dear David, you are so gentle and your frequent posts in Liferay's' forum and blog are very useful...Thank you also for your actual effort to explain me ...I think that the real critical point is about how to load some thousand of records from a Liferay's managed database into a pagination control of Vaadin... It loads all records in memory and after a few users do the same I think the memory is full.I know that there is a Lazy loader control to do that but no one explained how to link data returned from some sort of MyEntityLocalServiceUtil.getAllRecords(...) to a Vaadin control to paginate the data ...I hope to read soon a new post from you about this secret !! :-)Thank you in advance for your valuable support ...Ivano C. Please sign in to reply. Reply as... Cancel David H Nebinger Ivano Carrara 9 Years Ago Ah, now paged results is a black art...So Vaadin has support for paged retrievals using direct JDBC, but there is no support for paged results using Liferay's methods.In general I try to avoid Vaadin's natural table handling because, like you pointed out, it is quite easy to exhaust server side resources when users are viewing tables with large row counts.Instead I tend to fall back to manually handling pagination. You can leverage Liferay's APIs (most list methods from Liferay have a corresponding windowed version to grab a subset of rows). You can grab the row count, handle moving forwards and backwards, all without the pitfalls of oversized table handling.Now if I absolutely had to support in in Liferay, I'd extend SQLContainer and override methods that access JDBC to use the corresponding Liferay API to get the total row count and retrieve records, By extending SQLContainer, you can leverage the examples from the Book of Vaadin that demonstrate how to use SQLContainer. Please sign in to reply. Reply as... Cancel Jack Bakker David H Nebinger 9 Years Ago I see two mind the gaps when using Vaadin in Liferay: 1) reducing overhead for larger datasets with many users (in Table component for example) 2) coordinating Liferay and Vaadin themes. A good CRUD example might address these. Please sign in to reply. Reply as... Cancel David H Nebinger Jack Bakker 9 Years Ago - Edited #1 is handled by manually paging the records. UserLocalServiceUtil, for example, has getUsersCount() method to get the number of users, and getUsers(int start, int end) grabs a subset of those users. Many of the Liferay APIs support similar things. For your own custom entities, the persistence classes always has paging methods, you just need to expose them in EntityLocalServiceImpl. So you manually support paging the dataset, each page forward increases your start/end values by the number of records you display, ... It is not elegant, but it does the trick and limits the server side overhead/impact.#2, well there is no coordination. In Vaadin you have to create your vaadin theme, and often times you have to undo what Liferay styles the default tags with. Vaadin uses it's own classes for styling, so you have to style the vaadin classes in a separate Vaadin theme. Unfortunately this means you create a Liferay theme for styling your site, then you have to recreate the theme as a Vaadin theme bringing your colors, etc. over to the Vaadin theme. Yes, this is ugly, but there is no other choice. Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago #1 No, I think that the best solution is to use Lazy Query Container Vaadin add on.The QueryFactory and Query interface implementations are designed to be application specific and should invoke a data source like WebService client, JDBC connection, JPA context or Java service class to read and write data items. The data source has to support querying data in batches.#2 I hope the Valo Vaadin Theme can help us.At the end, I hope that some Liferay and Vaadin people can help us to understand the beauty of their products !Thank you for your comments ...Ivano C. Please sign in to reply. Reply as... Cancel David Nebinger Ivano Carrara 9 Years Ago Lazy query container works, and I've posted a response to your forum thread about usage. I do worry though about server side impact of caching many records by many simultaneous users. I guess it takes an understanding of your environment and users to determine if it will be an impact or not.Valo is not going to be much of a help... It is a responsive theme design for Vaadin, but it still has the same issues the other themes have, namely their own custom class names and expectation that there is no underlying theme to build from. You'll still end up creating a custom theme (or perhaps a concept of a valo color scheme or something, I haven't figured out how they handle the color scheme changes) to bring consistency to both your Liferay environment and Vaadin portlets. Please sign in to reply. Reply as... Cancel
David H Nebinger Ivano Carrara 9 Years Ago Ah, now paged results is a black art...So Vaadin has support for paged retrievals using direct JDBC, but there is no support for paged results using Liferay's methods.In general I try to avoid Vaadin's natural table handling because, like you pointed out, it is quite easy to exhaust server side resources when users are viewing tables with large row counts.Instead I tend to fall back to manually handling pagination. You can leverage Liferay's APIs (most list methods from Liferay have a corresponding windowed version to grab a subset of rows). You can grab the row count, handle moving forwards and backwards, all without the pitfalls of oversized table handling.Now if I absolutely had to support in in Liferay, I'd extend SQLContainer and override methods that access JDBC to use the corresponding Liferay API to get the total row count and retrieve records, By extending SQLContainer, you can leverage the examples from the Book of Vaadin that demonstrate how to use SQLContainer. Please sign in to reply. Reply as... Cancel Jack Bakker David H Nebinger 9 Years Ago I see two mind the gaps when using Vaadin in Liferay: 1) reducing overhead for larger datasets with many users (in Table component for example) 2) coordinating Liferay and Vaadin themes. A good CRUD example might address these. Please sign in to reply. Reply as... Cancel David H Nebinger Jack Bakker 9 Years Ago - Edited #1 is handled by manually paging the records. UserLocalServiceUtil, for example, has getUsersCount() method to get the number of users, and getUsers(int start, int end) grabs a subset of those users. Many of the Liferay APIs support similar things. For your own custom entities, the persistence classes always has paging methods, you just need to expose them in EntityLocalServiceImpl. So you manually support paging the dataset, each page forward increases your start/end values by the number of records you display, ... It is not elegant, but it does the trick and limits the server side overhead/impact.#2, well there is no coordination. In Vaadin you have to create your vaadin theme, and often times you have to undo what Liferay styles the default tags with. Vaadin uses it's own classes for styling, so you have to style the vaadin classes in a separate Vaadin theme. Unfortunately this means you create a Liferay theme for styling your site, then you have to recreate the theme as a Vaadin theme bringing your colors, etc. over to the Vaadin theme. Yes, this is ugly, but there is no other choice. Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago #1 No, I think that the best solution is to use Lazy Query Container Vaadin add on.The QueryFactory and Query interface implementations are designed to be application specific and should invoke a data source like WebService client, JDBC connection, JPA context or Java service class to read and write data items. The data source has to support querying data in batches.#2 I hope the Valo Vaadin Theme can help us.At the end, I hope that some Liferay and Vaadin people can help us to understand the beauty of their products !Thank you for your comments ...Ivano C. Please sign in to reply. Reply as... Cancel David Nebinger Ivano Carrara 9 Years Ago Lazy query container works, and I've posted a response to your forum thread about usage. I do worry though about server side impact of caching many records by many simultaneous users. I guess it takes an understanding of your environment and users to determine if it will be an impact or not.Valo is not going to be much of a help... It is a responsive theme design for Vaadin, but it still has the same issues the other themes have, namely their own custom class names and expectation that there is no underlying theme to build from. You'll still end up creating a custom theme (or perhaps a concept of a valo color scheme or something, I haven't figured out how they handle the color scheme changes) to bring consistency to both your Liferay environment and Vaadin portlets. Please sign in to reply. Reply as... Cancel
Jack Bakker David H Nebinger 9 Years Ago I see two mind the gaps when using Vaadin in Liferay: 1) reducing overhead for larger datasets with many users (in Table component for example) 2) coordinating Liferay and Vaadin themes. A good CRUD example might address these. Please sign in to reply. Reply as... Cancel David H Nebinger Jack Bakker 9 Years Ago - Edited #1 is handled by manually paging the records. UserLocalServiceUtil, for example, has getUsersCount() method to get the number of users, and getUsers(int start, int end) grabs a subset of those users. Many of the Liferay APIs support similar things. For your own custom entities, the persistence classes always has paging methods, you just need to expose them in EntityLocalServiceImpl. So you manually support paging the dataset, each page forward increases your start/end values by the number of records you display, ... It is not elegant, but it does the trick and limits the server side overhead/impact.#2, well there is no coordination. In Vaadin you have to create your vaadin theme, and often times you have to undo what Liferay styles the default tags with. Vaadin uses it's own classes for styling, so you have to style the vaadin classes in a separate Vaadin theme. Unfortunately this means you create a Liferay theme for styling your site, then you have to recreate the theme as a Vaadin theme bringing your colors, etc. over to the Vaadin theme. Yes, this is ugly, but there is no other choice. Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago #1 No, I think that the best solution is to use Lazy Query Container Vaadin add on.The QueryFactory and Query interface implementations are designed to be application specific and should invoke a data source like WebService client, JDBC connection, JPA context or Java service class to read and write data items. The data source has to support querying data in batches.#2 I hope the Valo Vaadin Theme can help us.At the end, I hope that some Liferay and Vaadin people can help us to understand the beauty of their products !Thank you for your comments ...Ivano C. Please sign in to reply. Reply as... Cancel David Nebinger Ivano Carrara 9 Years Ago Lazy query container works, and I've posted a response to your forum thread about usage. I do worry though about server side impact of caching many records by many simultaneous users. I guess it takes an understanding of your environment and users to determine if it will be an impact or not.Valo is not going to be much of a help... It is a responsive theme design for Vaadin, but it still has the same issues the other themes have, namely their own custom class names and expectation that there is no underlying theme to build from. You'll still end up creating a custom theme (or perhaps a concept of a valo color scheme or something, I haven't figured out how they handle the color scheme changes) to bring consistency to both your Liferay environment and Vaadin portlets. Please sign in to reply. Reply as... Cancel
David H Nebinger Jack Bakker 9 Years Ago - Edited #1 is handled by manually paging the records. UserLocalServiceUtil, for example, has getUsersCount() method to get the number of users, and getUsers(int start, int end) grabs a subset of those users. Many of the Liferay APIs support similar things. For your own custom entities, the persistence classes always has paging methods, you just need to expose them in EntityLocalServiceImpl. So you manually support paging the dataset, each page forward increases your start/end values by the number of records you display, ... It is not elegant, but it does the trick and limits the server side overhead/impact.#2, well there is no coordination. In Vaadin you have to create your vaadin theme, and often times you have to undo what Liferay styles the default tags with. Vaadin uses it's own classes for styling, so you have to style the vaadin classes in a separate Vaadin theme. Unfortunately this means you create a Liferay theme for styling your site, then you have to recreate the theme as a Vaadin theme bringing your colors, etc. over to the Vaadin theme. Yes, this is ugly, but there is no other choice. Please sign in to reply. Reply as... Cancel Ivano Carrara David H Nebinger 9 Years Ago #1 No, I think that the best solution is to use Lazy Query Container Vaadin add on.The QueryFactory and Query interface implementations are designed to be application specific and should invoke a data source like WebService client, JDBC connection, JPA context or Java service class to read and write data items. The data source has to support querying data in batches.#2 I hope the Valo Vaadin Theme can help us.At the end, I hope that some Liferay and Vaadin people can help us to understand the beauty of their products !Thank you for your comments ...Ivano C. Please sign in to reply. Reply as... Cancel David Nebinger Ivano Carrara 9 Years Ago Lazy query container works, and I've posted a response to your forum thread about usage. I do worry though about server side impact of caching many records by many simultaneous users. I guess it takes an understanding of your environment and users to determine if it will be an impact or not.Valo is not going to be much of a help... It is a responsive theme design for Vaadin, but it still has the same issues the other themes have, namely their own custom class names and expectation that there is no underlying theme to build from. You'll still end up creating a custom theme (or perhaps a concept of a valo color scheme or something, I haven't figured out how they handle the color scheme changes) to bring consistency to both your Liferay environment and Vaadin portlets. Please sign in to reply. Reply as... Cancel
Ivano Carrara David H Nebinger 9 Years Ago #1 No, I think that the best solution is to use Lazy Query Container Vaadin add on.The QueryFactory and Query interface implementations are designed to be application specific and should invoke a data source like WebService client, JDBC connection, JPA context or Java service class to read and write data items. The data source has to support querying data in batches.#2 I hope the Valo Vaadin Theme can help us.At the end, I hope that some Liferay and Vaadin people can help us to understand the beauty of their products !Thank you for your comments ...Ivano C. Please sign in to reply. Reply as... Cancel David Nebinger Ivano Carrara 9 Years Ago Lazy query container works, and I've posted a response to your forum thread about usage. I do worry though about server side impact of caching many records by many simultaneous users. I guess it takes an understanding of your environment and users to determine if it will be an impact or not.Valo is not going to be much of a help... It is a responsive theme design for Vaadin, but it still has the same issues the other themes have, namely their own custom class names and expectation that there is no underlying theme to build from. You'll still end up creating a custom theme (or perhaps a concept of a valo color scheme or something, I haven't figured out how they handle the color scheme changes) to bring consistency to both your Liferay environment and Vaadin portlets. Please sign in to reply. Reply as... Cancel
David Nebinger Ivano Carrara 9 Years Ago Lazy query container works, and I've posted a response to your forum thread about usage. I do worry though about server side impact of caching many records by many simultaneous users. I guess it takes an understanding of your environment and users to determine if it will be an impact or not.Valo is not going to be much of a help... It is a responsive theme design for Vaadin, but it still has the same issues the other themes have, namely their own custom class names and expectation that there is no underlying theme to build from. You'll still end up creating a custom theme (or perhaps a concept of a valo color scheme or something, I haven't figured out how they handle the color scheme changes) to bring consistency to both your Liferay environment and Vaadin portlets. Please sign in to reply. Reply as... Cancel