Fusebox 101: Using switch and case verbs
As part of my fusebox 101 updates I've decided to show how to use the switch and case verb in fusebox.
Here is the code you will need (you can easily spot the similarities):
As part of my fusebox 101 updates I've decided to show how to use the switch and case verb in fusebox.
Here is the code you will need (you can easily spot the similarities):
Within fusebox you have access to the myFusebox CFC. This can help you get a lot of information about your fusebox app and it has some nice shortcuts to information, here are a couple I use a lot:
What other do you use?
View the full list of functions on Sean Corfelds site
Now this may be very much a personal approach but I thought I would say where I place my XFAs after my previous XFA post.
I've just been chatting with someone about the XFA in verb for fusebox and I thought I would post my thoughts.
XFA stands for eXit FuseAction - this is where you store variables to be used in your web pages. The question here is, why use it?
Well imagine this, you have a login form that is used on your website. When a user goes to certain areas, you check to see if the user is logged in. If they are, then they will continue as normal, on the other hand they will need to login.
Being a great coder you don't want to have lots of forms all over the place, so you include one login form. This form then performs different actions depending on the what you need it to do.
I've been asked a few questions about fusebox recently and I've been happy to blog my responses but it's got me thinking, what would be nice is a fusebox 101 section. I've setup a fusebox 101 category, where I intend to post some fusebox posting with some of the more fundamental aspects of fusebox.
If you have any questions you would like to ask then please contact me and I'll post a response. In fact ask any questions and I'd be happy to answer.
To kick start check out the related posts below.
UPDATE: I'm wondering what peoples thoughts are on fusebox? Is it covered well, and what level of coverage do you think it has? Comments below please.
I was asked today what the different modes in fusebox do. For those that don't know fusebox allows you to have 3 different modes (these can be changed in the fusebox.xml.cfm file).
Here is an overview of the permissions attribute and how you can use it within fusebox.
From: http://halhelms.com/index.cfm?fuseaction=newsletters.show&issue=052203_rolesBasedSecurity
<circuit access="public" permission="useQuizBuilder">Fusebox itself does not apply any security check, but does make the values set in these attributes available to the programmer. It then becomes a simple matter of a few lines of code to write any challenge code you wish. For example, we might write a plugin to ensure that to use any fuseaction in the circuit, the user must have the useQuizBuilder permission. If the user wants to delete a quiz, s/he can now be challenged for the deleteQuiz key. The rules for permission binding can be stored and gotten from database table(s), XML files, .ini files, through the use of web services, etc.
<fuseaction name="deleteQuiz" permission="deleteQuiz">
...
</fuseaction>
One needs to create a plug-in to check if the permission set (or permissions made available) are matched by the current user – thus (plugins/listCheckSecurity.cfm):
I've just started using the coldspring lexicon for fusebox5 which is very nice indeed (more to come on this). One of this things you have to do when using lexicons is declare the name space (xmlns) and path for the lexicon:
You can then use the name space to reference you lexicons:
Okay this all works fine but what if you have 2 different lexicon directories, one for coldspring and one for custom tags?