Hi Guys

Problem Description: When I creating the method "listarSolicituesTramite"
in Apache Isis and  the method is invoked only reach the fields of
application are flat on the table, but returns the fields come
from relationship as null.



tbl_Solicitud

tbl_Motivo Tramite

tbl_Tramite

Nombre (Flat)





ID_Motivo_Tramite (Relation Field)





ID_Tramite (Relation Field)






In this example, the  field "Nombre" return a value, but "ID_Motivo_Tramite"
and "ID Tramite" arrive in null, which does not allow the filter.

Here the Method

@MemberOrder(sequence="10.3")

       @Action(semantics = SemanticsOf.*SAFE*)

       @ActionLayout(bookmarking = BookmarkPolicy.*AS_ROOT*)

       *public* List<Solicitud> ListarSolicitudesTramite(*final*
@ParameterLayout(named="Tramite") String       tramite) {

             List <Solicitud> listaSolicitudes= repositoryService
.allInstances(Solicitud.*class*);

             String [] arrayTramites= tramite.split("//|");

             ArrayList<String> listaTramites= *new* ArrayList<String>();

             *for* (*int* i = 0; i < arrayTramites.length; i++) {

                    listaTramites.add(arrayTramites[i]);

             }

             *for* (Iterator<Solicitud> iterator = listaSolicitudes.iterator();
iterator.hasNext();) {

                    Solicitud solicitud = iterator.next();

                    *if*
(!listaTramites.contains(solicitud.getMotivoTramite().getTramite()))
{

                           iterator.remove();

                    }

             }

             *return* listaSolicitudes;

       }

-- 
[image: Logo]

José Alejandro Manaure
*Project Manager*
Tel: (57) 1 703 17 77
Cel: (57) 312 5476188
E-mail: [email protected]
Calle 93 # 19b - 66 Ofc 202
Bogotá D.C., Colombia
www.ticxar.com
  [image: facebook]
<https://www.facebook.com/pages/Ticxar/446503822192581> [image:
twitter] <http://twitter.com/ticxar> [image: linkedIn]
<https://www.linkedin.com/company/ticxar>

Reply via email to