ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Olmstead <jolmste...@gmail.com>
Subject Re: Modifying Form Data
Date Mon, 12 Jul 2010 18:47:29 GMT
Thanks for the response.  When I change from actions to row-actions I get
nothing.  Not even the "1" when entering a new routing.  Am I missing
something?  And yes, I realize this will not update to the database.  I plan
to intercept UpdateRoutingTask and convert the data back to milliseconds
before updating.


On Mon, Jul 12, 2010 at 1:35 PM, Adrian Crum <adrianc@hlmksw.com> wrote:

> You will need a row action for that. Keep in mind if you change the field's
> value on the fly like that and the user clicks Save, the wrong value will
> get saved.
> -Adrian
> On 7/12/2010 11:04 AM, Jeremy Olmstead wrote:
>> I would like to be able to take data to be displayed in a forms text field
>> and manipulate it before it is displayed.  How can I do this?  See below
>> for relevant example code.  Here I want to display estimatedSetupMillis as
>> minutes instead of milliseconds.
>> file: RoutingTaskForms.xml
>> <form name="EditRoutingTask" target="UpdateRoutingTask"
>> extends="EditRoutingTask"
>> extends-resource="component://manufacturing/widget/manufacturing/RoutingTaskForms.xml">
>>         <actions>
>>             <set field="estimatedSetupMillis" value="${groovy:
>> return(estimatedSetupMillis/60000);}"/>
>>         </actions>
>> This doesn't do anything.  If I change the actions section to below, I get
>> a
>> "1" when creating a new task, but when editing a task I still just get the
>> milliseconds.  Obviously when in edit mode it just replaces
>> estimatedSetupMillis with whatever is in the database.  I also have a
>> feeling that estimatedSetupMillis may not be defined yet in the actions
>> section.  How can I make it so I can modify the data before it gets
>> displayed?
>>         <actions>
>>             <set field="estimatedSetupMillis" value="1"/>
>>         </actions>
>> Regards,
>> Jeremy Olmstead

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message