Das Notes Forum

Domino 9 und frühere Versionen => ND6: Entwicklung => Thema gestartet von: robertpp am 19.12.05 - 21:46:09

Titel: 2 Embedded View in Web contents as HTML
Beitrag von: robertpp am 19.12.05 - 21:46:09
Hallo ich hab ein Problem mit 2 embedded views in einer Web Maske die als contents as HTML angezeigt werden sollen!
Besteht hier das gleiche Problem wie wenn ich zwei View mit JavaApplet im Web anzeigen möchte?

Hier gibt es ja ein kleines Würgaround:
Zitat
How to embed more than one view in a form: 

Original posted by Linda Ruiz (Notes.net Gold Release Forum)

Caveats:
1. Ensure this form is only available on the web otherwise you wil have to deal with strange display problems - some harmless.

2. When Lotus changes the view parameters, or their engine with regards to embedded views, this will probably break.

Embed your first view as you normally would.
Paste the code below into your form as Pass-thru HTML, changing the names to protect the innocent. If your're not sure what to change, display one of your existing forms with an embedded view into your browser, then view the source. Note the table is optional.

The code:

<TABLE BORDER=0><TR VALIGN=top><TD WIDTH="595" BGCOLOR="E0E0FF">
<APPLET NAME="view" CODE="lotus.notes.apps.viewapplet.ViewApplet.class" CODEBASE="/domjava" ARCHIVE="nvapplet.jar" ALT="View" WIDTH="594" HEIGHT="144">
<PARAM NAME="cabbase" VALUE="nvapplet.cab">
<PARAM NAME="Database" VALUE="<Computed Value>">
<PARAM NAME="ViewName" VALUE="evwHotItems">
<PARAM NAME="PanelStyle" VALUE="LINE_BORDER">
<PARAM NAME="ViewUNID" VALUE="8095d6a60b7e08d2852569530009078f">
<PARAM NAME="bgColor" VALUE="E0E0FF">
<PARAM NAME="RestrictToCategory" VALUE="Software">
<PARAM NAME="locale" VALUE="en">
<PARAM NAME="IconPath" VALUE="/icons">
</APPLET>
</TD></TR></TABLE>

To review, you MUST change the ViewName, ViewUNID & RestrictToCategory parameters with your values. If you don't know the viewUNID simply create a dummy form, embed the view, display in your browser, display source and copy the string for ViewUNID to your code.

Suggestions, additional tips appreciated.


Mein derzeitiges Script sieht so aus:

<script language="JavaScript" TYPE="text/javascript" src="//WebcamM1.nsf/clientsniff.js">
</script>
REM Dann ist das die erste View mit Contents as HTML
<a id="test_1" href="/Applications/Intier/IT/WebcamM1.nsf/picture/RPRZ-6K8J72/$file/current.jpg"></a>
<a id="test_2" href="/Applications/Intier/IT/WebcamM1.nsf/picture/RPRZ-6K8JHC/$file/current.jpg"></a>
REM Viewende
<script language="JavaScript">
var test_url = new Array;
REM und hier sollte dann eine andere View mit Contents as HTML rein mit dem Inhalt:
test_url[1] = "";
test_url[2] = "";

usw.

Es funktioniert beides getrennt aber in Kombination bekomme ich es nicht zu laufen.
Kann mir da jemand bitte weiterhelfen?

danke robert
Titel: Re: 2 Embedded View in Web contents as HTML
Beitrag von: umi am 20.12.05 - 07:41:53
Geht nich.
Notes kann nicht 2 Views als HTML darstellen im Web.

Workaround:
1. https://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/a6a28b636444a896852570b6006c3d69?OpenDocument  (https://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/a6a28b636444a896852570b6006c3d69?OpenDocument)

2. Webqueryopen Agent, welcher dir den entsprechenden Code generiert und in ein Feld schreibt

3. Ajax ansatz: via XMLHTTP Request und einem Agent holt sich ein JS alle nötigen Daten und stellt diese dann dar.



Titel: Re: 2 Embedded View in Web contents as HTML
Beitrag von: robertpp am 20.12.05 - 09:06:26
Danke umi ich hab es mit der Lösung 2 gemacht. Einen Agent der mir alle Einträge einer View zählt und dann das Script in einem Feld erstellt.

Jetzt noch eine kleine Frage: Wäre es möglich zu zählen wieviele id's es gibt,
Sprich:
<a id="test_1" href="/Applications/Intier/IT/WebcamM1.nsf/picture/RPRZ-6K8J72/$file/current.jpg"></a>
<a id="test_2" href="/Applications/Intier/IT/WebcamM1.nsf/picture/RPRZ-6K8JHC/$file/current.jpg"></a>


das wären jetzt 2 mit test_1 und test_2?

danke robert
Titel: Re: 2 Embedded View in Web contents as HTML
Beitrag von: umi am 20.12.05 - 09:09:33
ja klar, Dein Agent, welcher dein HTML zusammenbaut könnte die Anzahl in ein weiteres Feld des Dokuments schreiben.

oder falls dein Agent nur JS Code produziert, könnte diese Auswertung im JS gemacht werden.



Titel: Re: 2 Embedded View in Web contents as HTML
Beitrag von: robertpp am 20.12.05 - 10:49:18
Nein ich meine das anders:

Ich möchte das in Javascript haben und das direkt auf der Maske als Passthru-HTML.

Vielleicht geht das irgendwie mit document.getallElementsbyName oder ID?
und dann schreib ich mir das einfach in eine Variable.

Geht das so auch?