tabs order

  • Fabiana Bugli

    Fabiana Bugli - 2012-02-02

    I've created all my entity classes and I can see them in my application, but I cannot change the order of the tabs.
    I've tryed changing the order of the entity declaration in the package.jdo file and in the applicationContext-domain-repositories.xml file but it didn't work they always appear in the inverse order I've created them. I cannot undestand how it works and what to do.

  • tglman

    tglman - 2012-02-02

    For the default HomePage of roma not exist an order of tabs, if you want set the order you can overwrite the method fillPages of HomePageBasic extended by HomePage class in your project.

    The base code of fillPages is dis:

         * Fill the home page with all pages crud.
        protected void fillPages() {
            try {
                List<SchemaClass> mains = Roma.schema().getSchemaClassesByPackage(this.getClass().getPackage().getName());
                SchemaClass mainSchema = Roma.schema().getSchemaClass(CRUDMain.class);
                for (SchemaClass schemaClass : mains) {
                    if (schemaClass.isAssignableAs(mainSchema) && schemaClass.getName().endsWith(CRUDConstants.MAIN_EXTENSION)) {
                        addPage(I18NHelper.getLabel(SchemaHelper.getSuperclassGenericType(schemaClass)), schemaClass.newInstance());
            } catch (Exception e) {
                throw new RuntimeException("Error on Page filling", e);

    the order of tabs is depends order that was called addPage.


Log in to post a comment.