If you look into ModelParam.java, you will see that the default-value is only 
intended to be a simple String, it's not interpreted as an action.
You could enhance it and provide a patch in a Jira

Jacques

xxshutong wrote:
> Dear friends,
> I want to set a date field in entity to current time. I use service as bellow:
> 
> <service name="createInput" default-entity-name="InventoryInput" 
> engine="entity-auto" invoke="create" auth="true">
>         <description>Create a new input record</description>
>         <!--<permission-service service-name="exampleGenericPermission" 
> main-action="CREATE"/>-->
>         <auto-attributes include="pk" mode="OUT" optional="false"/>
>         <auto-attributes include="nonpk" mode="IN" optional="true"/>
>         <override name="machine_no" optional="false"/>
>         <override name="product_id" optional="false"/>
>         <override name="batch_no_id" optional="false"/>
>         <override name="inputDate" default-value="${bsh: 
> org.ofbiz.base.util.UtilDateTime.nowTimestamp()}"/>
>    </service>
> 
> But the bold part can't work correctly, any suggestions?
> 
> Thanks,
> Leon.Zhou

Reply via email to