database different host/ip (not localhost)

2009-05-26 Thread Hari Plaikoil

Dear all, 
 
I'm trying to connect to a database on different server (different ip than
localhost), but I always get error messages. I change the entityengine.xml : 
 
delegator name=default entity-model-reader=main
entity-group-reader=main entity-eca-reader=main
distributed-cache-clear-enabled=false 
group-map group-name=org.ofbiz datasource-name=externalmysql/  
/delegator 
 
datasource name=externalmysql 
helper-class=org.ofbiz.entity.datasource.GenericHelperDAO 
field-type-name=mysql 
check-on-start=true 
add-missing-on-start=true 
check-pks-on-start=false 
use-foreign-keys=true 
join-style=ansi-no-parenthesis 
alias-view-columns=false 
drop-fk-use-foreign-key-keyword=true 
table-type=InnoDB 
character-set=latin1 
collate=latin1_general_cs 
read-data reader-name=seed/ 
read-data reader-name=demo/ 
read-data reader-name=ext/ 
inline-jdbc 
jdbc-driver=com.mysql.jdbc.Driver 
jdbc-uri=jdbc:mysql://ip_address/database_name?autoReconnect=true 
jdbc-username=username 
jdbc-password=password 
isolation-level=ReadCommitted 
pool-minsize=2 
pool-maxsize=20/  
/datasource 

when the database was on localhost, I could access it.  
 
jdbc-driver=com.mysql.jdbc.Driver  
jdbc-uri=jdbc:mysql://127.0.0.1/database_name?autoReconnect=true  
jdbc-username=username  
jdbc-password=password  

however, I want to access the database on different ip (change 127.0.0.1
with another ip), but system runs on my computer (ip: 127.0.0.1). it means,
it doesn't install in the same server where the database lies on. 

After I checked on the log, it seems system can access the database: 
 
WARNING: Column [PRODUCT_ID] of table [ACCTG_TRANS_ENTRY] of entity
[AcctgTransEntry] has a column size of [40] in the database, but is defined
to have a column size of [20] in the entity definition. 
Column [CARRIER_PARTY_ID] of table [ORDER_HEADER] of entity [OrderHeader]
exists in the database but has no corresponding field 
Column [ATTN_PARTY_ID] of table [ORDER_HEADER] of entity [OrderHeader]
exists in the database but has no corresponding field 
Entity [OrderHeader] has 31 fields but table [ORDER_HEADER] has 33 columns. 
 
 
However, the other log message makes me confuse : 
 
