Re: how to import data from excel sheet

2009-10-27 Thread Nalin Chandra

Hi

This is long time i back on this forum.

thanks for all your suggestions. I solve this problem with different method.
Now we store the path of the image using Excel sheet and upload the
corresponding images in the respective folder.


Nalin Chandra
Ofbiz developer



BJ Freeman wrote:
 
 Ok the way to upload changes with out a form.
 First understand that in the form way the image is uploaded into server
 memory, from your desktop, then you read the data from the server memory
 and put it into a file. This is a function of the webbrowser not ofbiz.
 The problem is that a server can not read from you local drive. You can
 only do this thru a web browser.
 
 so you must either put the images on the server, thru FTP then reference
 them that way in your excel.
 or put the images on a machine that is exposed to the internet with a
 web server and give a http:// type url to be uploaded, in your excel.
 
 
 nalin chandra sent the following on 5/10/2009 7:24 AM:
 Thanks for reply.
 
 But that is not my problem.
 Once again i clear my problem.
 I want to upload all the information about product category etc from the
 excel sheet where we write all the required information about product and
 category. In that excel sheet i also mentioned the local system path of
 image. Now i want to upload the image from local system to remote server
 using path of that. Now i read the local system file path from excel
 sheet
 as shown in bold.
 
 I know we need a form to upload the file 
 form method=post action=uploadCategory
 enctype=multipart/form-data
   file: input type=file name=file-upload
   input type=submit
 /form .
 
 but i my case there is no form. i got the file path in my method now i
 want
 to upload the that file from local system to remote server.
 
 I think now you under stand my problem.
 with the use of this we have no need to upload the product detail one by
 one
 to the server.
 
 waiting for your reply.
 
 Thanks
 
 Nalin Chandra
 
 
 
 
 public static String uploadCategory(HttpServletRequest request,
 HttpServletResponse response) {

 try
 {
  String filename = D:/category.xls;
   WorkbookSettings ws = new WorkbookSettings();
   ws.setLocale(new Locale(en, EN));
   Workbook workbook = Workbook.getWorkbook(new
 File(filename),ws);
   Sheet s  = workbook.getSheet(0);
   readCategoryDataSheet(s, request);
   workbook.close();  
 }
 catch (IOException e)
 {
   e.printStackTrace();
 }
 catch (BiffException e)
 {
   e.printStackTrace();
 }

 return success;
 }

 private static void readCategoryDataSheet(Sheet s,
 HttpServletRequest
 request)
 {
   Cell rowData[] = null;
   int successCount = 0;
   int failCount = 0;
   int rows = s.getRows();
   int column = s.getColumns();
   String productCategoryId = ;
   String productCategoryTypeId = ;
   String primaryParentCategoryId = ;
   String categoryName = ;
   String description = ;
   String longDescription = ;
   String categoryImageUrl = ;
   String linkOneImageUrl = ;
   String prodCatalogId = ;
   String prodCatalogCategoryTypeId = ;
   String sequenceNum = ;

   for (int i = 1; i  rows; i++) {
  rowData = s.getRow(i);
 if (rowData[0].getContents().length() != 0) {
 for (int j = 0; j  column; j++) {
 switch (j) {
 case 0:
 productCategoryId =
 rowData[j].getContents();
 case 1:
 productCategoryTypeId =
 rowData[j].getContents();
 case 2:
 primaryParentCategoryId
 =
 rowData[j].getContents();
 case 3:
 categoryName =
 rowData[j].getContents();
 case 4:
 description =
 rowData[j].getContents();
 case 5:
 longDescription =
 rowData[j].getContents();
 case 6:
 categoryImageUrl =
 rowData[j].getContents();
 case 7:
 linkOneImageUrl =
 rowData[j].getContents();
 default:
 break;
 }
 }
 }
 String imageFilenameFormat

how to import data from excel sheet

2009-05-10 Thread nalin chandra
++;
  } catch (GenericEntityException e) {
  Debug.logWarning(e.getMessage(),
module);
  }
   
  }
  } catch(GenericEntityException e) {
  Debug.logError(Exception occured :+e.getMessage(), module);
   }
  }
 
}


