Modifica Entità tramite file xml

30 Jan '12, 10:37 AM
30,901 Views
No Forum Badges

Salve, abbiamo realizzato un'applicazione che utilizza webratio come parte server e comunica con il client tramite file xml, mi spiego meglio; la nostra applicazione crea dei file xml delle nostre entità, il nostro client legge questi xml e visualizza i dati in un determinato modo. L'applicazione client modifica questi file xml aggiungendo, rimuovendo o modificando un'istanza, quello che serve a noi è: -lettura da parte di webrartio di un file xml -salvataggio di eventuali modifiche nell'entità.

Abbiamo provato a utilizzare una getXmlUnit per recuperare il file nella sua posizione poi abbiamo fatto un passaggio alla XmlInUnit (Aggiungendo una XMLInEntity) ora non sappiamo come procedere per il controllo di eventuali modifiche e salvataggio nell'entità! Suggerimenti?

 
x 0
Follow
Answer Answer at this question and get points!
Forum Starter - Level 4

Ciao Bruno, la XML In Unit può lavorare su un'entità o su una relazione. Inoltre, sull'entità o relazione che setti su di essa, puoi definire quale Update Policy utilizzare. Di default è impostato a No Action, nel momento in cui invece hai bisogno di aggiungere o di sovrascrivere, puoi utilizzare le altre due properties Extend o Overwrite.

Inoltre se l'entità in questione è un'entità volatile, puoi utilizzare anche la property Delete All Before, che va a svuotare l'entità volatile prima di popolarla nuovamente.

   
x 1
Forum Starter - Level 4

Ciao Bruno, è proprio per questa ragione che ti accennavo all'utilizzo di entità volatili. Utilizzando l'entità volatile, tu puoi cancellare tutto il contenuto prima di ripopolarlo con ciò che ritieni opportuno. Solo a quel punto puoi scrivere sull'entità persistente ciò che ti interessa.

 
x 1
No Forum Badges

Ok, grazie Mario! Ora il nostro problema è: L'aggiornamento dell'entità funziona perfettamente, però se un record è stato cancellato dalla parte client, dovrebbe essere cancellato anche nell'entità, ma questo non lo fa perchè si occupa di fare solo l'aggiornamento.

 
x 0
Answer at this question and get points!

Related questions

Acceder a diferentes site views/ Acces to diferents site views Add to Bag link in ACME any webratio book ? Asking For a Book Attribute comparison in a selector unit Clarification about the NoOperation unit Codigo QR Como hacer un menu en webratio? Conditional Expression "greater than 0" on null fields Connect more query unit Content module page variable won't assign. Convert selector component result to single value Could not open the editor: This copy of WebRatio is not registered coupled mandatory fields Create Unit with Date (Year only) Custom Attributes Condition Database Database List is not showing up in App Emulator Data is always created doubled Data Management: Updating Data - Attachments - Updating Data Sample Project Final Description: Unknown tag 'wr:LinkResource' Dudas sobre modelado(Data Flow,Forms y Operation Create) Empty record mistakenly saved en_US codify problem Export XML external link.= Filter information in a Simple List Format currency forward/backward navigation and bookmark in ajax web app "Generation Error" with Generate and Run Generation options problem get the attachment files of an email Get Unit problem Get Year from Date Help for connect public and private site views How can i create pagemenu or landmarkmenu with multiple levels. How can I import a view in the Domain Model as an attribute of an Entity? How does WebRatio represent these IFML elements? / ¿Cómo representa WebRatio estos elementos IFML? How i can reuse modules in multiple projects? How to define the sequence of execution units on a page? How to display the attributes of a related entity. How to filter imported attributes? How to include Selector Unit result in Mail Unit Body? How to pass vars to a alternative page How to process IFML Model (build with Eclipse editor) with ATL How to show a page based on a boolean? How to speed up the "last" link using PowerIndexUnit for lots of records How to store data related to an entity in relationships in a project web Import an XPDL 2.2 file into a BPM Project Importing JAR Libraries into Script Unit Insert data into database Insert master page to many hybrid modules Integrating a BPM model into an existent WebML model JSON I/O Unit e informazioni derivate KO Links in Selector Unit Landmark in hybrid module Link localization Links from Index unit with condition Link Visibility Condition Power Index Unit Mail multipla maintain the record order in a sortable list Math Unit to update attributes of an entity? Missing units when importing project [MOBILE] How I extract information from JSON client side? Multi Entry Unit: How to forward only checked rows? multi-lingual product description Non riesco a fare funzionare Xml out unit Parametrizzazione Selector Unit Problem Example create Unit (no company in employee table) Problem in adding diagrams in IFML Editor (Eclipse) Problem with query unit! Problem with Scroller Unit Process model import in other languages query a database Question about Site Views Rename passing attributes Replace ID by its value in another table Search by Selector component does not work Select between parameters Selector unit doesn't return any value in hybrid module Sending mails is not working Sending mails with gmail is not working Setting the Default link for a Switch unit show/hide fields on button click (registration page) [solved] all links transparent, why ? Something leads to wrong condition expression evaluation. sumar atributos de una tabla filtrado por Role Condition Sum entity's values Transportation Link issue Unique Fields using relationship role conditional with null usuarios y grupos utilizzo componenti database Visibility Condition on Multiple Links From Index Unit Web Ratio Mobile and Foreign Key WebRation - Create Navigation diagram WebRatio no imports all attributes (fields) of a table