Failure in findListIteratorByCondition operation for entity [DynamicView]:
org.ofbiz.entity.GenericDataSourceException: SQL Exception while executing
the following:SELECT COUNT(*) FROM ENTITY_KEY_STORE (Base table or view not
found message from server: Table database_name.ENTITY_KEY_STORE' doesn't
exist). Rolling back transaction. 
Exception: org.ofbiz.entity.GenericDataSourceException 
Message: SQL Exception while executing the following:SELECT COUNT(*) FROM
ENTITY_KEY_STORE (Base table or view not found message from server: Table
'database_name.ENTITY_KEY_STORE' doesn't exist) 
 
those messages give me an assumption that system cannot access the database. 
 
 
FYI, table's name is typed in lowercase font, EntityKeyStore becomes
entity_key_store. and field's name is typed in uppercase font, keyName
becomes KEY_NAME. 
 
after I changed entitty_key_store to ENTITY_KEY_STORE, ofbiz didn't give any
message for that table, but for another table, another 'doesn't exist'
messages. 
 
would you like to help me, which one of the files should I modify to change
the font case of the table's name from uppercase to lowercase font to make
the query becomes like this : 'SELECT COUNT(*) FROM entity_key_store' ?  
 
I guess the problem is about uppercase and lowercase, but I'm not sure. My
computer/system is running on windows. but the database is running on linux. 
 
Please help me. 
 
Thank in advance. 
-- 
View this message in context: 
http://www.nabble.com/database-different-host-ip-%28not-localhost%29-tp23720201p23720201.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



What is functionality of OrderItemAndShipGroupAssoc?

2009-04-15 Thread Hari Plaikoil

Dear all,

Sorry if my question a little bit annoying for you. I am curious about the
functionality of OrderItemAndShipGroupAssoc's view-entity. What does it mean
for sales order process, for OrderItem entity,etc. If we can get the data
from OrderItem and OrderItemShipGroupAssoc, why we still need to access
OrderItemAndShipGroupAssoc? I'm trying to read the quick ship entire order
at this moment, and I can't figure out some steps of the process.

Thank a lot for the answer.

rgds
Hari Plaikoil
-- 
View this message in context: 
http://www.nabble.com/What-is-functionality-of-OrderItemAndShipGroupAssoc--tp23070656p23070656.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: Inventory transfer half of total stock

2009-03-01 Thread Hari Plaikoil

Oh, I'm sorry. I didn't know it.

Thank you Jacques for your explanation.

regards,
Hari Plaikoil


Sorry but this is OpenTaps, there are sufficient significant changes between
Opentpas and OFBiz (Opentpas is build upon OFBiz ), so 
please see before with them on their forum.

Jacques

-- 
View this message in context: 
http://www.nabble.com/Inventory-transfer-half-of-total-stock-tp0694p22281577.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Inventory transfer half of total stock

2009-02-26 Thread Hari Plaikoil

Dear all,

I try to make an inventory transfer from WebstoreWarehouse to Demo3PL. The
product id is WG- and the Inventory item id is 9005. The ATP/QOH is 4/4.
I want to transfer 2 product of WG- from Webstore to Demo3PL. So, in my
assumption it will subtract 4 becomes 2.

On transfer process, system creates new Inventory item id. It's ATP/QOH is
0/2.

But, when I click Complete on transfer process, I've got error message : 
http://www.nabble.com/file/p0694/error.jpg 

Would you like to help me solve this problem? What should I do to make it
right?

I don't understand, when I transferred all of the product (4 of 4), it was
okay, no error. But, when I transferred half of them, I've got error :(

Please help me.

Thank you in advance.

Regards'

Hari Plaikoil
-- 
View this message in context: 
http://www.nabble.com/Inventory-transfer-half-of-total-stock-tp0694p0694.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



RE: Checkbox on Form Widget

2009-02-01 Thread Hari Plaikoil

Dear Nikita,

I'm so sorry, I couldn't reply your message immediately. I was in the middle
of another task in ofbiz. Thank you for your advice. It helped me much. 


Regards,
Hari Plaikoil.


Nikita Shinde wrote:
 
 Hi Hari,
 
  It's best not to use auto-fields-entity tag in this case, you can
 just put the fields you need to display in the form:
 
 field name=createdStamp title=Datedisplay//field
 field name=isRushOrdercheck//field
 
 Else other way round is -
 
 auto-fields-entity entity-name=OrderHeader
 default-field-type=display/
 field name=orderTypeId title=Datehidden//field  
 .
 .
 .(make other unrequired fields as hidden)
 . 
 .
 .
 field name=isRushOrdercheck//field
 
 If you want to have isRushOrder field to be checked by default then you
 can
 use this -
 
 field name=isRushOrdercheck all-checked=true//field
 
   Let me know if you still have any issues.
 
 Regards,
 Nikita
 Amicon Technologies Pvt. Ltd., Mumbai, India.
 India's No.1 OFBiz service provider
 
 -Original Message-
 From: Hari Plaikoil [mailto:hari.plaik...@gmail.com] 
 Sent: Thursday, January 08, 2009 1:45 PM
 To: user@ofbiz.apache.org
 Subject: RE: Checkbox on Form Widget
 
 
 Thanks Nikita for your suggestion
 
 Sorry, I'm too late to reply.
 
 Btw, I tried your advice, It worked. But, since I declare all the fields
 hidden at the beginning (and manually display some of the fields). I've
 got
 problem to use display/ and check/ on the same time.
 
 This is my code :
 
 auto-fields-entity entity-name=OrderHeader
 default-field-type=hidden/
 field name=createdStamp title=Datedisplay//field
 field name=orderIdcheck//field
 
 When I use check/ instead of display/, The orderId (the title) is
 gone. I want the title and the check to be showed.
 
 Could you help me how to solve this problem?
 
 Thank you.
 
 
 rgds'
 
 Hari Plaikoil
 
 
 
 Btw, 
 
 
 Nikita Shinde wrote:
 
 Yes absolutely possible. Here's how you do it - 
 
 field name=belowMinimumStockcheck//field
 
 Hope that helps.
 
 Regards,
 Nikita
 Amicon Technologies Pvt. Ltd., Mumbai, India.
 India's No.1 OFBiz service provider
 
 -Original Message-
 From: Hari Plaikoil [mailto:hari.plaik...@gmail.com] 
 Sent: Tuesday, January 06, 2009 9:31 AM
 To: user@ofbiz.apache.org
 Subject: Checkbox on Form Widget
 
 
 Dear all, Happy New Year for all of you...
 
 Would you like to tell me, is it possible to add/use checkbox on form
 widget? (I mean, not in .ftl form)
 
 
 rgds
 
 Hari Plaikoil
 -- 
 View this message in context:
 http://www.nabble.com/Checkbox-on-Form-Widget-tp21304357p21304357.html
 Sent from the OFBiz - User mailing list archive at Nabble.com.
 
 
 
 
 -- 
 View this message in context:
 http://www.nabble.com/Checkbox-on-Form-Widget-tp21304357p21347465.html
 Sent from the OFBiz - User mailing list archive at Nabble.com.
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Checkbox-on-Form-Widget-tp21304357p21782739.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



RE: Checkbox on Form Widget

2009-01-08 Thread Hari Plaikoil

Thanks Nikita for your suggestion

Sorry, I'm too late to reply.

Btw, I tried your advice, It worked. But, since I declare all the fields
hidden at the beginning (and manually display some of the fields). I've got
problem to use display/ and check/ on the same time.

This is my code :

auto-fields-entity entity-name=OrderHeader default-field-type=hidden/
field name=createdStamp title=Datedisplay//field  
field name=orderIdcheck//field

When I use check/ instead of display/, The orderId (the title) is
gone. I want the title and the check to be showed.

Could you help me how to solve this problem?

Thank you.


rgds'

Hari Plaikoil



Btw, 


Nikita Shinde wrote:
 
 Yes absolutely possible. Here's how you do it - 
 
 field name=belowMinimumStockcheck//field
 
 Hope that helps.
 
 Regards,
 Nikita
 Amicon Technologies Pvt. Ltd., Mumbai, India.
 India's No.1 OFBiz service provider
 
 -Original Message-
 From: Hari Plaikoil [mailto:hari.plaik...@gmail.com] 
 Sent: Tuesday, January 06, 2009 9:31 AM
 To: user@ofbiz.apache.org
 Subject: Checkbox on Form Widget
 
 
 Dear all, Happy New Year for all of you...
 
 Would you like to tell me, is it possible to add/use checkbox on form
 widget? (I mean, not in .ftl form)
 
 
 rgds
 
 Hari Plaikoil
 -- 
 View this message in context:
 http://www.nabble.com/Checkbox-on-Form-Widget-tp21304357p21304357.html
 Sent from the OFBiz - User mailing list archive at Nabble.com.
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Checkbox-on-Form-Widget-tp21304357p21347465.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Checkbox on Form Widget

2009-01-05 Thread Hari Plaikoil

Dear all, Happy New Year for all of you...

Would you like to tell me, is it possible to add/use checkbox on form
widget? (I mean, not in .ftl form)


rgds

Hari Plaikoil
-- 
View this message in context: 
http://www.nabble.com/Checkbox-on-Form-Widget-tp21304357p21304357.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: passing map parameter from ftl to event type java

2008-12-06 Thread Hari Plaikoil

Hai Mridul,

thanks for your advice. 

I just tried it, but it didn't work. I guess it cannot work because the
parameters that I put on request.setAttribute (as you said) called in java's
event (by request.getAttribute) after .ftl page. I don't call java's event
directly after I load my .bsh. But I call my .bsh, then .ftl, then java's
event.

So, I think the value of the parameters has lost when it reached in java's
event. (Please correct me if I'm wrong)



Mridul Pathak-2 wrote:
 
 Hari,
 I am pretty sure that I have understood your problem.  Here are few
 comments from my side:
 1) AFAIK, you can never send a Java object other than String and Array as
 a
 (hidden) parameter from FTL.  What you can send is string values and
 array.
  The reason is there are two major methods available with a request object
 to fetch parameters: String getParameters(String) and String[]
 getParameterValues(String).  You can't fetch any parameter whose value is
 a
 Java Object of other types.
 2) For your problem, when you catch the parameters in .bsh, instead of
 putting them in context try using request.setAttribute() method.
 3) Now in your Java event use request.getAttribute() method and it should
 work.
 
 -- 
 Thanks  Regards
 Mridul Pathak
 Hotwax Media
 http://www.hotwaxmedia.com
 [EMAIL PROTECTED]
 
 On Fri, Dec 5, 2008 at 8:37 AM, Hari Plaikoil
 [EMAIL PROTECTED]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-tp20790183p20847035.html
 Sent from the OFBiz - User mailing list archive at Nabble.com.


 
 

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