it create the temp file in corresponding directory but there is no actual
image at that path.

So any one have any idea regarding this please suggest me.


Thanks.

Nalin Chandra
-- 
View this message in context: 
http://www.nabble.com/how-to-import-data-from-excel-sheet-tp23467442p23467442.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: how to import data from excel sheet

2009-05-10 Thread nalin chandra

Thanks for reply.

But that is not my problem.
Once again i clear my problem.
I want to upload all the information about product category etc from the
excel sheet where we write all the required information about product and
category. In that excel sheet i also mentioned the local system path of
image. Now i want to upload the image from local system to remote server
using path of that. Now i read the local system file path from excel sheet
as shown in bold.

I know we need a form to upload the file 
form method=post action=uploadCategory enctype=multipart/form-data
  file: input type=file name=file-upload
  input type=submit
/form .

but i my case there is no form. i got the file path in my method now i want
to upload the that file from local system to remote server.

I think now you under stand my problem.
with the use of this we have no need to upload the product detail one by one
to the server.

waiting for your reply.

Thanks

Nalin Chandra




 
 public static String uploadCategory(HttpServletRequest request,
 HttpServletResponse response) {

 try
 {
  String filename = D:/category.xls;
   WorkbookSettings ws = new WorkbookSettings();
   ws.setLocale(new Locale(en, EN));
   Workbook workbook = Workbook.getWorkbook(new File(filename),ws);
   Sheet s  = workbook.getSheet(0);
   readCategoryDataSheet(s, request);
   workbook.close();  
 }
 catch (IOException e)
 {
   e.printStackTrace();
 }
 catch (BiffException e)
 {
   e.printStackTrace();
 }

 return success;
 }

 private static void readCategoryDataSheet(Sheet s, HttpServletRequest
 request)
 {
   Cell rowData[] = null;
   int successCount = 0;
   int failCount = 0;
   int rows = s.getRows();
   int column = s.getColumns();
   String productCategoryId = ;
   String productCategoryTypeId = ;
   String primaryParentCategoryId = ;
   String categoryName = ;
   String description = ;
   String longDescription = ;
   String categoryImageUrl = ;
   String linkOneImageUrl = ;
   String prodCatalogId = ;
   String prodCatalogCategoryTypeId = ;
   String sequenceNum = ;
 
   for (int i = 1; i  rows; i++) {
  rowData = s.getRow(i);
 if (rowData[0].getContents().length() != 0) {
 for (int j = 0; j  column; j++) {
 switch (j) {
 case 0:
 productCategoryId =
 rowData[j].getContents();
 case 1:
 productCategoryTypeId =
 rowData[j].getContents();
 case 2:
 primaryParentCategoryId =
 rowData[j].getContents();
 case 3:
 categoryName =
 rowData[j].getContents();
 case 4:
 description =
 rowData[j].getContents();
 case 5:
 longDescription =
 rowData[j].getContents();
 case 6:
 categoryImageUrl =
 rowData[j].getContents();
 case 7:
 linkOneImageUrl =
 rowData[j].getContents();
 default:
 break;
 }
 }
 }
 String imageFilenameFormat =
 UtilProperties.getPropertyValue(catalog, image.filename.format);
 String imageServerPath =
 UtilProperties.getPropertyValue(catalog, image.server.path);
 String imageUrlPrefix =
 UtilProperties.getPropertyValue(catalog, image.url.prefix);


 // upload image
 FlexibleStringExpander filenameExpander = new
 FlexibleStringExpander(imageFilenameFormat);
 String catImageUrl = ;
 String linkImageUrl = ;
 if(categoryImageUrl != null 
 categoryImageUrl.length()  0){
 Object forLock = new Object();
 String contentType = null;
 String categoryImageLocation =
 filenameExpander.expandString(UtilMisc.toMap(location, categories,
 type, category, id, productCategoryId

How to print Bulk report through network printer..

2009-04-17 Thread nalin chandra

Hi all

I want to implement the bulk printing of order report, When i send the
request it through the exception..

Invalid URI for printer [Auto HP LaserJet 1018 on PAL20]
Exception: java.net.URISyntaxException
Message: Illegal character in path at index 4: Auto HP LaserJet 1018 on
PAL20
 stack trace
---
java.net.URISyntaxException: Illegal character in path at index 4: Auto HP
LaserJet 1018 on PAL20
java.net.URI$Parser.fail(Unknown Source)
java.net.URI$Parser.checkChars(Unknown Source)
java.net.URI$Parser.parseHierarchical(Unknown Source)
java.net.URI$Parser.parse(Unknown Source)
java.net.URI.init(Unknown Source)
org.ofbiz.content.output.OutputServices.sendPrintFromScreen(OutputServices.java:167)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:91)
org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:53)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:336)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:211)
org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:136)
org.ofbiz.service.job.GenericServiceJob.exec(GenericServiceJob.java:70)
org.ofbiz.service.job.JobInvoker.run(JobInvoker.java:221)
java.lang.Thread.run(Unknown Source)


