[cfaussie] Re: cfspreadsheet and vfs
Upgraded to CF 9.0.1. Still broken, although the exception message is a little more insightful. Message An exception occurred while using action=write. Detail java.lang.ClassCastException: coldfusion.vfs.VFileOutputStream cannot be cast to java.io.FileOutputStream I couldn't find this in the adobe bug database so I might whack it in... On Dec 1, 3:31 pm, Andrew am2...@gmail.com wrote: Thanks Paul. On Dec 1, 3:19 pm, Paul Kukiel kuki...@gmail.com wrote: I'm pretty sure Steve showed this bug at the CFUG a few months ago. Not sure if he logged it but it should be logged as I would expect that to have worked. Paul On 1/12/2010 3:12 PM, Andrew wrote: Hi, I was just trying to use cfspreadsheet to save into the virtual file system but it keeps falling over with an error like: Message An exception occurred while using action=write. Detail java.io.FileNotFoundException: ram://performance.xls Here's how I'm calling it: cfspreadsheet action=write filename=ram://performance.xls query=qPerformanceReport overwrite=true If I change the filename to a physical drive and make no other changes, eg c:/performance.xls it works. As far as I can tell the vfs is working as this code creates a file and reads it back successfully: cffile action = write file = ram://test.txt output = This is a test file cffile action=read file=ram://test.txt variable=test cfoutput#test#/cfoutput I'll just fall back to using the physical filesystem here I think, but I am interested to know if anyone else has the same issue with cfspreadsheet and the vfs? Or am I doing something wrong? I am using CF version 9,0,0,251028 (developer edition) on Windows 7. I guess I should try 9.0.1 Andrew. -- You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaus...@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en.
Re: [cfaussie] Re: cfspreadsheet and vfs
Let us know the bug number and I'll vote for it aswell. Paul. On 2/12/2010 12:11 PM, Andrew wrote: Upgraded to CF 9.0.1. Still broken, although the exception message is a little more insightful. Message An exception occurred while using action=write. Detail java.lang.ClassCastException: coldfusion.vfs.VFileOutputStream cannot be cast to java.io.FileOutputStream I couldn't find this in the adobe bug database so I might whack it in... On Dec 1, 3:31 pm, Andrewam2...@gmail.com wrote: Thanks Paul. On Dec 1, 3:19 pm, Paul Kukielkuki...@gmail.com wrote: I'm pretty sure Steve showed this bug at the CFUG a few months ago. Not sure if he logged it but it should be logged as I would expect that to have worked. Paul On 1/12/2010 3:12 PM, Andrew wrote: Hi, I was just trying to use cfspreadsheet to save into the virtual file system but it keeps falling over with an error like: MessageAn exception occurred while using action=write. Detail java.io.FileNotFoundException: ram://performance.xls Here's how I'm calling it: cfspreadsheet action=write filename=ram://performance.xls query=qPerformanceReport overwrite=true If I change the filename to a physical drive and make no other changes, eg c:/performance.xls it works. As far as I can tell the vfs is working as this code creates a file and reads it back successfully: cffile action = write file = ram://test.txt output = This is a test file cffile action=read file=ram://test.txt variable=test cfoutput#test#/cfoutput I'll just fall back to using the physical filesystem here I think, but I am interested to know if anyone else has the same issue with cfspreadsheet and the vfs? Or am I doing something wrong? I am using CF version 9,0,0,251028 (developer edition) on Windows 7. I guess I should try 9.0.1 Andrew. -- You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaus...@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en.
[cfaussie] Re: cfspreadsheet and vfs
85267. Thanks! On Dec 2, 12:18 pm, Paul Kukiel kuki...@gmail.com wrote: Let us know the bug number and I'll vote for it aswell. Paul. -- You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaus...@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en.
[cfaussie] Re: Best practices for retrieving foreign key display names in Entity Beans / DAOs
Hi Mark thanks for your response. Yes this is a custom framework that is modelled off the Bean/DAO/Gateway principles. I guess in general when setting up new entity beans i will base them off a database entity, much the same way Hibernate would perform the mapping so an entity property corresponds to a table field, and many-to-many relationships will be handled by an array of object instances against the entity. I guess my main issue arises when some tables may have many reference data fields for very simple id/name style tables. Ie in my current project, and Event table will contain up to 8 foreign keys for things like EventContactId, EventTypeId, EventLocationId, EventOrganiserId etc... So the lazy way would be to just add additional getter/setter methods for the displayname of each of these properties so I would end up with. getEventContactName(), getEventTypeName() and so on. This way avoids additional gateway calls and removes the object coupling, however it seems like i'm just creating unncessary properties for the Object purely to assist my output at the View layer. Cheers Phil On Dec 1, 3:11 pm, Mark Mandel mark.man...@gmail.com wrote: Phil, You using ORM, or you writing this yourself? Generally, you don't expose your foreign keys in your model as that is Relational data, as opposed to Object data. Academically when building an OO model, you want to model real world objects, so injecting relational data really steps away from that. (Obviously there are pragmatic reasons to do this at times, however). Generally speaking, yes, you would set up your objects to have relationships, so as you rightly described below, you would have a user.getType().getName() style API on your User object. Hope that helps. Mark On Wed, Dec 1, 2010 at 1:55 PM, Phil Rasmussen ara...@gmail.com wrote: Hi Everyone, Just wondering what the best practices were when it comes to displaying friendly names of foreign key based values in an Entity Bean at the View layer. So lets say for example I have a User bean with all the standard getter/setter methods for id/name/dob/age etc, but I also have a UserTypeId property which is stored as an ID value only corresponding to the foreign key variables.instance.usertypeid Now i will obviously have a getter and setter for getUserTypeId and setUserTypeId, however at the View layer i also want to display the actual User Type name somewhere, and I don't like the idea of making additional Gateway calls just to grab a single name value? I've read that some people will create objects out of all reference data such as having a UserType object which is stored against the User directly, and I can then output the name by writing #objUser.getUserType.getName()# for example. I seem to run into this issue a lot as the bigger the Entity bean the more foreign key references will usually exist and somewhere at the View layer i need to get the user friendly name value and display it. Would love to hear what others are doing with regards to this? Cheers Phil -- You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaus...@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.comcfaussie%2bunsubscr...@googlegroups.c om . For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en. -- E: mark.man...@gmail.com T:http://www.twitter.com/neurotic W:www.compoundtheory.com cf.Objective(ANZ) - Nov 18, 19 - Melbourne Australiahttp://www.cfobjective.com.au Hands-on ColdFusion ORM Trainingwww.ColdFusionOrmTraining.com -- You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaus...@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en.
Re: [cfaussie] Re: Best practices for retrieving foreign key display names in Entity Beans / DAOs
I guess the point here is - if you were using an ORM, you would build relationships, so you wouldn't expose the FK data. Again, Objects aren't simply a way to expose relational data - the idea behind OO is to represent real world objects. So your Event should have a Location, and have an Organiser, much like it would do in the real world. Good luck! Mark On Thu, Dec 2, 2010 at 2:11 PM, Phil Rasmussen ara...@gmail.com wrote: Hi Mark thanks for your response. Yes this is a custom framework that is modelled off the Bean/DAO/Gateway principles. I guess in general when setting up new entity beans i will base them off a database entity, much the same way Hibernate would perform the mapping so an entity property corresponds to a table field, and many-to-many relationships will be handled by an array of object instances against the entity. I guess my main issue arises when some tables may have many reference data fields for very simple id/name style tables. Ie in my current project, and Event table will contain up to 8 foreign keys for things like EventContactId, EventTypeId, EventLocationId, EventOrganiserId etc... So the lazy way would be to just add additional getter/setter methods for the displayname of each of these properties so I would end up with. getEventContactName(), getEventTypeName() and so on. This way avoids additional gateway calls and removes the object coupling, however it seems like i'm just creating unncessary properties for the Object purely to assist my output at the View layer. Cheers Phil On Dec 1, 3:11 pm, Mark Mandel mark.man...@gmail.com wrote: Phil, You using ORM, or you writing this yourself? Generally, you don't expose your foreign keys in your model as that is Relational data, as opposed to Object data. Academically when building an OO model, you want to model real world objects, so injecting relational data really steps away from that. (Obviously there are pragmatic reasons to do this at times, however). Generally speaking, yes, you would set up your objects to have relationships, so as you rightly described below, you would have a user.getType().getName() style API on your User object. Hope that helps. Mark On Wed, Dec 1, 2010 at 1:55 PM, Phil Rasmussen ara...@gmail.com wrote: Hi Everyone, Just wondering what the best practices were when it comes to displaying friendly names of foreign key based values in an Entity Bean at the View layer. So lets say for example I have a User bean with all the standard getter/setter methods for id/name/dob/age etc, but I also have a UserTypeId property which is stored as an ID value only corresponding to the foreign key variables.instance.usertypeid Now i will obviously have a getter and setter for getUserTypeId and setUserTypeId, however at the View layer i also want to display the actual User Type name somewhere, and I don't like the idea of making additional Gateway calls just to grab a single name value? I've read that some people will create objects out of all reference data such as having a UserType object which is stored against the User directly, and I can then output the name by writing #objUser.getUserType.getName()# for example. I seem to run into this issue a lot as the bigger the Entity bean the more foreign key references will usually exist and somewhere at the View layer i need to get the user friendly name value and display it. Would love to hear what others are doing with regards to this? Cheers Phil -- You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaus...@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.comcfaussie%2bunsubscr...@googlegroups.com cfaussie%2bunsubscr...@googlegroups.c om . For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en. -- E: mark.man...@gmail.com T:http://www.twitter.com/neurotic W:www.compoundtheory.com cf.Objective(ANZ) - Nov 18, 19 - Melbourne Australiahttp:// www.cfobjective.com.au Hands-on ColdFusion ORM Trainingwww.ColdFusionOrmTraining.com -- You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaus...@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.comcfaussie%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en. -- E: mark.man...@gmail.com T: http://www.twitter.com/neurotic W: www.compoundtheory.com cf.Objective(ANZ) - Nov 18, 19 - Melbourne Australia http://www.cfobjective.com.au Hands-on ColdFusion ORM Training www.ColdFusionOrmTraining.com -- You received this message because you are subscribed to the Google Groups cfaussie group.
[cfaussie] Session Variables with multiple sessions
Hi, I have an inhouse billing application that I now support and are wanting to make some modifications to. I am wanting end users to be able to open up multiple copies of our cf web application in different IE windows. This is so they can be looking at a persons invoice in a session of Internet Explorer and then receive a help desk call and proceed to look at a different persons invoice in a second session of Internet Explorer. The application uses session variables to hold ID's etc so if the end user then went back to their first Internet Explorer session it is possible that if they clicked onto a button to show the persons details, they would get the details from the 2nd Internet Explorer session (help desk call) as the session variables would have changed. So, my question is, can you have separate session variables per Internet Explorer window (not tab)? Is there a better way to manage having the application open multiple times on the one PC? Hope this makes sense. Cheers Anthony -- You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaus...@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en.
[cfaussie] Re: Best practices for retrieving foreign key display names in Entity Beans / DAOs
Yeah look i understand what you are saying about ORM, but our applications just aren't built that way and the DAO/Entity beans are more like a direct mapping to the entity tables. The Event does have all those properties you have specified, except they are not stored as objects themselves so i currently use getter/setter methods for handling that additional information. I guess once a related entity is over a couple of fields in size i will create an object structure out of it and then store that object reference against the parent. My initial question was more along the lines of how are other people dealing with simple reference data against objects and displaying this information on the frontend. Thanks anyways. Phil On Dec 2, 2:27 pm, Mark Mandel mark.man...@gmail.com wrote: I guess the point here is - if you were using an ORM, you would build relationships, so you wouldn't expose the FK data. Again, Objects aren't simply a way to expose relational data - the idea behind OO is to represent real world objects. So your Event should have a Location, and have an Organiser, much like it would do in the real world. Good luck! Mark On Thu, Dec 2, 2010 at 2:11 PM, Phil Rasmussen ara...@gmail.com wrote: Hi Mark thanks for your response. Yes this is a custom framework that is modelled off the Bean/DAO/Gateway principles. I guess in general when setting up new entity beans i will base them off a database entity, much the same way Hibernate would perform the mapping so an entity property corresponds to a table field, and many-to-many relationships will be handled by an array of object instances against the entity. I guess my main issue arises when some tables may have many reference data fields for very simple id/name style tables. Ie in my current project, and Event table will contain up to 8 foreign keys for things like EventContactId, EventTypeId, EventLocationId, EventOrganiserId etc... So the lazy way would be to just add additional getter/setter methods for the displayname of each of these properties so I would end up with. getEventContactName(), getEventTypeName() and so on. This way avoids additional gateway calls and removes the object coupling, however it seems like i'm just creating unncessary properties for the Object purely to assist my output at the View layer. Cheers Phil On Dec 1, 3:11 pm, Mark Mandel mark.man...@gmail.com wrote: Phil, You using ORM, or you writing this yourself? Generally, you don't expose your foreign keys in your model as that is Relational data, as opposed to Object data. Academically when building an OO model, you want to model real world objects, so injecting relational data really steps away from that. (Obviously there are pragmatic reasons to do this at times, however). Generally speaking, yes, you would set up your objects to have relationships, so as you rightly described below, you would have a user.getType().getName() style API on your User object. Hope that helps. Mark On Wed, Dec 1, 2010 at 1:55 PM, Phil Rasmussen ara...@gmail.com wrote: Hi Everyone, Just wondering what the best practices were when it comes to displaying friendly names of foreign key based values in an Entity Bean at the View layer. So lets say for example I have a User bean with all the standard getter/setter methods for id/name/dob/age etc, but I also have a UserTypeId property which is stored as an ID value only corresponding to the foreign key variables.instance.usertypeid Now i will obviously have a getter and setter for getUserTypeId and setUserTypeId, however at the View layer i also want to display the actual User Type name somewhere, and I don't like the idea of making additional Gateway calls just to grab a single name value? I've read that some people will create objects out of all reference data such as having a UserType object which is stored against the User directly, and I can then output the name by writing #objUser.getUserType.getName()# for example. I seem to run into this issue a lot as the bigger the Entity bean the more foreign key references will usually exist and somewhere at the View layer i need to get the user friendly name value and display it. Would love to hear what others are doing with regards to this? Cheers Phil -- You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaus...@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.comcfaussie%2bunsubscr...@googlegroups.c om cfaussie%2bunsubscr...@googlegroups.c om . For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en. -- E: mark.man...@gmail.com T:http://www.twitter.com/neurotic W:www.compoundtheory.com
Re: [cfaussie] Session Variables with multiple sessions
I personally would never use session variables to hold transitory record data (ie: what the user is working on). For me the session variables is all about the user at that login, nothing about what they are trying to do. if I wanted multiple browser instances (or multiple tabs) to deal with each record, I'd be passing the record ID around in the URL or form submit's. Treat each browser tab (or instance) as a silo but that's just my 2c. On Thu, Dec 2, 2010 at 2:36 PM, Anthony Landers anthony.land...@hnehealth.nsw.gov.au wrote: Hi, I have an inhouse billing application that I now support and are wanting to make some modifications to. I am wanting end users to be able to open up multiple copies of our cf web application in different IE windows. This is so they can be looking at a persons invoice in a session of Internet Explorer and then receive a help desk call and proceed to look at a different persons invoice in a second session of Internet Explorer. The application uses session variables to hold ID's etc so if the end user then went back to their first Internet Explorer session it is possible that if they clicked onto a button to show the persons details, they would get the details from the 2nd Internet Explorer session (help desk call) as the session variables would have changed. So, my question is, can you have separate session variables per Internet Explorer window (not tab)? Is there a better way to manage having the application open multiple times on the one PC? Hope this makes sense. Cheers Anthony -- You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaus...@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.comcfaussie%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en. -- You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaus...@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en.
Re: [cfaussie] Re: Best practices for retrieving foreign key display names in Entity Beans / DAOs
Phil, Assuming you need to stick to the current architecture, I would suggest a super pragmatic approach like: #application.someLookupHelperService.getLookUpDesc( userType, objUser.getUserTypeId() )# Obviously someLookupHelperService contains referenced tables (structure) as private members, and it is cached. I personally prefer to objUser.getUserType().getName() approach if possible though. Cheers, Terry On 2 December 2010 15:22, Phil Rasmussen ara...@gmail.com wrote: Yeah look i understand what you are saying about ORM, but our applications just aren't built that way and the DAO/Entity beans are more like a direct mapping to the entity tables. The Event does have all those properties you have specified, except they are not stored as objects themselves so i currently use getter/setter methods for handling that additional information. I guess once a related entity is over a couple of fields in size i will create an object structure out of it and then store that object reference against the parent. My initial question was more along the lines of how are other people dealing with simple reference data against objects and displaying this information on the frontend. Thanks anyways. Phil On Dec 2, 2:27 pm, Mark Mandel mark.man...@gmail.com wrote: I guess the point here is - if you were using an ORM, you would build relationships, so you wouldn't expose the FK data. Again, Objects aren't simply a way to expose relational data - the idea behind OO is to represent real world objects. So your Event should have a Location, and have an Organiser, much like it would do in the real world. Good luck! Mark On Thu, Dec 2, 2010 at 2:11 PM, Phil Rasmussen ara...@gmail.com wrote: Hi Mark thanks for your response. Yes this is a custom framework that is modelled off the Bean/DAO/Gateway principles. I guess in general when setting up new entity beans i will base them off a database entity, much the same way Hibernate would perform the mapping so an entity property corresponds to a table field, and many-to-many relationships will be handled by an array of object instances against the entity. I guess my main issue arises when some tables may have many reference data fields for very simple id/name style tables. Ie in my current project, and Event table will contain up to 8 foreign keys for things like EventContactId, EventTypeId, EventLocationId, EventOrganiserId etc... So the lazy way would be to just add additional getter/setter methods for the displayname of each of these properties so I would end up with. getEventContactName(), getEventTypeName() and so on. This way avoids additional gateway calls and removes the object coupling, however it seems like i'm just creating unncessary properties for the Object purely to assist my output at the View layer. Cheers Phil On Dec 1, 3:11 pm, Mark Mandel mark.man...@gmail.com wrote: Phil, You using ORM, or you writing this yourself? Generally, you don't expose your foreign keys in your model as that is Relational data, as opposed to Object data. Academically when building an OO model, you want to model real world objects, so injecting relational data really steps away from that. (Obviously there are pragmatic reasons to do this at times, however). Generally speaking, yes, you would set up your objects to have relationships, so as you rightly described below, you would have a user.getType().getName() style API on your User object. Hope that helps. Mark On Wed, Dec 1, 2010 at 1:55 PM, Phil Rasmussen ara...@gmail.com wrote: Hi Everyone, Just wondering what the best practices were when it comes to displaying friendly names of foreign key based values in an Entity Bean at the View layer. So lets say for example I have a User bean with all the standard getter/setter methods for id/name/dob/age etc, but I also have a UserTypeId property which is stored as an ID value only corresponding to the foreign key variables.instance.usertypeid Now i will obviously have a getter and setter for getUserTypeId and setUserTypeId, however at the View layer i also want to display the actual User Type name somewhere, and I don't like the idea of making additional Gateway calls just to grab a single name value? I've read that some people will create objects out of all reference data such as having a UserType object which is stored against the User directly, and I can then output the name by writing #objUser.getUserType.getName()# for example. I seem to run into this issue a lot as the bigger the Entity bean the more foreign key references will usually exist and somewhere at the View layer i need to get the user friendly name value and display it. Would love to hear what others are doing with regards to this? Cheers Phil -- You received this message because you are subscribed to the