Re: passing map parameter from ftl to event type java

2008-12-06 Thread Hari Plaikoil

Dear all,

thanks for all your support and advice on my problem. however, I think I
should change my process's path to avoid this confusing problem.

Thanks a lot.

Best regards,
Hari Plaikoil


Hari Plaikoil wrote:
 
 Hai Mridul,
 
 thanks for your advice. 
 
 I just tried it, but it didn't work. I guess it cannot work because the
 parameters that I put on request.setAttribute (as you said) called in
 java's event (by request.getAttribute) after .ftl page. I don't call
 java's event directly after I load my .bsh. But I call my .bsh, then .ftl,
 then java's event.
 
 So, I think the value of the parameters has lost when it reached in java's
 event. (Please correct me if I'm wrong)
 
 
 
 Mridul Pathak-2 wrote:
 
 Hari,
 I am pretty sure that I have understood your problem.  Here are few
 comments from my side:
 1) AFAIK, you can never send a Java object other than String and Array as
 a
 (hidden) parameter from FTL.  What you can send is string values and
 array.
  The reason is there are two major methods available with a request
 object
 to fetch parameters: String getParameters(String) and String[]
 getParameterValues(String).  You can't fetch any parameter whose value is
 a
 Java Object of other types.
 2) For your problem, when you catch the parameters in .bsh, instead of
 putting them in context try using request.setAttribute() method.
 3) Now in your Java event use request.getAttribute() method and it should
 work.
 
 -- 
 Thanks  Regards
 Mridul Pathak
 Hotwax Media
 http://www.hotwaxmedia.com
 [EMAIL PROTECTED]
 
 On Fri, Dec 5, 2008 at 8:37 AM, Hari Plaikoil
 [EMAIL PROTECTED]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-tp20790183p20847035.html
 Sent from the OFBiz - User mailing list archive at Nabble.com.


 
 
 
 

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