...INSIDE sendPrintFromScreen METHOD.444..
2009-04-17 22:34:20,828 (default-invoker-Thread-8) [
OutputServices.java:173:WARN ]
 exception report
--
Invalid URI for printer [Auto HP LaserJet 1018 on PAL20]
Exception: java.net.URISyntaxException

if any one have any idea regarding this. please help me.

Thanks

Nalin Chandra
-- 
View this message in context: 
http://www.nabble.com/How-to-print-Bulk-report-through-network-printer..-tp23101937p23101937.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



list of product (with quantity) sale from particular Facility.

2008-12-20 Thread nalin chandra

hi All

I want to display list of product (with quantity) sale from particular
Facility.
If any one have idea please help me.

Thanks
-- 
View this message in context: 
http://www.nabble.com/list-of-product-%28with-quantity%29-sale-from-particular-Facility.-tp21104276p21104276.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: xX mM lL ERROR

2008-12-11 Thread nalin chandra

Hi Harish

This is very common error. You check your fo table syntex. may be you miss
some things.

the main problem is common decorator where you create a template for pdf
file some time user did the mistake at that place, means you not design the
page as per the template. 

So first you check the screen-decorator template after that check screen is
proper for that template, then check run the request without content fo.ftl
file. if pdf page is open then you must miss the fo table syntax.

I hope this will work for you.
other wise you send the file i will trace your error.



harish84 wrote:
 
 when i try to convert ftl file into pdf i am getting error as sax
 transform exception xml files must be terminated  by same entity.
 
 javax.xml.transform.TransformerException: org.xml.sax.SAXParseException:
 XML document structures must start and end within the same entity.
 

-- 
View this message in context: 
http://www.nabble.com/xX-mM-lL-ERROR-tp20916781p20954393.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: the symbol of the folder..

2008-12-11 Thread nalin chandra

Hi

build are not part of repository. thats why there are no symbol with that
folder.
when you run ant build is created.

you can check it by command (ant clean). all the build folder is deleted.
again use command (ant) all build folder is again created.

i hope your confusion is clear now.


myofbiz wrote:
 
 As soon as I  checkout the ofbiz project from repository, and open it in
 eclipse, all the directories  have a symbol (indicating checked out from
 repository)but few dirs do not have the symbol like build, bin.May I know
 what makes it not to change..
 
 Thanks in advance
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/the-symbol-of-the-folder..-tp20942771p20954451.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: use of contextfilter.java

2008-12-11 Thread nalin chandra

Hi 

I think you want to know about use contextfilter.java in ofbiz application.

This file is use to set the context path, initial parameter for our servlet.
you go through the code written in the contextfilter.java file as well as
with logs.

few log statement is following:-
-12-12 09:15:59,881 (main) [  ContextFilter.java:297:INFO ] Adding
web.xml context-param to application attribute with name
[entityDelegatorName] and value [default]
-12-12 09:15:59,881 (main) [  ContextFilter.java:297:INFO ] Adding
web.xml context-param to application attribute with name
[localDispatcherName] and value [example]
==OFBIZ HOME===  D:\demoappwithvisitorstat
 is the path information   :
