Hello Isomorphic,
after switching to 5.0p (v10.0p_2015-03-25) from 4.1p, I got problems with my boolean fields. As Oracle does not have a boolean datatype in SQL, it needs to be mapped. I chose sqlStorageStrategy="singleCharYN" from the options you offer.
But the value your widgets send is interpreted as String and therefore disregarded by the built-in validation (errorMessage:"Must be no more than 1 characters long").
Please see this builtInDS-based sample:
supplyItem.ds.xml:
supplyItemLarge.data.xml & supplyItem.data.xml:
RegEx-Search:<SKU>.*</SKU>
RegEx-Replace:<SKU>N</SKU>
Then start the sample and select the 1st supplyItem. Change the "SKU"-checkbox and click safe. Result is:
DSRequest-tab of Developer Console:
Raw Response-Tab of Developer Console:
This error message goes away if I remove the length="1" from the field definition.
But this used to work in 4.1p and feels right the way it was. Is this a bug?
Best regards,
Blama
after switching to 5.0p (v10.0p_2015-03-25) from 4.1p, I got problems with my boolean fields. As Oracle does not have a boolean datatype in SQL, it needs to be mapped. I chose sqlStorageStrategy="singleCharYN" from the options you offer.
But the value your widgets send is interpreted as String and therefore disregarded by the built-in validation (errorMessage:"Must be no more than 1 characters long").
Please see this builtInDS-based sample:
supplyItem.ds.xml:
Code:
<field name="SKU" [B]length="1"[/B] type="boolean" sqlStorageStrategy="singleCharYN" title="SKU" required="true"/>
RegEx-Search:<SKU>.*</SKU>
RegEx-Replace:<SKU>N</SKU>
Then start the sample and select the 1st supplyItem. Change the "SKU"-checkbox and click safe. Result is:
DSRequest-tab of Developer Console:
Code:
{
dataSource:"supplyItem",
operationType:"update",
componentId:"isc_DynamicForm_0",
data:{
nextShipment:"2015-03-31",
category:"Adding Machine/calculator Roll",
itemName:"Adding Machine Roll 57x57mm Standard",
itemID:1,
unitCost:0.41,
SKU:false,
inStock:true,
units:"Roll",
description:null
},
textMatchStyle:"exact",
callback:{
target:[DynamicForm ID:isc_DynamicForm_0],
methodName:"saveEditorReply"
},
showPrompt:true,
prompt:"Saving form...",
oldValues:{
nextShipment:"2015-03-31",
category:"Adding Machine/calculator Roll",
itemName:"Adding Machine Roll 57x57mm Standard",
itemID:1,
unitCost:0.41,
SKU:true,
inStock:true,
units:"Roll"
},
requestId:"supplyItem$6271",
internalClientContext:{
},
fallbackToEval:false,
afterFlowCallback:"isc_DynamicForm_0.$49z(dsRequest, dsResponse, data)",
editor:[DynamicForm ID:isc_DynamicForm_0],
lastClientEventThreadCode:"MUP1",
bypassCache:true
}
Code:
{
affectedRows:0,
errors:[
{
[B]SKU:{
errorMessage:"Must be no more than 1 characters long"
}[/B]
}
],
invalidateCache:false,
isDSResponse:true,
operationType:"update",
queueStatus:-1,
status:-4,
data:null
}
But this used to work in 4.1p and feels right the way it was. Is this a bug?
Best regards,
Blama
Comment