Widgets Selects en Colección

1
+1
-1

hola, tengo el siguiente problema...

supongamos que en un formulario el usuario puede agregar diferentes paises y ciudades.

en un Colección tengo 2 select el primero que es país y el 2do que es ciudad y depende del país que se seleccione.

El usuario puede agregar cuantos paises quiera.

El problema que tengo es que en el primer coleccion en el primer select elijo USA y de ciudad MIAMI,
en el segundo coleccion al seleccionar un nuevo pais ejm:Mexico, las ciudades del segundo select tambien se actualizan con las del 2do pais-

1 answer

1
+1
-1

Debes estar referenciando el mismo objeto.

  • Utiliza un container; en Collection, referencia la lista de salida, por ejemplo formOutput.salida.
  • Dentro del container agregar los selects Pais y Ciudad, y en value utiliza $item para almacenar los valores, por ejemplo $item.pais y $item.ciudad.
  • Por ultimo un boton de Agregar, con la Accion, "Add to collection", en Collection referencia la lista de salida, formOutput.salida

Comments

Submitted by romualdo.s.rs on Wed, 06/07/2017 - 18:59

Sei que já faz algum tempo que esse post foi respondido mas dessa forma que você sugeriu iria funcionar em uma segunda linha quando ele apertasse o botão adicionar? Pois eu tenho mais ou menos o mesmo problema, de acordo com o que é selecionado no primeiro dropdown (Paises) libera o segundo dorpdown com os estados respectivos, esses dados são trazidos do meu BDM, eu consigo aplicar um filtro para que cada linha seja preenchida com os estados correspondentes?

Submitted by Mauricio.Barrantes on Wed, 06/07/2017 - 20:42

Please provide more information, maybe i can help you

Submitted by romualdo.s.rs on Wed, 06/07/2017 - 20:51

Thanks for your return, I'm in time looking for something that helps me with this but I can not find anything.

In short, I have in my BDM data that I load in the UI Designer, a BDM stores countries (id, name) and in the second BDM has the states (idPais, idEstado, name), which I need and be able to add several, for example, when In the first line I select the "country" and "state" when I add the second line, even if I select another "id" from "parents" I do not clear the "state" of the first line.

Sorry for the English if it is written in the wrong way, I am Brazilian and I do not speak the language yet.

Thanks in advance for your help.

Submitted by romualdo.s.rs on Wed, 06/07/2017 - 22:39

What I basically need would be this:
https://drive.google.com/file/d/0B8aMiLwwVY0ndXhUUndiakpUSTg/view?usp=sh...

What I can not do is that if I select another country in the second row, I display only the respective states without changing the contents of the first row already selected

Notifications