D:\demoappwithvisitorstat\framework\example\webapp\example\index.jsp
-12-12 09:15:59,881 (main) [  ContextFilter.java:257:INFO ]
[ContextFilter.init] Getting Entity Engine Delegator with delegator name
default


 

nachi19 wrote:
 
 Hi
can anyone give the brief description of contextfilter.java .. what is
 its purpose ... and what task it does...
 

-- 
View this message in context: 
http://www.nabble.com/use-of-contextfilter.java-tp20962775p20969801.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: passing map parameter from ftl to event type java

2008-12-05 Thread nalin chandra

Hi Hari

tou wrote..

Third, on .ftl file I catch the Map and JRDataSource which has been sent by
.bsh file (on context) before. And here is the problem : I want to send
(again) both of the parameters to become input parameters for a java's
event. 

so, if you want to send the same Maps for next request then you can put the
same in context in bsh and fetch in your java file where you want. 
in ftl file Maps handling is not so good so if you want to use the same
process you first change Maps to list there are many method toList(Maps map)
available in ofbiz it will easier to handle the list.

In case you use the Maps in ftls it has problem because The ``hash'' type of
the FreeMarker Template Language (FTL) is not the same as Java's Map. FTL's
hash is an associative array too, but it uses string keys exclusively. 

i understand your problem but if you give me some idea about what you want
to do, so may be i can suggest you alternative.



Hari Plaikoil wrote:
 
 Hi Nalin, thanks for your response. I'll try to describe my process's path
 :
 
 First, when I click a submit link, it will call java service. The output
 of the java service are Map and JRDataSource. (on this service, there is
 no problem)
 
 Second, through a .bsh file, I catch the both of the parameters and put
 them on context (on this .bsh there is no problem), and I pass the context
 to .ftl file
 
 Third, on .ftl file I catch the Map and JRDataSource which has been sent
 by .bsh file (on context) before. And here is the problem : I want to send
 (again) both of the parameters to become input parameters for a java's
 event.
 I don't know how to assign both of this parameters on ftl to become
 attribute. So, when I catch them on java's event by code
 request.getAttribute(Map) it will not give me null value. 
 
 I don't want to send both of the parameters on .ftl by @inputHidden. All
 my problem is between .ftl and java's event. There is no screen widget
 here. 
 
 That's all. I hope you have a clear view now on my problem.
 
 Thanks
 
 
 nalin chandra wrote:
 
 Hi 
 Sorry but, i don't understand your problem completely. But what ever i
 understand from your conversation with Scott, i think you want to send
 value through ftl file.
 
 So you try
 set field=abc from-field=parameters.abc/
 set field=xyz from-field=parameters.xyz/
 between screens actions/actions tag.
 
 
 
 
 Hari Plaikoil wrote:
 
 Dear all,
 
 Could you tell me how to pass a Map's parameter from ftl to java? 
 
 When in ftl, the parameter has data. But when I call it in java's method
 by this code below, I got null value:
 
  MapString, Object jPrm = (MapString,
 Object)request.getAttribute(jrParameters);
  JRDataSource jrDataSource = (JRDataSource)
 request.getAttribute(jrDataSource);
 
  In this case, I want to pass jrParameter and jrDatasource to make a
 report.
 
 Please, help me...
 
 Thanks.
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/passing-map-parameter-from-ftl-to-event-type-java-tp20790183p20862259.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: set the permission

2008-12-05 Thread nalin chandra

Hi Anand

Permission setting is define in the decorator also. If you no use this
section..

condition
  if-has-permission permission= action=_VIEW/
/condition

tag in the any screens widget sections or its common decorator . it will
automatically provide the all permission.




anand joshi wrote:
 
 hi all
  i have created one page , i want to set the all permission for that
 page , how to do it.
 
 -- 
 Anand..
 
 

