connais pas ActionListener, ça sert à quoi ???
voici mon code :
- Code : Tout sélectionner
Sub Initialize()
Dim session As New NotesSession
Dim db As NotesDatabase
Dim viewContacts As NotesView
Dim viewAllContacts As NotesView
Dim viewNew As NotesView
Dim docContact As NotesDocument
Dim doc As NotesDocument
Dim docNew As NotesDocument
Dim agent As NotesAgent
Dim noteid As String
Dim nbDocs As Long
Dim b As Byte
Dim q As String
Dim country As String
Dim nomEnquete As string
On Error GoTo erreur
Set db=session.Currentdatabase
Call db.UpdateFTIndex(True)
Set viewContacts=db.Getview("(Contacts)")
Set viewAllContacts=db.Getview("AllContacts")
Set agent=session.Currentagent
noteid=agent.ParameterDocID
Set doc=db.GetdocumentbyID(noteid)
country=""
If doc.Getitemvalue("Countries")(0)<>"" Then
ForAll x In doc.Getitemvalue("Countries")
If country="" Then
country={"} + x + {"}
Else
country=country + { OR "} + x + {"}
End If
End ForAll
q={(FIELD Country CONTAINS } + country + {)}
nbDocs=viewContacts.Ftsearch(q, 0)
If nbDocs>0 Then
nomEnquete=doc.GetItemValue("DatabaseName")(0)
Set docContact=viewContacts.Getfirstdocument()
While Not(docContact Is Nothing)
Set docNew = New NotesDocument(db)
Call docContact.Copyallitems(docNew,True)
Call docNew.Replaceitemvalue("NomEnquete", nomEnquete)
Call docNew.Save(True,False)
Set docContact = viewContacts.GetNextDocument(docContact)
Wend
Set viewNew=db.Createview("CustomizedDatabase\" + nomEnquete ,{SELECT Form="Contact" & NomEnquete="} + nomEnquete + {"},viewAllContacts, True)
Call viewContacts.Clear
End If
End If
Exit Sub
erreur:
MsgBox "Agent Error : (CreateCustomizedDatabase) " + CStr(GetThreadInfo (1))+" Call by "+Cstr(GetThreadInfo(10))+")"+Chr(10)+"Erreur " + Str(Err) + " : "+Chr(10) + CStr(Error)+". "+Chr(10)+"Ligne N° "+Cstr(Erl)
Exit Sub
End Sub
le but :
- récupérer une valeur saisie dans ma xPage
- passer cette valeur à mon agent ls pour faire une recherche fulltext sur une vue
- créer une vue avec le résultat de cette recherche
--> et je voudrais ouvrir ma vue, qui est contenue dans une xPage c'est ça que je n'arrive pas à faire