Domino 9 und frühere Versionen > ND6: Entwicklung

Probleme beim Laden von Daten aus dem Backend ins Frontend

<< < (2/3) > >>

Hazamel:
Was ich auch nicht verstehe, ist warum die Daten beim schließen der Maske ohne Speichern weg sind.

Im Java-Agenten speichere ich die Werte ja schon nachdem ich die Methoden durchlaufen habe mit einem doc.save();


--- Code: ---Stat1(rs, st, doc);
            Stat2(rs, st, doc);
            Stat3(rs, st, doc);
            Stat4(rs, st, doc);
            doc.save();


--- Ende Code ---

Fedaykin:
Hab Dir ein Codebeispiel gesucht wo es um so einen reopen geht. Ist aus einer Klasse rauskopiert also weiss nicht wie gut so klappt aber wie das mit neu öffnen gemeint ist müsste man da so rauslesen können. Hoffe hilft.

   Sub ReOpen(msource as notesuidocument,FormName As String)
      Dim ws As New NotesUIWorkspace
      Dim olduidoc As NotesUIDocument
      Dim thisdoc As NotesDocument
      Set olduidoc=mSource
      Set thisdoc = mSource.Document ' doc in memory but hasn't been saved yet
      
      UnbindEvents
      
      thisdoc.Form=FormName
         ' set the SaveOptions field so that when the uidoc is closed, the user won't be asked to save
      thisdoc.SaveOptions = "0"
         ' close the uidoc. It won't actually happen until the code is finished executing
      olduidoc.Close False
      
         ' create a new uidoc and open the backend doc that is still in memory with added doc link
      Set mSource = ws.EditDocument(True, thisdoc)
         ' delete the reference to the old uidoc
         ' this is necessary because the code below affects it if left in memory
      Delete olduidoc
         ' re-associate the variable with the backend doc
         ' have to do this because the olduidoc reference was deleted
      Set thisdoc = mSource.Document
         ' remove the SaveOptions field so the doc can be saved
      thisdoc.RemoveItem "SaveOptions"
      mSource.Refresh
   End Sub

Hazamel:
Hmm.... danke.

...aber auch nicht von erfolg gekrönt. Hatte das mit einem Feld namens SaveOptions schon probiert und nach Ausführen des Agenten die Registerkarte schließen lassen um zur Ansicht zurückzukehren, wo die Daten ja richtig ausgelesen werden können, aber eben nur über die Eigenschaften des Dokuments.

Leider sind dann wieder alle Daten weg  >:(

Fedaykin:
Wenn Werte richtig im Dokument stehen und nicht irgendwie bei initialisieren der Maske überschrieben werden weiss ich auch nicht weiter. Hab ich bisher noch nie erlebt.

Gruss
Remo

Hazamel:
Danke auf jeden Fall für die Hilfe und die Vorschläge.

Ich werd jetzt noch ein bißchen rumprobieren und falls ich noch eine Lösung finde, werd ich sie auf jeden Fall, incl. Fehlerbeschreibung, hier posten.

Navigation

[0] Themen-Index

[#] Nächste Seite

[*] Vorherige Sete

Zur normalen Ansicht wechseln