-- 
View this message in context: 
http://www.nabble.com/set-the-permission-tp20848735p20862431.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: Inserting Data through forms

2008-12-04 Thread nalin chandra

Hi Divya

if there is data stored in data base then its display in Entity Data
Maintenance, so first you sure about this, check the database manually, 

I don't confirm about your process to create the table, may be you miss the
Package-name=org.ofbiz.emartcatalog.produst 

entity entity-name=ProductVisit
package-name=org.ofbiz.emartcatalog.produst
title=Product Visit Entity
  field name=visitId type=id/field
  field name=productId type=id/field
  field name=categoryId type=id/field
  field name=productOrdered type=indicator/field
  prim-key field=visitId/
  prim-key field=productId/
/entity

if you did the same then please send the log for that request, then i will
try to solve your issue.


Divya Nair wrote:
 
 Hi All,
 
 I have created one new form in ofbiz and when I tried to insert data
 through this form, it's accepting all values and it's not showing any
 errors...  
 
 I have created one table for this form in entitymodel.xml also
 
 But when I searched the data through  Entity Data Maintenance, it's not
 showing there
 Do we need to add any JAVA beans for inserting?
 
 Thanks in advance...
 
 Regards,
 Divya
 
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Inserting-Data-through-forms-tp20832247p20840686.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: CSV reporting..

2008-12-03 Thread nalin chandra
(,,
 );
  }
   }
 
 if(EMAIL_ADDRESS.equals(contactMech1.getString(contactMechTypeId)))
   {
 email += contactMech1.getString(infoString)+/;
   }
 
 if(TELECOM_NUMBER.equals(contactMech1.getString(contactMechTypeId)))
   {
 telecomNumber = contactMechGV.get(telecomNumber);
 if(telecomNumber.get(areaCode) != null)
 phone += telecomNumber.get(areaCode).trim();
 
   phone += telecomNumber.get(contactNumber).trim();
 
// if(telecomNumber.partyContactMech.get(extension)
 !=
 null)
 // phone +=
 telecomNumber.partyContactMech.get(extension);
   }
  // print( partyId +partyId+ email +email+ fullName
 +fullName+ address +address+ phone +phone);
 }
 fw.append(partyId);
 fw.append(',');
 fw.append(toName);
   fw.append(',');
   fw.append(attnName);
   fw.append(',');
 fw.append(address1);
   fw.append(',');
 fw.append(address2);
   fw.append(',');
   fw.append(city);
   fw.append(',');
   fw.append(postalCode);
   fw.append(',');
   fw.append(state);
   fw.append(',');
   fw.append(country);
   fw.append(',');
   fw.append(fullName);
 fw.append('\n');
 
   fw.flush();
  // fw.close();
   //response.sendRedirect(control/main);
 }
 }
 
 
 
 
 
 
 On Wed, Dec 3, 2008 at 2:05 AM, nalin chandra 
 [EMAIL PROTECTED] wrote:
 

 i use CSV reporting in ofbiz

 As we all know, we can display data of only one list in the form.

 so i use view entity to display data of multiple table.
 now i have one problem.

 i want to display the detail of party like name, address, email, contact
 number etc.
 for this purpose i create a view entity but it only display the email id
 or
 telephone number because contactMechId id different for those two, so
 please
 help me on this issue..

 below i paste the view entity code which i use for this purpose:-

 DynamicViewEntity dynamicView = new DynamicViewEntity();
 List orderBy = FastList.newInstance();
 List fieldsToSelect = FastList.newInstance();

 dynamicView.addMemberEntity(PT, Party);
 dynamicView.addAlias(PT, partyId);
 dynamicView.addAlias(PT, statusId);
 dynamicView.addAlias(PT, partyTypeId);
 dynamicView.addAlias(PT, createdDate);
 dynamicView.addRelation(one-nofk, , PartyType,
 ModelKeyMap.makeKeyMapList(partyTypeId));
 dynamicView.addRelation(many, , UserLogin,
 ModelKeyMap.makeKeyMapList(partyId));


 fieldsToSelect.add(partyId);
 fieldsToSelect.add(statusId);
 fieldsToSelect.add(partyTypeId);
 fieldsToSelect.add(createdDate);
 orderBy.add(createdDate);

 dynamicView.addMemberEntity(PDS, PartyDataSource);
 dynamicView.addAlias(PDS, visitId);
 dynamicView.addViewLink(PT, PDS, Boolean.FALSE,
 ModelKeyMap.makeKeyMapList(partyId));

 fieldsToSelect.add(visitId);

 dynamicView.addMemberEntity(UL, UserLogin);
 dynamicView.addAlias(UL, userLoginId);
 dynamicView.addViewLink(PT, UL, Boolean.FALSE,
 ModelKeyMap.makeKeyMapList(partyId));

 fieldsToSelect.add(userLoginId);

 dynamicView.addMemberEntity(PE, Person);
 dynamicView.addAlias(PE, firstName);
 dynamicView.addAlias(PE, lastName);
 dynamicView.addViewLink(PT, PE, Boolean.FALSE,
 ModelKeyMap.makeKeyMapList(partyId));

 fieldsToSelect.add(firstName);
 fieldsToSelect.add(lastName);

 dynamicView.addMemberEntity(PC, PartyContactMech);
 dynamicView.addMemberEntity(CM, ContactMech);
 dynamicView.addMemberEntity(TM, TelecomNumber);
 dynamicView.addAlias(PC, contactMechId);
 dynamicView.addAlias(CM, infoString);
 dynamicView.addAlias(TM, countryCode);
 dynamicView.addAlias(TM, areaCode);
 dynamicView.addAlias(TM, contactNumber);
 dynamicView.addViewLink(PT, PC, Boolean.FALSE,
 ModelKeyMap.makeKeyMapList(partyId));
 dynamicView.addViewLink(PC, CM, Boolean.FALSE,
 ModelKeyMap.makeKeyMapList(contactMechId));
 dynamicView.addViewLink(PC, TM, Boolean.FALSE,
 ModelKeyMap.makeKeyMapList(contactMechId));

 fieldsToSelect.add(infoString);
 fieldsToSelect.add(contactNumber);
 fieldsToSelect.add(areaCode);
 fieldsToSelect.add(countryCode);


 in ftl file if i display partyLists.infoSting is display null because for
 telecomNumber there is no infoString value in corresponding column of
 contactMech table.

 --
 View this message in context:
 http://www.nabble.com/CSV-reporting..-tp20800340p20800340.html
 Sent from the OFBiz - User mailing list archive at Nabble.com.


 
 
 -- 
 With regards,
 S K Pradeep kumar
 
 

