ColdBox is an object-oriented, event-driven framework for ColdFusion that includes tools to help developers with bug reporting, logging, enterprise caching, debugging, i18n, URL rewriting, ORM integration, testing, and mocking.
Questions tagged [coldbox]
137 questions
1
vote
1 answer
How to override default dependencies with Mockbox and Wirebox
I have a logger service that has a ScopeStorage and a LoggerServiceDAO dependency and in my unit test I need to override these to use mock objects I have created. I am using Wirebox AOP to trigger the logging events so I can not just create a mock…

Yamaha32088
- 4,125
- 9
- 46
- 97
1
vote
1 answer
How to mock a coldbox.system.web.context.RequestContext and initialize it?
I have inherited some code at my work. A previous person wrote some ColdFusion code that looks like this:
public struct function GetData(Event,RC,PRC){};
I am trying to write a unit-test for this function but I don't know how to mock this…

Jhonson.Chen
- 13
- 3
1
vote
2 answers
Populate Model from a Query with a One-to-Many Relationship
I have two tables:
surveyTemplateHeader
surveyTemplateQuestions
What I was looking to do was get the information from both tables:
var q = dao.getSurveyTemplateDetails( surveyTemplateID = ARGUMENTS.surveyTemplateID );
Then use Coldbox to populate…

Caleb Palmquist
- 448
- 2
- 7
- 15
1
vote
1 answer
Conversion of Minute,Seconds to milliseconds
We are working with millisecond conversion of time duration which is saved in database (Format : mm:ss ).The duration value we can access through the command #bignews.Control_CountdownDuration#.
1
vote
0 answers
Virtual Entity with new datasource
I have a Users entity that is duplicated across a few different applications where it just inherits the datasource from the application.cfc. I am trying to consolidate some sections of the applications to one spot, so I need to access the entity…

Colin
- 91
- 7
1
vote
3 answers
Coldbox and cfschedule
How should I add a cfschedule task to an app using the Coldbox framework?
Should I:
a.) write an event that does what the task, and point cfschedule to that URL with Coldbox?
b.) write a simple .cfm outside of coldbox?
Is one better than the other? …

Henry
- 32,689
- 19
- 120
- 221
1
vote
0 answers
ColdFusion ( CF ) - How to setup a Google Directory API Service Account using ColdFusion 11 (ColdBox 4.0)
Cannot seem to get this working.
Here is the documentation for setting up the service using Java: https://developers.google.com/admin-sdk/directory/v1/guides/delegation
I am attempting to recreate this in ColdFusion. This is my code:
var p12File…

Benson Myrtil
- 11
- 1
- 3
1
vote
0 answers
CF Entity implicit getter putting space in front of number
I have the following object definition:
component persistent="true" table="settings" hint="Settings" extends="coldbox.system.orm.hibernate.ActiveEntity" {
property name="id" fieldtype="id" generator="native";
property name="type" ormtype="string"…

Jason
- 1,957
- 2
- 20
- 34
1
vote
1 answer
coldfusion ajax json - empty request body
Most of my AJAX calls just work with the daya attribute in jQuery to pass singular values. But sometimes I need to pass a structure in JSON to the server for further processing. I know how to, I know it works. But it seems to work only 90% of the…

dreagan
- 2,426
- 6
- 24
- 34
1
vote
2 answers
Coldbox getSetting in a model wirebox injection
I am trying to access Coldbox getSetting within a model.
In the docs, and on Coldbox Google Group posts, it clearly states
The model is a completely isolated layer of your application and has no
access to anything ColdBox unless you inject…

Jay Rizzi
- 4,196
- 5
- 42
- 71
1
vote
3 answers
Glassfish, railo and coldbox - messed up links?
I am new to ColdFusion and ColdBox (and programming). I tried to setup ColdBox but some of the links in the sample applications are broken.
My configuration is a GlassFish v3 installation with the current Railo OSS. I access my site through Apache…

mrt181
- 5,080
- 8
- 66
- 86
1
vote
2 answers
How to embed a image using the ColdBox MailService plugin
I am using the ColdBox MailService plugin to send emails. I am not sure how to include/embed an image in my email.
I tried the tag but this will not work because it is not enclosed in a tag.

isurfbecause
- 990
- 4
- 16
- 30
1
vote
1 answer
CF ORM many-to-many relationship sort order
I have a many to many relationship setup, and need to control the order.
I have an entity with the property below. How do I control the order of the components when retrieved via this relationship?
property name="Components"…

Jason
- 1,957
- 2
- 20
- 34
1
vote
0 answers
Wirebox in custom tags
I have some custom tags where I do things like CreateObject(). Some of the tags are used in controllers, some in views.
I'd love to use wirebox to inject these dependencies instead. Is there a "right way" to get a reference to the wirebox…

jinglesthula
- 4,446
- 4
- 45
- 79
1
vote
1 answer
Mocking transient objects with MockBox
I have this injection metadata at the top of a model:
and later, in a function I request a dependency and start using it:
variables.injector.getInstance("MyTransientDependency").doSomeStuff()
In…

jinglesthula
- 4,446
- 4
- 45
- 79