<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How can I development a chainSelect widget but with groups and users? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-development-a-chainselect-widget-but-with-groups-and/m-p/326197#M13198</link>
    <description>&lt;P&gt;I want to development a widget where I can select a group on a selectListBox and using ajax to update another selectListBox with group's users selected.&lt;/P&gt;
&lt;P&gt;I was reviewing &lt;A href="http://community.nuxeo.com/api/nuxeo/5.6/tlddoc/" target="test_blank"&gt;http://community.nuxeo.com/api/nuxeo/5.6/tlddoc/&lt;/A&gt; but those widgets only works with vocabularies.&lt;/P&gt;
&lt;P&gt;I try to use and custom widget template to select groups from a vocabulary and another widget user suggestion:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;c:if test="true" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
	xmlns:nxu="http://nuxeo.org/nxweb/util"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:nxdir="http://nuxeo.org/nxdirectory"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:nxp="http://nuxeo.org/nxweb/pdf"&amp;gt;

	&amp;lt;c:if test="#{widget.mode == 'edit'}"&amp;gt;

		&amp;lt;c:set var="directory"
			value="#{nxu:test(!empty widgetProperty_directory, widgetProperty_directory, 'CoorAsig')}" /&amp;gt;
		&amp;lt;c:set var="required"
			value="#{nxu:test(!empty widgetProperty_required, widgetProperty_required, false)}" /&amp;gt;


		&amp;lt;a4j:region renderRegionOnly="true" id="#{widget.id}_region"&amp;gt;
			&amp;lt;nxdir:selectOneListbox id="#{widget.id}" value="#{field_0}"
				directoryName="#{directory}" displayIdAndLabel="true"
				required="#{required}"
				valueChangeListener="#{userSuggestionActions.selectUserGroup}"&amp;gt;
				&amp;lt;a4j:support event="onchange" ignoreDupResponses="true" reRender="selectUser"
					bypassUpdates="true" /&amp;gt;
			&amp;lt;/nxdir:selectOneListbox&amp;gt;
              
		&amp;lt;/a4j:region&amp;gt;


		&amp;lt;a4j:outputPanel ajaxRendered="true"&amp;gt;	
			&amp;lt;h:message for="#{widget.id}" styleClass="errorMessage" /&amp;gt;
		&amp;lt;/a4j:outputPanel&amp;gt;
	&amp;lt;/c:if&amp;gt;
&amp;lt;/c:if&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and  I overwrote userSuggestionActions's getSuggestions method seam component, in this component, I created selectUserGroup variable . When I select a group on my selectListBox, this variable is updated and when I search a user in my user suggestion widget, this is filtered by group selected.&lt;/P&gt;
&lt;P&gt;The problem is when I select another group, I do not know how to delete the user selected in user suggestion widget&lt;/P&gt;</description>
    <pubDate>Fri, 08 Nov 2013 14:39:44 GMT</pubDate>
    <dc:creator>geekonspace</dc:creator>
    <dc:date>2013-11-08T14:39:44Z</dc:date>
    <item>
      <title>How can I development a chainSelect widget but with groups and users?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-development-a-chainselect-widget-but-with-groups-and/m-p/326197#M13198</link>
      <description>&lt;P&gt;I want to development a widget where I can select a group on a selectListBox and using ajax to update another selectListBox with group's users selected.&lt;/P&gt;
&lt;P&gt;I was reviewing &lt;A href="http://community.nuxeo.com/api/nuxeo/5.6/tlddoc/" target="test_blank"&gt;http://community.nuxeo.com/api/nuxeo/5.6/tlddoc/&lt;/A&gt; but those widgets only works with vocabularies.&lt;/P&gt;
&lt;P&gt;I try to use and custom widget template to select groups from a vocabulary and another widget user suggestion:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;c:if test="true" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
	xmlns:nxu="http://nuxeo.org/nxweb/util"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:nxdir="http://nuxeo.org/nxdirectory"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:nxp="http://nuxeo.org/nxweb/pdf"&amp;gt;

	&amp;lt;c:if test="#{widget.mode == 'edit'}"&amp;gt;

		&amp;lt;c:set var="directory"
			value="#{nxu:test(!empty widgetProperty_directory, widgetProperty_directory, 'CoorAsig')}" /&amp;gt;
		&amp;lt;c:set var="required"
			value="#{nxu:test(!empty widgetProperty_required, widgetProperty_required, false)}" /&amp;gt;


		&amp;lt;a4j:region renderRegionOnly="true" id="#{widget.id}_region"&amp;gt;
			&amp;lt;nxdir:selectOneListbox id="#{widget.id}" value="#{field_0}"
				directoryName="#{directory}" displayIdAndLabel="true"
				required="#{required}"
				valueChangeListener="#{userSuggestionActions.selectUserGroup}"&amp;gt;
				&amp;lt;a4j:support event="onchange" ignoreDupResponses="true" reRender="selectUser"
					bypassUpdates="true" /&amp;gt;
			&amp;lt;/nxdir:selectOneListbox&amp;gt;
              
		&amp;lt;/a4j:region&amp;gt;


		&amp;lt;a4j:outputPanel ajaxRendered="true"&amp;gt;	
			&amp;lt;h:message for="#{widget.id}" styleClass="errorMessage" /&amp;gt;
		&amp;lt;/a4j:outputPanel&amp;gt;
	&amp;lt;/c:if&amp;gt;
&amp;lt;/c:if&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and  I overwrote userSuggestionActions's getSuggestions method seam component, in this component, I created selectUserGroup variable . When I select a group on my selectListBox, this variable is updated and when I search a user in my user suggestion widget, this is filtered by group selected.&lt;/P&gt;
&lt;P&gt;The problem is when I select another group, I do not know how to delete the user selected in user suggestion widget&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2013 14:39:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-development-a-chainselect-widget-but-with-groups-and/m-p/326197#M13198</guid>
      <dc:creator>geekonspace</dc:creator>
      <dc:date>2013-11-08T14:39:44Z</dc:date>
    </item>
  </channel>
</rss>

