Hi Pizão,
thank you for your Java file attached.
Ok I believe understand your probleme. When appears your problem? While generate XML fields available? While merging with velocity? Could you please create me a simple AbstractRTFUseCase in order to I see your usecase. Morever this AbstractRTFUseCase will be usefull for you to test your RTF model. See http://rtftemplate.sourceforge.net/userguide/model-creation-java/modele-creation-java.html to implement AbstractRTFUseCase or see sampel into usecases distribition.
Regards Angelo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Pizão,
thank you for your zip uploaded.
I have seen your problem, but it's very difficult for me to detect bidirectionnel VO into parseObject.
This method build XML fields available.
Morever, even if I can detect the bidirectionnel VO, when parseObject must end? When you have bidirectionnel VO
I think you want manage recursivity in your RTF model. Recursivity is not possible.
I'm very Sorry.
Regards Angelo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm with rpizao trying to solve this problem..
After some days spent understanding the code,
I don't even know the need of run troughout all the context before
start to transform, if we need a little part of context in template.
Would be so hard to make a on-demand context read?
We are still not using the Xml of fields available.
If we use this file, will we avoid to load all the context before transform???
I don't know if we could explain properly our problem.. I have a VERY BIG context,
with a lot of circular references and with a very deep tree of relations
and it's impracticable to load it all previuosly, we got A java heap space when tried.
If someone could help us...
thanks..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, rpizao friend
I have upload new version of RTFTemplate b-14 and I have tried to manage circular references.
With your sample it works, but with complex context, I don't know.
To avoid having problem with references circular, you must do
rtfTemplate.setCircularReferences(true);
before calling merge (see TestRtfTemplate of TestCircularReferencesRTF.zip).
I give you zip TestCircularReferencesRTF.zip (it's my Eclipse project, but get only source and rtf directory, because I have not putted libraries). In this source, you have TestCircularReferencesRTF wich is AbstractRTFUseCase (in th efuture, please send me AbstractRTFUseCase, it will be more easy for me, thank you).
When you run TestCircularReferencesRTF, it will generate contextStart.rtf.vmRTFTemplate.out.rtf into rtf directory.
Thanks for your help, but for this time i prefered using fields.xml, because my context is bigger then i really need in templates...
My context is a result of hibernate query, and have a lot of complex objects..
I think a automatic context exploration, without fields.xml, would not work for my context..
I couldn't test your new build with my context because I got a "Java heap space" when the context reader
dived into 'deep of hibernate complex objects'... Sorry.
I saw the code and it seems to solve the circular reference problem, your solution similar to a draft i tried here.
thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi brunojcm,
I don't understand when you say "but for this time i prefered using fields.xml"
because object with circular reference are managed (simply). So you can use fields.xml and
this XML file can be generated automaticly (see my zip uploaded).
Angelo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I said "but for this time i prefered using
fields.xml" because the circular references were not my only problem,
the hibernate objects that are automatically generated and extends
my objects have a lot os 'get' methods that i didn't want.
If i try to generate xml automatically it would be bigger than
it really need and have a lot of strange things of hibernate..
I have a new problem now, how to use get with parameters!
can you reply my Support Request in the tracker?
I create a new thread because i think it's a new problem,
not necessarely a bug..
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=1006268
Originator: NO
Hi Pizão,
thank you for your Java file attached.
Ok I believe understand your probleme. When appears your problem? While generate XML fields available? While merging with velocity? Could you please create me a simple AbstractRTFUseCase in order to I see your usecase. Morever this AbstractRTFUseCase will be usefull for you to test your RTF model. See http://rtftemplate.sourceforge.net/userguide/model-creation-java/modele-creation-java.html to implement AbstractRTFUseCase or see sampel into usecases distribition.
Regards Angelo
Logged In: YES
user_id=1868853
Originator: YES
Ok Angelo,
Here are the files.
I'm use Velocity.
Thanks a lot.
File Added: TestRtfTemplateBUG.zip
Tests with VO bidiretional
Logged In: YES
user_id=1006268
Originator: NO
Hi Pizão,
thank you for your zip uploaded.
I have seen your problem, but it's very difficult for me to detect bidirectionnel VO into parseObject.
This method build XML fields available.
Morever, even if I can detect the bidirectionnel VO, when parseObject must end? When you have bidirectionnel VO
I think you want manage recursivity in your RTF model. Recursivity is not possible.
I'm very Sorry.
Regards Angelo
Logged In: NO
Hi, azerr!
I'm with rpizao trying to solve this problem..
After some days spent understanding the code,
I don't even know the need of run troughout all the context before
start to transform, if we need a little part of context in template.
Would be so hard to make a on-demand context read?
We are still not using the Xml of fields available.
If we use this file, will we avoid to load all the context before transform???
I don't know if we could explain properly our problem.. I have a VERY BIG context,
with a lot of circular references and with a very deep tree of relations
and it's impracticable to load it all previuosly, we got A java heap space when tried.
If someone could help us...
thanks..
Use case with circular references
Logged In: YES
user_id=1006268
Originator: NO
Hi, rpizao friend
I have upload new version of RTFTemplate b-14 and I have tried to manage circular references.
With your sample it works, but with complex context, I don't know.
To avoid having problem with references circular, you must do
rtfTemplate.setCircularReferences(true);
before calling merge (see TestRtfTemplate of TestCircularReferencesRTF.zip).
I give you zip TestCircularReferencesRTF.zip (it's my Eclipse project, but get only source and rtf directory, because I have not putted libraries). In this source, you have TestCircularReferencesRTF wich is AbstractRTFUseCase (in th efuture, please send me AbstractRTFUseCase, it will be more easy for me, thank you).
When you run TestCircularReferencesRTF, it will generate contextStart.rtf.vmRTFTemplate.out.rtf into rtf directory.
Tell me, if it works with your complex context.
Regards Angelo
File Added: TestCircularReferencesRTF.zip
Logged In: YES
user_id=1871602
Originator: NO
Hi azerr!
Thanks for your help, but for this time i prefered using fields.xml, because my context is bigger then i really need in templates...
My context is a result of hibernate query, and have a lot of complex objects..
I think a automatic context exploration, without fields.xml, would not work for my context..
I couldn't test your new build with my context because I got a "Java heap space" when the context reader
dived into 'deep of hibernate complex objects'... Sorry.
I saw the code and it seems to solve the circular reference problem, your solution similar to a draft i tried here.
thanks
Logged In: YES
user_id=1006268
Originator: NO
Hi brunojcm,
I don't understand when you say "but for this time i prefered using fields.xml"
because object with circular reference are managed (simply). So you can use fields.xml and
this XML file can be generated automaticly (see my zip uploaded).
Angelo
Logged In: NO
Hi, Angelo..
I said "but for this time i prefered using
fields.xml" because the circular references were not my only problem,
the hibernate objects that are automatically generated and extends
my objects have a lot os 'get' methods that i didn't want.
If i try to generate xml automatically it would be bigger than
it really need and have a lot of strange things of hibernate..
I have a new problem now, how to use get with parameters!
can you reply my Support Request in the tracker?
I create a new thread because i think it's a new problem,
not necessarely a bug..
Thanks
Logged In: NO
Ok I understand.
So you prefere build field.xml at hand.
Angelo
Logged In: YES
user_id=1868853
Originator: YES
Hi Angelo, very thanks for help.
And the new problem, know if is possible?
Rafael.
Logged In: NO
Hi Rafael,
I have answered of your request (Sorry today, it's not possible).
See my answer at https://sourceforge.net/tracker/index.php?func=detail&aid=1782869&group_id=153424&atid=787712
for more explanation.
Angelo