Package org.kuali.rice.krad.web.form

Examples of org.kuali.rice.krad.web.form.InquiryForm


  public void testGetKeyValuesViewModel() {
    MatterClientNamesKeyValues mckv = new MatterClientNamesKeyValues();
    boSvc = mock(BusinessObjectService.class);
    mckv.setBusinessObjectService(boSvc);
   
    InquiryForm inqForm = new InquiryForm();
    inqForm.setDataObject(kase);
   
    InquiryForm inqForm2 = new InquiryForm();
    inqForm2.setDataObject(consideration);
   
    MatterTxForm txForm = mock(MatterTxForm.class);
    when(txForm.getDocument()).thenReturn(doc);
    when(boSvc.findBySinglePrimaryKey(Matter.class, matterId)).thenReturn(kase);
   
View Full Code Here


  private static final long serialVersionUID = -7448642552698860147L;
  /**
     * @see org.kuali.rice.krad.lookup.Lookupable#getMaintenanceActionLink
     */
    public void getMaintenanceActionLink(Link actionLink, Object model, String maintenanceMethodToCall) {
      InquiryForm inquiryForm = (InquiryForm) model;
        Object dataObject = inquiryForm.getDataObject();
   
        List<String> pkNames = getDataObjectMetaDataService().listPrimaryKeyFieldNames(getDataObjectClass());

        // build maintenance link href
        String href = getActionUrlHref(inquiryForm, dataObject, maintenanceMethodToCall, pkNames);
View Full Code Here

          matter = getBusinessObjectService().findBySinglePrimaryKey(
            Matter.class, doc.getMatterId());
        }
      }
    } else if (model instanceof InquiryForm) {
      InquiryForm form = (InquiryForm) model;
      if (form.getDataObject() instanceof Matter) {
        matter = (Matter) form.getDataObject();
      } else if (form.getDataObject() instanceof MatterConsideration) {
        matter = ((MatterConsideration) form.getDataObject()).getMatter();
      }
    }
    if (matter != null && matter.getClients() != null && !matter.getClients().isEmpty()) {
      for (Object clientObj: matter.getClients()) {
        MatterClient client = (MatterClient)clientObj;
View Full Code Here

           "&dataObjectClassName=org.martinlaw.bo.courtcase.CourtCase";
     String[] urls = {editUrl, copyUrl, delUrl};
    
     String[] methods = {KRADConstants.Maintenance.METHOD_TO_CALL_EDIT, KRADConstants.Maintenance.METHOD_TO_CALL_COPY,
         KRADConstants.Maintenance.METHOD_TO_CALL_DELETE};
     InquiryForm form = new InquiryForm();
     form.setDataObject(dataObject);
     form.setDataObjectClassName(DATA_OBJECT_CLASS.getCanonicalName());
     Link link = new Link();
    
    //link.setTarget(target);
     // test for actions on existing object
     for (int i=0; i<urls.length; i++) {
       inquirable.getMaintenanceActionLink(link, form, methods[i]);
       assertEquals("action URL differs", urls[i], link.getHref());
     }
    
     //testing new url
     form.setDataObject(null);
     inquirable.getMaintenanceActionLink(link, form, KRADConstants.Maintenance.METHOD_TO_CALL_NEW);
     assertEquals("action URL differs", newUrl, link.getHref());
  }
View Full Code Here

TOP

Related Classes of org.kuali.rice.krad.web.form.InquiryForm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.