-- 
View this message in context: 
http://www.nabble.com/CSV-reporting..-tp20800340p20815359.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



CSV reporting..

2008-12-02 Thread nalin chandra

i use CSV reporting in ofbiz

As we all know, we can display data of only one list in the form.

so i use view entity to display data of multiple table.
now i have one problem.

i want to display the detail of party like name, address, email, contact
number etc.
for this purpose i create a view entity but it only display the email id or
telephone number because contactMechId id different for those two, so please
help me on this issue..

below i paste the view entity code which i use for this purpose:-

DynamicViewEntity dynamicView = new DynamicViewEntity();
List orderBy = FastList.newInstance();
List fieldsToSelect = FastList.newInstance();

dynamicView.addMemberEntity(PT, Party);
dynamicView.addAlias(PT, partyId);
dynamicView.addAlias(PT, statusId);
dynamicView.addAlias(PT, partyTypeId);
dynamicView.addAlias(PT, createdDate);
dynamicView.addRelation(one-nofk, , PartyType,
ModelKeyMap.makeKeyMapList(partyTypeId));
dynamicView.addRelation(many, , UserLogin,
ModelKeyMap.makeKeyMapList(partyId));


fieldsToSelect.add(partyId);
fieldsToSelect.add(statusId);
fieldsToSelect.add(partyTypeId);
fieldsToSelect.add(createdDate);
orderBy.add(createdDate);

