RE: Can I ask a question? (RE: Frameworks)
and wherever you get your job programming, you'll learn that they probably have procedures in place that you'll have to learn in order to work well with the team that you'll join. I guess that was our framework discussion. I think this all depends on what you are attempting to do, as each framework is intended to solve a (sometimes different) set of problems. In your environment Jeff, the problems that each framework addresses may not be relevant. Each framework is targeted at a specific problem, take for example ColdSpring; Do you program in an OO fashion and have many dependencies between your objects? Then ColdSpring is a framework that can help you manage those dependencies in an easy way (not to mention AOP). Do you have code that is tied really tightly with your display pages, causing all sorts of headaches when you need to update something? You might want to look at an MVC framework. In the end, many of the concepts that are applied are done so to help reduce the effort it will take to maintain the application. These things may or may not apply to your situation. If you run into these problems, then you'll become an advocate of frameworks, and the people that craft them. Rich Kroll ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276940 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Problem Using CFC Within IFrame
Anne, I don't know of any specific problems with the technique that you are trying to use. I would suggest trying to make a really simple demo of what you are trying to achieve for demonstration purposes, and post that code to the list so we can see all the moving parts of what is going on, then we might be able to give you some more feedback. Rich Kroll ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276661 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Testing Database Connection within Application
There is a decent chance that the admin api functionality gives you access to the same thing that happens when you click the verify data source icon in CF Admin. Yes, you can get this from the adminapi: cfscript // you must log in before accessing other adminapi components adminObj = createObject('component', 'cfide.adminapi.administrator'); adminObj.login('yourCFAdminPassword'); // create the data object and test the DSN dataObj = createObject('component', 'cfide.adminapi.datasource'); writeOutput(dataObj.verifyDSN('dsnName')); //returns boolean /cfscript I tested shutting down my datasource, and it retured false in about 1-2 seconds in my local environment. HTH, Rich Kroll ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275875 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Access my SessionService from Gateway (MG, CS, Reactor)
From your description, it seems like you are mixing layers (which will IMO bite you later). I would suggest keeping your components as focused as possible. When working on this type of problem, I create services that manage each of the entities in the domain. I generally separate user authentication from authorization / entitlement. Here is some pseudo-code to demonstrate what I'm talking about: UserService - userGateway (table gateway e.g. sets of data) - userDAO (manage single object persistence) getUser(username,password) : UserBean ( userDAO.read(UserBean) ); saveUser(UserBean) : Void ( userDAO.save(UserBean) ) getAll() : Query ( userGateway.getAll() ) UserDAO read(UserBean) : UserBean save(UserBean) : Void UserGateway getAll() { select ... from ... return query; } AuthenticationService - UserService (access to the user) - SessionFacade (access to the session) processLogin(username,password) : Boolean { user = UserService.getUser(username,password); return authenticateUser(user); } authenticateUser(UserBean) { log in user. if (loggedIn ) { sessionFacade.setUser(UserBean); } return UserBean; } EntitlementService - UserService - SessionFacade getEntitlements(UserBean) ... In this type of a setup, you could create accessors (setUserFacade/getUserFacade) for each of the composited items and let CS inject them. HTH, Rich Kroll ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275081 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Access my SessionService from Gateway (MG, CS, Reactor)
I now need access to this session service from one of the Gateways. CS won't be able to autowire your model, but it can still wire those cfcs for you. In your services.xml file, define your façade and then define your gateway with the façade as a property like: bean id=yourGateway class=path.to.your.gateway property name=sessionFacaderef bean=sessionFacade //property /bean bean id=sessionFacade class=path.to.sessionFacade / Then when you ask CS for your gateway, it will have the session façade wired in. HTH Rich Kroll -Original Message- From: Robert Rawlins - Think Blue [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 10, 2007 9:36 AM To: CF-Talk Subject: Access my SessionService from Gateway (MG, CS, Reactor) Hello Guys, this should be a quick and easy one I hope. I've made a habit of accessing all my scopes like Application and Session through a facade cfc passed to me by one of the other developers. When I need to access it from my controllers i just have CS auto wire it to the controller. I now need access to this session service from one of the Gateways. How can I access this service from my gateway? Some form of getBean() function perhaps? It seems that ColdSpring cant auto wire directly to the model components. Thanks, Rob ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274937 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Access my SessionService from Gateway (MG, CS, Reactor)
I'm not using CS to access my gateway using the getBean() method, I'm accessing the gateway using something like this. LOCAL.gCredentials = getModelGlue().getOrmService().createGateway(Credentials); With that call you are talking to reactor I'm assuming. I've not worked with MG:U, so I'm not exactly sure what is going on in the construction of those objects. I know that MG:U provides scaffolding, and am assuming that the getOrmService().createGateway() call is referencing a table called Credentials that it read from your database. In this case, reactor is creating the gateway, not CS, so you have to determine how to inject the sessionFacade into the reactor generated file. I know that reactor generates files that you can provide custom methods, and that might be the place to achieve what you are trying to do. It could be that CS fires after reactor, so you might be able to add a reference in the reactor generated abstract gateway and have CS inject your façade. I'm sorry I can't be of more help with this exact issue, but I think that there is a list dedicated to MG:U, and you might find more help from people there. I'm a little unclear on what you are trying to achieve. Once you create the credentials gateway, it seems as though you are going to look up a users credentials. How does your sessionFacade factor into this? Why would it need to be injected into the gateway? HTH Rich Kroll ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274954 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: ColdSpring From Within App.cfc (MG)
(Sorry if this is a double post, I waited a few hours and still had not seen it go through) I'm not using CS to access my gateway using the getBean() method, I'm accessing the gateway using something like this. LOCAL.gCredentials = getModelGlue().getOrmService().createGateway(Credentials); With that call you are talking to reactor I'm assuming. I've not worked with MG:U, so I'm not exactly sure what is going on in the construction of those objects. I know that MG:U provides scaffolding, and am assuming that the getOrmService().createGateway() call is referencing a table called Credentials that it read from your database. In this case, reactor is creating the gateway, not CS, so you have to determine how to inject the sessionFacade into the reactor generated file. I know that reactor generates files that you can provide custom methods, and that might be the place to achieve what you are trying to do. It could be that CS fires after reactor, so you might be able to add a reference in the reactor generated abstract gateway and have CS inject your façade. I'm sorry I can't be of more help with this exact issue, but I think that there is a list dedicated to MG:U, and you might find more help from people there. I'm a little unclear on what you are trying to achieve. Once you create the credentials gateway, it seems as though you are going to look up a users credentials. How does your sessionFacade factor into this? Why would it need to be injected into the gateway? HTH Rich Kroll ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274960 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Subversion questions
It seems as though your repository structure is working well for you, it seems the only problem is the project properties. I'm assuming for your flex projects that you are using eclipse, which creates .project files. This can wreak havoc if people have the workstations set up differently and those files are managed by SVN. What you can do to get around this is to use svn:ignore when importing the project. HTH, Rich Kroll -Original Message- From: Rick Root [mailto:[EMAIL PROTECTED] Sent: Monday, April 02, 2007 8:43 AM To: CF-Talk Subject: OT: Subversion questions So we've been using Subversion to track changes to our web site applications for a few months now, and I don't think we're doing it right when I set up the subversion server originally, I set up a single repository which holds everything we want to maintain version control for... each web site is a subdirectory of the main repository. so on my computer, I have a working copy of the repository that looks like this: D:\work\ads\* (www.it.dev.duke.edu) D:\work\advanceweb\* (advanceweb.ads.duke.edu) D:\work\stockgifts\* (stockgifts.duke.edu) Additionally, all of my flex projects are stored in D:\work\flexProjects\* The problem here of course is that *ALL* of the flex project files are part of version control, including the project properties and such... which seems to make life difficult for having multiple developers working on the same flex application. So... what are the best practices for subversion use? Should I create a repository for each web site, and another for each flex project? What if I have multiple coldfusion applications residing on a given web site (for example, www.it.dev.duke.edu has *MANY* applications) Thanks... Rick -- CFMBB - Coldfusion Message Boards, Version 1.21 Now Available! http://www.cfmbb.org ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274304 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: date compare
Firstly, what you have to keep in mind is that you said you have date/time fields. When you are trying: WHERE myDate = '03/26/2007' what you are really saying is: WHERE myDate = '2007-03-26 00:00:00.000' This comparison will fail on a record such as '2007-03-26 17:56:22.000'. To get around that you can convert the date/time field to get it to drop the time: CONVERT(char(8), myDate, 1) will give you '03/26/07' cfquery name=Getnow datasource=trials Select * from trials_info /cfquery CFSET sevendaysback = DateAdd(d, -7, getnow.expiration) Select * from trials_info Where '#DateFormat(CreateODBCDate(now()), mm/dd/)#' = '#DateFormat(CreateODBCDate(sevendaysback), mm/dd/)#' /cfquery I get from your code that you are trying to find all records that have an expiration column equal to 7 days ago. You could do this all in one query like the following (MSSQL syntax): SELECT * FROMtrials_info WHERE CONVERT(char(8), dateadd(dd, -7, expiration), 1) = CONVERT(CHAR(8), getDate(), 1) HTH, Rich Kroll ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273728 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: date compare
#Fix( your_date )# will convert the date to a float, and then cut off the hour/min/seconds... Then the CFQueryParam tag will convert the float back into a date/time object. I guess you learn something every day! Nice tip Ben Rich Kroll ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273729 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: date compare
Thanks Rich. Tried to implement but recevd errors with Convert. Where does this command go pls? In the where? Tried that but still got errors. As Janet noted, that syntax is for MSSQL. I did a quick test in Access, and you can get similar results using the following: WHERE Format(myDate, 'mm/dd/') = '03/26/2005'; HTH, Rich Kroll ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273766 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: You think you know OOP.. but you don't
I agree with most of your post, Dave. But one thing that bothers me about the 100 CF frameworks out there is that often times these guys make up their own dialect instead of trying to use existing terms that mean the same thing. I'm not a frameworks expert, but from the reading I've done, Fusebox and Model Glue each introduce new terms for concepts that have been around for a long time (for example, fuse and all of its variants). I really wish people would stop trying to be cool, and just use existing standard language. I have to disagree to an extent. Of all the frameworks in CF that I have seen, each attempts to leverage methodologies proven in other languages and bring them to CF (MVC, ORM, etc.). Inside each framework, each attempts to communicate the moving bits as best they can as there is not always a 1-1 relationship with other languages. For example, in many event driven applications you either broadcast an 'event' or broadcast a 'message'. In both MG and MII, the exact names change, but the intent is carried through. Learning CF has nothing to do with learning a framework. Leveraging a framework or a design pattern helps developers solve specific problems they encounter. Too much business logic tied to your display? Use the MVC pattern (and perhaps a MVC framework). How someone learns CF is based on a myriad of factors and varies greatly from person to person. Each of these Buzz words solves REAL problems that developers face day to day. The Buzz words are buzz words in CF, but have long since become standard practice in most modern languages. My 2 cents Rich Kroll ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273446 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: A quick referance guide to OOP MVC
I'm looking for someone to give me a rough rundown of some of the OOP terms that I keep seeing thrown around and yet still baffle me. I've got some elements of my application that I've been handed by other people, and they refer to them as 'Facades' or 'Utilities' or 'Services' what are the definitions of those? And how should they be applied within an application. Facades: A Façade is intended to keep your code from knowing how something is managed. In web based OO, you often need to persist a user object across the life of the session. You would not want session references sprinkled throughout your code, so you create a UserFacade. Your application asks the façade for a user, and the façade manages persistence of the user object in the session scope. Services: Services are often referenced as part of a SoA (Service oriented architecture). The easiest way I can describe them is using an analogy ;) Think of the process of going to the bank. You walk up to a teller, hand him/her your account number and tell them what you want to do. For example, I tell the teller my account number is 101 and I wish to deposit 500 into my checking account. The teller hands me a receipt and tells me the money has been deposited. You have no knowledge of exactly what the teller DID, you just know that the money was deposited. The teller performed a service to you. The teller can perform many other services like withdraw money, transfer money. Other services offered in the bank are home loans, but they are offered by a DIFFERENT person (think object here). So the idea is that each object has a set of services that it offers. Those services might depend on a number of different objects in your business model, but the service hides the inner workings and just exposes the facts that it needs to perform the service. The tellerService might depend on an authentication object to verify that I have an account, an account object to deposit the money, etc. The method call tellerService.depositMoney(accountNumber, amount) is all the rest of the application has to see, and simply depends on the return (like a receipt) to know that the deposit was successful, so you hide many of the dependencies. This makes for a stronger application. Transfer Objects (TOs): Transfer objects are simply objects that contain only data. They expose this data as properties. See http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html for a full explanation. I'd be interested to take any recommendations on more general perhaps java based OOP, MVC and AOP related books that would be worth me reading. Many of the things you are reading / hearing are in reference to Design Patterns (gateways = table gateway pattern, DAO = Data Access Object Pattern, etc). It might make things clearer if you look into the GoF (Gang Of Four) and their book Design Patterns: Elements of Reusable Object-Oriented Software. I highly recommend Head First Design Patterns (http://www.amazon.com/Head-First-Design-Patterns/dp/0596007124), it's in Java but relatively easy to follow and an amazing explanation of many different patterns. HTH Rich Kroll ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273279 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: A quick referance guide to OOP MVC
But what's this with TO's being an object only containing properties? I thought that was a bean? So for instants I'd have a bean that containing only getters and setters, nothing more, is that a TO, or is a TO more like an active record that represents a row of table data? Rob, It's just a really lightweight version of an object that can be passed around. It can also be used in the memento pattern (using a TO to populate a bean). For example: cfcomponent displayname=userTO cfscript THIS.id = 0; THIS.firstname = ''; THIS.lastname = ''; THIS.password = ''; THIS.emailaddress = ''; /cfscript /cfcomponent This TO would then be handed to another object, for example a DAO: cffunction name=Save cfargument name=to type=path.to.TO / cfset var qSave = / cfquery name=qSave datasource=#getDSN()# UPDATE users SET id = #arguments.TO.id# ,name = '#arguments.TO.name#' !--- etc... --- !--- and use CFQUERYPARAM! --- /cfquery /cffunction HTH Rich Kroll ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273316 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Help Desk / Trouble Ticket recommendation?
I highly recommend Jira (www.atlassian.com) Its Java based and once you purchase the application, you have access to the source. It is configurable to a degree that I've never seen in any other app. Has SVN integration, an active community of plug-in developers, web service availability, can run on tomcat, I could go on for days (I'm a BIG fan!). My 2 cents... Rich Kroll -Original Message- From: Andrew Peterson [mailto:[EMAIL PROTECTED] Sent: Friday, March 16, 2007 5:00 PM To: CF-Talk Subject: Help Desk / Trouble Ticket recommendation? Can someone recommend a good help desk/trouble ticket system? The ideal application would be cf based and open source. Thanks. ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272901 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Dynamic title In Model-Glue
Is there any reason behind doing this? I try to do this as well in my applications. The reason that I do it is that it places all framework dependant code at the top of the template so it is easy to get to. An additional benefit is that if I ever need to migrate the application to another framework, I would only have to update the references at the top of the view rather than scattered throughout it. Rich Kroll ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272730 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: SVN Dreamweaver
Seriously, what're people using to count lines of code? I gave a rough guess based on the number of templates X the average lines of code in a template. Not exactly accurate, but it did not need to be ;) Rich Kroll ~| ColdFusion MX7 by Adobe® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272505 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: SVN Dreamweaver
I believe the way you are using VSS is using the lock-modify-unlock model for source control. Subversion uses a different model, the copy-modify-merge model. We used VSS prior to moving to SVN, and some of the decision makers had concerns with switching to a model where multiple developers had the ability to modify the same code. Since we have moved to SVN and embraced its model, we have seen dramatic increases in productivity as well as code stability. We have over 15,000,000 lines of code in our application, and the only times conflicts occur is when people are working on the same area of the application and making conflicting changes (which usually means a lack of communication somewhere). If you are set on attempting to use the lock-modify-unlock model, you can access information on it at http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html (though I *highly* recommend NOT using that model). We have a quite a few developers on our team that choose to use Dreamweaver as their IDE. There are a few software solutions that allow direct SVN manipulation from within DW, but are all purchased components. Instead of using these 3rd party components, we have all developers (not using Eclipse) to use TortoiseSVN and use windows explorer integration to perform all SVN operations. Good luck and HTH, Rich Kroll ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272475 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Subject: How to invoke a method from inside another method in a cfc
All you need to do is simply call the method: cffunction name=method1... ... cfif... cfset method2() / /cfif /cffunction cffunction name=method2... /cffunction HTH, Rich Kroll ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2. Free Trial http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272316 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Nesting CFCs?
Scott, There are two answers to your question. You can call methods in other CFCs in two ways. The first way is through Inheritance, take the following example: cfcomponent displayname=ObjectA cffunction name=aFunction cfreturn A / /cffunction /cfcomponent cfcomponent displayname=ObjectB extends=ObjectA cffunction name=bFunction cfreturn B / /cffunction /cfcomponent Based on this example you could call ObjectB.aFunction() and it would return A. The other method for this is through composition. A quick example of how this would work is: cfcomponent displayname=ObjectB cfset variables.objectA = createObject('component', 'ObjectA').init() / cffunction name=bFunction cfreturn B / /cffunction cffunction name=aFunction cfreturn variables.objectA.aFunction() / /cffunction /cfcomponent In this example, Object B contains a copy of Object A and when ObjectB.aFunction() is called, it simply passes that call on to its copy of objectA. HTH, Rich Kroll -Original Message- From: Scott Weikert [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 07, 2007 12:27 PM To: CF-Talk Subject: Nesting CFCs? Hey gang - I'm currently revamping various parts of my main app to CFC-ify it up. Modernization and all that rot. Quick question - can you call one CFC from within another CFC? And if so (I imagine so), what's the method? In my case, I'd like to just have another cffunction block in the same CFC file, so that, say, function1 and function2 both can call function3 at some point, within that file. --Scott ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271902 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: why Named Virtual Hosts in apache??
Virtual Hosts in Apache? On a development machine why do this? I use named virtual hosts on dev machine. I've got them set up to allow me to have a development 'playground'. For example when I start a new experimental project, I create a new directory and a matching virtual host in apache. For example I am working on a new OO project using Mach-ii, ColdSpring and Reactor. I created a new directory containing all three frameworks and my default folder / package layout. This setup allows me to work from the web root without having to move / delete anything existing in my standard webroot. HTH Rich Kroll ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271534 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Problem with Server Timing Out
I turned off pooling and I am still getting the time outs. I have upgraded the drivers. Ugh, any other suggestions? -JH Jim, We switched to jTDS drivers until Adobe can work with DataDirect to correct the problem, and they seem to be working well for us. You might want to give them a shot. Rich Kroll ~| Create Web Applications With ColdFusion MX7 Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271319 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Problem with Server Timing Out
All you need to do is unzip the jar into your classpath, or add a mapping to where you unzip them. To test them open CFAdmin and create a new datasource of type 'other'. JDBC URL: jdbc:jtds:sqlserver://***you.server.here***:1436/**databaseNameHere**;td s=8.0;lastupdatecount=true; Replace the ***your.server.here*** with the URL of your server and **databaseNameHEre** with your database Driver Class: net.sourceforge.jtds.jdbc.Driver And you should be good to go. HTH, Rich Kroll -Original Message- From: Jim H [mailto:[EMAIL PROTECTED] Sent: Friday, March 02, 2007 11:40 AM To: CF-Talk Subject: Re: Problem with Server Timing Out Rich, I have no idea how to implement that change. How do I install it, deploy and use it? I looked at the site, but I didnt see much to guide me through an install. Thanks! -JH I turned off pooling and I am still getting the time outs. I have upgraded the drivers. Ugh, any other suggestions? -JH Jim, We switched to jTDS drivers until Adobe can work with DataDirect to correct the problem, and they seem to be working well for us. You might want to give them a shot. Rich Kroll ~| ColdFusion MX7 by Adobe® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271330 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: DAO, Gateway Access
Robert, The 'traditional' way in which DAO's and gateways are implemented are that a DAO works with an individual bean and manages its persistence. A gateway manages retrieving sets of data, usually returned as a query. From what it should like you are doing, you are asking the gateway for a set of data, and then you want to message that data prior to returning it to the client. I would move the processing into a service object, which would contain an instance of your Gateway. Your method would proxy calls to the gateway, and then process the returned results. HTH Rich Kroll ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271013 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Queue Manager
I need some advice. I am working on a project. The cfm page in my project I call TheBrain.cfm this is the page that gets called by my task scheduler every 4 hours. TheBrain.cfm script then makes calls to a web service. I am allowed to have 15 simultaneous connections to the web service at any one given point. To clarify, In TheBrain.cfm are you looping over something when calling the web service? From what I understand of your problem, I would second Chris suggestion of looking at Ray's cfthread / cfjoin proof of concept. Rich Kroll ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270852 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Problem with Server Timing Out
Error Executing Database Query. [Macromedia][SQLServer JDBC Driver]A problem occurred when attempting to contact the server (Server returned: Connection reset). I'm assuming that you are connecting to a MSSQL server. We were running into these types of timeouts as well as handler errors. We switched to the jTDS drivers instead of the built in CF drivers and this issue cleared up. HTH, Rich Kroll ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270587 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Problem with Server Timing Out
Where can I find or how can I switch to the jTDS drivers? We are using SQL2000 and a fresh install of 7.02. http://jtds.sourceforge.net/ Rich Kroll ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270594 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Switching to Weblogic 9.2 on Java 1.5 - which version of CF to use?
So that's where i'm at for now: 1) Might work with cfmx 7, but not supported. 2) Will most likely work with CFMX 8, but no information of whether it will be officially supported (the Weblogic 9.2 bit, not the java 1.5 bit). 3) Some kind of one time automated migration to regular java web app code. From everything that I've heard, your assessment is right on the money. The one time migration sounds a bit like snake oil to me as well, but it would be theoretically possible but IMO improbable. Rich Kroll ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270304 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cfcs defining datasource in application.cfm
Passing the dsn to the CFC in the create object?? Is this correct or should I change my ways? I think it depends on your requirements and personal taste. I have done exactly the same thing, but now I also need to pass not just the DSN but also the database I'm currently working on. I chose to create a Datasource component and call Datasource.getDSN() and Datasource.getDatabase(). This way I only have to pass that as one argument and only one place to change if I ever need to. Rich Kroll ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270338 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfcs defining datasource in application.cfm
Sorta off topic, but this is one area where ColdSpring is pretty awesome. That's pretty much the only way I'm using CS right now-- Haven't even scratched the surface of Advice, which is just freaking cool. I agree completely! Rich Kroll ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270394 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: ColdSpring - What's my DAO do?
Rich, so based on this, it means I should have a dogFactory for my dogGateway as well as my dogDAO, right? Nope, you would have a single dogFactory to handle creation of dog objects. In its simplest form, the dogFactory would simply return a newly created dog instance. When inside your DAO, you would have CS inject the dogFactory. Here is an example read method for the dogDAO (assuming a getter/setter for the dogFactory and that it is injected): cffunction name=read access=public returntype=path.to.dog cfargument name=dogID required=true type=numeric / cfset var qRead = / cfset var dog = / cfquery name=qRead datasource=#dsn# SELECT id, breed, weight FROMdogTable WHERE dogID = cfqueryparam value=#arguments.dogID# cfsqltype=cf_sql_integer null=false / /cfquery !--- ACCESS FACTORY HERE --- cfset dog = getDogFactory().getDog().init() / cfif qRead.recordcount cfset dog.setID(qRead.id) / cfset dog.setBreed(qRead.breed) / cfset dog.setWeight(qRead.weight) / /cfif cfreturn dog / /cffunction Does that make things clearer? Rich Kroll ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:269635 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: ColdSpring - What's my DAO do?
Rich, I apologize for not making my question totally clear. What I am asking is if I you are suggesting injecting the dogFactory into both the dogDAO as well as the dogDG through CS. Yes, that is exactly what I was suggesting. Rich Kroll ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:269642 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: ColdSpring - What's my DAO do?
So - how do I create an object (or multiple) from within my DAO and DG without hard coding the path? After writing an almost complete example of how to set this up I realized that I missed the point of your question. You are referring to where you get a dog bean once inside your DAO / Gateway, and I first thought you were asking how to inject your DAO / Gateway into your service. So with that said, I think you are close in what you are thinking, but I would leverage ColdSpring to inject the factory into the DAO / Gateway. Your CS config would look something like: bean id=dogService class=path.to.service property name=dogDAO ref bean=dogDAO/ /property property name=dogGateway ref bean=dogGateway/ /property /bean bean id=dogDAO class=path.to.DAO property name=dogFactory ref bean=dogFactory/ /property /bean Then you only have one factory creating dog instances and it can be reused in both your DAO and Gateway. HTH, Rich Kroll ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:269562 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Uploading files to one server, propgating them to many. Was: Client variables? reliable enough?
My company currently has multiple load balanced web servers. Each time we deploy code, we have to manually FTP it to each server. We'd love to be able to upload (or SVN) code to one location and have an automated process to replicate the code to the other servers. We currently have a similar setup and are looking to use SVN to automate this portion of our process. We're currently looking to use a bat file to SVN Update / Checkout the code on the remote servers. We have an integration server where we currently checkout our repository to then copy the code to the remote servers. We are trying to do away with this method as we are using a large amount of bandwidth that is not really necessary. Using the SVN update / Checkout method, only the files that are needed will be transmitted to the production servers, or at least that is our thought. Is there something we're missing with this method? Rich Kroll ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268840 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Take a minute to Digg this story about the Smith Project
Of course it would be quite awhile before smith was anywhere near the quality of Macromedia's product. By taking the project open source, I think they would enable more rapid feature development. The quality I think would depend on who is running the project and how many quality contributions from the community that were received. I think this is a great bit of news for smaller shops that may not need all of the features that are currently available in the current CF release, cannot afford CF, or do not need the support options available to adobe customers. Rich Kroll ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268695 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: CFEclipse Setup Question
The F9/collapsing feature in HS allows for a larger viewable area and I use it all of the time. Instead of collapsing the file viewer, you can Ctrl-M to maximize the current view. Same objective, different path. Rich Kroll ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268604 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Daily procedures for using Subversion
You said that you thought of putting the entire web root under source control. Is the web root one project, or do you have multiple applications running under it? If it is one project then can create a repository where the trunk would be your entire web root. The repository structure would look like: |- Repository root |-trunk |-tags |-branches The problem with this approach is what happens if a new application needs to be put under source control? You end up with a very strange repo tree. I suggest creating your repository like: |-Repository root |-app1 |-trunk |-etc. |-app2 |-trunk |-etc. I would not worry too much about the revision numbers and how they increment with each committed change. They are there to enable you to isolate each atomic commit that took place. In terms of deployment and matching how you currently work, you could simple have your production server be a 'check-out' of the appropriate repository. You could also integrate ANT into your process and have build scripts automatically deploy your application. Also, how often do you commit a change to the repo? And last, how do you work when you need to get something out of the repo to work with? Do you download it to your local machine, or download to a test server? You can simply check-out a projects trunk into a local folder. When changes were needed, you would update your local environment (SVN Update), do the work needed, test, and then commit your changes. Suggested best practice is to create a tag or branch when you are ready to deploy, and simply deploy that tag/branch to your production servers. HTH, Rich Kroll ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268312 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: thread-saftey of application-instantiated components
There is the possibility for race conditions, so it depends what your component is doing. If your component has the following method: cffunction name=performMath cfargument name=num1 type=numeric required=true / cfargument name=num2 type=numeric required=true / cfset var result = (num1 * 2) + num2 / cfreturn result / /cffunction This method in an application scoped component is thread safe. There is no instance data that could change for each request. But this method is not thread safe: cffunction name=performMath cfset var result = (variables.num1 * 2) + variables.num2/ cfreturn result / /cffunction Thread safety becomes an issue when you are dealing with instance data within the component (the variables scope) that could change based on the actions of a different request. In cases like this you would need to lock the transaction just as you would any other shared scope variable. HTH, Rich Kroll ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268313 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: thread-saftey of application-instantiated components
Yes, the separate calls could get inconsistent data. This is what the CFLOCK tag is for. This is true only if the method is calling / using instance data. Rich Kroll ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268314 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cfif vs cfswitch
We had the same problem that Jochem's post related to. We changed all our cfswitch/cfcase statements that worked with strings inside loops to cfif/cfelseif statements and saw increased performance and stability. This was on a CF7 set of servers. We noticed that when the cfswitch was outside of a loop, the performance difference was virtually undetectable. HTH, Rich Kroll -Original Message- From: Doug Brown [mailto:[EMAIL PROTECTED] Sent: Monday, January 29, 2007 6:18 PM To: CF-Talk Subject: Re: cfif vs cfswitch Still waiting to hear if this was involved with CFMX7. I would really hate this sense all my apps use cfswitch for template switching. :-( Doug B. ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268039 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfif vs cfswitch
I agree with Jochem's suggestion of using cfswitch for numeric or perhaps single character searches. The problem as noted in the link Jochem provided is that when using cfswitch, CF under the hood attempts a toDouble(), which if it is numeric hums happily along. If you pass in any type of string (including single character searches), CF internally throws an error which it catches and then attempts to re-process the cfswitch as a string. When a cfswitch is put in a loop (including queries) and uses strings is when this problem becomes more apparent. On an application with moderate load this could be the cause of performance problems. If the weight of all decisions is equally probably, you could argue the useage of cfswitch. I disagree. Based on the way the CF calculates a cfswitch, if you are within a loop and using a string for your case elements, there is no question IMO but to refactor the code to use cfif / cfelseif. Jochem also has a very good answer to this solution. Why are you just taking my word for it? Exactly. Test it yourself. He found the solution for a finite and given solution set. Is it the exact culprit for your latency issues? That would be too general to assume. I am not saying this is a magic bullet solution to all performance problems, but am advocating that people understand what is happening behind the scenes when using cfswitch and to be careful of using it in this type of a case. If someone IS using cfswitch in this mannor, it is undoubtedly causing latency, it is just a matter or whether it is enough to be a problem. I have sincere issues myself putting CF logic into my queries. I let the DB handle this type of logic in the form of stored procedures, which will calculate my execution plan for me in advance. I completely agree when possible, but this issue also affects loops as well, not just query loops. Rich Kroll ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268131 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Delimited list problems - a bug?
Hey all, One of my team members just brought to me something strange that to me seems as if it's a bug. If you use multiple delimiters to create a list, and then use a single delimiter to fashion a sub-list, CF treats the sub-list as two elements. Here is an example: cfset myList = 'element 1||element2||element3' cfoutput Single list using || as delim brbr length = #listLen(myList, '||')# br !--- This will produce 3 as expected --- element1 = #listFirst(myList, '||')# br !--- 'element1' as expected --- element2 = #listGetAt(myList, 2, '||')# br!--- 'element2' as expected --- element3 = #listLast(myList, '||')# br !--- 'element3' as expected --- /cfoutput br br cfset myNewList = 'element 1||element2a|element2b||element3' !--- now add a sub-list using a single pipe char --- Sublist using | as delim in a list using || as delim cfoutput length = #listLen(myNewList, '||')# br !--- returns 4?? --- element1 = #listFirst(myNewList, '||')# br!--- 'element1' as expected --- element2 = #listGetAt(myNewList, 2, '||')# br !--- 'element2a' wth?!? This should return 'element2a|element2b' --- element3 = #listLast(myNewList, '||')# br !--- 'element3' as expected --- /cfoutput If I am explicitly telling CF that the delimiter is two pipes, why would it stop when finding only one? I tried this with other delimiters and found the same behavior. Am I crazy or does this appear to be a bug? Rich Kroll ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267725 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Delimited list problems - a bug?
But it is explained this way in the documentation. When you provide a list of delimiters it is not an AND list, it is an OR list. Thanks. I did not even consult the doc's on this, I made the assumption that multiple delimiters were treated in an AND fashion. I guess I now know what they mean by the saying Making assumptions... Thanks for the clarification guys. I can't say that I've ever run into a situation where I needed the OR operation, seems to me the AND operation is more natural. I don't suppose there is any way to accomplish what my coworker is going for? Rich Kroll ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267734 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Date Problem
That is what I want, nulls. If no date is selected, then I do not want anything there. I would suggest using the CFQUERYPARAM tag and using its NULL attribute. If not that then you will be forced to do a CFIF myDate eq ''NULLcfelse#myDate#/cfif Rich Kroll ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267497 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Date Problem
Based on the query you provided: UPDATE tblCouncilMember SET Fname = '#Arguments.Fname#', Lname = '#Arguments.Lname#', Address = '#Arguments.Address#', City = '#Arguments.City#', State = '#Arguments.State#', Zip = '#Arguments.Zip#', Phone = '#Arguments.Phone#', Email = '#Arguments.Email#', Status = '#Arguments.Status#', NC_ID = #Arguments.NC_ID#, IssuesOfConcern = '#Arguments.IssuesOfConcern#', DateElected = '#Arguments.DateElected#', DateAppointed = '#Arguments.AppointedDate#', ResignDate = '#Arguments.ResignDate#', TermLength = '#TermLength#' WHERE CouncilMemberID = #Arguments.CouncilMemberID# If for example you pass 'DateElected' but DateAppointed and ResignDate are not filled out the resulting query is passing an empty string to SQL, which as Teddy said will cause it to be stored as 1/1/1900. If you change all your date fields to one of the following it will solve your problem: 1. For example DateElected cfqueryparam cfsqltype=cf_sql_date value=#arguments.DateElected# null=#len(arguments.DateElected)# 2. cfif len(arguments.DateElected)#arguments.DateElected#cfelseNULL/cfif This will cause NULL to be passed to the database if the DateElected variable is an empty string. HTH, Rich Kroll ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267503 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Date Problem
Yeah, guess I am gonna have to use the CFIF option. SP's are not allowed on the DB2 server for the city. We are getting our own SQL Server and CF Server soon though, so I get to re-write the app using SP's. As I understand it, using the CFQUERYPARAM tag is on the ColdFusion side and simply creates a prepared statement that is sent to the database and does not involve the use of stored procedures. Rich Kroll ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267504 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Intro to e-commerce transactions
I'm currently working on my first e-commerce solution (don't ask me how that's even possible after this many years as a developer!). Much of the back end work I'm very comfortable with, but I've never worked with online payment processing. Can anyone suggest some resources to the payment portion for this type of solution? I'm aware of the mail-order aspect to processing orders (not billing until the product ships) and have built that functionality into the application. I'm more concerned with the actual communication and authorization of payments. Can anyone suggest a good credit card processing service or give me any advice on this? Thanks Rich Kroll ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267567 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Better way to send nulls to a Stored Proc?
null=#opposite[yesNoFormat(len(dateIn))]# I do something similar. I use: null=#NOT YesNoFormat(len(dateIn))# I've been looking for a cleaner way to accomplish this as well, but this works for the time being. Rich Kroll ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267238 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
String Math Parser
I am currently creating a wiki style parsing engine for the lack of a better description. To date I have all the HTML elements parsing that I need, but one of the requirements that I have is to allow the end user to input variables from our system (kind of a merge field) and allow them to perform math operations on them. I was hoping that someone might know of an existing CF math parsing engine / code that I might be able to get a foothold on how to accomplish this. Anyone know of an existing open source library? The current requirement is to allow for basic arithmetic but including nesting parenthesis for more complex equations. I have some ideas for the basic math, but when getting into nesting equations is where I get a little fuzzy. This is what I am trying to achieve in wiki markup: [b]Welcome[/b] [p] Product Commission is [math]({product_price}-{product_credits})*{commission_rate}[/math] [/p] Using my existing code I can get it to generate the correct [math] like: (10-500)*.15 I thought of simply tossing an eval() around this, but it seems like a major hack and does not allow for more complex equations that might come up later. Anyone have any ideas? Rich Kroll Senior Technical Lead SITE Manageware, Inc. 2841 West Cypress Creek Road Fort Lauderdale, Florida 33309 954-944-9020 EXT. 716 954-272-8916 Fax This communication is intended for use only by the individual(s) to whom it is specifically addressed and should not be read by, or delivered to, any other person. Such communication may contain privileged or confidential information. If you have received this message in error, please notify us immediately by returning the communication to the sender, or by sending it to [EMAIL PROTECTED] ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266715 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CF on Apache
Just one little problem. Apache 2.2.4 doesn't have an 'apache.exe' file in it's bin folder. Any ideas? All help is appreciated. When we moved to SVN I set up all our developers with CF7 / Apache 2. I found that if my configuration file had any problems in it that apache would fail to start, which sounds like what you are running into so I would look to the httpd.conf file and ensure that all the settings are set correctly. When I did this the first time, I configured the server with all the settings I needed without the CF settings (using settings copied from httpd.default.conf). Once I had the web server configured I copied in the CF specific settings and tweaked them until I got everything working. The great thing about this setup is that once configured you can simply copy the httpd.conf file to all developers workstations and they immediately work. HTH Rich Kroll ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266606 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: [RE-POST] IE6 CSS butting heads
They recommended the articles from A List Apart www.alistapart.com. I'll second A List Apart, they have some great resources. They have a ASP / ASP.Net focus but their CSS work is great. Rich Kroll Senior Technical Lead SITE Manageware, Inc. 2841 West Cypress Creek Road Fort Lauderdale, Florida 33309 954-944-9020 EXT. 716 954-272-8916 Fax ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266634 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: SQL Server Error 8179: Could not find prepared statement with handle x
George, We ran into the same problem a few months ago. What we found was the error was thrown on random queries that had CFQUERYPARAMs in them (which was almost every query in our application). Somewhere on the net I found an article explaining that it had something to do with the drivers. We switched our drivers to the jTDS JTDS drivers for MS SQL 2k and the problem went away. HTH Rich Kroll -Original Message- From: George Abraham [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 09, 2007 8:38 AM To: CF-Talk Subject: SQL Server Error 8179: Could not find prepared statement with handle x Hi all, One of our CFMX 7 applications (which was working fine before) suddenly started throwing this error - SQL Server Error 8179: Could not find prepared statement with handle x. The funny part is, it throws the error at pretty much any point in the application without any apparent reason in the sequence of code. If I comment out that code, then the some other query code will malfunction the same way with a different value for x. I looked around for solutions, but could not get any usable ones. One thing that worked for us is to increase the maximum number of pooled statements by 1 in the datasource and then the problem went away. However it would be nice to know why the heck it happened in the first place. Thanks, George ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266039 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: SQL Server Error 8179: Could not find prepared statement with handle x
The drivers we used are located at http://jtds.sourceforge.net/ Rich Kroll -Original Message- From: George Abraham [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 09, 2007 10:02 AM To: CF-Talk Subject: Re: SQL Server Error 8179: Could not find prepared statement with handle x Hmm, we did have other problems with the current drivers we are using that was shipped with the product by (then) Macromedia. Mayve we can look at this driver you mention. Thanks, George ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266046 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Werid cfqueryparam error...
Have you tried using the NULL attribute of CFQUERYPARAM? I've done something like NULL=#NOT YesNoFormat(LEN(ARGUMENTS.prodconsignmentprice))# to handle this type of thing. Rich Kroll -Original Message- From: Will Tomlinson [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 09, 2007 8:28 AM To: CF-Talk Subject: Werid cfqueryparam error... I've seen this before but just worked around it with a cfif in the SQL. SQL Server, smallmoney data type for this field. Here's the SQL: prodconsignmentprice = cfqueryparam cfsqltype=cf_sql_money value=#ARGUMENTS.prodconsignmentprice# If you submit a blank value, you get this error: Invalid data for CFSQLTYPE CF_SQL_DOUBLE. Umm ok... I'm not using any cfqueryparams with double. Just money. It works fine, unless you submit an empty value. I usually just wrap it with a cfif. Am I doing somethin wrong though? Thanks, Will ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266047 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Getting changed fields from database using an audit table
In a SQL query without the dynamic column list, is this what you are trying to achieve? SELECT u.id FROMusers u INNER JOIN users_updated up ON u.id = up.id AND up.lastupdated = cfqueryparam cfsqltype=cf_sql_date value=#since# WHERE u.id IN ( SELECT id FROMUSER_UPDATE up1 WHERE u.cola up1.cola OR u.colb up1.colb OR u.colc up1.colc OR etc etc ) Rich Kroll ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266066 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CF and OOP - Controller
Matt, Glad I could help. Good luck on your project and the OO adventure! Rich Kroll ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266091 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Getting changed fields from database using an audit table
Doug, After seeing your intended output the query will need to change a bit, but I think I understand what you are after. Could you do something like this: (beware this SQL psudeo-code it's untested) declare @User_modify table( UserID int, FieldName nvarchar(50), NewValue nvarchar(50) ) declare @col sysname declare colList cursor local fast_forward for select COLUMN_NAME fromINFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'USER_UPDATED' open colList -- loop over the column list @col will hold the current column fetch next from colList into @col while (@@fetch_status = 0) begin -- insert matching records into the temp table insert into @User_Modify(UserId, FieldName, newValue) SELECT userid, @col, cast(@col as sysname) as newValue FROM users where @col cfqueryparam type=cf_sql_date value=#since# fetch next from colList into @col end close colList deallocate colList select * from @user_modify This way you could offload a lot of the processing onto the SQL server. HTH, Rich Kroll -Original Message- From: Doug Bezona [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 09, 2007 1:59 PM To: CF-Talk Subject: RE: Getting changed fields from database using an audit table Thanks Unfortunately, simply having the two tables joined doesn't help. The issue isn't getting the correct data, it's simply that to get the output I need, I have to loop over each column in each record to see which column has been updated in a given time period, and output the info about that column. USERS has a single lastupdated column, just so we know when it was updated. USER_UPDATED has most of the same columns as USERS, but each column just holds a date stamp of the last time the corresponding field was updated in USERS The data looks something like this: USERS: UserIDFirstnameLastname ------ 1 John Doe 2 Jane Smith USER_UPDATE: UserIDFirstnameLastname ---- --- 1 07/08/2005 10/31/2006 2 05/10/20067/15/2006 The output I am looking for is this, given an input date of 01/01/2006: UserID FieldNameValue --- --- --- 1 Lastname Doe 2 Firstname Jane 2 Lastname Smith The code produces the exact output I need, so the basic logic is fine (if not as fast as I need it to be). The queries run in a few milliseconds, so they aren't the bottleneck. It's the looping through each column in each record of the resultset to check the updated date of each field when it's 12000 records x 89 columns that's the bottleneck. ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266098 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: SOT. Formatting Excel
So, is there any way to specify no text wrap in this code: You can manipulate this with CSS. Here is the procedure I followed with good results: 1. Export the existing document to Excel. 2. Modify the columns to display how I want them. 3. Export to HTML from Excel. 4. View source and copy / paste the CSS into my template. 5. Update my table / rows with the CSS from the exported Excel HTML Now when the template is exported, Excel uses the CSS to properly format the cells. HTH Rich Kroll ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265618 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Modifying an existing PDF
Is it possible, using the built in features of CF, to modify and add information on top of an existing pdf file? What do you mean by modify and add information? Are you referring to filling in PDF Forms? Adding additional pages to the end of an existing page? Modifying existing text inside an existing PDF? The reason I ask is that I've done some work in this area. We had a requirement to populate pre-existing PDF's with dynamic data, and a later requirement to dynamically add additional pages to the end of these pre-configured PDF documents and insert user defined text. The solution I found (which can be tricky depending on your java knowledge) was to use the iText Java library. An older version of iText ships with CF and is what powers CFDocument from what I understand. Using the iText library you can get to virtually every part of a PDF, but some are a lot harder to manipulate than others. The link to the home of iText is http://www.lowagie.com/iText/ Depending what you are trying to do I might be able to provide some code samples of how to manipulate PDFs within CF. HTH Rich Kroll ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265655 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Modifying an existing PDF
Thanks Rich. We actually have a certificate that will be put into a pdf. We will then place the customer's name and other information on that pdf when needed. In that case what you are looking for should be pretty easy to achieve. If you have access to add a JAR file to your server you can use the Adobe XPAA.jar library at http://www.adobe.com/devnet/coldfusion/articles/pdfform.html to solve the problem (the JAR and code samples are there). If you can't add a JAR file let me know and I can provide some sample code using the built in iText library. Rich Kroll ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265660 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Issue with not of type numeric when sending value to CFC
Can you post the code that you have in your test CFC as well? Rich Kroll What's happening is that if I take a recordset row, and build a structure based on it's columns, and then pass that structure as an ArgumentCollection to a CFC, the method tosses a not of type numeric on a value that is indeed numeric. Has anyone else seen a problem like this? The only way around it has been to set the type to any and then just accept any old crap that someone wants to pass in. Thanks, -- Daniel Short Web Application Architect lynda.com, Inc. ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265708 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CF and OOP - Controller
Firstly, I applaud your work in attempting to truly understand how OO works and how to apply it to CF. I just wanted to chime in and give you a few things to think about when you are trying to understand / build an MVC app. I looked at the problem of building an MVC application and looked to Mach-ii, MG, and Fusebox as possible options. When I attempted to build my own MVC architecture one of the hurdles that I encountered was how the controller knew what it was supposed to do. I knew that it was to act as the 'traffic cop', but was really confused as to how IT knew what was currently happening. In my research I dug through the code of every MVC framework that I could find. The one thing that I saw repeated for all web based MVC patterns was that the framework acted as the controller. When you look at the existing OO frameworks, many of them use an XML config file to help 'wire' everything together and use an 'event' driven methodology to define when things happen. You define your model and tell the controller how each event affects the model and which views are used for display. The framework manages transforming all url and form variables into its internally used object (in Mach-ii this is the event object) to ensure your model / view do not need to know anything about scopes. In your original example of a user logging in, your userObject would be the model and accept arguments of username / password. Your view would have a form element that had inputs for both the username and password and when submitted would cause the controller to be invoked (usually event driven, eg. index.cfm?event=loginUser). This is where XML config files usually come in. Generally, you need to map an action to model components as well as what views to generate once the operation is complete. This all becomes significantly more complex when you begin to think about different logic paths that might need to be followed depending on the current request. For example in your scenario, what happens when the user login fails? What about if it succeeds? What if you want to add logging into the process? You could have the model generate new 'events' or have your components simply return success / failure response which your controller could then consume and dispatch other events. When I began looking at the previously mentioned frameworks as a controller to my application, I began to look more closely at the model portion of application. I highly suggest looking at the problem in slices when trying to 'get' OO. Once I focused my attention on modeling real world things in my application and focused less on the 'traffic cop' it made it much easier for me to see how each object should be constructed as well as relate to other objects in the system. This perceptual shift was a kind of spring board to me truly getting OO. Once I began designing components like this, I began to *see* the benefits of architectural patterns like DAO, Factory, etc. Once I saw the benefits of these patterns, I looked back at the frameworks and examined the controller layer and saw them applied there as well. That was when I could actually see *why* they had used them and what problems they solved. Good luck and I hope you enjoy the journey! HTH Rich Kroll ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265485 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfqueryparam DECREASES performance?
The SQL output by a query using cfqueryparam is a prepared statement. He was suggesting that you compare the execution plan using cfqueryparam vs. not using it to see what the difference is. Maybe I'm looking in the wrong place then. I know I can use MSSQL's SQL Management Studio to place in a SQL query and run it to view the execution plan. How can you run the queries in CF and see the execution plan from MSSQL? Rich Kroll ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265304 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Simple source control
Claude, I recently went through exactly what you are dealing with now. Our development environment began with all developers working against the exact same code base, where developers would overwrite each others changes as well as break code during the development process that would affect other people. Don't even get me started on the problems we ran into when deploying to production servers. Our first step into source control was to use Microsoft VSS which used the lock model. This worked ok for a short time but once our development team grew, having people constantly forced to wait for files to be unlocked became unbearable and began to kill our productivity. We recently (about 8 months ago) converted to SVN where each developer has a local copy of the code, makes their changes and then commits those changes to the main code. With a team of 20 developers constantly working with the same files, conflicts happen VERY rarely, and when they do it is 99% of the time a miscommunication as to what should be changed in that part of the code. Most of the time when code is committed, SVN merges in changes from other developers transparently. This idea at first sounds scary, but in practice it has been a TREMENDOUS advantage in terms of productivity, communication, and stability of our code. The ability to look back in time at our code has been invaluable in countless ways. If a bug was introduced, we can simply merge that change out of the code while we fix it. It truly is an unbelievable tool. The only downside that we've experienced is that the computers we use to work on have to be a little more beefy to be able to run local copies of our applications (CF, SQL, TSVN, Eclipse, etc.). IMO the merging solution implies more overhead and clumsiness than no solution at all. Hopefully I have communicated how this is truly not the case in a real world scenario (or at least in ours). If you have the chance, save yourself the growing pains of moving to a lock model, then outgrowing it and moving to SVN. If you are going to have your development team learn a new methodology for how they deal with source, have them learn how to effectively use SVN. In the end, we went from a development team of 5 using no source control to MS VSS, to over 20 developers using SVN. I can attest to the struggles of converting to source control, as well as not moving to SVN first. I hope that my experiences will help you in your efforts. HTH, Rich Kroll ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265196 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Simple source control
Yes. But why would would you want to automatically download code from there? To make sure that a programmer will get the last version before he starts working on a file. At least, this should be checked by the system when a user request a lock on a file. Making sure that you are working on the latest version of a file is not automatic, but does not hurt anything if it is not the latest either. When the developer attempts to commit their changes, SVN will simply notify them that their code is out of date and force them to update their local copy prior to committing. When they update, any conflicts will be caught, merged / fixed, and they are then free to commit the changes. I think this is beginning to become a relentless circle of you challenging source control systems and people that use them offering up solutions to the challenges you propose. In any event, you have heard from every response that a SCM tool will solve the problems you are facing as well as many problems you have YET to face. Each SCM tool that has been proposed (CVS, SVN, VSS), now it is just a matter of deciding which will best suit your needs. I've personally given you advice based on experience walking the road that you seem to be currently on. You can take it or discard it, but the answers from this list are going to stay the same: You need a source control tool. And the 3 that are most widely used are: SVN - Based on CVS and addresses some of its shortcomings CVS - Tried and true with some small limitations. VSS - M$'s SCM and IMO a pain to work with. HTH Rich Kroll ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265245 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cfqueryparam DECREASES performance?
You might want to take a look at your query execution plan, and see what's different when using a prepared statement. I know how to see the query execution plan on MSSQL, but how do you see it compared to a prepared statement? Rich Kroll ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265246 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Certification
We've used Brainbench with some success. We have applicants take the tests on premise, so we proctor them ourselves. Rich Kroll Brainbench certifications are unproctored, so you can't even tell if the applicant actually took it, can you? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264336 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Certification
Some companies actually have the applicant take the brainbench exam as part of the interviewing process. In that case it is proctored, and if controlled properly, might give a decent indication of the candidate's skill set. That's exactly how we perform and use the tests. Rich Kroll ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264337 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cffunction with a loop inside - need some advice
I was not sure if you needed to invoke this as a web service or simply an object, so I wrote up each. This makes one call for each 'class' that needs to be created. If you wanted to reduce hits on your database, I would refactor this to take an array of structures of 'classes' as an argument and then loop over the array and do the inserts from that. !--- OBJECT CALL --- cfset myObj = createObject('component', 'path.to.obj') / cfloop from=1 to=#form.totalPERSONS# index=idx cfset myObj.createEnrollment(evaluate('form.enrID#idx#'), evaluate('form.part_class#idx#')) / /cfloop !--- WEBSERVICE CALL --- cfloop from=1 to=#form.totalPERSONS# index=idx cfinvoke webservice=myWEBSERVICE method=createEnrollment returnvariable=newID cfinvokeargument name=ernID value=#evaluate('form.enrID#idx#')# / cfinvokeargument name=class value=#evaluate('form.part_class#idx#')# / /cfinvoke /cfloop !--- FUNCTION --- cffunction name=createEnrollment access=remote returntype=numeric cfargument name=ernID required=true type=numeric cfargument name=class required=true type=string cfset var qWrite = / cfquery name=qWrite datasource=yourdsn INSERT INTO participants ( enrID, part_class ) VALUES ( cfqueryparam cfsqltype=cf_sql_integer value=#arguments.ernID#, cfqueryparam cfsqltype=cf_sql_varchar value=#arguments.class# ) /cfquery cfreturn qWrite.newID /cffunction HTH, Rich Kroll -Original Message- From: Les Mizzell [mailto:[EMAIL PROTECTED] Sent: Thursday, December 14, 2006 9:36 PM To: CF-Talk Subject: cffunction with a loop inside - need some advice OK - before I tried turning this particular problem into a service, I had a simple query like this, which works (examples simplified for clarity, whatever that is!): cfloop from=1 to=#form.totalPERSONS# index=idx cfquery name=WRITE_ENROLL INSERT INTO participants ( enrID, part_class ) VALUES ( #evaluate(form.enrID#idx#)#, '#evaluate(form.part_class#idx#)#' ) /cfquery /cfloop The function to handle this once converted is failing with 'Can't generate stubblan, blah so I've got a syntax problem or just simply don't know what I'm doing trying to translate the above. Here's what I've got: To invoke the beast: cfinvoke webservice=myWEBSERVICE method=ENROLLMENTS WStotalPERSONS=#form.totalPERSONS# cfloop from=1 to=#form.totalPERSONS# index=idx WSenrID#idx#=#evaluate(form.enrID#idx#)# WSpart_class#idx#=#evaluate(form.part_class#idx#)# /cfloop And here's the function: cffunction name=ENROLLMENT_TWO access=remote returntype=query cfargument name=WStotalPERSONS type=numeric / cfloop from=1 to=#arguments.WStotalPERSONS# index=idx cfargument name=WSenrID#idx# type=string / cfargument name=WSpart_class#idx# type=string / /cfloop cfloop from=1 to=#WStotalPERSONS# index=idx cfquery name=WRITE_ENROLL INSERT INTO participants ( enrID, part_class ) VALUES ( WSenrID#idx#, 'WSpart_class#idx#)#' ) /cfquery /cfloop I probably need to rethink the way this particular function has to work, but I desperately need some pointers please! Thanks, Les ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264107 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CFC Assistance
You might want to try something like this: cfcomponent cfset variables.ncid = 0 !--- called when CFC is created --- cffunction name=checkNCID access=public output=false cfargument name=NCID required=no default=#variables.ncid# cfset var id = 0 /!--- var the ID so it is local to this method --- cfif arguments.NCID NEQ 0 AND len(argument.NCID) cfset id = arguments.NCID / /cfif cfreturn ID / /cffunction /cfcomponent Calling Page: cfinvoke component=NCSelected method=checkNCID returnvariable=id cfinvokeargument name=NCID value=#ncid# / /cfinvoke HTH, Rich Kroll ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:263121 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Determine database field type
The first step would be to find out what type of field I am working with. I am don't know how to do that. You can use the information_schema if you are using MSSQL to determine the data type of the column. Then I'll have to figure out how to make it a date field for excel. You can create a new spreadsheet and format each column with a different data type, then save as HTML. Once you do this you will have the CSS markup and can make your own custom classes. Then when you export to excel, simply assign those classes in your generated HTML. HTH Rich Kroll ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:263137 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cfinput validate=SubmitOnce
One way this can be solved is use a synchronized token to manage the submittal (Synchronizer Token, Core J2EE Patterns). The way this works is you create a unique token, for example a UUID and store this in the user's session. When the user reaches your form you store the token in a hidden input field. On the processing page you check if the tokens match and if so begin validating the data. If any data validation fails return them to the form to correct the problem. If the data validation passes, create a new token for the user and overwrite the one in the session. If the user presses the back button and resubmits, the tokens do not match and you can alert the users of the problem. HTH, Rich Kroll This communication is intended for use only by the individual(s) to whom it is specifically addressed and should not be read by, or delivered to, any other person. Such communication may contain privileged or confidential information. If you have received this message in error, please notify us immediately by returning the communication to the sender, or by sending it to [EMAIL PROTECTED] -Original Message- From: Doug Brown [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 28, 2006 8:16 AM To: CF-Talk Subject: Re: cfinput validate=SubmitOnce Well, I think I have gone and described the problem wrong. It is not the fact that the user can click the submit button twice, as much as that they can click back and submit again. If I expire the page after the form submittal, it poses another problem with server side validation. If they are directed to click back to fix the form items that were required they get a page has expired. What is the solution to this? Doug ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261849 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: OT: Multiple Select Boxes (JS)
I'd be interested as well if you could put it up. Rich Kroll -Original Message- From: Wayne Putterill [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 08, 2006 5:27 AM To: CF-Talk Subject: Re: OT: Multiple Select Boxes (JS) Sent, I'd put it up somewhere but I can't from work and I'm off to cfdevcon this afternoon so won't have a chance - if anybody else does want it I will put it somewhere for download this weekend. On 08/11/06, mac jordan [EMAIL PROTECTED] wrote: On 11/8/06, Wayne Putterill [EMAIL PROTECTED] wrote: I've just sent you a custom tag documentation off list, hope it's useful. ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259608 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Java ListIterator to CF Variable
..nextIndex() the index of the element that would be returned by a subsequent call to next, or list size if list iterator is at end of list it's not technically a length() or size() call, but you can get the same functionality from it :P Rich Kroll -Original Message- From: Dan Plesse [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 01, 2006 8:46 PM To: CF-Talk Subject: Re: Java ListIterator to CF Variable Please reread the method summary :) only 9 methods to speak of :) ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:258802 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Framework choices
I was specifically wondering if ANY of the frameworks support code re-use in the form that I mentioned in the orginal post. i.e. can I write the model and views for one system and keep them in one location accessile to several applications that mayuse parts or all of it's functionality. IMO it's always a good idea to keep your model separated from the framework you choose to use. I use Mach-II for most of my development (so I am a bit biased). When designing an application, I create my model completely detached from the framework. Once the model is built I then create the event listeners that draw upon my model. This allows me to use the model in different applications if necessary, as well as it keeps my model framework agnostic. In mach-ii you can create layered views, which will allow you to create component-like views. This allows me to reuse certain view portions around the application. This depends heavily on how you design your views. Also not mentioned in my original post but occurring to me here is that the site is largely dynamic in that the same code needs to serve different content for different sites that use the same backend. All the dynamic information for the content are retreived from a database through stored procedures. So these procedures would need to be executed on all pages with dirreent arguments. Is each 'site' all part of one application? It seems as though you could have the listener determine which arguments to pass to your stored procedure depending on parameters passed in an event object. All the points mentioned above seem impossible to implement in Model-Glue (without destroying the performance of the site). IF this is not the case can someone set me straight? Otherwise could someone recommend another framework. Or better yet give me the difinitive that I need to be rolling my own. I've only worked with MG to a small degree, but from my experiments many of the core concepts are the same between MG and MII so most (if not all) of what you are attempting should be possible. HTH, Rich Kroll ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257918 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Locales
Do you know any useful links on the java epoch offsets? Rich Kroll -Original Message- From: Paul Hastings [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 11, 2006 12:47 AM To: CF-Talk Subject: Re: Locales Mark Flewellen wrote: but you'd be better off ditching the localized strings stick w/the cf datetime object or even better java epoch offsets (as you're going to eventually get bit by cf's all datetimes are server datetimes timezone issue).. ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:256265 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
OT: JS i18n
Does anyone know of a JavaScript library that handles localized dates / currency? We're having problems with i18n and our users passing localized currency and date strings into JS and it's returning very strange results as it does not know how to parse the string. Any help would be greatly appreciated! Rich ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:256187 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Bad use of DAOs and Gateways?
if all your objects are in the session Noo, never do this. Eats up memory fast, JRUN will crash. I had a CF 7.0.1 site that got thousends of page views/day doing this, and it was fine. We were using Weblogic though, which is a tad more industrial than JRrun, IMVHO. This is something I was concerned about recently. I'm going to be creating a new application, and am working to make it a truly OO app. With all the different objects that need to be created, as well as composited within one another, how this affected performance. Once there were 4-5 objects composited within an object, the instantiation time of the object became really slow. My thought was to use a resource pool within application memory to manage this problem. Has anyone else run into this type of problem? Rich Kroll ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255792 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
JVM Server Memory
Hello all, I remember a post not too long ago talking about the JVM and it's max size on a windows 32bit server having a celing of 1.3gb. We've got a server that has 3gb of ram, and about 1.8gb of that is going unused even under peak load. One of my colleagues decided to up the -XmxNx value of the JVM to 2gb to attempt to allocate more memory and increase performance. This caused CF to fail on startup, and once the setting was lowered, CF started fine again. As is understand it there are three major settings to tweak in the JVM (where N is the memory size) and please forgive me as I'm new to JVM configuration: -XmsNm - minimum GC size -XmxNm - maximum GC size -XX:MaxPermSize=Nm - the maximum permanent size For our application we have quite a large number of objects stored in the application scope and would like to increase the amount of ram allocated to jrun / JVM. Am I correct in that increasing the MaxPermSize from its default of 128m to a larger amount (say 512m) will increase the available memory of the JVM for objects being stored for a much longer period of time (like those in application scope)? Our current settings for our JVM are: -Xms512m -Xmx1024m -XX:MaxPermSize=128m We are not getting a ton of GC that is degrading performance, but we seem to be having the system slow down dramatically when JRun / JVM hits the 1gb mark. So our thought was to raise the amount of memory in the JVM available to JRun. Am I right in my understanding of the differences in the settings? Rich Kroll ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:254604 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Currency Codes and Locale
I've run into a situation where I need to separate Locale from the currency used in our application. I found a few listings that use currency codes (ex. USD for US Dollar, GBP for UK Pounds, etc.). Is there a CF Function or perhaps Java library that I can use to get these codes and tie them to their Locale? I'm looking to default the currency of a given Locale in our application, and then give the user the ability to choose the currency they wish to use, and then find a way to get the Locale of that currency so that LSCurrencyFormat() and LSNumberFormat() work as expected. Has anyone else run into this situation? Rich Kroll ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:254239 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Currency Codes and Locale
http://www.sustainablegis.com/projects/i18n/currencyTB.cfm Thanks paul, that's exactly what I was looking for! I'm amazed when I see things like this, where we have many of the built in tools in CF, but are missing what to me seems like very necessary tools and must delve into Java to have access to functions that could and should be wrapped into CF functions. How hard would it be to have a CF function getCurrencySymbol()? CF already knows the locale, so they would simply have to call the underlying Java to return it. Frustration! Again, thanks for pointing me in exactly the right direction. Rich Kroll ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:254303 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CFLdap
Speaking of LDAP, I'm new to this and trying to integrate a few different applications we've got in house to use a central user repository that we can base security upon groups from AD. Is there a reference somewhere on how to do this, and perhaps a reference on the attributes you guys are talking about? I'm not sure where to look to find things like memberOf=domain admin type things. Rich Kroll -Original Message- From: Dawson, Michael [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 11:24 PM To: CF-Talk Subject: RE: CFLdap Ian, I tried the following filter and it returned results similar to what you were wanting: ((objectCategory=person)(!(memberOf=CN=grp Vpn,OU=Groups,DC=evansville,DC=edu))) You need to specify the entire DN of the group that you want to exclude from the results. In this example, the DN is: CN=grp Vpn,OU=Groups,DC=evansville,DC=edu I didn't know if you had already solved this, but I had to try it myself and satisfy my own curiosity. ;-) M!ke ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:253278 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfquery sql= ...
This is for multi configuration, for a single instance configuration, you can find it in \wwwroot\WEB-INF\cftags\META-INF\taglib.cftld Rich Kroll -Original Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 13, 2006 5:16 PM To: CF-Talk Subject: RE: cfquery sql= ... Where would that be? I don't see it in my local copy (CFMX). Is that an MX 7 path? ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:253149 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
I18N and money
We have just picked up our first international clients and are beginning down the road of I18N. Initially we were planning to just support locale specific dates and money, which we would store in US dollars and in a US date format within our database. We offer a software solution that is a sales management tool, so we have inventory, deposits, etc. I just got a request to look into how the following scenario would work: Client's locale is say en_GB (UK), but they have remote sales people in say Germany. When the remote sales staff use the system, it displays everything in pounds as their project is configured to use en_GB. 1. Would the salesperson be forced to input the customers order in pounds even know the local currency for that region is euro's? 2. Should we build in a currency converter to the application? 3. Instead of just lsnumberformat() and lseurocurrencyformat(), should we be converting the amounts to local currency prior to display, and back again when we need to get user input? I have a feeling this is something that a lot of people have tackled before and any pointers in the right direction would be extremely helpful. Rich Kroll Senior Technical Lead SITE Manageware, Inc. ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252591 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Locale problems
Hey all, I'm currently working with resource bundles, and I've run into a problem with the implementation and am hoping that someone here can give me some insight. I've got a resourceBundle CFC set up that uses the Java ICU4J library to manage my RBs. My problem comes up when I'm using getLocale() to return the current locale. The CF docs state The current locale value, as an English string. If a locale has a Java name and a name that ColdFusion MX used prior to the ColdFusion MX 7 release (for example, en_US and English (US)), ColdFusion MX returns the ColdFusion name (for example, English (US)). The ICU4J library expects java locales, and when CF returns a string instead of the java locale, my app defaults back to English as it does not know how to parse the string equivalent. Is there a way to force CF7 to return the java locale, or perhaps another way to deal with this problem? Thanks, Rich Kroll ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251497 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Locale problems
why use icu4j for this? especially if you're *just* using core java locales rather than ULocale? if you want *all* the CLDR locales you need to use icu4j's ULocale. I was going to use the ICU4J libraries as they included extra features for calendars, etc. which I thought could come in handy down the road. In my CFC I was actually using com.ibm.icu.util.ULocale. well for one thing, getLocale() returns the *server* locale as a cf locale, i imagine you'd want the user's locale? how are you determining or handling the user locale? I was under the impression that getLocale() and setLocale() worked on the current request. I was using setLocale(myQuery.userLocale) to set the current request to the users locale and then within my CFC manage working with that locale to get the correct RB file. When working with what I have set up now, I have a few lines in my application.cfc that uses setLocale(userLocale) to set their requests to the correct locale. But in certain cases where I've got say us_GB stored for the user, CF will return English(UK) which forces my CFC to fail to render things correctly. Is there another way I should handle this? Rich Kroll -Original Message- From: Paul Hastings [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 30, 2006 1:15 PM To: CF-Talk Subject: Re: Locale problems Richard Kroll wrote: insight. I've got a resourceBundle CFC set up that uses the Java ICU4J library to manage my RBs. My problem comes up when I'm using why use icu4j for this? especially if you're *just* using core java locales rather than ULocale? if you want *all* the CLDR locales you need to use icu4j's ULocale. ColdFusion name (for example, English (US)). The ICU4J library expects java locales, and when CF returns a string instead of the java locale, well for one thing, getLocale() returns the *server* locale as a cf locale, i imagine you'd want the user's locale? how are you determining or handling the user locale? string equivalent. Is there a way to force CF7 to return the java locale, or perhaps another way to deal with this problem? no, cf locale isn't quite a java locale but for your purposes all you need is core java locale ID (or icu4j ULocale) you can build the locale object in one line of code. ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251518 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Coldfusion and Java
This is a shot in the dark, but I know I've had problems with I did not cast things for java. Did you try JavaCast() on your passed arguments? Rich Kroll -Original Message- From: Mullai Subbiah [mailto:[EMAIL PROTECTED] Sent: Monday, August 28, 2006 2:56 PM To: CF-Talk Subject: Coldfusion and Java I am trying to call a user-defined Java method. I am using CFMX7 and Java 1.4.2 One of the method within the class when called gets executed by Coldfusion. But another method does not seem to be seen by coldfusion. Every time I try to call the method I get a method not found error. The classpath is fine, the method exists (can call this method when stand alone), I have recompiled and restarted the Coldfusion server hoping that might help but no success. I get a similar error when I try to call the calendar set method. This is the error I get. Called from E:\wwwroot\coeweb\apdr\index.cfm: line 57 34 : cfset daysrange = -30 35 : 36 : cfset searchResultList = searchUltra_.searchCollectionWithDate(#searchString#, simap, #curtime#, #daysrange#) 37 : 38 : cfset resultquery = QueryNew(Score, Title, Description, Url, news_id, published_date, Please try the following: Check the ColdFusion documentation to verify that you are using the correct syntax. Search the Knowledge Base to find a solution to your problem. Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1) Remote Address 12.36.96.235 Referrer http://website/apdr/index.cfm?action=search Date/Time 28-Aug-06 08:53 AM Stack Trace (click to expand) at cfsearchresultfunction2ecfc1423953097$funcGETULTRASEEKRESULTSDATECONSTRA INT.runFunction(E:\wwwroot\coeweb\apdr\user\searchresultfunction.cfc:36) at cfsearch_result2ecfm617320438.runPage(E:\wwwroot\coeweb\apdr\user\search _result.cfm:65) at cfindex2ecfm9115575.runPage(E:\wwwroot\coeweb\apdr\index.cfm:57) coldfusion.runtime.java.MethodSelectionException: The selected method searchCollectionWithDate was not found. at coldfusion.runtime.java.ObjectHandler.findMethodUsingCFMLRules(ObjectHan dler.java:176) at coldfusion.runtime.java.JavaProxy.invoke(JavaProxy.java:84) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:1627) at cfsearchresultfunction2ecfc1423953097$funcGETULTRASEEKRESULTSDATECONSTRA INT.runFunction(E:\wwwroot\coeweb\apdr\user\searchresultfunction.cfc:36) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:348) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:294) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.j ava:258) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java: 56) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:211) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:370) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:196) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:156) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:1587) at coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:345) at cfsearch_result2ecfm617320438.runPage(E:\wwwroot\coeweb\apdr\user\search _result.cfm:65) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:343) at coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.java:1908) at cfindex2ecfm9115575.runPage(E:\wwwroot\coeweb\apdr\index.cfm:57) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:343) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:210) at coldfusion.filter.PathFilter.invoke(PathFilter.java:86) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:50) at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:52) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersist enceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.CfmServlet.service(CfmServlet.java:105) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at
RE: OT: SVN, Ant, CruiseControl, and deployment
Thanks for the feedback. I'm going to start next week working with a few spare servers we have at the moment. I'm going to try to get the process set up across them to replicate our environment and see what I can come up with. I'll provide some feedback once I get everything set up. Rich Kroll ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251301 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Database design question
The one table design that Michael is describing will hold all your categories and sub-categories, as well as any further nesting that you might need. For example: Cat_id, category_name, parent_id 1, category 1, NULL 2, category 2, NULL 25, sub-category 1, 1 26, sub-category 2, 1 49, sub-category 49,2 200,sub-sub category 1, 2 Etc. This single table design lets you nest sub-categories as deep as you need to go. As someone previously stated, the major drawback to this design is that you can only have one parent for each item. If you need an item to have more than one parent, you would have to develop a two table design. Hope that clears things up a bit. Rich Kroll -Original Message- From: Doug Brown [mailto:[EMAIL PROTECTED] Sent: Monday, August 21, 2006 3:26 PM To: CF-Talk Subject: Re: Database design question Thanks michael, but if I do it that way, will I not have hundreds of tables? I currently have about 24 categories and each category has prob 10-50 sub_categories and then each sub_category has it's own set of sub_categories. - Original Message - From: Michael E. Carluen [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Monday, August 21, 2006 12:53 PM Subject: RE: Database design question Doug, yYou can actually use a single table for that. One way is to create a field that serves as a parent_id. Example: ID: 1, NAME: Antiques and Vintages, PARENT_ID: 0 ID: 2, NAME: Antique Furniture, PARENT_ID: 1 ID: 3, NAME: Vintage Cars, PARENT_ID: 1 ID: 4, NAME: Hutches, PARENT_ID: 2 ID: 5, NAME: DeSoto, PARENT_ID: 3 Hope that makes sense, Doug. Michael -Original Message- From: Doug Brown [mailto:[EMAIL PROTECTED] Sent: Monday, August 21, 2006 11:16 AM To: CF-Talk Subject: Database design question On my classifieds database it will have... categories and corresponding sub_categories and corresponding sub_sub_categories. How would you design the table names and relationships to avoid confusion? Kinda new to database design!! IE: Antiques-category antique furniture - sub_category hutches - sub_sub_category ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250500 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Global vars in CFC's :-)
I am a big proponent of method A. My reasoning is that it cleanly separates instance data from other data in the object. I create a debug() method in all my objects that return the instance struct, which gives a very clean way to see what data is within an object. Additionally you can use the instance data to implement the memento design pattern. This pattern allows you to easily store the state of an object and return to an earlier state with a method like MyObject.setMemento(instance) to populate the object with a stored state. Even if this functionality is not something I use all the time, I like the flexibility it offers if the need ever arises. My 2 cents. My 2 cents. Rich Kroll ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250507 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Getting today's orders?
The problem you are seeing is that when you are comparing orderdate = now() that it's including minutes and seconds, which will not equal your record. You can use: WHERE CAST(CONVERT(varchar, orderdate, 1) as smalldatetime) = '8/19/2006' to get all valid orders from the specific date regardless of min and seconds. HTH, Rich Kroll -Original Message- From: Will Tomlinson [mailto:[EMAIL PROTECTED] Sent: Monday, August 21, 2006 4:50 PM To: CF-Talk Subject: Getting today's orders? I need to get today's orders in a query. I know there's one test order in the db today, but I can't get my query to return anything. It's SQL Server, smalldatetime field. Here's the data in the db: 8/13/2006 6:04:00 PM What do I do to make this work? cffunction name=getTodayOrders access=public returntype=query output=false hint=Returns a query of today's orders cfset var gettodayorders = cfquery name=gettodayorders datasource=#VARIABLES.dsn# SELECT orderID, orderdate, ordersubtotal, ordertotal, cartID, paymentstatusID, paypalpaymenttypeID, shiptotal FROM tblOrders WHERE orderdate = cfqueryparam cfsqltype=cf_sql_timestamp value=#CreateODBCDateTime(Now())# ORDER BY orderdate DESC /cfquery cfreturn gettodayorders /cffunction Thanks, Will ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250527 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Changing views at runtime with mach-ii
I did not know about the mach-ii list. I was looking for it but must have missed it when looking for mach-ii info. Unfortunately I can't use a simple branch in the logic to solve my problem. I'm attempting to create a dynamic view engine, which would allow me to use a different view based on values only known at runtime. Rich Kroll -Original Message- From: Hugo Ahlenius [mailto:[EMAIL PROTECTED] Sent: Saturday, August 12, 2006 3:21 AM To: CF-Talk Subject: RE: Changing views at runtime with mach-ii Hi Richard, You know that there is a Mach-II mailing list, right? What you need to set up is a branching point in the logic, so that a new event (which creates your desired view) is announced. Most commonly a listener or a filter would do an announcement, but it could also be a plugin. /hugo -- Hugo Ahlenius - Hugo Ahlenius E-Mail: [EMAIL PROTECTED] Project OfficerPhone: +46 8 412 1427 UNEP GRID-Arendal Fax:+46 8 723 0348 Stockholm Office Mobile: +46 733 467111 WWW: http://www.grida.no Skype:callto:fraxxinus - |-Original Message- |From: Richard Kroll [mailto:[EMAIL PROTECTED] |Sent: Friday, August 11, 2006 18:37 |To: CF-Talk |Subject: OT: Changing views at runtime with mach-ii | |Hell all, | |I'm struggling to find a way to dynamically change a view at runtime in |Mach-ii and hoped someone here could point me in the right direction. |I've got clients that like to see different views depending on the |situation and I was trying to create a plug-in to swap the called view |at runtime but am running into a roadblock in how I can manipulate |this. |Has anyone here run into this sort of problem? I've found in the |mach-ii framework where the call happens, but the path to the view is |in the arguments scope which my plug-in cannot access. Any direction |would be greatly appreciated! | | | |Rich | | | | | | ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:249711 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
OT: Changing views at runtime with mach-ii
Hell all, I'm struggling to find a way to dynamically change a view at runtime in Mach-ii and hoped someone here could point me in the right direction. I've got clients that like to see different views depending on the situation and I was trying to create a plug-in to swap the called view at runtime but am running into a roadblock in how I can manipulate this. Has anyone here run into this sort of problem? I've found in the mach-ii framework where the call happens, but the path to the view is in the arguments scope which my plug-in cannot access. Any direction would be greatly appreciated! Rich ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:249613 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: odd component issue
I've encountered some strange things like this on our server when we are caching classes. From time to time we need to remove all of the CF generated classes and then CF can see the missing page again. I've been unable to figure out exactly why it's caused, but at least I've found a solution *shrug* Rich -Original Message- From: Cutter (CFRelated) [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 08, 2006 11:46 PM To: CF-Talk Subject: odd component issue This just recently (last few hours) has happened in our production environment, for no apparent reason, and I really need some help (I've received almost 2,000 error messages from my error trapping) because I am stumped. I have a template that is calling the following code: variables.imgObj = createobject(component,com.utils.Image); and I am receiving multiple errors stating the following: message = Could not find the ColdFusion Component com.utils.Image. detail = Please check that the given name is correct and that the component exists. missingFileName = com.utils.Image errorCode = 200 My issue is, the file is there. In fact, it's being called by well over a dozen templates with no issue whatsoever. I even copied and pasted the line from another (working) template and redeployed the file. Same results. Any ideas? Anybody? -- Cutter http://blog.cutterscrossing.com The Past is a Memory The Future a Dream But Today is a Gift That's why they call it The Present ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:249289 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CRUD
You can create the DAO, bean, and gateway CFCs by right clicking on a table and using a provided wizard. It's a great tool, there are some code inconsistencies (just style mostly) that are within the generated CFCs, but adobe is aware and I'm sure will fix them in an upcoming release. Rich -Original Message- From: Aaron Rouse [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 08, 2006 4:44 PM To: CF-Talk Subject: Re: CRUD Doesn't the RDS plugin for CFEclipse build back end CFCs as well? I know it does not build the exact same thing but was under the impression it built something along the lines of the bean, gateway, etc. On 8/8/06, Chad Gray [EMAIL PROTECTED] wrote: Now these are my kind of solutions! It fits right in with my spaghetti coding that I am so fond of. :) I will admit after playing with reactor it is pretty slick since it builds all of the back end CFCs for you. Thanks for the tips! Chda -Original Message- From: Aaron Rouse [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 08, 2006 3:11 PM To: CF-Talk Subject: Re: CRUD I do this as well, my first version of it stored the table information in the application scope so I only did that one query. The second version though I changed to just do a query for table information before any insert/updates because found the hit to the database system tables just was not hurting performance enough to even measure it. I had thought about expanding it to build my CRUD screens but just have not bothered since we still use a old set of in-house custom tags for the CRUD. What I like about this approach is if you change a column size in the DB you do not have to worry about changing any of the insert/update pages. Or if I had a new column to the DB, all I do is add it to the one config page for the table that the CRUD system uses. Doesn't the onTap framework help to allow for the easy development of CRUD pages? On 8/6/06, Denny Valliant [EMAIL PROTECTED] wrote: For a long time I've used basicly what amounts to a custom cfinsert. I like it because it's a simple: cfset theRecord = saveToTable('form','tablename'), does cfqueryparam, length checking, etc. Just have to match struct key names to column names. I take a hit with an initial query for table structure, but it saves so much coding time, it's well worth it (IMHO). Updates or Adds, whoopie! :-) After looking at model glue 2, and the xsl scaffolding stuff, along with reactor, I'm liking the possibilities. ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:249291 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Development Environment Setup
I feel your pain and have recently worked through many of the problems that you are currently struggling with. This is the solution that we found works for us and is in no way best practice or the right way, but hey, it works for us with 20 developers all working on the same set of code! We decided to have each developer run a local copy of CF under apache as well as installing TortoiseSVN to interact with SVN (Subversion). Our IT guys helped me put together an installer package that had the apache conf files as well as all the necessary installers. We wrote a few CF files that used the admin API to create all the necessary datasources etc. This enables us to bring a computer from start to configured in about an hour. We have two environments, QA and production that we deploy to. When we are ready to QA a release, we create a branch from the trunk and have our QA server switch to that branch for testing. If there are any problems, we update the trunk and merge those changes into the release branch. Once this branch is ready for deployment onto our live servers we simply have the live servers switch to the new release branch. Currently we are not using many automated processes to accomplish this (outside of SVN) but I'm looking into ANT and CruiseControl as I've heard really great things about both for automated deployments. In regards to your question about the logistical nightmare of keeping all developers in sync...well SVN handles all of it from a code perspective. When a developer attempts to commit changes to the repository, they are notified that their local copy is out of date and they must sync with the server prior to any commits. On the data side, we have data environments (development, qa, live) and all developers have their CF datasources pointed to our dev DB server. HTH Rich -Original Message- From: Konopka, David [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 09, 2006 2:19 PM To: CF-Talk Subject: RE: Development Environment Setup You could create individual user shares on a development web server. Each developer would check out code to his/her user share to code with. ___ David Konopka Wharton Computing and Information Technology -Original Message- From: Neil Middleton [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 09, 2006 9:20 AM To: CF-Talk Subject: Development Environment Setup Hi guys, Question on how best to setup our development environment. I know it's been asked before, I would like your ideas on our specific setup: Currently we maintain several applications under many websites, on a single development server (CFMX7 and SQL2000). Developers work direct on the shared development server via VSS (do some work, save it, check it in to see if it works...very time consuming). Releases are then done by the tech support guys, who get sent a list of things to push to test (which is currently a manual task). Developers have no access to SQL Admin or CF Admin. As you can guess, this isn't the best, and I personally would like to see us using a better source control system (Subversion?). I would also the like the source control and release process to be a lot more transparent in the overall process. I have seen mentions of people having devs running their own instances of CF/SQL, but how the hell do you keep these up to date without creating a logistical nightmare (i.e making sure every developer is in sync with both code and external requirements such as IIS setup?) Cheers in advance.. -- Neil Middleton Visit feed-squirrel.com ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:249343 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Announcing SeeFusion 4 (with Flex 2)!
* New 2-for-1 pricing model for individual servers. For any single physical server, every 2 ColdFusion instances that you want to monitor now require just 1 SeeFusion license. This is a quote from the email that webapper sent today. Rich ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:248822 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cfproperty vs. setting variables for in a cfc
cfproperty is used in webservice calls, and if your CFC is not used for that, then the only benefit AFAIK is for introspection. HTH, Rich -Original Message- From: Ken Fused [mailto:[EMAIL PROTECTED] Sent: Friday, July 28, 2006 1:53 PM To: CF-Talk Subject: cfproperty vs. setting variables for in a cfc In creating a CFC, what is the difference between cfproperty name=myVar type=string default=Hello cfscript variables.myVar = Hello; /cfscript I realize that the cfproperty tag is used for webservices. But if I am not creating a webservice, just a simple cfc is there an advantage in using cfproperty over just setting the variable. It would appear as though I have the advantage of establishing a data type. ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:248061 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: OT: SVN Error
Here is my post-commit script, though I don't think the problem is here as most of the time it's working fine...it only chokes if one of the directories has been moved / deleted in the underlying file structure: @echo Processing Cleanup C:\progra~1\subversion\bin\svn.exe cleanup c:\webserver\site C:\progra~1\subversion\bin\svn.exe cleanup c:\webserver\admin @echo Starting Dev Deployment C:\progra~1\subversion\bin\svn.exe update C:\webserver\site C:\progra~1\subversion\bin\svn.exe update C:\webserver\admin @echo Deployment complete -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Thursday, July 13, 2006 2:41 AM To: CF-Talk Subject: Re: OT: SVN Error Can you show us the script? Could you have an issue with \ vs. / in it? Jochem ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:246407 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: FAQ?
I know I'd sign up for notification for when new tips are added. I know I don't check back that often, only when a need arises and I'm looking for a solution. My 2 cents, Rich -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 11:00 AM To: CF-Talk Subject: Re: FAQ? I've considered a Subscribe mode for people who want to get informed on each entry. Since the site has an RSS feed I figured it wasn't quite as critical. But it would be nice to add email notification. On 7/12/06, Rick Faircloth [EMAIL PROTECTED] wrote: I try all the time to convince my clients that while being on the Internet on a website is a must, it's more important for marketing to be in people's inboxes. Why not set up a Tip of the Day (or Tip of the Week) and deliver it to subscriber's inboxes, where they can then save the tips to archives...searchable on their own systems. Also, when new tips are added, automatic email notice goes out to all subscribers with information about the tip. Why wait for them to go to the site? Take the material to them...you're traffic will pick up a lot, I'll wager, too... Rick ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:246314 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4