facebook

XDoclet DataObjectSubTask problem

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #209839 Reply

    sgabriele76
    Member

    Hi all,
    I created a Xdoclet-build.xml with myeclipse wizard on the section
    dataobject I added this section packageSubstitutions=”data”

    <dataobject packageSubstitutions=”data”>
    </dataobject>

    and when i compile this file the compiler send me this error:
    Class xdoclet.modules.ejb.entity.DataObjectSubTask doesn’t support the “packagesttribute” attribute

    thanks all

    gabriele

    #209922

    Greg
    Member

    Gabriele,

    I don’t believe you can set packageSubstitutions for dataobject subtask directly, even those the gui lets you. To correctly do package substitution for dataobjects do the following…

    Right-click on the dataobject subtask and choose “Add”, then select PackageSubstitution.
    Then you will see two attributes, “packages” and “substituteWith”.
    If you are using the myeclipse recommended package suffix .ejb then set the following values…
    packages=”ejb”
    substituteWith=”data”

    If you take a look at a new “Standard EJB” configuration you will see a dao subtask that is configured with another subtask PackageSubstitution. This is what you want to replicate for dataobject using the steps above.

    Let us know if this works for you.

    That should subtitute .data package suffix for .ejb for all generated dataobjects.

    #225712

    fmfaulkner
    Member

    @support-greg wrote:

    Gabriele,

    I don’t believe you can set packageSubstitutions for dataobject subtask directly, even those the gui lets you. To correctly do package substitution for dataobjects do the following…

    Right-click on the dataobject subtask and choose “Add”, then select PackageSubstitution.
    Then you will see two attributes, “packages” and “substituteWith”.
    If you are using the myeclipse recommended package suffix .ejb then set the following values…
    packages=”ejb”
    substituteWith=”data”

    If you take a look at a new “Standard EJB” configuration you will see a dao subtask that is configured with another subtask PackageSubstitution. This is what you want to replicate for dataobject using the steps above.

    Let us know if this works for you.

    That should subtitute .data package suffix for .ejb for all generated dataobjects.

    There seems to be a global problem in the GUI with package substitutions. The expected tag name is packageSubstitution with no ‘s’ on the end.

    For value objects I would expect to see this generated:
    <valueobject>
    <packageSubstitution packages=”ejb” substituteWith=”value”
    </valueobject>

    What I see instead, and causes the error, is:
    <valueobject packageSubstitutions=”packages=ejb substitueWith=value” >

    Has this been fixed yet?

    #225747

    Greg
    Member

    Package substitution works correctly you just have to use the method as described in my previous post. If you use this method and look at the xdoclet-build.xml file you will see the correct <packageSubstitution> tag.

    This is a known problem with the GUI that is shows packageSubstitutions as an attribute of the valueobject subtask itself. That isn’t entired incorrect, because there actually is a packageSubstitutions property for a valueobject class. However, the correct way to set it is with the nested subtasks instead of using the packageSubstitutions attribute. So the GUI is misleading in that it appears you can set the packageSubstitution attribute directly and it shouldn’t be listed.

    But the important thing is that you can get your substitutions working for value objects. Is that working using the way I described in this topic?
    https://www.genuitec.com/forums/topic/wrong-tags-generated-for-xdoclet-package-substitution/#post-225746

    Let us know if you are unable to get the valueobjects generated with the correct package substitution.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: XDoclet DataObjectSubTask problem

You must be logged in to post in the forum log in