Re: passing map parameter from ftl to event type java

2008-12-04 Thread Hari Plaikoil

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-tp20790183p20847035.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



passing map parameter from ftl to event type java

2008-12-02 Thread Hari Plaikoil

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-tp20790183p20790183.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: passing map parameter from ftl to event type java

2008-12-02 Thread Hari Plaikoil

I followed your instruction. First, I've got the jrParameters (Map's type)
and jrDataSource (JRDataSource's type) as output parameters from java
service. Second, I catch the parameters on .bsh file, I put the parameters
on context than I pass to .ftl
Third, on .ftl, I've checked both of the parameters, they have the same data
like in .bsh file. 
Fourth, I called java's event from .ftl through controller. On the java's
event I realized the value of jrParameters and jrDataSource are null.

I really don't have any idea how to set  fields or parameters for both of
them on .ftl so when I catch on java's event the value will not null. I
tried on .ftl assign the parameters like the code below:

 @inputHidden name=jrParameters value=${jrParameters}/
 @inputHidden name=jrDataSource value=${jrDataSource}/

 the code causes error exception, so I changed to :

 #assign jrParameters = ${jrParameters}
 #assign jrDataSource = ${jrDataSource}

 again, it causes an error exception too :-((
 
 Please, help me out

 Thanks.


BJ Freeman wrote:
 
 in ofbiz you pass the ftl thru the controller to a request-map
 if you need to process the data then you can all a service or event.
 if you use a service then the data is availible as a context.
 if you use an event it is availible thru the httprequest.
 otherwise you can direct to another page through a view that would be
 your report.
 if your using widgets you can process data in the action section then
 define the ftl that will show the report.
 
 ofbiz takes care of passing the information.
 
 review
 http://docs.ofbiz.org/display/OFBIZ/OFBiz+Beginner%27s+Development+Guide+Using+Practice+Application.
 
 
 
 Hari Plaikoil sent the following on 12/2/2008 3:15 AM:
 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-tp20790183p20805691.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: passing map parameter from ftl to event type java

2008-12-02 Thread Hari Plaikoil

I need to go to .ftl after visit the .bsh because I have to choose an printer
name, report type for my other parameters for the java's event. and the
choices are in .ftl (drop-down) :-D

you can say I take a long path just to make a pdf's report :-D frankly, I
don't know how to explain that.

So, would you like to help me how to pass the parameters (Map's type 
JRDataSource's type) from .ftl to java's event?

Anyway, I write piece of code on java's event to catch the parameters like
this :

MapString, Object jPrm =
(Map)request.getAttribute(jrParameters);
JRDataSource jrDataSource = (JRDataSource)
request.getAttribute(jrDataSource);

but, the variables give me null value :-((



Scott Gray wrote:
 
 Why are you waiting until you get to the template?  Wouldn't it be easier
 to
 call the method from the bsh script?
 Regards
 Scott
 
 2008/12/3 Hari Plaikoil [EMAIL PROTECTED]
 

 I followed your instruction. First, I've got the jrParameters (Map's
 type)
 and jrDataSource (JRDataSource's type) as output parameters from java
 service. Second, I catch the parameters on .bsh file, I put the
 parameters
 on context than I pass to .ftl
 Third, on .ftl, I've checked both of the parameters, they have the same
 data
 like in .bsh file.
 Fourth, I called java's event from .ftl through controller. On the java's
 event I realized the value of jrParameters and jrDataSource are null.

 I really don't have any idea how to set  fields or parameters for both of
 them on .ftl so when I catch on java's event the value will not null. I
 tried on .ftl assign the parameters like the code below:

  @inputHidden name=jrParameters value=${jrParameters}/
  @inputHidden name=jrDataSource value=${jrDataSource}/

  the code causes error exception, so I changed to :

  #assign jrParameters = ${jrParameters}
  #assign jrDataSource = ${jrDataSource}

  again, it causes an error exception too :-((

  Please, help me out

  Thanks.


 BJ Freeman wrote:
 
  in ofbiz you pass the ftl thru the controller to a request-map
  if you need to process the data then you can all a service or event.
  if you use a service then the data is availible as a context.
  if you use an event it is availible thru the httprequest.
  otherwise you can direct to another page through a view that would be
  your report.
  if your using widgets you can process data in the action section then
  define the ftl that will show the report.
 
  ofbiz takes care of passing the information.
 
  review
 
 http://docs.ofbiz.org/display/OFBIZ/OFBiz+Beginner%27s+Development+Guide+Using+Practice+Application
 .
 
 
 
  Hari Plaikoil sent the following on 12/2/2008 3:15 AM:
  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-tp20790183p20805691.html
 Sent from the OFBiz - User mailing list archive at Nabble.com.


 
 

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



Re: passing map parameter from ftl to event type java

2008-12-02 Thread Hari Plaikoil

Thanks Scott for your advice. 

But, I think when I use request.getParameter it will give a String value. I
don't want a String, I want a Map  and a JRDataSource :-D

my jrParameters is Map's type, MapString, Object type.

I tried request.getParameter(jrParameters), it was really impossible :

 MapString, Object jrParameters = request.getParameter(jrParameters);
--- cannot convert from String to Map :-D

I really totally confuse with all this code :-((


Scott Gray wrote:
 
 Ah ok, so you mean that you have a form generated from an ftl and when
 that
 form is submitted you can't get the parameters using request.getAttribute
 (jrParameters)?  Try using request.getParameter(jrParameters).
 Usually when people talk about trying to do things from ftl they are
 talking
 about while rendering the template.
 
 Regards
 Scott
 
 2008/12/3 Hari Plaikoil [EMAIL PROTECTED]
 

 I need to go to .ftl after visit the .bsh because I have to choose an
 printer
 name, report type for my other parameters for the java's event. and the
 choices are in .ftl (drop-down) :-D

 you can say I take a long path just to make a pdf's report :-D frankly, I
 don't know how to explain that.

 So, would you like to help me how to pass the parameters (Map's type 
 JRDataSource's type) from .ftl to java's event?

 Anyway, I write piece of code on java's event to catch the parameters
 like
 this :

MapString, Object jPrm =
 (Map)request.getAttribute(jrParameters);
 JRDataSource jrDataSource = (JRDataSource)
 request.getAttribute(jrDataSource);

 but, the variables give me null value :-((



 Scott Gray wrote:
 
  Why are you waiting until you get to the template?  Wouldn't it be
 easier
  to
  call the method from the bsh script?
  Regards
  Scott
 
  2008/12/3 Hari Plaikoil [EMAIL PROTECTED]
 
 
  I followed your instruction. First, I've got the jrParameters (Map's
  type)
  and jrDataSource (JRDataSource's type) as output parameters from java
  service. Second, I catch the parameters on .bsh file, I put the
  parameters
  on context than I pass to .ftl
  Third, on .ftl, I've checked both of the parameters, they have the
 same
  data
  like in .bsh file.
  Fourth, I called java's event from .ftl through controller. On the
 java's
  event I realized the value of jrParameters and jrDataSource are null.
 
  I really don't have any idea how to set  fields or parameters for both
 of
  them on .ftl so when I catch on java's event the value will not null.
 I
  tried on .ftl assign the parameters like the code below:
 
   @inputHidden name=jrParameters value=${jrParameters}/
   @inputHidden name=jrDataSource value=${jrDataSource}/
 
   the code causes error exception, so I changed to :
 
   #assign jrParameters = ${jrParameters}
   #assign jrDataSource = ${jrDataSource}
 
   again, it causes an error exception too :-((
 
   Please, help me out
 
   Thanks.
 
 
  BJ Freeman wrote:
  
   in ofbiz you pass the ftl thru the controller to a request-map
   if you need to process the data then you can all a service or event.
   if you use a service then the data is availible as a context.
   if you use an event it is availible thru the httprequest.
   otherwise you can direct to another page through a view that would
 be
   your report.
   if your using widgets you can process data in the action section
 then
   define the ftl that will show the report.
  
   ofbiz takes care of passing the information.
  
   review
  
 
 http://docs.ofbiz.org/display/OFBIZ/OFBiz+Beginner%27s+Development+Guide+Using+Practice+Application
  .
  
  
  
   Hari Plaikoil sent the following on 12/2/2008 3:15 AM:
   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-tp20790183p20805691.html
  Sent from the OFBiz - User mailing list archive at Nabble.com.
 
 
 
 

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


 
 

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



getParameter has the data, but why getAttribute is null when catch in java's event?

2008-12-02 Thread Hari Plaikoil

I tried using getParameter and getAttribute for both of the parameters.
First, in .ftl I set like this :

  #assign jrP = requestAttributes.jrParameters
  @inputHidden name=jrPr value=jrP/
  #assign jrD = requestAttributes.jrDataSource
  @inputHidden name=jrDt value=jrD/

and then I called java event through controller, and I caught both of the
parameter like this :

MapString, Object jPrm = (Map)request.getAttribute(jrPr);
JRDataSource jrDataSource = (JRDataSource)
request.getAttribute(jrDt);

Debug.logInfo(jPrm = +jPrm, module); //gives null value
Debug.logInfo(jrDataSource = +jrDataSource, module); // gives null
value

Debug.logInfo(jPrm = +request.getParameter(jrPr), module); //
gives the data
Debug.logInfo(jrDataSource = +request.getParameter(jrDt),
module); // gives the data


Does anyone wanna help me to solve this problem?

Thanks

Hari Plaikoil wrote:
 
 Thanks Scott for your advice. 
 
 But, I think when I use request.getParameter it will give a String value.
 I don't want a String, I want a Map  and a JRDataSource :-D
 
 my jrParameters is Map's type, MapString, Object type.
 
 I tried request.getParameter(jrParameters), it was really impossible :
 
  MapString, Object jrParameters = request.getParameter(jrParameters);
 --- cannot convert from String to Map :-D
 
 I really totally confuse with all this code :-((
 
 
 Scott Gray wrote:
 
 Ah ok, so you mean that you have a form generated from an ftl and when
 that
 form is submitted you can't get the parameters using request.getAttribute
 (jrParameters)?  Try using request.getParameter(jrParameters).
 Usually when people talk about trying to do things from ftl they are
 talking
 about while rendering the template.
 
 Regards
 Scott
 
 2008/12/3 Hari Plaikoil [EMAIL PROTECTED]
 

 I need to go to .ftl after visit the .bsh because I have to choose an
 printer
 name, report type for my other parameters for the java's event. and the
 choices are in .ftl (drop-down) :-D

 you can say I take a long path just to make a pdf's report :-D frankly,
 I
 don't know how to explain that.

 So, would you like to help me how to pass the parameters (Map's type 
 JRDataSource's type) from .ftl to java's event?

 Anyway, I write piece of code on java's event to catch the parameters
 like
 this :

MapString, Object jPrm =
 (Map)request.getAttribute(jrParameters);
 JRDataSource jrDataSource = (JRDataSource)
 request.getAttribute(jrDataSource);

 but, the variables give me null value :-((



 Scott Gray wrote:
 
  Why are you waiting until you get to the template?  Wouldn't it be
 easier
  to
  call the method from the bsh script?
  Regards
  Scott
 
  2008/12/3 Hari Plaikoil [EMAIL PROTECTED]
 
 
  I followed your instruction. First, I've got the jrParameters (Map's
  type)
  and jrDataSource (JRDataSource's type) as output parameters from java
  service. Second, I catch the parameters on .bsh file, I put the
  parameters
  on context than I pass to .ftl
  Third, on .ftl, I've checked both of the parameters, they have the
 same
  data
  like in .bsh file.
  Fourth, I called java's event from .ftl through controller. On the
 java's
  event I realized the value of jrParameters and jrDataSource are null.
 
  I really don't have any idea how to set  fields or parameters for
 both
 of
  them on .ftl so when I catch on java's event the value will not null.
 I
  tried on .ftl assign the parameters like the code below:
 
   @inputHidden name=jrParameters value=${jrParameters}/
   @inputHidden name=jrDataSource value=${jrDataSource}/
 
   the code causes error exception, so I changed to :
 
   #assign jrParameters = ${jrParameters}
   #assign jrDataSource = ${jrDataSource}
 
   again, it causes an error exception too :-((
 
   Please, help me out
 
   Thanks.
 
 
  BJ Freeman wrote:
  
   in ofbiz you pass the ftl thru the controller to a request-map
   if you need to process the data then you can all a service or
 event.
   if you use a service then the data is availible as a context.
   if you use an event it is availible thru the httprequest.
   otherwise you can direct to another page through a view that would
 be
   your report.
   if your using widgets you can process data in the action section
 then
   define the ftl that will show the report.
  
   ofbiz takes care of passing the information.
  
   review
  
 
 http://docs.ofbiz.org/display/OFBIZ/OFBiz+Beginner%27s+Development+Guide+Using+Practice+Application
  .
  
  
  
   Hari Plaikoil sent the following on 12/2/2008 3:15 AM:
   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

make import entity file (combine more than one entity)

2008-12-01 Thread Hari Plaikoil

Dear all,

Would you like to help me to solve my problem?

I want to create an import file that consists of more than one entity, so
when I import that file via webtools, the data will store in different
entity. 

For example, in one file's import I want to add Product entity fields,
ProductPrice entity fields. So, when I import that file with new productId
on the file's import, it (file's import) will store all the fields on right
entity. the productId will store on Product entity and ProductPrice, the
internalName will store in Product and productPriceTypeId will store in
ProductPrice. It happen just by import one file's import.

Is it possible to do? 

Please, help me...

Thanks
-- 
View this message in context: 
http://www.nabble.com/make-import-entity-file-%28combine-more-than-one-entity%29-tp20769580p20769580.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: make import entity file (combine more than one entity)

2008-12-01 Thread Hari Plaikoil

The data not only one. It includes productId, internalName,
productPriceTypeId. All the mandatory fields.

Please help me

Thank you


-- 
View this message in context: 
http://www.nabble.com/make-import-entity-file-%28combine-more-than-one-entity%29-tp20769580p20769633.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: make import entity file (combine more than one entity)

2008-12-01 Thread Hari Plaikoil

Thank you BJ, It really helps me out.

rgds


BJ Freeman wrote:
 
 take a look at the demoproduct.xml as an example
 
 Hari Plaikoil sent the following on 12/1/2008 2:45 AM:
 Dear all,
 
 Would you like to help me to solve my problem?
 
 I want to create an import file that consists of more than one entity, so
 when I import that file via webtools, the data will store in different
 entity. 
 
 For example, in one file's import I want to add Product entity fields,
 ProductPrice entity fields. So, when I import that file with new
 productId
 on the file's import, it (file's import) will store all the fields on
 right
 entity. the productId will store on Product entity and ProductPrice, the
 internalName will store in Product and productPriceTypeId will store in
 ProductPrice. It happen just by import one file's import.
 
 Is it possible to do? 
 
 Please, help me...
 
 Thanks
 
 

-- 
View this message in context: 
http://www.nabble.com/make-import-entity-file-%28combine-more-than-one-entity%29-tp20769580p20784421.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: cannot get value from findByPrimaryCache

2008-11-28 Thread Hari Plaikoil

Thank you Charles for your help.

The problem has been solved, I didn't give much attention with the whole
process that made me stuck with that problem.

But everything is okay right now.

rgds


STELTZLEN Charles wrote:
 
 Hi Hari,
 
 Code seems to be ok.
 
 Sure that the product weight you want is stored in Product ?
 
 Don't forget to refresh your cache if you have store the product
 weight just before this reading.
 
 
 Hari Plaikoil a écrit :
 Hi All,

 Would you like to help me, how to fetch value from a variable which its
 type
 is GenericValue? 
 this is my code:

 GenericValue product = delegator.findByPrimaryKeyCache(Product,
 UtilMisc.toMap(productId,productId ));

 I want to get the weight's value by this code:

 double weight = product.getDouble(weight).doubleValue();

 but, I don't have any value store in weight's variable.

 I don't know what mistakes I've done. Please help me.


 Thank you
   
 
 
 

-- 
View this message in context: 
http://www.nabble.com/cannot-get-value-from-findByPrimaryCache-tp20674090p20744589.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



cannot get value from findByPrimaryCache

2008-11-24 Thread Hari Plaikoil

Hi All,

Would you like to help me, how to fetch value from a variable which its type
is GenericValue? 
this is my code:

GenericValue product = delegator.findByPrimaryKeyCache(Product,
UtilMisc.toMap(productId,productId ));

I want to get the weight's value by this code:

double weight = product.getDouble(weight).doubleValue();

but, I don't have any value store in weight's variable.

I don't know what mistakes I've done. Please help me.


Thank you
-- 
View this message in context: 
http://www.nabble.com/cannot-get-value-from-findByPrimaryCache-tp20674090p20674090.html
Sent from the OFBiz - User mailing list archive at Nabble.com.