linkfieldvalue

Grails: How to make everything I create Upper Case?

只愿长相守 提交于 2019-12-22 04:10:46
问题 I am currently using CSS to change everything I write to upperCase when I create an entry, but that is not enough. When I save things, the text shown in the text fields is upper case, but the real value that Grails stores stays in lower case. I am assuming I'd need to change something in the controller or anything. Maybe transforming the $fieldValue CSS could work?? Any ideas would help! Thnks! 回答1: You could just write setters for your domain object? class Domain { String aField void

Extract URL from link field in Drupal?

痞子三分冷 提交于 2019-12-11 07:08:19
问题 I have a link field that is composed from a URL and the title, I need to print out only the URL of the link field without the title in my node content type tpl file, is that possible ? Thanks! 回答1: It should be as easy as: $url = $node->field_name_of_field[$node->language][0]['url']; I'll break that down a bit: Fields are members of the node object and are always prefixed with field_ so a field called my_field can be found with $node->field_my_field . Each field members of the node object is

Grails: How to make everything I create Upper Case?

只愿长相守 提交于 2019-12-05 02:10:16
I am currently using CSS to change everything I write to upperCase when I create an entry, but that is not enough. When I save things, the text shown in the text fields is upper case, but the real value that Grails stores stays in lower case. I am assuming I'd need to change something in the controller or anything. Maybe transforming the $fieldValue CSS could work?? Any ideas would help! Thnks! You could just write setters for your domain object? class Domain { String aField void setAField( String s ){ aField = s?.toUpperCase() } } I think you are asking how to change values on your domain