Announcement

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

  • Blama
    replied
    @All finding this thread via search: This thread is related.

    Leave a comment:


  • Isomorphic
    replied
    Hello Blama,
    We checked this issue. Field fieldProperties works fine in your example (checked on nightly and 4.0). Please check that you loaded type description e.g. using loadDS tag or DataSourceLoader servlet as you do for all datasources. If you still have the issue
    please tell us what exact version of smartgwt library do you use.

    Regards
    Isomorphic Software

    Leave a comment:


  • Blama
    replied
    Hi Isomorphic,

    thanks for the fast answer. What exactly do you mean by fieldProperties?
    Code:
    <SimpleType name="createdByType" inheritsFrom="text">
    	<(f|F)ieldProperties foreignKey="V_USER_CREATED_BY.ID" displayField="CREATED_BY_NAME" title="Erstellt von" type="int"></(f|F)ieldProperties>
    </SimpleType>
    does not change anything for me (applied in both type.xml files)

    Best regards,
    Blama

    Leave a comment:


  • Isomorphic
    replied
    ?

    Well, there's no use of fieldProperties anywhere in there, so no, it should not work.

    Leave a comment:


  • Blama
    replied
    Hi Isomorphic,

    this doesn't work for me. Should it?

    V_LEAD_UNFINISHED.ds.xml
    Code:
    <field name="CREATED_BY" type="createdByType"></field>
    <field name="CREATED_BY_NAME" type="createdByNameType"></field>
    createdByType.type.xml
    Code:
    <SimpleType name="createdByType" inheritsFrom="text" foreignKey="V_USER_CREATED_BY.ID" displayField="CREATED_BY_NAME" title="Erstellt von"
    	type="int">
    </SimpleType>
    createdByTypeName.type.xml
    Code:
    <SimpleType name="createdByNameType" inheritsFrom="text" includeFrom="V_USER_CREATED_BY.SURNAME" hidden="true">
    </SimpleType>
    project.html
    Code:
    DataSourceLoader?dataSource=createdByNameType, createdByType, V_LEAD_UNFINISHED, ...
    I get a SQL-error saying "V_LEAD_UNFINISHED"."CREATED_BY_NAME": invalid identifier. Also the SQL doesn't include the join it had when all the type.xml attributes were directly in the ds.xml field.
    The order in which I load the types in DSLoader does not change the outcome.

    Is the simpleType system supposed to support this kind of usage?

    Best regards,
    Blama

    Leave a comment:


  • Isomorphic
    replied
    This can be done via simpleType.fieldProperties.

    Leave a comment:


  • Blama
    started a topic SimpleType to outsource more than validation/display?

    SimpleType to outsource more than validation/display?

    Hi Isomorphic,

    I have a short question regarding SimpleType. Searching the forums I found:
    http://forums.smartclient.com/showth...28247&p=111423 which says (...) that have common validation, formatting and other similar behaviors.

    My case is the following. I make heavy use of FKs and have many fields like
    Code:
    <field foreignKey="T_CAMPAIGN.ID" name="CAMPAIGN_ID" displayField="CAMPAIGN_NAME" title="Campaign" type="integer" required="true"></field>
    .

    Is it possible to put these information in a .type.xml file as well and reference it via
    Code:
    <field name="CAMPAIGN_ID" type="myTypeName"></field>
    ?

    Or is the Simple Type system more about display and validation?

    Thanks,
    Blama
Working...
X