tag:blogger.com,1999:blog-8888841891156921870.post6763187622354809716..comments2009-11-17T21:27:12.323-08:00Comments on Vroom Framework: EJBs, YUI DataTable and JavaScript using Vroom Web FrameworkFarrukhhttp://www.blogger.com/profile/00456229413600218531noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-8888841891156921870.post-942545443720759962009-11-17T21:27:12.323-08:002009-11-17T21:27:12.323-08:00@florian, You can email me directly. Check the con...@florian, You can email me directly. Check the contact details in my profile. I'm supporting the framework on this blog but I'm not posting new contents.Anonymoushttps://www.blogger.com/profile/07507278059234017542noreply@blogger.comtag:blogger.com,1999:blog-8888841891156921870.post-54068151737015406602009-11-17T04:27:59.493-08:002009-11-17T04:27:59.493-08:00Thank you, I thought that you had left your blog.....Thank you, I thought that you had left your blog......<br />P.S: could not send you an email , may be you address has some problemsfloriannoreply@blogger.comtag:blogger.com,1999:blog-8888841891156921870.post-9489411292763988422009-11-04T03:21:15.447-08:002009-11-04T03:21:15.447-08:00Hi Florian,
1. Make sure you've #{locale.lang...Hi Florian,<br /><br />1. Make sure you've #{locale.language} instead of #{local.language}.<br /><br />2. You can create the class anywhere in the project. You can also use existing java beans if they are on the classpath as .jar files or .class files. The only limitation is that the NetBeans plugin will not show u the classes if they are not available in the same project.<br /><br />Check my latest project as http://kenai.com/projects/vroom-app-server it's built using Grails framework and very interesting for rapid application development. But it's under development.Farrukhhttps://www.blogger.com/profile/00456229413600218531noreply@blogger.comtag:blogger.com,1999:blog-8888841891156921870.post-9614856616271786502009-11-04T03:04:09.212-08:002009-11-04T03:04:09.212-08:00Hello Farrukh,
my name is florian,
I was trying tr...Hello Farrukh,<br />my name is florian,<br />I was trying trhe method that you have posted using the same tools: netbeans, Vroom web framework but i got some problems:<br />1. on the Web App part: if i use<br />alert('The local language of your browser is #{local.language}'); in customer-search-btnSearch-onclick.js , when i debug the application and click on the search button, the alert message will not come.<br />2. where do you create the DatabaseBean class? in DemoApp-war or DemoApp-ejb?<br />Thank youRwezenoreply@blogger.comtag:blogger.com,1999:blog-8888841891156921870.post-9593079884385193032008-11-18T23:04:00.000-08:002008-11-18T23:04:00.000-08:00That's the power of this framework. You can return...That's the power of this framework. You can return any object as long is there is no cyclic reference. E.g. in step 11, getCustomer(...) is returning a List. You can return list of your own java beans. E.g. if you have MyCustomerBean class which has various properties like custId, custName, custAddr, custPhone etc. you can build the list of MyCustomerBean objects and return. To access the properties of your beans you need to use<BR/><BR/>fields: ["custId", "custName", "custAddr", "custPhone"]<BR/><BR/>Another powerful feature of the framework is that it's not necessarily the List object you should return. You can return any object E.g. You may want to access customers and orders in one shot. You can define another method called Map getData(...) and put the code as follows:<BR/><BR/>public Map getData(HttpServletRequest req, HttpServletResponse resp) {<BR/> List customers = new ArrayList();<BR/> List orders = new ArrayList();<BR/> // populate customers from database...<BR/> // populate orders from database...<BR/> Map myData = new HashMap();<BR/> myData.put("customers", customers);<BR/> myData.put("orders", orders);<BR/> return myData;<BR/>}<BR/><BR/>To access customers in the client script you need to use "customers" instead of "array" as follows:<BR/><BR/>// in client script...<BR/>this.myDataSource.responseSchema = {<BR/> resultList: "customers"<BR/> fields: ["custId", "custName", "custAddr", "custPhone"]<BR/>}<BR/><BR/>You can return Object version of primitive data types such as String, Integer, Long, Float, Date and you need to use<BR/>"value" attribute for them.<BR/><BR/>For Lists or Arrays you need to use "array" attribute.<BR/>For Maps, Properties, ResourceBundles, you need to access them using the key of the attribute.<BR/><BR/>Visit my other posts related to Localization and also visit wikipedia for Vroom Framework and you'll find a lot of interesting features the framework provides. I've built complete application in my company using my framework alone with YUI components and it's much faster and can be customized quickly.<BR/><BR/>Hope this will help.Farrukhhttps://www.blogger.com/profile/00456229413600218531noreply@blogger.comtag:blogger.com,1999:blog-8888841891156921870.post-92173906925204734722008-11-18T12:25:00.000-08:002008-11-18T12:25:00.000-08:00Thanks Farukh, Thats good for client side. how abo...Thanks Farukh, Thats good for client side. how about in getCustomer bean. In step 8, you have two value in bean(ArrayList of LabelValueBeans ) like....beans.add(new LabelValueBeans(c.getName(), c.getCustomerID().toString());........Here can I add more values like c.getAddress() etc wich match with myDatasource columndefination. shortly can i add more than two value in LabelValueBean object.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8888841891156921870.post-56243191778697903402008-11-17T21:23:00.000-08:002008-11-17T21:23:00.000-08:00This is very simple indeed. In step 10, notice tha...This is very simple indeed. In step 10, notice that myColumnDefs variable contains column definitions that you want to show in the table. Add more definitions to the structure of myColumnDefs as well as include your desired columns in fields array of myDataStore.responseSchema. The key in myColumnDefs must be one among the fields of myDataStore.responseSchema.<BR/><BR/>E.g.<BR/><BR/>var myColumnDefs = [<BR/> {key: "empNo", label: "Employee No"},<BR/> {key: "empName", label: "Employee Name"},<BR/> {key: "hireDate", label: "Hire Date"}<BR/>]<BR/><BR/>fields = ["empNo", "empName", "hireDate"];<BR/><BR/>Let me know if you still need assistance.Farrukhhttps://www.blogger.com/profile/00456229413600218531noreply@blogger.comtag:blogger.com,1999:blog-8888841891156921870.post-588952716548642822008-11-17T15:49:00.000-08:002008-11-17T15:49:00.000-08:00Hi Farukh, This example deals with two colums (nam...Hi Farukh, This example deals with two colums (name-value pair), If I want to show more than two colums' data than how can i do that. please explain.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8888841891156921870.post-64175019881782077842008-10-05T12:54:00.000-07:002008-10-05T12:54:00.000-07:00If your web app in the same .ear file then you sho...If your web app in the same .ear file then you shouldn't get this problem. If your web app is outside the .ear file then make sure you've deployed the .ear file prior to deploying the .war file. Also make sure that you've checked "Remote" in step 7. Ignore the second error you've specified, it's a bug. You're reaching inside the "getCustomer" method of the bean that's why you got the lookup error. If you still can't fix it, let me know and I'll upload the source code at sourceforge.net site of the project. Thanks!Farrukhhttps://www.blogger.com/profile/00456229413600218531noreply@blogger.comtag:blogger.com,1999:blog-8888841891156921870.post-115147280717273422008-09-16T04:00:00.000-07:002008-09-16T04:00:00.000-07:00thanks for nice tool. But I'm not able to run the ...thanks for nice tool. But I'm not able to run the example you present here. I get error in looking up java:comp/env/CustomerSessionBean and <BR/>method not found getCustomer(HttpServletRequest, HttpServletResponse). <BR/>If possible please post source code for the project.Trial Blazerhttps://www.blogger.com/profile/00750069780339738492noreply@blogger.com