Hello peoples!! I'm trying to design a multi criteria research for an application. This application have to display a list of object this way :
<div id="corps"> <div t:type="loop" t:source="isoMsgList" t:value="isoMsg"> <div id="Liste" style="background-color: ${getIsoMsgState()}"> ${isoMsg.idMessage}/${isoMsg.horodatage}/${getLibelleType()} <div t:type="loop" t:source="ssMsgList" t:value="isoMSg"> <div id="ListSsMsg" style="background-color: ${getIsoMsgState()}"> ${isoMsg.idMessage}/${isoMsg.horodatage}/${isoMsg.exception}/${getLibelleType()} </div> </div> </div> </div> </div> These objects are message objects and they can have sub messages. So I the user to research particular message with somes criteria (date, state etc...) Here his the .tml code : <t:form> <p> <label t:type="label" t:for="type" /> : <input t:type="select" t:id="type" t:model="types" t:value="libelle" style="width: 230px;" /> <label t:type="label" t:for="etatRetour" /> : <input t:type="select" t:id="etatRetour" t:model="literal: ok, non-ok"/> <input t:id="dateTimeField1"/> <input t:type="submit" t:name="Rechercher"/> </p> </t:form> And the java code : @Persist @Property private String libelle; @SuppressWarnings("unused") @Component(parameters = { "value=actualDate1", "datePattern=dd-MM-yyyy HH:mm" }) private DateTimeField _dateTimeField1; @Persist @Property private Date _actualDate1; @Persist @Property private String _etatRetour; Object onSuccess(){ return BorneDetails.class; } public List<IsoMsg> getIsoMsgList() { String error = null; try { if(_etatRetour == null) { error = null; } else if(_etatRetour.equals("ok")) { error = "false"; } else if(_etatRetour.equals("non-ok")) { error = "true"; } TypeIso type = null; if (libelle !=null){ type = typeIsoManager.findByLibelle(libelle); } return (List<IsoMsg>) isoMsgManager.findMultiCritere(bornes.getId(), _actualDate1, type, error); } catch (BusinessException e) { e.printStackTrace(); return null; } catch (TechnicalException e) { e.printStackTrace(); return null; } } public List<String> getLibelleList() { try { return typeIsoManager.findLibelle(); } catch (BusinessException e) { // TODO Auto-generated catch block e.printStackTrace(); return null; } catch (TechnicalException e) { // TODO Auto-generated catch block e.printStackTrace(); return null; } } public List<IsoMsg> getSsMsgList() { try { return (List<IsoMsg>) (isoMsgManager.findSsMsg(isoMsg .getIdMessage())); } catch (BusinessException e) { e.printStackTrace(); return null; } catch (TechnicalException e) { e.printStackTrace(); return null; } } public String getIsoMsgState() { color = service.isoMsgState(isoMsg.getIdMessage()); return color; } public String getLibelleType() { TypeIso type; try { type = typeIsoManager.findById(isoMsg.getTypeIso().getIdType()); } catch (BusinessException e) { e.printStackTrace(); return null; } catch (TechnicalException e) { e.printStackTrace(); return null; } return type.getLibelle(); } But when I try this code, I get the following exception : [ERROR] borne.BorneDetails Render queue error in BeforeRenderTemplate[borne/Details:type]: Parameter 'model' of component borne/Details:type is bound to null. This parameter is not allowed to be null. org.apache.tapestry5.ioc.internal.util.TapestryException: Parameter 'model' of component borne/Details:type is bound to null. This parameter is not allowed to be null. [at classpath:com/atosworldline/effia/applira/web/pages/borne/BorneDetails.tml, line 24] In my mind the onSuccess function his the false one (I'm not very sure that refreshing the page with persistant criteria his the right thing to do... but I didn't find another idea) But I didn't manage to find how to withdraw this error. So has a pilote in a plane, I say mayday mayday!! ;-D -- View this message in context: http://old.nabble.com/Multicriteria-research-tp29386056p29386056.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org