Autor Thema: Ansprechen von Feldern in einer tabed Table im Web  (Gelesen 1449 mal)

Offline mahonri

  • Aktives Mitglied
  • ***
  • Beiträge: 128
  • Geschlecht: Männlich
  • Schon mal Domino mit Servern gespielt
Wenn ich versuche mit Java-Script,innrehalb einer Tabed-Table, Felder anzusprechen, die in der gerade verborgenen Tabellenzeile sind, bekomme ich die Fehlermeldung, dass er das Feld nicht findet.
Gibt es eine Möglichkeit die Register der Tabelle programatisch mit Java-Script zu wechseln? um so die Feldprüfung in Teile zu zerlegen?
Thomas

P-CLP Development 4,5,6
P-CLP Admin 5
CLP Admin 6

Glombi

  • Gast
Re:Ansprechen von Feldern in einer tabed Table im Web
« Antwort #1 am: 27.11.03 - 15:51:52 »
Tabbed tables und Web - das ist mal wieder so eine Sache.

Es ginge evtl. so  - anderes Problem, gleiche Wirkung:

Title:   
      Refreshing Document From a Web Browser Switches Tabbed Table Back to First Tab
Product:
Platform(s):
   Lotus Domino  >  Lotus Domino Server  >  5.x
      Platform Independent
      
Document Number:   1098439   Date:   29.01.2002




This document is based on the following Software Problem Reports (SPRs):
About SPRs
SPR Number   SPR Status   SPR Fixed Release
DBRO4PBNLS
CDCO47LKKS   Open/Reproduced
Duplicate Report   Not Applicable
Not Applicable
Problem
Using a web browser, you switch to the second or third tab of a tabbed table in a Domino application.  If you then cause a document refresh to occur by, for example, changing a value in a keyword field that has the "Refresh Fields on Change" option enabled or selecting an Action that executes an @Command([ViewRefreshFields]), the document refreshes with the first tab of the table displayed instead of the tab the browser had perviously selected.



Solution
This issue has been reported to Lotus Quality Engineering.

To work around this issue you can make the tabbed table programmable.  Create a hidden form action that executes the document Refresh and sets the desired Table Tab that should be returned.  Use the JavaScript that Domino serves up for this action as the JavaScript code for the keyword's onChange event or in another action's onClick event.  The following is a more detailed description of how this can be done:

1. Design the table to be Tabbed and Programmable.  On the Table Rows tab (second from right) of the Table Properties dialog box, set the "Which Row to Display" option to "Switch Rows Programmatically" and "Also Show Tabs so Users Can Pick Rows."

2. In the Table Programming tab (right-most tab) of the Table Properties dialog box, enter a name for the table in the "Name/ID" field in the "Table HTML Tags" section.  

3 In the Row Tags section on this same tab, name each row in the field labeled "Name".  Select the first row of the table and enter a name for that row, then select the second row of the table and enter a name for that row and so on for each row in the table.

4. Add a text editable field to the design of the form with the name $tablename, where tablename is the name you gave the table in step two. The field name must exactly match the table name, that is, it is case sensitive.  Hide this field from web browsers by enabling the "Web Browser" option on the Paragraph Hide When tab of the Field Properties dialog box.

5. Enable the "Generate HTML for All Fields" form option on the Advanced tab of the Form Properties dialog box.

6. Create a Form Action with the following formula:

@Command([ViewRefreshFields]);
@SetField("$MyTable";"Tab2");
@Command([RefreshHideFormulas])

 $MyTable was the name given for the table, and Tab2 was the name given for the row the browser should be returned to.

7. Compose a new document using a browser and examine the HTML that Domino generated for the Form Action.  For example:

onClick="return _doClick('ba1bc1110fd3b6088625677b0073b785/$V5ACTIONS/0.1C4', this, null)

When the Form Action is selected, the "_doClick" function is called and the path to the clicked action is passed to the function.  This is how the browser tells the server which button was clicked.

ba1bc1110fd3b6088625677b0073b785  -  This is the UNID of the form design note.
$V5ACTIONS  -  This is the form's item that contains the form actions.
0.1C4  -  This is the offset to the CD Record that contains the formula behind the action.

This information can be used to call the _doClick function and have any Form Action execute from other document events.  After capturing this information from the HTML source, the action can be marked as Hide from Web browser.  For example, to have the Form Action execute when a keyword's value is changed, add the following to that keyword's onChange event:

return _doClick('ba1bc1110fd3b6088625677b0073b785/$V5ACTIONS/0.1C4', this, null)

Changing the Keyword field's value will execute the Form Action and the browser will be returned to the desired tab.


 

Impressum Atnotes.de  -  Powered by Syslords Solutions  -  Datenschutz