[Logo] Forums for GrailsFlow, Weceem, XSLfast
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Set default Status  XML
Forum Index » Weceem Forum
Author Message
leobarrientos



Joined: 27/07/2010 14:29:44
Messages: 6
Offline

Hi,

I created a new Content, extend of WcmContent, and now I want to set the status to Publishing, widoth asking to the user.

How can I do this?



I put this in may code, but dosn't work.

Bye.

Leonardo.
marcpalmer



Joined: 04/06/2009 13:36:35
Messages: 286
Location: UK
Offline

Try overriding getStatus in your content class:


This should work - but it will probably be a bit slow. You don't want to query the database every time, so it would be best to write yourself a service / static helper that gets the published status at startup (remember there can be more than one public status, and it may not be called "published"), and stores it so that the domain class getStatus can just read that value later.

This message was edited 1 time. Last update was at 27/07/2010 16:33:58


- -
Twitter: wangjammer5
Blog: http://www.anyware.co.uk
Grails plugins: http://www.grailsrocks.com
[WWW]
 
Forum Index » Weceem Forum
Go to:   
Powered by JForum 2.1.8 © JForum Team