Hi All,

I know that this posting is somehat off the subject,
but I just finding reading Friday issue of Dev Web Pro
article (8.10.07), and I throught you all might be
interested in using this approach with CF8?

Reacting To Grid Row Selection In Coldfusion 8

By Raymond Camden

This week must be grid week. First we have Bruce
Phillips' post on cfgrid, and Todd Sharp posted on it
as well.

I thought I'd follow the crowd and share a tip as
well. How do you do something (anything) when a user
clicks on a grid, specifically when using the new HTML
cfgrid in ColdFusion 8? 

Technically there isn't a attribute that you can add
to the grid itself. However, other form fields can
easily bind to the grid itself. So if you wanted to
build an edit form, for example, that is pretty easy
(and again, see Bruce Phillips' post). But what if you
wanted more fine grained control? This is where
CFAJAXPROXY comes in. 

Now if you are like me - you looked at the docs on
CJAJAXPROXY and were impressed with how cool it is to
be able to create a connection to a CFC. That's
amazing, and in my mind, I think it is the most
impressive new feature in ColdFusion 8. 

But what people may miss (I know I did!) is that
CFAJAXPROXY has a whole other... "mode" we shall call
it, that lets the tag act in a complete separate
manner. In fact, it is so different I'm not quite sure
why another tag wasn't made, like CFBIND for example.
This other mode takes one main attribute, bind. You
can also use a onSuccess and onError attribute. In
this mode, the tag simply acts as a listener. So image
my grid is named entries. I can bind to it like so: 

All this says is - when the grid changes - call a
JavaScript function and pass the value of the Title
column. I could also use a CFC or CFM bind as well,
but you get the idea. Again, I think CFBIND would be a
better name since in this form the tag isn't creating
a proxy object for a remote CFC. But that's neither
here nor there - lets get back to the original
question - how do I react to a grid change? 

First you need to figure out what values you want. In
my code sample above, I grabbed the title column. If I
wanted something different, like ID, I'd do:

In this example I'm loading up my HTML grid with a
query (yes, you don't have to use Ajax for HTML
grids). On the top of my template I bound my
JavaScript function to the entries grid. Whenever I
selected an entry in my grid, an alert will be fired. 

I want to point out one last thing. Take a look at the
first cfgridcolumn. Why do I have a column that I
don't bother displaying? When you specify the columns
to show - you are also limiting the data actually
stored in the grid. If I didn't have that hidden
column there, I wouldn't be able to use the ID column
in my bind. 


--- Christopher Jordan <[EMAIL PROTECTED]>
wrote:

> It's one form right now, but my customer is in nine
> different states, and
> each states form that accomplishes this task is
> slightly different from each
> other. I'm hoping that I will eventually get all
> nine states' PDFs imported
> and then converted to an actual PDF form (or
> whatever I have do to) to make
> it so that I can pre-fill the form with data from
> the database.
> 
> Does that make sense?
> 
> Chris
> 
> On 8/14/07, miguel olivarez <[EMAIL PROTECTED]>
> wrote:
> >
> > Hello Chris,
> > Are you going to have to do this auto population
> of
> > forms across a large library of government forms?
> >
> > Or is this just for one form?
> >
> > Miguel
> >
> > --- Christopher Jordan <[EMAIL PROTECTED]>
> > wrote:
> >
> > > Thanks everyone.
> > >
> > > I think CF8 is probably my best solution. The
> issue
> > > is that the PDFs already
> > > exist, so being able to read them in *and then*
> > > monkey around with them is
> > > pretty crucial. The PDFs are state government
> forms
> > > and must look exactly
> > > right or they won't be accepted by the local
> > > government offices.
> > >
> > > That said, I'm still going to be in new
> territory
> > > when trying to accomplish
> > > this task even under CF8. If anyone's got advice
> > > using CF8 to
> > > programmatically pre-fill certain form fields
> (and
> > > most likely converting
> > > the things to PDF forms since I'm not sure
> they'll
> > > technically be PDF forms
> > > to start with), I'd welcome that like no other!
> :o)
> > >
> > > Many thanks folks!
> > > Chris
> > >
> > > On 8/13/07, Eli Sanders <[EMAIL PROTECTED]>
> wrote:
> > > >
> > > > From what I remember it is a simple text file
> > > format to write out using
> > > > cf... The hardest part was the time consuming
> task
> > > of creating the fields in
> > > > Arobat Writer... if you have a lot... I found
> > > documentation a long time ago
> > > > on the adobe website and Arobat Writer help.
> > > >
> > > > Good luck...
> > > >
> > > >
> > > > On 8/13/07, Christopher Jordan
> > > <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Eli,
> > > > >
> > > > > That's great news (though we may upgrade
> > > anyway). How difficult was it?
> > > > > Can you point me to any online resources for
> the
> > > FDF language? Have you
> > > > > tried using the new cfpdf tags provided in
> CF8?
> > > Would you recommend one over
> > > > > the other?
> > > > >
> > > > > Thanks!
> > > > > Chris
> > > > >
> > > > > On 8/13/07, Eli Sanders <[EMAIL PROTECTED]
> >
> > > wrote:
> > > > > >
> > > > > > Chris,
> > > > > >
> > > > > > I've done this before with CF4.5 and 6
> using
> > > the Acrobat FDF Language
> > > > > > you can fill in the form easily after you
> have
> > > configured the template PDF
> > > > > > document you map the data you have to the
> > > fields in the PDF using CF..
> > > > > >
> > > > > > Eli
> > > > > >
> > > > > >
> > > > > >  On 8/13/07, Christopher Jordan <
> > > [EMAIL PROTECTED] > wrote:
> > > > > >
> > > > > > > Hi folks,
> > > > > > >
> > > > > > > I have the need to read in PDF documents
> > > (state government forms)
> > > > > > > and programmatically fill in certain
> fields
> > > prior to letting the user print
> > > > > > > out the resultant form. I'm guessing
> first
> > > that I could not do this with CF7
> > > > > > > (we will upgrade to get this
> functionality).
> > > What I'm wondering next is how
> > > > > > > I should approach this. The user
> wouldn't
> > > have to fill anything out, as all
> > > > > > > of the data that I need to pre-fill on
> the
> > > PDF I already have in my
> > > > > > > database. So should I convert the thing
> into
> > > an honest to goodness PDF form
> > > > > > > (if it isn't one already), or can I just
> > > read the PDF in, manipulate what is
> > > > > > > necessary, and be done with it?
> > > > > > >
> > > > > > > I've never done any PDF manipulation so
> if
> > > anyone on here has
> > > > > > > experience with that, I'd love your
> input.
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Chris
> > > > > > >
> > > > > > > --
> > > > > > > http://cjordan.us
> > > > > > >
> > > _______________________________________________
> > > > > > > Reply to DFWCFUG:
> > > > > > >   [email protected]
> > > > > > > Subscribe/Unsubscribe:
> > > > > > >
> > >
> >
>
http://lists1.safesecureweb.com/mailman/listinfo/list
> > > > > > > List Archives:
> > > > > > >
> > >
> http://www.mail-archive.com/list%40list.dfwcfug.org/
> > > > > > >
> > > http://www.mail-archive.com/list%40dfwcfug.org/
> > > > > > > DFWCFUG Sponsors:
> > > > > > >   www.instantspot.com/
> > > > > > >  www.teksystems.com/
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > _______________________________________________
> > > > > > Reply to DFWCFUG:
> > > > > >  [email protected]
> > > > > > Subscribe/Unsubscribe:
> > > > > >
> > >
> >
>
http://lists1.safesecureweb.com/mailman/listinfo/list
> > > > > > List Archives:
> > > > > >
> > >
> http://www.mail-archive.com/list%40list.dfwcfug.org/
> > > > > >
> > > http://www.mail-archive.com/list%40dfwcfug.org/
> > > > > > DFWCFUG Sponsors:
> > > > > >   www.instantspot.com/
> > > > > >   www.teksystems.com/
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > http://cjordan.us
> > > > >
> _______________________________________________
> > > > > Reply to DFWCFUG:
> > > > >  [email protected]
> > > > > Subscribe/Unsubscribe:
> 
=== message truncated ===>
_______________________________________________
> Reply to DFWCFUG: 
>   [email protected]
> Subscribe/Unsubscribe: 
>  
>
http://lists1.safesecureweb.com/mailman/listinfo/list
> List Archives: 
>    
> http://www.mail-archive.com/list%40list.dfwcfug.org/
>             
>   http://www.mail-archive.com/list%40dfwcfug.org/
> DFWCFUG Sponsors: 
>   www.instantspot.com/
>   www.teksystems.com/
> 



       
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search 
that gives answers, not web links. 
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC

_______________________________________________
Reply to DFWCFUG: 
  [email protected]
Subscribe/Unsubscribe: 
  http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives: 
    http://www.mail-archive.com/list%40list.dfwcfug.org/             
  http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors: 
  www.instantspot.com/
  www.teksystems.com/

Reply via email to