No announcement yet.
  • Filter
  • Time
Clear All
new posts

    AutoDeriveSchema and i18n

    Hi, i'm looking into shortening my ds.xml files by trying out autoderiveschema. I am hoping to just have a JavaBean and no field definitions in the XML. However, i'm not sure how i can make the field titles localized? Is this possible?

    edit: Also just tried it and i get a classnotfound on DataSourceTools. Is the autoderiveschema/schemabean not available in the Pro version?

    You would need field definitions to have i18n titles, but you would be able to avoid specifying various other aspects of the field definitions (type, etc).

    The feature is available in the Pro version.


      OK, so 2 questions:

      1. Do you mean that i would have to specify all fields, but only the title-field and the rest would automagically come from the bean?
      <field name="idNumber">
                      <fmt:message key="idNumber"/>
      Like this?

      2. Again, as i mentioned, i get classnotfoundexception on DataSourceTools, which seems to be an enterprise-only class. This is how i define the datasource:
      <DataSource ID="mycooldatasource" xmlns:fmt=""
                  autoDeriveSchema="true" serverType="bean" schemaBean="">
      I debugged, and specifically, It's BasicDataSource that causes the ClassNotFound:
      if (parentConfig == null) {
          Object[] params = new Object[]{soInstance.getClass().getName()};
      >>>>    parentConfig = (Map)Reflection.invokeNonVisibleStaticMethod("", "_getDataSourceConfigFromJavaClass", params);


        1. yes, like that. Although, since it seems likely that i18n titles might be the only thing forcing you to declare all fields, we're now considering adding some way to have titles looked up from bundles without requiring such a field definition

        2. sounds like isomorphic_tools.jar may be missing from your classpath?


          re. last point thanks will look.

          Re point 1 sounds great, and please allow me to reiterate a suggestion i made back in 2018: