If you are using sql processor then just define your empty result set in sql:no-results to replace the instance in your model with this empty xml template.If you are doing something else you will have to provide more detail in your question and the actually database you are calling, etc. You reference i-instance and no where in your model do you show an instance with that id.
Brian Steuhl
Follow BTM on Twitter
Website: http://BTMSoftwareSolutions.com
Business Email: [hidden email]
Cell: 908-421-0742Home Office: 732-961-3187
Google Voice: 732-800-1286 (1BTM)
RSS Feed To My Blog:
From: daniele ippoliti <[hidden email]>
To: [hidden email]
Sent: Mon, April 18, 2011 5:09:28 AM
Subject: [ops-users] Re: URGENT: I'm not able to do insert in an empty xml..
sorry the second instance is
<xf:instance id="i-instance">
<RefPoints xmlns="">
</RefPoints>
</xf:instance>
2011/4/18 daniele ippoliti <[hidden email]>
Hello If I receive an empty instance from the database is it possible to insert a template... I'm not able to do it....
<xf:instance id="templateRefPoint">
<RefPoint xmlns="">
<Name Language="" ID=""></Name>
<GeneralCategory></GeneralCategory>
<AttractionCategory></AttractionCategory>
<ReferenceCategory></ReferenceCategory>
<Rank></Rank>
<AppropriateFor></AppropriateFor>
<Seasonality></Seasonality>
<Description Language="" ID=""></Description>
<Location>
<LocationCode></LocationCode>
<DirectionFromHotel></DirectionFromHotel>
<Distance DistanceUnit=""></Distance>
<Latitude LatitudeUnit="" LatitudeOrientation=""></Latitude>
<Longitude LongitudeUnit="" LongitudeOrientation=""></Longitude>
</Location>
<Contact>
<PhoneCountry></PhoneCountry>
<PhoneAreaCity></PhoneAreaCity>
<PhoneNumber></PhoneNumber>
<WebsiteURL></WebsiteURL>
<StreetAddress></StreetAddress>
<CountryName></CountryName>
<StateProv></StateProv>
<CityName></CityName>
<PostalCode></PostalCode>
</Contact>
</RefPoint>
</xf:instance>
<xf:instance id="templateRefPoint">
<RefPoints xmlns="">
</RefPoints>
</xf:instance>
<xf:submission id="s-send" method="put" action="file:/D:/fake/myData.xml" replace="none" instance="i-instance" validate="false" >
<xf:action ev:event="xforms-submit-error">
<xf:message level="ephemeral">Submission failed</xf:message>
</xf:action>
<xf:action ev:event="xforms-submit-done">
<xf:message level="ephemeral">Submission successfull.</xf:message>
</xf:action>
</xf:submission>
....
SAVE button
<xf:label>Save</xf:label>
<xf:trigger id="saveButtonBottom" class="orderListAddTrigger">
<xf:action ev:event="DOMActivate">
<xf:insert context="instance('i-instance')" at="last()" position="after" origin="instance('templateRefPoint')"/>
</xf:action>
</xf:trigger>
SUBMIT BUTTON
<xf:submission id="s-send" method="put" action="file:/D:/fake/myData.xml" replace="none" instance="i-instance" validate="false" >
<xf:action ev:event="xforms-submit-error">
<xf:message level="ephemeral">Submission failed</xf:message>
</xf:action>
<xf:action ev:event="xforms-submit-done">
<xf:message level="ephemeral">Submission successfull.</xf:message>
</xf:action>
</xf:submission>
why the file myData is empty ?????
it's urgent !!!!
thank you for your answers
Daniele
--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Free forum by Nabble | Edit this page |