"Default Value" attribute on <g:ui_reference ??

Makosko
Tera Expert

does the <g:ui_reference macro support an attribute for specifying a default value ? I can set it using a client script but that is not an ideal scenario...

the <g:ui_reference macro is to be invoked in an UI page...

1 ACCEPTED SOLUTION

Hey makosko,



Also try setting displayvalue too. Did you try that?



<g:ui_reference name="ref" table="${table_name}" value="<give_sys_id_of_default_value_here> displayvalue="<display_Value_here>" "/>


View solution in original post

6 REPLIES 6

adiddigi
Tera Guru

<g:ui_reference name="ref" table="${table_name}" value="<give_sys_id_of_default_value_here>"/>


thanks for your reply. looks like there is some kind of bug with rendering a reference field in my instance since I can`t see a record display name, although I know it was loaded.... I recall trying value, default_value and default as attributes... thanks for your help anyway..


Hey makosko,



Also try setting displayvalue too. Did you try that?



<g:ui_reference name="ref" table="${table_name}" value="<give_sys_id_of_default_value_here> displayvalue="<display_Value_here>" "/>


that did the trick



<g:ui_reference name="ref" table="sys_user" value="${gs.getUserID()}" displayvalue="${gs.getUser().getDisplayName()}" />