AnsweredAssumed Answered

genericPicker

Question asked by fatimazahra_6762 on Apr 19, 2010
Latest reply on Apr 20, 2010 by fatimazahra_6762
Bonjour à tous,
[img]http://img405.imageshack.us/img405/9034/capi.png[/img]
Je vises à ajouter un bouton à ce formulaire nommé "Montrer tous" qui permet d'afficher tous les utilisateurs qui existe sur la base de données, et après j'aurais la possibilité de sélectionner l'utilisateur que je veux, ou bien j'applique une recherche

j'ai trouvé que ce formulaire s'affiche grâce à un tag nommé "genericPicker"
<tag>
      <name>genericPicker</name>
      <tag-class>org.alfresco.web.ui.common.tag.GenericPickerTag</tag-class>
      <body-content>JSP</body-content>

      <attribute>
         <name>id</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
      </attribute>

      <attribute>
         <name>binding</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
      </attribute>

      <attribute>
         <name>rendered</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
      </attribute>

      <attribute>
         <name>showFilter</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
      </attribute>

      <attribute>
         <name>showContains</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
      </attribute>

      <attribute>
         <name>showAddButton</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
      </attribute>

      <attribute>
         <name>filterRefresh</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
      </attribute>

      <attribute>
         <name>multiSelect</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
      </attribute>

      <attribute>
         <name>addButtonLabel</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
      </attribute>
     
      <attribute>
         <name>searchButtonLabel</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
      </attribute>

      <attribute>
         <name>action</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
      </attribute>

      <attribute>
         <name>actionListener</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
      </attribute>

      <attribute>
         <name>width</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
      </attribute>

      <attribute>
         <name>height</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
      </attribute>

      <attribute>
         <name>filters</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
      </attribute>

      <attribute>
         <name>queryCallback</name>
         <required>true</required>
         <rtexprvalue>true</rtexprvalue>
      </attribute>
   </tag>


et c'est au niveau de l'attribut queryCallback où je peux modifier ou créer une requette qui va me permettre à afficher tous les utilisateurs en cliquant sur le bouton "monter tous" à l'aide de la méthode suivante

  /**
   * Query callback method executed by the Generic Picker component.
   * This method is part of the contract to the Generic Picker, it is up to the backing bean
   * to execute whatever query is appropriate and return the results.
   *
   * @param filterIndex        Index of the filter drop-down selection
   * @param contains           Text from the contains textbox
   *
   * @return An array of SelectItem objects containing the results to display in the picker.
   */
  public SelectItem[] pickerCallback(int filterIndex, String contains);

Mais je sai pas comment ?????
MErci d'avance…

Outcomes