Hi Dan,

See below.

Dan wrote:
Thanks Jeff, see my responses to your questions/comments below prefaced with
===>
I believe I found something, via the help of your questions on what to look
for.  See my comments towards the end of your reply below.

Dan


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jeff
Fleitz
Sent: Wednesday, May 18, 2005 9:57 PM
To: [email protected]
Subject: Re: [plum] Cannot add Control to PlumUserEditForm

Hi Dan,

Dan wrote:

I have added a field to the PlumUser table called ParentUserID (int, 4)



What are you using for a database?  Is this a manual add or via
synchronization?


===>I manually added the field/column and then ran "Synchronize with
database"






In the Plum IDE, I expand Modules, expand Plum User, expand PluUserEditForm.cfm, select Edit Form: Plum User



Where is the path pointing to?  Are you pointing back into the users folder
in the admin directory, or is your module path outside of admin?


===> ??? I'm not sure what you mean. The only path shown when selecting the
PlumUserEditForm.cfm from the folder tree in the IDE is in Pages that link
to this page:
/admin/PlumUser/PlumUserList.cfm


There is the problem. All of the default admin user forms that are generated with the new project wizard are in the admin/users subdirectory. When you created the Plum User module, you created a new folder under the admin folder called PlumUser (see your path above). So you are calling two different PlumUserEditForm.cfm templates here.

You can think of a module and a Windows folder synonymously. When you create a new module, you create a new folder. The /admin/PlumUser/PlumUserList.cfm is the new template you call from the Database menu, because Plum automatically regenerates that menu when you create a new module with forms and generate code. That is the one with the new control and works as expected.

However, when you access the admin menu and click on the Users link, that is a hard coded link that doesn't get updated and it points to admin/users/PlumUserEditForm.cfm and not admin/PlumUsers/PlumUserEditForm.cfm. See the difference?

Duplicate forms in two separate folders.

Adam and David made a conscious descision not to include default modules with pages for the mandatory Plum tables in a project, for better or worse. The reason they did this is that those tables are intimately tied to the Plum Framework (components and custom tags), and messing with those templates can cause problems, until you gain experience. They reasoned that those folks who needed to modify the PlumUser table/forms for instance, would have to go in and manually modify the templates to do what they wanted. To do this, a developer would have to be intimately familiar with how things work 'under the hood'. Those folks that don't need that, don't need to worry about it.

I make modifications to the PlumUser table in almost all of my projects. When I do it, modify the table and then manually modify the templates like PlumUserEditForm.cfm in code. You can just use the tag editor in HomeSite or whatever, to add the control. I don't mess with the IDE at all for this.



One thing I would recommend: You might want to get into the habit of
eliminating spaces in folder names and templates, because the web doesn't like spaces in links, and if you don't URLEncode() all your links, you are bound to run into problems down the road.


===> I agree with that habit and follow it. If I use a "space" in a filename
I use the _ , for example:  BCC_qry_GetQuote.cfm
All of my folder names are single words, no underscores.



Ok. Sorry, I thought when you said module "Plum User", that was how your folder 
was named.




My new field PlumUser.ParentUserID shows in the "Controls not on this form" box. I select if and click the arrow to move it to "Controls on this form". And then move it up to the top under the existing UserID control.



I then run Generate Code, then Save.



I then go to my browser and login to the Admin site. I select Users, and then Edit a User. The ParentUserID does NOT appear on the Edit form.



Did you open the template in your code editor to confirm the generated
template has the ParentUserID in it?

===> Yes. In /admin/PlumUser/PlumUserEditForm.cfm this line appears in the
file: <cf_DisplayTextInput column="ParentUserID" label="Parent User ID"
type="integer" required="No" size="10">


Ok, that is right. This is a separate form. See above.




I then select Database and select Plum Users, get a list of users and select my user to Edit, AND THERE IT IS, ParentUserID is showing on this form-which appears to be the same PlumUserEditFrom, but contains the filed, when if I select Users and Edit it does not show.


Check your module path and make sure it is pointing to where you think it
is. If your Plum User module is not pointing at the admin/users directory. Look at the path in the status bar when you move your mouse over the link in the Database navbar and confirm whether it is pointing to admin/users. It sounds like you
may have your module outside of admin.

===> Ahh, here's a clue, the path from the Edit link from
Admin/Database/PlumUser/Edit is:

http://localhost:8500/dev.buyerscreditcoach.com/admin/PlumUser/PlumUserEditF
orm.cfm?UserID=10

and the path from Admin/Users/Edit is:
http://localhost:8500/dev.buyerscreditcoach.com/admin/users/PlumUserEditForm
.cfm?UserID=11

Yep. See above.


One is looking to the PlumUser folder, the other is looking to the users
folder.
??? Where did this "users" folder come from? Vs. the PlumUser folder? I
don't recall creating it. But I guess I could have.

So question: why do I have two folders: PlumUser and users.  The users
folder has "a full set" of Plum files just like the PlumUser folder, but
actually has a few more.


The users, content and layout folders, along with the default forms, are generated by Plum automatically for each new project you create. This is part of the 'starter content'.


v/r,

Jeff

**********************************************************************
You can subscribe to and unsubscribe from lists, and you can change
your subscriptions between normal and digest modes here:

http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
**********************************************************************

Reply via email to