dynamicView.addMemberEntity(PDS, PartyDataSource);
dynamicView.addAlias(PDS, visitId);
dynamicView.addViewLink(PT, PDS, Boolean.FALSE,
ModelKeyMap.makeKeyMapList(partyId));

fieldsToSelect.add(visitId);

dynamicView.addMemberEntity(UL, UserLogin);
dynamicView.addAlias(UL, userLoginId);
dynamicView.addViewLink(PT, UL, Boolean.FALSE,
ModelKeyMap.makeKeyMapList(partyId));

fieldsToSelect.add(userLoginId);

dynamicView.addMemberEntity(PE, Person);
dynamicView.addAlias(PE, firstName);
dynamicView.addAlias(PE, lastName);
dynamicView.addViewLink(PT, PE, Boolean.FALSE,
ModelKeyMap.makeKeyMapList(partyId));

fieldsToSelect.add(firstName);
fieldsToSelect.add(lastName);

dynamicView.addMemberEntity(PC, PartyContactMech);
dynamicView.addMemberEntity(CM, ContactMech);
dynamicView.addMemberEntity(TM, TelecomNumber);
dynamicView.addAlias(PC, contactMechId);
dynamicView.addAlias(CM, infoString);
dynamicView.addAlias(TM, countryCode);
dynamicView.addAlias(TM, areaCode);
dynamicView.addAlias(TM, contactNumber);
dynamicView.addViewLink(PT, PC, Boolean.FALSE,
ModelKeyMap.makeKeyMapList(partyId));
dynamicView.addViewLink(PC, CM, Boolean.FALSE,
ModelKeyMap.makeKeyMapList(contactMechId));
dynamicView.addViewLink(PC, TM, Boolean.FALSE,
ModelKeyMap.makeKeyMapList(contactMechId));

fieldsToSelect.add(infoString);
fieldsToSelect.add(contactNumber);
fieldsToSelect.add(areaCode);
fieldsToSelect.add(countryCode);


in ftl file if i display partyLists.infoSting is display null because for
telecomNumber there is no infoString value in corresponding column of 
contactMech table.

-- 
View this message in context: 
http://www.nabble.com/CSV-reporting..-tp20800340p20800340.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: CSV reporting..

2008-12-02 Thread nalin chandra

Thanks for suggestion


