Examples of CountryLanguages


Examples of org.dmlite.model.component.country.CountryLanguages

      Link dmLiteEntryLink = new PageLink("dmLiteEntry", dmLiteEntryPage);
      add(dmLiteEntryLink);

      ModelContext countryLanguageModelContext = new ModelContext();
      countryLanguageModelContext.setDomainModel(app.getDomainModel());
      CountryLanguages countryLanguages = (CountryLanguages) app
          .getEntry("CountryLanguages");
      countryLanguageModelContext.setEntities(countryLanguages);
      String languageCode = null;
      CountryLanguage defaultCountryLanguage = null;
      languageCode = getSession().getLocale().getLanguage();
      defaultCountryLanguage = (CountryLanguage) countryLanguages
          .retrieveByCode(languageCode);
      countryLanguageModelContext.setEntity(defaultCountryLanguage);
      ViewContext countryLanguageViewContext = new ViewContext();
      countryLanguageViewContext.setApp(app);
      countryLanguageViewContext.setPage(page);
View Full Code Here

Examples of org.dmlite.model.component.country.CountryLanguages

    try {
      App app = viewContext.getApp();
     
      CountryLanguage countryLanguage = (CountryLanguage) modelContext
          .getEntity();
      CountryLanguages countryLanguages = (CountryLanguages) modelContext
          .getEntities();
      ConceptConfig countryLanguageConceptConfig = countryLanguages
          .getConceptConfig();
      String currentLanguage = countryLanguage.getLanguage();
      List languageList = countryLanguages.getLanguageList();

      IModel choiceModel = new Model(currentLanguage);
      DropDownChoice countryLanguageChoice = new CountryLanguageChoice(
          "countryLanguageChoice", choiceModel, languageList);
      add(countryLanguageChoice);
View Full Code Here

Examples of org.dmlite.model.component.country.CountryLanguages

     * @param currentLanguage
     *            current language
     */
    private void changeLocale(String currentLanguage) {
      try {
        CountryLanguages countryLanguages = (CountryLanguages) modelContext
            .getEntities();
        String languageCode = countryLanguages
            .getLanguageCode(currentLanguage);
        if (languageCode == null) {
          getAppSession().setLocale(new Locale("en"));
        } else {
          getAppSession().setLocale(new Locale(languageCode));
View Full Code Here

Examples of org.dmlite.model.component.country.CountryLanguages

  private void createTestData() {
    createTestComments();
  }

  private void createLanguages() {
    CountryLanguages languages = getLanguages();
    languages.createLanguage("en", "english");
    languages.createLanguage("fr", "français");
    languages.createLanguage("ba", "bosanski");
    List errors = languages.getErrors().getErrorList();
    if (errors.size() > 0) {
      OutTester.output(errors, "Languages Add Errors");
    }
  }
View Full Code Here

Examples of org.dmlite.model.component.country.CountryLanguages

      OutTester.output(errors, "Applicants Add Errors");
    }
  }

  private void outputLanguages() {
    CountryLanguages countryLanguages = getLanguages();
    countryLanguages.output("Languages");
  }
View Full Code Here

Examples of org.dmlite.model.component.country.CountryLanguages

      if (app.getModelConfig().isI18n()) {
        ModelContext countryLanguageModelContext = new ModelContext();
        countryLanguageModelContext
            .setDomainModel(app.getDomainModel());
        CountryLanguages countryLanguages = (CountryLanguages) app
            .getEntry("CountryLanguages");
        countryLanguageModelContext.setEntities(countryLanguages);

        String languageCode = null;
        CountryLanguage defaultCountryLanguage = null;
        languageCode = getSession().getLocale().getLanguage();
        defaultCountryLanguage = (CountryLanguage) countryLanguages
            .retrieveByCode(languageCode);
        countryLanguageModelContext.setEntity(defaultCountryLanguage);
        ViewContext countryLanguageViewContext = new ViewContext();
        countryLanguageViewContext.setApp(app);
        countryLanguageViewContext.setPage(app.getViewMeta()
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.