Package org.jallinone.subjects.java

Examples of org.jallinone.subjects.java.Subject


        resourcesPanel.setItem(vo.getProgressiveHie02ITM01(),vo.getCompanyCodeSys01ITM01(),vo.getItemCodeITM01());
      }

      public void beforeLookupAction(ValueObject gridVO) {
        DetailCallOutRequestVO vo = (DetailCallOutRequestVO)calloutPanel.getVOModel().getValueObject();
        Subject subVO = (Subject)getSubjectForm().getVOModel().getValueObject();
        vo.setCompanyCodeSys01SCH03(subVO.getCompanyCodeSys01REG04());
        vo.setProgressiveReg04SCH03(subVO.getProgressiveREG04());
        itemDataLocator.getLookupFrameParams().put(ApplicationConsts.SHOW_ONLY_PURCHASED_ITEMS,new Boolean(controlFilterItems.isSelected()));
        itemDataLocator.getLookupValidationParameters().put(ApplicationConsts.SHOW_ONLY_PURCHASED_ITEMS,new Boolean(controlFilterItems.isSelected()));
        if (vo.getProgressiveReg04SCH03()!=null) {
          itemDataLocator.getLookupFrameParams().put(ApplicationConsts.PROGRESSIVE_REG04,vo.getProgressiveReg04SCH03());
          itemDataLocator.getLookupValidationParameters().put(ApplicationConsts.PROGRESSIVE_REG04,vo.getProgressiveReg04SCH03());
View Full Code Here


   * @param newValueObject value object to save
   * @return an ErrorResponse value object in case of errors, VOResponse if the operation is successfully completed
   */
  public Response insertRecord(ValueObject newPersistentObject) throws Exception {
    DetailCallOutRequestVO vo = (DetailCallOutRequestVO)newPersistentObject;
    Subject subVO = (Subject)frame.getSubjectForm().getVOModel().getValueObject();
    vo.setCompanyCodeSys01SCH03(subVO.getCompanyCodeSys01REG04());
    vo.setProgressiveReg04SCH03(subVO.getProgressiveREG04());
//    vo.setSubjectTypeReg04SCH03(subVO.getSubjectTypeREG04());
    Response res = ClientUtils.getData("insertCallOutRequest",newPersistentObject);
    if (!res.isError()) {
      vo = (DetailCallOutRequestVO)((VOResponse)res).getVo();
      pk = new CallOutRequestPK(vo.getCompanyCodeSys01SCH03(),vo.getRequestYearSCH03(),vo.getProgressiveSCH03());
View Full Code Here

        return false;
      }
      CompanyHierarchyLevelVO levelVO = (CompanyHierarchyLevelVO)frame.getTreePanel().getSelectedNode().getUserObject();
      SubjectFrame f = (SubjectFrame)MDIFrame.getSelectedFrame();
      int[] rows = f.getGrid().getSelectedRows();
      Subject vo = null;
      ArrayList list = new ArrayList();
      for(int i=0;i<rows.length;i++) {
        vo = (Subject)f.getGrid().getVOListTableModel().getObjectForRow(rows[i]);
        list.add( vo );
      }
View Full Code Here

  public Response loadData(Class valueObjectClass) {
    // since this method could be invoked also when selecting another row on the linked grid,
    // the pk attribute must be recalculated from the grid...
    int row = gridFrame.getGrid().getSelectedRow();
    if (row!=-1) {
      Subject gridVO = (Subject)gridFrame.getGrid().getVOListTableModel().getObjectForRow(row);
      pk = new SubjectPK(gridVO.getCompanyCodeSys01REG04(),gridVO.getProgressiveREG04());
    }


    return ClientUtils.getData("loadSupplier",pk);
  }
View Full Code Here

   * Method called by the Form panel to insert new data.
   * @param newValueObject value object to save
   * @return an ErrorResponse value object in case of errors, VOResponse if the operation is successfully completed
   */
  public Response insertRecord(ValueObject newPersistentObject) throws Exception {
    Subject subjectVO = (Subject)newPersistentObject;
    if (subjectVO.getSubjectTypeREG04().equals(ApplicationConsts.SUBJECT_ORGANIZATION_CUSTOMER)) {
      OrganizationVO vo = (OrganizationVO)subjectVO;
      OrganizationVO contact1VO = (OrganizationVO)this.contactVO;
      vo.setAddressREG04(contact1VO.getAddressREG04());
      vo.setCityREG04(contact1VO.getCityREG04());
      vo.setCompanyCodeSys01REG04(contact1VO.getCompanyCodeSys01REG04());
View Full Code Here

  }


  public final Response executeCommand(Object inputPar,UserSessionParameters userSessionPars,HttpServletRequest request, HttpServletResponse response,HttpSession userSession,ServletContext context) {
    try {
      Subject oldVO = (Subject)((ValueObject[])inputPar)[0];
      Subject newVO = (Subject)((ValueObject[])inputPar)[1];

      // retrieve internationalization settings (Resources object)...
      ServerResourcesFactory factory = (ServerResourcesFactory)context.getAttribute(Controller.RESOURCES_FACTORY);
      String serverLanguageId = ((JAIOUserSessionParameters)userSessionPars).getServerLanguageId();
      String t1 = factory.getResources(serverLanguageId).getResource("there is already another people with the same first and last name.");
      String t2 = factory.getResources(serverLanguageId).getResource("there is already another organization with the same corporate name.");

      Contacts bean = (Contacts)JAIOBeanFactory.getInstance().getBean(Contacts.class);
      Response answer = null;
      if (newVO.getSubjectTypeREG04().equals(ApplicationConsts.SUBJECT_ORGANIZATION_CONTACT))
        answer = bean.updateOrganization((OrganizationVO)oldVO,(OrganizationVO)newVO,t1,t2,((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername());
      else
        answer = bean.updatePeople((PeopleVO)oldVO,(PeopleVO)newVO,t1,t2,((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername());

View Full Code Here

      HttpServletRequest request,
      HttpServletResponse response,
      HttpSession userSession,
      ServletContext context) {
    try {
      Subject vo = (Subject)inputPar;

      // retrieve internationalization settings (Resources object)...
      ServerResourcesFactory factory = (ServerResourcesFactory)context.getAttribute(Controller.RESOURCES_FACTORY);
      String serverLanguageId = ((JAIOUserSessionParameters)userSessionPars).getServerLanguageId();
      String t1 = factory.getResources(serverLanguageId).getResource("there is already another people with the same first and last name.");
      String t2 = factory.getResources(serverLanguageId).getResource("there is already another organization with the same corporate name.");
      ArrayList companyCodes = ((JAIOUserSessionParameters)userSessionPars).getCompanyBa().getCompaniesList("REG04_CONTACTS");
     
      Contacts bean = (Contacts)JAIOBeanFactory.getInstance().getBean(Contacts.class);
      Response answer = null;
      if (vo.getSubjectTypeREG04().equals(ApplicationConsts.SUBJECT_ORGANIZATION_CONTACT))
        answer = bean.insertOrganization((OrganizationVO)vo,t1,t2,((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername(),companyCodes);
      else
        answer = bean.insertPeople((PeopleVO)vo,t1,t2,((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername(),companyCodes);

      return answer;
View Full Code Here

   * Method called by the Form panel to insert new data.
   * @param newValueObject value object to save
   * @return an ErrorResponse value object in case of errors, VOResponse if the operation is successfully completed
   */
  public Response insertRecord(ValueObject newPersistentObject) throws Exception {
    Subject sub = (Subject)newPersistentObject;
    sub.setSubjectTypeREG04((String)detailFrame.getControlSubjectType().getValue());
    if (sub.getSubjectTypeREG04().equals(ApplicationConsts.SUBJECT_ORGANIZATION_CONTACT)) {
      OrganizationVO vo = (OrganizationVO)sub;
      if (organization!=null) {
        vo.setCompanyCodeSys01Reg04REG04(organization.getCompanyCodeSys01REG04());
        vo.setProgressiveReg04REG04(organization.getProgressiveREG04());
      }
    }
    else {
      PeopleVO vo = (PeopleVO)sub;
      if (organization!=null) {
        vo.setCompanyCodeSys01Reg04REG04(organization.getCompanyCodeSys01REG04());
        vo.setProgressiveReg04REG04(organization.getProgressiveREG04());
      }
    }

    Response response = ClientUtils.getData("insertContact",newPersistentObject);
    if (!response.isError()) {
      sub = (Subject)((VOResponse)response).getVo();
      subVO = new SubjectVO(
          sub.getCompanyCodeSys01REG04(),
          sub.getProgressiveREG04(),
          null, // it's not very good...
          null, // it's not very good...
          sub.getSubjectTypeREG04()
      );
      SubjectPK pk = new SubjectPK(
          sub.getCompanyCodeSys01REG04(),
          sub.getProgressiveREG04()
      );

//      gridFrame.reloadData();

      detailFrame.getReferencesPanel().getGrid().getOtherGridParams().put(
View Full Code Here

   * Callback method invoked when the user has double clicked on the selected row of the grid.
   * @param rowNumber selected row index
   * @param persistentObject v.o. related to the selected row
   */
  public void doubleClick(int rowNumber,ValueObject persistentObject) {
    Subject sub = (Subject)detailFrame.getCurrentForm().getVOModel().getValueObject();

    new ContactController(
        detailFrame.getController().getGridFrame(),
        new SubjectVO(
          ((GridContactVO)persistentObject).getCompanyCodeSys01REG04(),
          ((GridContactVO)persistentObject).getProgressiveREG04(),
          ((GridContactVO)persistentObject).getName_1REG04(),
          ((GridContactVO)persistentObject).getName_2REG04(),
          ((GridContactVO)persistentObject).getSubjectTypeREG04()
        ),
        new SubjectPK(
          sub.getCompanyCodeSys01REG04(),
          sub.getProgressiveREG04()
        )
    );
  }
View Full Code Here

  /**
   * Callback method invoked before saving data when the grid was in INSERT mode (on pressing save button).
   * @return <code>true</code> allows the saving to continue, <code>false</code> the saving is interrupted
   */
  public boolean beforeInsertGrid(GridControl grid) {
    Subject sub = (Subject)detailFrame.getCurrentForm().getVOModel().getValueObject();

    if (super.beforeInsertGrid(grid)) {
      new ContactController(
          detailFrame.getController().getGridFrame(),
          null,
          new SubjectPK(
            sub.getCompanyCodeSys01REG04(),
            sub.getProgressiveREG04()
          )
      );
    }
    return false;
  }
View Full Code Here

TOP

Related Classes of org.jallinone.subjects.java.Subject

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.