BJ Freeman wrote:
 
 my first suggestion is you make a view-entity in a xml file
 and include it in your project.
 then you can use web tools to look at it like anyother entity.
 https://demo.hotwaxmedia.com/webtools/control/FindGeneric?entityName=ContactMechDetailfind=trueVIEW_SIZE=50VIEW_INDEX=0
 
 you should have a _NA_ for fields instead of Nulls where there is a
 relationship.
 
 
 nalin chandra sent the following on 12/2/2008 12:35 PM:
 i use CSV reporting in ofbiz
 
 As we all know, we can display data of only one list in the form.
 
 so i use view entity to display data of multiple table.
 now i have one problem.
 
 i want to display the detail of party like name, address, email, contact
 number etc.
 for this purpose i create a view entity but it only display the email id
 or
 telephone number because contactMechId id different for those two, so
 please
 help me on this issue..
 
 below i paste the view entity code which i use for this purpose:-
 
 DynamicViewEntity dynamicView = new DynamicViewEntity();
 List orderBy = FastList.newInstance();
 List fieldsToSelect = FastList.newInstance();
 
 dynamicView.addMemberEntity(PT, Party);
 dynamicView.addAlias(PT, partyId);
 dynamicView.addAlias(PT, statusId);
 dynamicView.addAlias(PT, partyTypeId);
 dynamicView.addAlias(PT, createdDate);
 dynamicView.addRelation(one-nofk, , PartyType,
 ModelKeyMap.makeKeyMapList(partyTypeId));
 dynamicView.addRelation(many, , UserLogin,
 ModelKeyMap.makeKeyMapList(partyId));
 
 
 fieldsToSelect.add(partyId);
 fieldsToSelect.add(statusId);
 fieldsToSelect.add(partyTypeId);
 fieldsToSelect.add(createdDate);
 orderBy.add(createdDate);
 
 dynamicView.addMemberEntity(PDS, PartyDataSource);
 dynamicView.addAlias(PDS, visitId);
 dynamicView.addViewLink(PT, PDS, Boolean.FALSE,
 ModelKeyMap.makeKeyMapList(partyId));
 
 fieldsToSelect.add(visitId);
 
 dynamicView.addMemberEntity(UL, UserLogin);
 dynamicView.addAlias(UL, userLoginId);
 dynamicView.addViewLink(PT, UL, Boolean.FALSE,
 ModelKeyMap.makeKeyMapList(partyId));
 
 fieldsToSelect.add(userLoginId);
 
 dynamicView.addMemberEntity(PE, Person);
 dynamicView.addAlias(PE, firstName);
 dynamicView.addAlias(PE, lastName);
 dynamicView.addViewLink(PT, PE, Boolean.FALSE,
 ModelKeyMap.makeKeyMapList(partyId));
 
 fieldsToSelect.add(firstName);
 fieldsToSelect.add(lastName);
 
 dynamicView.addMemberEntity(PC, PartyContactMech);
 dynamicView.addMemberEntity(CM, ContactMech);
 dynamicView.addMemberEntity(TM, TelecomNumber);
 dynamicView.addAlias(PC, contactMechId);
 dynamicView.addAlias(CM, infoString);
 dynamicView.addAlias(TM, countryCode);
 dynamicView.addAlias(TM, areaCode);
 dynamicView.addAlias(TM, contactNumber);
 dynamicView.addViewLink(PT, PC, Boolean.FALSE,
 ModelKeyMap.makeKeyMapList(partyId));
 dynamicView.addViewLink(PC, CM, Boolean.FALSE,
 ModelKeyMap.makeKeyMapList(contactMechId));
 dynamicView.addViewLink(PC, TM, Boolean.FALSE,
 ModelKeyMap.makeKeyMapList(contactMechId));
 
 fieldsToSelect.add(infoString);
 fieldsToSelect.add(contactNumber);
 fieldsToSelect.add(areaCode);
 fieldsToSelect.add(countryCode);
 
 
 in ftl file if i display partyLists.infoSting is display null because for
 telecomNumber there is no infoString value in corresponding column of 
 contactMech table.
 
 
 

-- 
View this message in context: 
http://www.nabble.com/CSV-reporting..-tp20800340p20800983.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



CSV Reporting.....

2008-10-24 Thread nalin chandra

how we generate the CSV report.
In CSV reporting i have 2 problem
first:-
how to export the data from two different list

form name=VisitStatsExport type=list list-name=visitList 
odd-row-style=alternate-row default-table-style=basic-table
hover-bar
field name=visitId title=Visit Iddisplay//field
field name=separator0 title=,display
description=,//field
field name=quot0 title=quot;display
description=quot;//field
field name=visitorId title=Visitor Iddisplay//field
field name=quot1 title=quot;display
description=quot;//field
/form

here we can use only one list.

second:-
when we export the data in the Excel Sheet date field is not display
properly. It display only time so there is need to change the field format
for that column. but if i remove the 

field name=separator0 title=,display description=,//field

field it display completely but then separator is remove from there. 

So please help me if any one have solution.

Thankyou
-- 
View this message in context: 
http://www.nabble.com/CSV-Reporting.-tp20154273p20154273.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: DIffernce between context root and context path

2008-10-15 Thread nalin chandra

Hi this is easily understandable if you print the both value on your ftl
page.
context root are the all root define in the component-load.xml as component
and mount in the web.xml with display-app-bar=true. context path is the
present request path. 


myofbiz wrote:
 
 Hi 
 Can some one tell me what is the contextPath and contextRoot which we
 compare in appbar.ftl
 
 Thankyou
 
 
 
   
 

-- 
View this message in context: 
http://www.nabble.com/DIffernce-between-context-root-and-context-path-tp19974544p1665.html
Sent from the OFBiz - User mailing list archive at Nabble.com.