|
We are using the Export Plugin (0.5). I have a list of objects retrieved
via a HQL query. These objects can be from two different domains (accountNote and contactNote). contactNotes belong to the contact domain and will have contact information and accountNotes belong to the account domain and will have account information. I want my CSV to be able to display information from each domain. Right now using the parameters below, the export is working and generating a CSV for me but it is generating stacktraces when exporting a contactNote, it has no account information and vice versa for accountNotes as they do not have contact information. How can I properly set up the fields and labels for the plugin properly so that it does not generate a lot of errors & still works? List fields=["account.name", "contact.lastName", "contact.firstName", "contact.workPhone", "createdBy", "note"] Map labels=["account.name": "Account Name", "contact.lastName": "Contact Last Name","contact.firstName": "Contact First Name","contact.workPhone": "Work Phone No.","createdBy":"Submitted By","note":"Note Content"] Many Thanks, Doug ********************************************************************************************* This email message and any attachments is for use only by the named addressee(s) and may contain confidential, privileged and/or proprietary information. If you have received this message in error, please immediately notify the sender and delete and destroy the message and all copies. All unauthorized direct or indirect use or disclosure of this message is strictly prohibited. No right to confidentiality or privilege is waived or lost by any error in transmission. ********************************************************************************************* --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Hi Doug,
from the top of my head I would say the easiest way to get rid of the error messages would be to set the log level for export plugin to error, because these messages are logged on info (to show that something might be wrong). Another option could be to transform the objects that should be exported to a list of maps where both types contain all the fields and have an empty value for those where they don't contain a value. Currently I'm thinking about whether it would make sense to add a configuration attribute to switch off these info messages. Best regards, Andreas 2011/4/26 <[hidden email]>: > We are using the Export Plugin (0.5). I have a list of objects retrieved > via a HQL query. These objects can be from two different domains > (accountNote and contactNote). contactNotes belong to the contact domain > and will have contact information and accountNotes belong to the account > domain and will have account information. I want my CSV to be able to > display information from each domain. Right now using the parameters > below, the export is working and generating a CSV for me but it is > generating stacktraces when exporting a contactNote, it has no account > information and vice versa for accountNotes as they do not have contact > information. How can I properly set up the fields and labels for the > plugin properly so that it does not generate a lot of errors & still works? > > List fields=["account.name", "contact.lastName", "contact.firstName", > "contact.workPhone", "createdBy", "note"] > > Map labels=["account.name": "Account Name", "contact.lastName": "Contact > Last Name","contact.firstName": "Contact First Name","contact.workPhone": > "Work Phone No.","createdBy":"Submitted By","note":"Note Content"] > > Many Thanks, > Doug > > > ********************************************************************************************* > This email message and any attachments is for use only by the named addressee(s) and may contain confidential, privileged and/or proprietary information. If you have received this message in error, please immediately notify the sender and delete and destroy the message and all copies. All unauthorized direct or indirect use or disclosure of this message is strictly prohibited. No right to confidentiality or privilege is waived or lost by any error in transmission. > ********************************************************************************************* > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Andreas,
Thanks for the reply. I actually took the second option on my own the other day and now I iterate through the objects and create the maps accordingly so I can manipulate the fields so it will work better. No errors this way and it works great! If it weren't for the errors in the first place, I may not have seen the issue at hand..... Thanks again. Doug From: Andreas Schmitt <[hidden email]> To: [hidden email] Date: 04/27/2011 04:16 PM Subject: Re: [grails-user] Export Plugin question Hi Doug, from the top of my head I would say the easiest way to get rid of the error messages would be to set the log level for export plugin to error, because these messages are logged on info (to show that something might be wrong). Another option could be to transform the objects that should be exported to a list of maps where both types contain all the fields and have an empty value for those where they don't contain a value. Currently I'm thinking about whether it would make sense to add a configuration attribute to switch off these info messages. Best regards, Andreas 2011/4/26 <[hidden email]>: > We are using the Export Plugin (0.5). I have a list of objects retrieved > via a HQL query. These objects can be from two different domains > (accountNote and contactNote). contactNotes belong to the contact domain > and will have contact information and accountNotes belong to the account > domain and will have account information. I want my CSV to be able to > display information from each domain. Right now using the parameters > below, the export is working and generating a CSV for me but it is > generating stacktraces when exporting a contactNote, it has no account > information and vice versa for accountNotes as they do not have contact > information. How can I properly set up the fields and labels for the > plugin properly so that it does not generate a lot of errors & still works? > > List fields=["account.name", "contact.lastName", "contact.firstName", > "contact.workPhone", "createdBy", "note"] > > Map labels=["account.name": "Account Name", "contact.lastName": "Contact > Last Name","contact.firstName": "Contact First Name","contact.workPhone": > "Work Phone No.","createdBy":"Submitted By","note":"Note Content"] > > Many Thanks, > Doug > > > > This email message and any attachments is for use only by the named addressee(s) and may contain confidential, privileged and/or proprietary information. If you have received this message in error, please immediately notify the sender and delete and destroy the message and all copies. All unauthorized direct or indirect use or disclosure of this message is strictly prohibited. No right to confidentiality or privilege is waived or lost by any error in transmission. > ********************************************************************************************* > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email ********************************************************************************************* This email message and any attachments is for use only by the named addressee(s) and may contain confidential, privileged and/or proprietary information. If you have received this message in error, please immediately notify the sender and delete and destroy the message and all copies. All unauthorized direct or indirect use or disclosure of this message is strictly prohibited. No right to confidentiality or privilege is waived or lost by any error in transmission. ********************************************************************************************* --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Powered by Nabble | Edit this page |
