ColdFusion programming

I am trying to extract data from an SQL database in the
dynamic page using a drop down list.
The drop down menu (data) has one option that if it's
selected,
select * from table but if the other options are selected
from the combo box,
select * from table where column #data#.
I have coded the second aspect of the query and it works to
recieve specified data from the database but to addthe first aspect
to it to extract all the data from the table if a particular option
is selected, I'm struggling with it. I think it requires a
<cfif> statement but I have tried a number of times but with
no success.
Could anyone advise me of what I should do?
Thanks,
Aqsa

You have set the type of your cfargument tag to be title, but
as we can see from your attached code the path for this CFC is
components.contact.title you need to change the type to
that.

Similar Messages

  • Run a CF program as a background process?

    I want to write a ColdFusion program that sends an email to a list of people whenever a particular column in a database is edited. I know how to do this, but I want it to run automatically everyday, rather than me having to run it myself. Is there a way to do this??

    Scheduled tasks are a great tool in CF but I wanted to clarify something in your post. Do you want this script (program) to run automatically each day at a set time or do you want it to run only when the DB is updated?
    If you just want it to run at a scheduled time, follow Ian and Adam's advice and check into the CF Docs for Scheduled Tasks. They're easy to setup and use ... and quite helpful in so many cases.
    If you're looking to have this script run only after your DB column is updated, you may want to take an alternate approach. And there are quite a few options you have available.
    A very simple approach would be to just add a CFMAIL tag after you run the update. This assumes that you have some ColdFusion code that processes the update. If this is the case, you could simply add a CFMAIL tag after your update code executes.
    <cfquery name="qry" datasource="#dsn#">
         update mytable
         set col1 = 20
         where id = #id#
    </cfquery>
    <cfmail to="[email protected]" from="[email protected]" subject="data">
         <!--- email details --->
    </cfmail>
    Another option would be to have your DB do the work for you, depending on your DB server that is. You could setup a trigger in your DB (I know MySQL and MS SQL support triggers and email).
    Basically, the trigger listens for changes on a specified table and when it detects you have updated a column in the specified table, it will run its code, including sending the email directly from your DB. I only mention this because I just learned how to do it for MySQL and MS SQL and it's pretty fun and cool ... well, 'cool' should probably be in quotes !

  • Coldfusion task scheduler

    I have been forced to migrate a coldfusion program to windows server for authentication security purposes.  I need to continue to use the task scheduler.  Security concerns also do not allow me to use IE to kick-off the coldfusion task scheduler.  If there any way to kick it off using a script without using a browser?

    I think I am beginning to see what you are trying to describe.
    Some things to make sure you clearly understand.
    A ColdFusion scheduled task is nothing more then a HTTP request to a CFML file done at a scheduled time.  If you have ColdFusion make this HTTP request, it will use a built in 'browser' internal to the ColdFusion engine to make the request.  There is nothing preventing you from using any other system you want to make that HTTP request to the CFML file in some scheduled manner.
    Secondly, you repeatedly talk about no browser (IE) allowed on the server.  The browser does not need to be on the server to configure a scheduled task.  Any browser on any system that can connect to the server can be used to configure the ColdFusion scheduled task.  But if you do configure the scheduled task through ColdFusion, then ColdFusion will be using it's internal system to make the HTTP request to the CFML file.
    Now we get to what I think you are talking about though.  It sounds like you have locked down the server with Microsoft Windows Integrated Security and ColdFusion can not make these HTTP requests, because surpise suprise ColdFusion is not a Microsoft product and it does not use NTLM autentication.
    What it can do is use is "Basic Security".  What usually happens now is that people say basic security is not good because it passes the user name and password in plain text in the request.  The idea here is that yes, the request is plain text, but it is expected that the entire request will then be encrypted with something like SSL.
    The other common solution is to configure one small section of the web server, a certain directory or even just the specific scheduled task files, are configured to not use Windows integrated security.  You can then configure your web server to only allow connections from the local ColdFusion applicaiton server IP address and no others so that there is no way for anybody else to access these so called 'unsecured' files.
    But, unfortunatly, there is no way to have ColdFusion make NTLM connections to Windows Integrated Security resources.
    To sumerize your three choices are:
    1) Use some other techenology to make the HTTP requests on a scheduled basis to the CFML files.
    2) Use basic security combined with SSL and not Windows Integrated Security
    3) Don't use user authentication security, but lock down the scheduled task resources to only accept requests form the specific ColdFuiosn server.
    P.S. I imagine one could combine the second and third options if one wanted to.

  • Vocabulary for web design and beyond

    Anyone tackling web design will encounter dozens of unfamiliar terms. I have compiled together this glossary to help them. I may update and expand in the future. Until then, feel free to use or pass along.
    Some of these terms don’t relate strictly to web design, but also to computer graphics and computer programming generally, as I’ve found that such terms are also important to reading and understanding any tutorials or other materials on web design.
    Asynchronous (1) General use. Not synchronous; not occurring or existing at the same time or having the same period or phase. (2) Digital communication. Pertaining to a transmission technique that does not require a common clock between the communicating devices; timing signals are instead derived from special characters in the data stream.
    Bitmap image Image that uses geometrical primitives such as points, lines, curves, and shapes, which are all based on mathematical equations. In a bitmap image, each pixel on a display screen is assigned at least one bit to indicate whether the pixel should reflect the background color, the foreground color, or some other color. each pixel in the bitmap might have 16, 24, or 48 bits of information associated with it. The more bits, the greater the resolution of the bitmap – and the larger the file. Compare Vector image.
    C (programming language) General-purpose computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system. It was designed for implementing system software and is also widely used for developing portable application software. C has greatly influenced many other popular programming languages, most notably C++, which began as an extension to C.
    C++ Statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It was developed by Bjarne Stroustrup starting in 1979 at Bell Labs as an enhancement to the C language and originally named C with Classes. It was renamed C++ in 1983.
    Cache Component that transparently stores data so that future requests for that data can be served faster. The data that is stored within a cache might be values that have been computed earlier or duplicates of original values that are stored elsewhere. If requested data is contained in the cache (cache hit), this request can be served by simply reading the cache, which is comparatively faster. Otherwise (cache miss), the data has to be recomputed or fetched from its original storage location, which is comparatively slower.
    Cascading Style Sheet (CSS) Style sheet language used to describe the presentation semantics (the look and formatting) of a document written in a markup language. Its most common application is to style web pages written in HTML and XHTML, but the language can also be applied to any kind of XML document, including SVG and XUL.
    ColdFusion Programming language based on standard HTML that is used to write dynamic webpages. It allows for the creation of pages that differ depending on user input, database lookups, time of day, or other criteria. ColdFusion pages consist of standard HTML tags together with CFML (ColdFusion Markup Language) tags such as <CFQUERY>, <CFIF> and <CFLOOP>. ColdFusion was introduced by Allaire in 1996, acquired by Macromedia in a merger in April 2001, and acquired by Adobe in December 2005.
    Compound selector Can be used to combine two or more style rules to create a style definition that displays only when one style is contained within another. Compound styles are useful when you want to do something like use the Heading 1 tag multiple times to format headlines in different ways on the same web page. For example, you could create one style for headlines that appear in the main story area of a page and then create another style for headlines that appear in the sidebar on the page and still use the Heading 1 tag to format both. Compound styles are created by combining ID, class, or tag styles and look like this: #sidebar h1.
    Contextual selector A type of Style Sheet Selector that
    CRE Loaded Open source online store management and shopping cart system for e-commerce from Chain Reaction eCommerce. It is based on osCommerce, runs on any LAMP (Linux, Apache, MySQL, PHP) web server, and is supported by an active international community of users and developers. For a monthly subscription ($10/mo. as of 2011), CRE Loaded allows small and medium-sized merchants to accept credit card payments in a web site that mirrors their own online stores.
    CSS See Cascading Style Sheet.
    Dynamic HTML (DHTML) Umbrella term for a collection of technologies used together to create interactive and animated web sites by using a combination of a static markup language (such as HTML), a client-side scripting language (such as JavaScript), a presentation definition language (such as CSS), and the Document Object Model. DHTML allows scripting languages to change variables in a web page's definition language, which in turn affects the look and function of otherwise “static” HTML page content, after the page has been fully loaded and during the viewing process.
    ECMA International International membership-based non-profit standards organization for information and communication systems.
    ECMAScript Scripting language standardized by Ecma International in the ECMA-262 specification and ISO/IEC 16262. The language is widely used for client-side scripting on the web, in the form of several well-known dialects such as JavaScript, JScript, and ActionScript.
    Extensible HyperText Markup Language (XHTML) Family of XML markup languages that mirror or extend versions of the widely used HTML, the language in which web pages are written. While HTML (prior to HTML5) was defined as an application of Standard Generalized Markup Language (SGML), a very flexible markup language framework, XHTML is an application of XML, a more restrictive subset of SGML. Because XHTML documents need to be well-formed, they can be parsed using standard XML parsers—unlike HTML, which requires a lenient HTML-specific parser.
    Extensible Markup Language Set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards. Its design goals emphasize simplicity, generality, and usability over the Internet. It is a textual data format with strong support via Unicode for the languages of the world. Known by its acronym XML.
    HTML See HyperText Markup Language.
    Hypermedia Graphics, audio, video, plain text and hyperlinks that intertwine to create a generally non-linear medium of information. This contrasts with the broader term multimedia, which may be used to describe non-interactive linear presentations as well as hypermedia. The World Wide Web is a classic example of hypermedia, whereas a non-interactive cinema presentation is an example of standard multimedia due to the absence of hyperlinks.
    Hypertext Text displayed on a computer or other electronic device with references (hyperlinks) to other text that the reader can immediately access, usually by a mouse click or keypress sequence.
    Hypertext Markup Language (HTML) Predominant markup language and basic building-block of webpages. It is written in the form of HTML elements consisting of tags, enclosed in angle brackets (like <html>), within the web page content. HTML tags normally come in pairs like <h1> and </h1>. The first tag in a pair is the start tag, the second tag is the end tag (they are also called opening tags and closing tags). Known by its acronym HTML.
    Hypertext preprocessor (PHP) Widely used, general-purpose scripting language that was originally designed for web development to produce dynamic web pages. It brings life to websites by communicating with external data sources, such as databases, news feeds, and XML documents. PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document. PHP 3 was launched in 1998; PHP 4 was released in 2000; and PHP 5 was released in 2005.
    Java Programming language released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to bytecode (class file) that can run on any Java Virtual Machine (JVM) regardless of computer architecture. Java is a general-purpose, concurrent, class-based, object-oriented language that is specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere". Java is currently one of the most popular programming languages in use, and is widely used from application software to web applications.[
    JavaScript Implementation of the ECMAScript language standard and is typically used to enable programmatic access to computational objects within a host environment. It can be characterized as a prototype-based object-oriented scripting language that is dynamic, weakly typed and has first-class functions.
    JPEG Commonly used method of Lossy compression for digital photography that was named after the Joint Photographic Experts Group, which created the standard. The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and image quality. JPEG typically achieves 10:1 compression with little perceptible loss in image quality.
    Linux Family of Unix-like computer operating systems using the Linux kernel (central OS component). Linux can be installed on a wide variety of computer hardware, ranging from mobile phones, tablet computers and video game consoles, to mainframes and supercomputers. The development of Linux is one of the most prominent examples of free and open source software collaboration; typically all the underlying source code can be used, freely modified, and redistributed, both commercially and non-commercially, by anyone under licenses such as the GNU General Public License.
    Lossy compression Data encoding method which discards (loses) some of the data, in order to achieve its goal, with the result that decompressing the data yields content that is different from the original, though similar enough to be useful in some way. Lossy compression is most commonly used to compress multimedia data (audio, video, still images), especially in applications such as streaming media and internet telephony. By contrast, lossless compression is required for text and data files, such as bank records, text articles, etc.
    MySQL Relational database management system that runs as a server providing multi-user access to a number of databases. The MySQL development project has made its source code available under the terms of the GNU General Public License, as well as under a variety of proprietary agreements. Acronym for “My Structured Query Language.”
    Open source Describes practices in production and development that promote access to the end product's source materials. Before the term open source became widely adopted, developers and producers used a variety of phrases to describe the concept; open source gained hold with the rise of the Internet, and the attendant need for massive retooling of the computing source code.
    osCommerce Open source Commerce. It allows store owners to setup, run, and maintain their online stores with minimum effort and with no costs involved. Combines open source solutions to provide a free and open development platform, which includes the PHP web scripting language, the Apache web server, and the MySQL database server. With no restrictions or special requirements, osCommerce can be installed on any PHP3 or PHP4 enabled web server, on any environment that PHP and MySQL supports, which includes Linux, Solaris, BSD, and Microsoft Windows environments.
    PHP See Hypertext preprocessor.
    Rasterization The process of converting a Vector image into a Bitmap image.
    Rasterize See Rasterization.
    Shopping cart software Software used in e-commerce to assist people making purchases online. The software allows online shopping customers to accumulate a list of items for purchase. Upon checkout, the software typically calculates a total for the order, including shipping and handling (i.e. postage and packing) charges and the associated taxes.
    Style sheet selector One of the two parts of a CSS rule (the other being the properties, or declaration block) that declares which of the markup elements a style applies to. Selectors may apply to all elements of a specific type, or only those elements that match a certain attribute (e.g., how they are placed relative to each other in the markup code, or on how they are nested within the document object model). There are many types of style sheet selectors: element selectors, which select by element name; class selectors, which select by class name; contextual selectors, which select by context based on parent elements (what the element is nested within or what precedes it in the document), etc..
    Supercomputer Computer that is at the frontline of current processing capacity, particularly speed of calculation. Supercomputers are typically one-of-a-kind custom designs produced by companies such as Cray, IBM and Hewlett-Packard, who had purchased many of the 1980s companies to gain their experience. Since October 2010, the Tianhe-1A supercomputer, located in China, has been the fastest in the world.
    Tag Non-hierarchical keyword or term assigned to a piece of information (such as an Internet bookmark, digital image, or computer file). This kind of metadata helps describe an item and allows it to be found again by browsing or searching. Tags are generally chosen informally and personally by the item's creator or by its viewer, depending on the system. HTML tags include paragraph, heading 1, heading 2, etc.
    Unix Computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs. The Unix operating system was first developed in assembly, which is machine-dependent and a low-level programming language. Ken Thompson created the B language in 1969 and Unix was written in the B language, a high-level programming language. The first Unix system written in C was released in November 1973.
    Vector image Image made up of numerous individual, scalable objects. These objects are defined by mathematical equations rather than pixels, so they always render at the highest quality. Objects may consist of lines, curves, and shapes with editable attributes such as color, fill, and outline. Changing the attributes of a vector object does not effect the object itself. Compare Bitmap image.
    Vector processor Central processing unit (CPU) that implements an instruction set containing instructions that operate on one-dimensional arrays of data called vectors. This is in contrast to a scalar processor, whose instructions operate on single data items. Also known as array processor.
    Web analytics Measurement, collection, analysis and reporting of internet data, including the number of visitors and page views, for understanding and optimizing web usage. It can be used as a tool for measuring website traffic and for business and market research. Web analytics applications can also help companies measure the results of traditional print advertising campaigns. It helps one to estimate how the traffic to the website changed after the launch of a new advertising campaign.
    Web design Design of the way that content is delivered to an end-user through the World Wide Web, using a web browser or other web-enabled software.
    Web development Refers to the work involved in developing a web site for the Internet (World Wide Web) or an intranet (a private network). This can include Web design, web content development, client liaison, client-side/server-side scripting, web server and network security configuration, and e-commerce development. However, among web professionals, "web development" usually refers to the main non-design aspects of building web sites: writing markup and coding. Web development can range from developing the simplest static single page of plain text to the most complex web-based internet applications, electronic businesses, or social network services.
    World Wide Web Consortium Main international standards organization for the World Wide Web. It is made up of member organizations which maintain full-time staff for the purpose of working together in the development of standards for the World Wide Web. Known by its acronym W3C.
    XHTML See Extensible HyperText Markup Language.
    XML See Extensible Markup Language.
    Zend Engine Open source scripting engine (a Virtual Machine) commonly known for the important role it plays in the web automation language PHP.

    Thanks for posting this!
    I would only mention that your definition is incomplete for this -
    Contextual selector A type of Style Sheet Selector that
    and that it's most often referred to now as a Descendent selector, not a contextual selector.  It's basically the same as the Compound selector that you have already defined....

  • Question On How to Install Teradata ODBC on CF9 64-bit?

    Need to install Teradata drivers on 2 different servers:  A Windows 7 64-bit, and a Windows Server 2008 R2, both running IIS 7.5 and CF 9.0.1 64-bit.  Am fairly sure this needs to be set up as an ODBC Socket in CF Admin.  I've downloaded both the 32 and 64-bit Teradata drivers from Teradata web site (version 13, latest ones).   But have not installed or done anything yet.
    First, is it correct with CF9 64-bit, in CF Admin, that the ODBC Socket drop-down will only display 64-bit drivers?  Thus only allowing ODBC connections using 64-bit drivers?   For example, I've been unable to get a 32-bit IBM DB2/UDB ODBC driver to appear in the drop-down.  However, the same 64-bit DB2 driver shows up in the drop-down, but when I test the connection in CF Admin, I get a "type mismatch" error message.  Have not been able to resolve.  Am hoping I don't experience the same issue with Teradata.
    On a development Windows 7 server at work, I successfully installed the 32-bit Teradata drivers, but on a Windows 7 32-bit server, and CF9.0.1 32-bit.  After installing and configuring the Teradata 32-bit driver in Control Panel/ODBC Data Sources, the driver DID show up in ODBC Socket drop-down, and tested fine.
    But not sure what to do on 64-bit servers, and 64-bit CF9?   If anyone has been able to successfully install and configure a Teradata ODBC-Socket connection on either Win 7 or Windows Server 2008 R2, 64-bit, using CF9 64-bit and IIS, would greatly appreciate any help/advice on what you did to create a successful connection in CF Admin.  Thank you,
    Gary

    No luck.  After installing Teradata 64-bit ODBC drivers, and successfully configuring them in Windows 7 64-bit, <Control Panel, ODBC Data Sources>, and IIS 7.5, I got the same architechture mis-match when trying to add them as an ODBC-Socket DSN. 
    After running into same problem with IBM's UDB/DB2 64-bit drivers, and after reading additional posts, I've come to the conclustion that CF9 64-bit does not support 64-bit drivers in an ODBC-Socket connection.  And if you install/configure 32-bit drivers, they won't appear in CF9's drop-down list of available ODBC-Socket connections.  It appears to only display 64-bit drivers, including the built-in ones (which I believe are mostly JDBC drivers).  If anyone disagrees, please advise.
    Yet, on a test server with 32-bit Windows 7 and 32-bit CF9, and 32-bit DB2 and Teradata drivers, everything works fine.  Don't understand why this doesn't work on 64-bit platforms.
    At work, we are upgrading our production servers from Win2K 32-bit to Win Server 2008 R2 64-bit.  And upgrading our testing servers at our desks to Win7 64-bit.  And switching the main database from Oracle and SQL Server to Teradata.  (We do have about 4 Oracle DSNs, and 1 SQL Server DSN, and they all work fine using native Oracle/SQL Server drivers that come with CF9 64-bit).  If I can't get the DB2 and Teradata (particularly the Teradata drivers) to work on this new Win Server 2008 R2 64-bit production server, we won't be able to run any of our ColdFusion programs. 
    Here are some options I've come up with, and would appreciate advice/recommendations from anyone who may have some experience with this:
    OPTIONS:
    1.  Un-install CF9 64-bit and and install CF9 32-bit on both Win Server 2008 R2 64-bit and Win 7 64-bit.  Not sure if either of these 64-bit OS will run a 32-bit CF9 installation normally, without problems or errors.  If this is the best way, will all existing Oracle and SQL Server DSNs need to be re-configured, and will those work properly?
    2. Run CF9 64-bit in 32-bit mode.  Can this be done?  If so, where do you find out how to do this?  And how does this impact current DSNs using Oracle and SQL Server, that are already configured and running normally? 
    3. Leave all "as is" and install Teradata JDBC Drivers.  They are available from their web site.  If this is best solution:
       A. Do you need to un-install the Teradata 64-bit ODBC drivers, or is it OK to just leave them there? 
       B.  I've never installed 64-bit JDBC drivers.  After install, how are these added as a CF DSN? Do they just show up on the main DSN driver drop-down list in CF Admin?  Or do you have to use OTHER?    I've looked at doing a CF "OTHER" configuration, and it asks some questions I don't have the answers to off-hand, and our Teradata DBAs aren't familiar with ColdFusion, so no help there.  So am hoping Teradata will just "show up" as an available driver when adding new DSNs in CF Admin. And I won't need to use OTHER.  Anyone know?
    Appreciate any help/advice.  I cannot ask my company to purchase additional licenses of CF9, until I know:
    1.  Whether I can get, and how I can get, a Win Server 2008 R2 64-bit server to use CF9 to connect to our Teradata Data Warehouse.
    2.  Which version of CF9 to purchase and install on these 64-bit servers (32 or 64 bit)
    Really appreciate any help/advice.  Thank you.
    Gary

  • Bind XML data to PDF417 barcode - LiveCycle Designer ES

    Trying to create a shipping form for a supplier that contains a PDF417 barcode.  The source data will come from an XML data file.  The form in not interactive, the data file will simply populate the pdf form, read-only via a Coldfusion program that queries our shipping data.  But I'm not quite able to connect the dots.  Does anyone know how to supply the data in the correct format within the XML doc?  It consists of 5 fields / row, with 10 rows max.  I'm unclear because the barcode software previously used embedded control chars within the data, such as record separators, group separators, and end of transmission.  Do I need to include these for LiveCycle?  As you've probably already guessed, yes, I do not use LiveCycle much at all. 
    I'm using LiveCycle ES2 version 9
    Any advice is much appreciated.  Thanks!

    There are a couple of ways to populate the barcode from Designer. First, is the manual coding method. In the "calculate" or (preferably) the "pre-print" event you change the .rawValue of the barcode object and change it to the value of the fields you wish to include. Alternatively there is a fairly good script generator built into designer that is accesible through the barcode object properties UI. Here you can have the content of the barcode auto-filled based on the entire form or selected fields in a collection. As a general rule of thumb: never select XML as your barcode data format and don't use the auto-generated code on a form with more than 30 or 40 fields.

  • How to change web server from inbuilt Tomcat to IIS in already configured Cold Fusion 10

    how to change web server from inbuilt Tomcat to IIS in already configured Cold Fusion 10

    You just need to run the Web Server Configuration Tool to connect ColdFusion to IIS.  It can be found in the ColdFusion program group off of the Start menu.  Be sure to run it "As Administrator".
    -Carl V.

  • Post CF9 installation error running cfadmin

    HTTP Error 404.3 - Not Found
    The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

    When you ran the installer, did you choose to install the web server connectors to IIS?  It sounds like either you didn't or it didn't complete properly.  You can re-run the Web Server Connector Tool from the ColdFusion program group on the Start menu (make sure to "Run As Administrator").  If the connector was at least partially installed, you will see IIS listed under Configured Web Servers.  If it's there already, remove it and close and restart the Web Server Connector Tool.  Then click Add... and connect IIS.  You can either connect all IIS websites, or each one individually.
    -Carl V.

  • Function returns object

    My question is-
    1) what happens(physically on computer memory) when you create an object? do each object get its own memory in Heap and what is the life time of the object.
    2) what happens when you return an object from a function?
    My doubt:- I think when an object is returned it is returned along with the varibale(values) with it. so that other it can be saved to another variable.
    3) How does a object get returned? Is object returned as an struct or string?(Physical structure).
    Can I save it to any varibale(int,string, float).
    Please help me out...............................thanks
    _I have a class webuser_
    public class WebUser
    public String userName;
    public String application;
    public String getUserName()
    {return userName;}
    public void setUserName(String userName){     this.userName = userName;}
    public String getApplication(){return application;}     
    public void setApplication(String application){this.application = application;}
    Another class* just returns this object
    public WebUser getProfile(String userName, String application)
    WebUser webUser = new WebUser();
    webUser.setApplication(application);
    webUser.setUserName(userName);           
    return webUser;
    In my coldfusion program I am saving the it  to a variable
    <cfset sha=WebUser.getprofile("mother","Home")/>
    How is it saved? Is ir returned as a struct or is it returned as a string.

    shafiur wrote:
    It means can you express it to me in lay terms
    "Each object gets its own memory on the heap but only what's specific for each object gets stored."
    Lets suppose a class has
    Class A
    public static void main(String args[])
    int x=5;
    String s="Muddu";
    float y=1.505;
    float z;
    z=add(x,y);
    public float add(int a, int b)
    float m;
    m=a+b;
    return m;
    in other class
    class b
    A a=new A();//What happens here(how is it get stored here. What does a have now. does it have its variables with it stored in heap.
    class C
    A b=new A();///Now what happens to this object. Is it different from the other one. If I change variable values here, does it effect my object a in the class b.
    Sorry for this dummy questions. But I get confused by this.
    }When you do
    A a = new A(); it creates an A object, and assigns a reference to it to variable "a".
    If you later do a = new A(); again, then you will create another A object, and put a reference to it into "a", which will then lose its reference to the first A object. That first object is then eligible for GC, if nothing else is referring to it.
    Then, if you do A a2 = a; you are not creating or copying an object. You're just copying the reference from "a" to "a2", so both variables point to the same object.

  • Form submission in IE9

    Hi All,
    I test the coldfusion program in IE9. However, I find some problems.
    I use javascript to add new input box (type=hidden, name="attach") in the form. Before submit the form, I use document.getElementsByName("attach") to check its existence. It shows me there is one item with the name "attach".
    However, when I submit the form, it shows me error "cannot find form.attach".
    I find that IE8 can pass it correctly. But it fails in IE9.
    Can anyone help me to solve this problem?

    Apparently there are issues with using appendChild in IE9 http://msdn.microsoft.com/en-us/library/ms535934%28v=vs.85%29.aspx
    It looks like IE9 only supports it if you are running in standards mode.
    There are actually several posts that talk about this issue.  Like this one http://stackoverflow.com/questions/436710/element-appendchild-chokes-in-ie
    Just do a Google search for "javascript appendchild ie9" and start reading.  I'm sure you can find an example that works for you.

  • Populate PDF Forms

    I would like to populate one pdf form with multiple sets of
    data and create one finished pdf form. I have a pdf form that was
    designed to create a one page letter. I brought the pdf into Adobe
    LiveCycle Designer and inserted interactive fields for population
    inside of ColdFusion. I have written a ColdFusion program to
    populate my form using <cfpdfform action="populate">. This
    was successful. If I merge one set of data 1 receive 1 pdf output.
    If I want to loop through multiple sets of data, I receive multiple
    pdf outputs. What I would like to receive, is one pdf with multiple
    pages of populated forms. How can I accomplish this.

    Try the forum for LiveCycle Designer.

  • How can I change namespace prefix for JAX-RPC client request?

    I'm creating a JAX-RPC client to invoke a RPC/encoded web service. The service was generated from a ColdFusion program and for some reason when the SOAP namespace prefix is anything but "soapenv" it returns text/html instead of text/xml. Currently the client is sending requests with the prefix "env" and I'd like to change it to "soapenv".
    I created a type of javax.xml.rpc.handler.GenericHandler and attempted to do the follow:
    @Override public boolean handleRequest(MessageContext p1) {
         SOAPMessage msg = ((SOAPMessageContext) p1).getMessage(); 
         try {
              SOAPPart part = msg.getSOAPPart();
              SOAPEnvelope envelope = part.getEnvelope(); 
              envelope.setPrefix("soapenv"); 
              msg.saveChanges(); 
         } catch(SOAPException ex) {
              // TODO
              return false;
         return true;
    However I get the following exception:
    java.rmi.RemoteException: SOAPFaultException - FaultCode [{http://schemas.xmlsoap.org/soap/envelope/}Server] FaultString [UNIMPLEMENTED ] FaultActor [null] Detail [<detail><bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0">java.lang.AssertionError: UNIMPLEMENTED
    at weblogic.xml.domimpl.NodeImpl.setPrefix(NodeImpl.java:173)
    at test.MyHandler.handleRequest(MyHandler.java:33)
    at weblogic.wsee.handler.JaxrpcHandlerChain.handleRequest(JaxrpcHandlerChain.java:58)
    at weblogic.wsee.ws.dispatch.server.JaxrpcChainHandler.handleRequest(JaxrpcChainHandler.java:102)
    at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:141)
    at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:107)
    at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:132)
    at weblogic.wsee.ws.WsStub.invoke(WsStub.java:87)
    at weblogic.wsee.jaxrpc.StubImpl._invoke(StubImpl.java:341)
    at test.Approvedsuppliers_Wrap_Stub.echo(Approvedsuppliers_Wrap_Stub.java:31)
    at test.Approvedsuppliers_WrapPortClient.echo(Approvedsuppliers_WrapPortClient.java:130)
    at test.Approvedsuppliers_WrapPortClient.main(Approvedsuppliers_WrapPortClient.java:43)
    Is there any workaround? I appreciate any feedback.
    Thanks, Bill

    What I ended up doing is converting the SOAP message to a string, replacing the namespace prefix and converting it back to a SOAP message.
    @Override
       public boolean handleRequest(MessageContext messageContext) {
          SOAPMessageContext soapMessageContext = (SOAPMessageContext) messageContext;
          SOAPMessage soapMessage = soapMessageContext.getMessage();
          String soapString = convertSOAPToString(soapMessage);
          soapString = soapString.replaceAll("env:", "soapenv:");
          soapString = soapString.replaceAll("xmlns:env", "xmlns:soapenv");
          SOAPMessage newSoapMessage = convertStringToSOAP(soapString);
          MimeHeaders mimeHeader = newSoapMessage.getMimeHeaders();
          mimeHeader.setHeader("SOAPAction", "");
          soapMessageContext.setMessage(newSoapMessage);
          return true;
       private String convertSOAPToString(SOAPMessage soapMessage) {
          StringWriter stringWriter = null;
          try {
             stringWriter = new StringWriter();
             StreamResult streamResult = new StreamResult(stringWriter);
             TransformerFactory transformFactory = TransformerFactory.newInstance();
             Transformer transformer = transformFactory.newTransformer();
             transformer.transform(new DOMSource(soapMessage.getSOAPPart()), streamResult);
          } catch (TransformerException e) {
             throw new RuntimeException(e);
          } finally {
             close(stringWriter);
          return stringWriter.toString();   
       private SOAPMessage convertStringToSOAP(String soapString) {
          SOAPMessage soapMessage = null;
          ByteArrayInputStream byteInputStream = null;
          try {
             MessageFactory msgFactory = MessageFactory.newInstance();
             soapMessage = msgFactory.createMessage();
             SOAPPart soapPart = soapMessage.getSOAPPart();
             // Load the SOAP text into a stream source
             byte[] buffer = soapString.getBytes();
             byteInputStream = new ByteArrayInputStream(buffer);
             StreamSource source = new StreamSource(byteInputStream);
             // Set contents of message
             soapPart.setContent(source);       
          } catch (SOAPException e) {
             throw new RuntimeException(e);
          } finally {
             close(byteInputStream);
          return soapMessage;
       private void close(Closeable closeable) {
          if(closeable != null) {
             try {
                closeable.close();
             } catch (IOException e) {
                // TODO

  • Round off problem?

    A ColdFusion program is trying to store a value or 0.25 into a column of type decimal(11,6) of SQL Server table but 0.0000000 is getting stored. 0.50 is getting stored at 1.0000000. This started happenning after using cfqueryparam. Maxlength is 17.
    What am I doing wrong?

    Was using cf_sql_decimal. Numeric didn't workeither but float did.
    Why is this?
    Thank you very much.

  • Newbie: first time interfacing with existing site

    Hi, first post here.
    Our company has an existing website that was created several
    years ago by someone no longer with the company. It is ColdFusion
    based.
    For the last few years, I have been in charge of site
    management. I have no formal background or training as a webmaster,
    so my experience growth has been awkward and unconventional.
    I've been doing coding using a text editor to do direct html
    manipulation. I then test "live" on our site, usually on a hidden
    page. As my company grows, I have not had the time to keep up with
    site expansion, and I have yet to date to find a reliable full time
    or part time webmaster replacement for me (believe me, I've tried)!
    So in the meantime, I have decided to see if I can simplify
    my work using Dreamweaver.
    So far, I am not off to a great start.
    I have downloaded our entire site to our local networked
    server in order to have a local architecture mirror. However, since
    our local server does not have CF installed, I realize that I
    cannot test locally.
    I set up remote access to our web server, and Dreamweaver
    connects successfully when I test in site management.
    However, when I go to "remote view" or "testing server" and
    accept the prompt to Get Dependent Files, I always end up with a
    partially complete view of the page I want to see, with many
    missing elements.
    Am I asking too much from Dreamweaver, since in essence I am
    asking it to come in and manage a very mature and extensively
    developed site after the fact? Is the program able to fully
    interface with any established site as long as its programming
    language is supported?
    Thanks for any basic advice here.
    Tod

    Sounds like maybe you haven't told us everything. Does your
    site use
    Coldfusion programming? If so, you can always download the
    free
    developer version and test locally.
    As far as testing HTML locally, you don't need a remote
    connection.
    You can download the files to your computer and use the
    Preview in
    Browser to test the pages before you load them. And yes, you
    should
    be able to scroll up and down and see the entire page if it's
    coded
    properly.
    Or am I totally misunderstanding your question?

  • What is the best program language for mass email (PHP,  ASP, Coldfusion)?

    I want to be able to send mass email (from a SQL db) with
    stability and reliability.
    I've used Coldfusion for some time (CFmail tag) and have not
    been impressed.
    It seems, at times, it has a mind of it's own, and is a
    little unreliable, especially
    when sending hundreds of emails at one shot. I'm not dogg'n
    Codfusion,
    that's what I program in, I just am looking for a method that
    I can build on.
    My question is this: What is the best and most reliable
    coding when sending mass email?
    Is it PHP, ASP, XML, Coldfusion....what?
    You would think there has to be an optimum option out
    there...right?
    Thanks for the knowledge!

    Beezy wrote:
    > say ...500-5,000, maybe larger. Any ideas?
    >
    I've used CF to send out as many as 50,000+ emails in a
    single blast and
    haven't ever had any problems with it. Particularly with CF
    Enterprise,
    CF is an extremely high-performance mail generation engine.
    Remeber
    that CF itself doesn't send the mail so you're dependent upon
    the speed
    of your mail server as a large part of the equation as well.
    Matt
    Matt Woodward
    [email protected]
    Adobe Community Expert - ColdFusion

Maybe you are looking for

  • Is there a way to download additional fonts into Pages? If so, where can I find them?

    I was wondering if there was a way to add new fonts to Pages. I recently purchased a new iMac that came standard with Pages. I'm resisting the urge to install Microsoft Word as I prefer Pages in many ways. However, I'm frustrated that I can't use/fin

  • My External Hard Drive is NOT opening!!!

    I have an external hard drive (my book) by WD.... When I plugged it in today it did not open and reported this error: Catalog file entry not found for extent The volume could not be verified completely ERROR: This disk needs to be repaired. Click Rep

  • Temporarily embed linked photos in catalog (collection)

    I use LR3 on two machines, my mac pro desktop and macbook pro laptop. I primarily use the laptop on shoots, to capture, annotate, etc., while the desktop in the studio is for serious editing because not only is it much faster, but it has lots of atta

  • Addenda Record ACH CTX

    Hi All, I have copied the ZFI_PAYMEDIUM_ACH_00,ZFI_PAYMEDIUM_ACH_05,ZFI_PAYMEDIUM_ACH_20,ZFI_PAYMEDIUM_ACH_30 and replaced the standard FM's My question is regarding Addenda Record Segments For Ex: GS Segment FORM CONSTRUCT_ADDN_BEGIN TABLES  T_PAYME

  • Avoid duplicates in datagrid

    There are 2 dataGrids: G1 and G2. Rows can be dragged and dropped from G1 into G2. There can be duplicate rows in G1, but we need to avoid duplicate rows in G2. Ideally there should be a STOP sign displayed when there is an attempt to drop a duplicat