IDEMPIERE-460 Cleaning idempiere schema, Making outputfields to unbounded, Resolving issue with validated lookups

This commit is contained in:
Deepak Pansheriya 2012-12-20 17:15:47 +05:30
parent 1dde3e4227
commit 0230f937e8
3 changed files with 7 additions and 92 deletions

View File

@ -1035,11 +1035,16 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic
}
if (!po.set_ValueOfColumnReturningBoolean(field.getColumn(), value))
throw new IdempiereServiceFault("Cannot set value of column " + field.getColumn(), new QName("setValueAccordingToClass"));
//Setting context for lookup resolution
Env.setContext(Env.getCtx(), 0, field.getColumn(), value==null ? null : value.toString());
}
public StandardResponseDocument scanFields(DataField[] fields,MWebServiceType m_webservicetype,PO po,POInfo poinfo,Trx trx,StandardResponse resp, StandardResponseDocument ret){
Map<String,Object> requestCtx = getRequestCtx();
//Clear ctx
Env.clearWinContext(Env.getCtx(),0);
for (DataField field : fields) {
// Implement lookup
X_WS_WebServiceFieldInput fieldInput = m_webservicetype.getFieldInput(field.getColumn());

View File

@ -289,7 +289,7 @@ public class AbstractService {
protected void setOuputFields(StandardResponse resp,MWebServiceType m_webservicetype,PO po,POInfo poInfo){
String[] outCols = m_webservicetype.getOutputColumnNames(false);
if(outCols.length>0){
OutputFields outputFields = resp.getOutputFields();
OutputFields outputFields = resp.addNewOutputFields();
if(outputFields==null)
outputFields=resp.addNewOutputFields();

View File

@ -129,53 +129,6 @@
<xsd:attribute name="ColumnName" type="xsd:string"/>
</xsd:complexType>
<!--
int WindowNo, int AD_Window_ID, int AD_Menu_ID, int TabNo, int PrevTabNo, int PrevRecNo, boolean getData, int RowStart, int RowCount)
-->
<xsd:element name="WindowTabDataReq" type="tns:WindowTabDataReq"/>
<xsd:complexType name="WindowTabDataReq">
<xsd:sequence>
<xsd:element name="FindCriteria" type="tns:DataRow"/>
</xsd:sequence>
<xsd:attribute name="WindowNo" type="xsd:int" />
<xsd:attribute name="AD_Window_ID" type="xsd:int" />
<xsd:attribute name="AD_Menu_ID" type="xsd:int" />
<xsd:attribute name="TabNo" type="xsd:int" />
<xsd:attribute name="PrevTabNo" type="xsd:int" />
<xsd:attribute name="PrevRecNo" type="xsd:int" />
<xsd:attribute name="getData" type="xsd:boolean" />
<xsd:attribute name="RowStart" type="xsd:int" />
<xsd:attribute name="RowCount" type="xsd:int" />
<xsd:attribute name="fromZoom" type="xsd:boolean" />
<xsd:attribute name="fromZoom_Window_ID" type="xsd:int" />
<xsd:attribute name="fromZoom_Tab_ID" type="xsd:int" />
<xsd:attribute name="fromZoom_Row_ID" type="xsd:int" />
<xsd:attribute name="fromZoom_ColumnName" type="xsd:string" />
<xsd:attribute name="fromZoom_ColumnValue" type="xsd:string" />
</xsd:complexType>
<xsd:element name="ADMenu" type="tns:ADMenuItem"/>
<xsd:complexType name="ADMenuItemList">
<xsd:sequence>
<xsd:element name="Item" type="tns:ADMenuItem" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ADMenuItem">
<xsd:sequence>
<xsd:element name="items" type="tns:ADMenuItemList"/>
<xsd:element name="description" type="xsd:string"/>
<xsd:element name="url" type="xsd:string"/>
</xsd:sequence>
<xsd:attribute name="AD_Menu_ID" type="xsd:int"/>
<xsd:attribute name="type" type="xsd:string"/>
<xsd:attribute name="name" type="xsd:string"/>
</xsd:complexType>
<xsd:element name="ADLoginRequest" type="tns:ADLoginRequest"/>
<xsd:element name="ADLoginResponse" type="tns:ADLoginResponse"/>
@ -202,37 +155,18 @@
<xsd:element name="clients" type="tns:LookupValues"/>
<xsd:element name="warehouses" type="tns:LookupValues"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Location">
<xsd:sequence>
<xsd:element name="C_Location_ID" type="xsd:int"/>
<xsd:element name="Name" type="xsd:string"/>
<xsd:element name="Address1" type="xsd:string"/>
<xsd:element name="Address2" type="xsd:string"/>
<xsd:element name="City" type="xsd:string"/>
<xsd:element name="PostalCode" type="xsd:string"/>
<xsd:element name="C_Country_ID" type="xsd:int"/>
<xsd:element name="C_Region_ID" type="xsd:int"/>
<xsd:element name="Countries" type="tns:LookupValues" minOccurs="0" maxOccurs="1"/>
<!-- <xsd:element name="Regions" type="tns:LookupValues" minOccurs="0" maxOccurs="1" /> -->
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="StandardResponse">
<xsd:sequence>
<xsd:element name="Error" type="xsd:string" minOccurs="0" />
<xsd:element name="Summary" type="xsd:string" minOccurs="0" />
<xsd:element name="LogInfo" type="xsd:string" minOccurs="0" />
<xsd:element name="Data" type="xsd:hexBinary" minOccurs="0" />
<xsd:element name="outputFields" type="tns:outputFields" minOccurs="0"/>
<xsd:element name="outputFields" type="tns:outputFields" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="RunProcessResponse" type="tns:RunProcessResponse" minOccurs="0"/>
<xsd:element name="WindowTabData" type="tns:WindowTabData" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="IsError" type="xsd:boolean" />
<xsd:attribute name="IsRolledBack" type="xsd:boolean" />
<xsd:attribute name="RecordID" type="xsd:int" />
<xsd:attribute name="ReportFormat" type="xsd:string" use="optional" />
</xsd:complexType>
<xsd:complexType name="outputFields">
@ -247,32 +181,8 @@
</xsd:complexType>
<xsd:element name="Location" type="tns:Location"/>
<xsd:element name="StandardResponse" type="tns:StandardResponse"/>
<xsd:element name="DocAction" type="tns:DocAction"/>
<xsd:complexType name="DocAction">
<xsd:sequence>
<xsd:element name="Action" type="tns:LookupValues" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Error" type="xsd:string"/>
</xsd:sequence>
<xsd:attribute name="IsError" type="xsd:boolean"/>
<xsd:attribute name="RecordID" type="xsd:int"/>
</xsd:complexType>
<xsd:element name="getLookupSearchDataReq" type="tns:getLookupSearchDataReq"/>
<xsd:complexType name="getLookupSearchDataReq">
<xsd:sequence>
<xsd:element name="Params" type="tns:DataRow" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="WindowNo" type="xsd:int" />
<xsd:attribute name="TabNo" type="xsd:int" />
<xsd:attribute name="RowNo" type="xsd:int" />
<xsd:attribute name="ColumnName" type="xsd:string" />
</xsd:complexType>
<!-- Elements added for model web services -->
<xsd:element name="ModelSetDocActionRequest" type="tns:ModelSetDocActionRequest"/>