Resouce Bundle question

I was able to, with a bit of reading get the i18n working greate, and with the help got them to work in custom tags.

Now I have an issue, where the docs mention Unknown Translation as a config option. However I get the following error

Also the docs Unknown is spelled incorrectly on the closing tag.

The config.xml file does not validate with the framework’s schema. & The error details are:
[Error] :201:22: cvc-complex-type.2.4.a: Invalid content was found starting with element ‘UnknownTranslation’. One of ‘{"":UknownTranslation}’ is expected.

It should follow this format:

includes/main en_US session

You can find this in the app template. Try reiniting the framework so changes take effect.

Luis

I think you missed the point…

The online docs is wrong…

While on the subject of resource bundles, how do I use strings that have {0} type params in them. I can’t seem to fidn anything regarding this.

Also not resource bundle related, but I am trying to create a urlMapping.

So that the following url is mapped to a controller and action.

/spaces/uniqueString/pageString

Now what I have so far is this, but I haven’t tested it as yet. But was hoping that someone might tell me if it is possible or not.

<cfset addCourse( pattern="/spaces/:uniqueString/:pageString", handler=“spaces”, action=“displaySpace”) />

Would this work, or would the action still need to be a part of the urlMapping?

Docs fixed.

As for your url mapping, that would work, basically /:uniqueString/:pageString

Will create two variables in the request collection

  1. uniqueString =
  2. pageString =

As for the {0} in the resource bundle strings, you should be able to use that, however, to replace them, I am not that quite familiar with it. You might want to post it in the forums also so we can get mr Paul Hastings to answer that question.

Luis

Cheers…

With the urlMapping, the problem I am having is the url itself.

/space/andrew-scott/test

I would hope would run the controller (handler) space, with the action defined in the routes.cfm however that is not the case. As it appears that I have to still do /space/action/andrew-scott/test as I was hoping to default the action or something. This is maybe not possible with Coldbox?

Does that make sense?

Can you repost again Andrew I am confused on what you are trying to do now.

If you have the pattern you can assign a handler and action to it or set the :handler and :action placeholders on the route itself.

Luis

I kind of figured it out, I think I had a bug somewhere.

You talk about on the route itself, I found that if I do not pass an action. It will default to index, I am not sure how to override that if I need too.

I am use to something like

createLink( controller: ‘handler’, action: ‘someAction’, uniqueString:’andrew-scott’)

And yes this is groovy (grails)…

Yes, it is very similar (eerily similar), have you read the routing guide? It’s all there.

Luis

Yeah that’s what I do like about Coldbox, its ease and power. There are a few things that I don’t know if they are possible or not, for example I do the following.

BuildLink(controller: ‘myController’, action: ‘someAction’)

Which would run the handler myController.someAction, then I will need to setup a view for this. However, I was wondering if there is a possibility that the default eventView is the name of the action?

Now if you can incorporate GORM style into Coldfusion to give us DDD, you would be a winner in my books.

However, I was wondering if there is a possibility that the default eventView is the name of the action?
You can easily do this. http://www.objectivebias.com/blog/entry/implicit-views-in-coldbox

I love how grails has done some of its implementations and I was really happy to see that Grails and ColdBox are very very similar. what is DDD?

I have been pondering on several ideas on how to create a thin layer on top of existing ORM’s (Transfer/Reactor) for ColdBox, to leverage conventions, but still very early in just research. What would you like to see?

Luis

GORM…

DDD, is Domain Driven Design. In the grails world this is how they database gets created, via the domain model.

Wishful thinking I know…