Re: passing map parameter from ftl to event type java

2008-12-05 Thread Mridul Pathak
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
> > 
> > 
> > between screens  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:
> >>
> >>  Map jPrm = (Map >> 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.
>
>


Question regarding FOB cost

2008-12-05 Thread Sumit Pandit


Hello Devs, 

I need suggestion regarding to the FOB cost. 
For this can I add a new entry in CostComponentType entity ? 

Thanks in advance 
Sumit Pandit 



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..


  


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: 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
>> 
>> 
>> between screens  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:
>>> 
>>>  Map jPrm = (Map>> 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.



cache and FTL and Timeout.

2008-12-05 Thread Fabien JALABERT
Hello, I've 2 questions on tuning ofbiz. 

1) On a production site, the search page returns a list of numerous products (more than 200). 
The main content view of the search result page call rendering of productsummary for each product in result set. 

This view contains 2 calls: 
- productsummary.bsh

- productsummary.ftl

I've put dates to make chrono in the productsummary. BSH execution needs only 
between 15 to 50 ms. But each execution of the bsh is separated with about 300 
ms. So there seem to be a process that need 270ms between BSH: controler ? 
widget ? ftl ?

When I reload this page, using Shift+F5, the BSH has same duration (very fast) but no other process is done around. 
Then I launch a new search and each summary need 300 ms. 

So can somebody tell me what is done with in these 270ms and how to tune it like in the ShiftF5 approach ? 



2) TIMEOUT
When a client request needs more that 60 sec. the DB links is off that many logs are displays (many thousands lines). 
Do you know where I could configure this timeout to increase it ? Is this dangerous for production site ? Is there a solution to break display in console of these thousands of products. 

Thanks a lot. 





favicon online generator

2008-12-05 Thread BJ Freeman
http://www.favicon.cc/


Re: Freemarker JspTaglibs error

2008-12-05 Thread Adrian Crum
Did you try asking this question on the FreeMarker mailing list?

-Adrian


--- On Fri, 12/5/08, madppiper <[EMAIL PROTECTED]> wrote:

> From: madppiper <[EMAIL PROTECTED]>
> Subject: Freemarker JspTaglibs error
> To: user@ofbiz.apache.org
> Date: Friday, December 5, 2008, 2:06 AM
> Hey,
> 
> when trying to use an external taglib (jakarta image
> taglib) in ofbiz, i
> receive the following error:
> 
>  exception report
> --
> Error rendering included template at location
> [component://brandsparadise/webapp/brandsparadise/includes/catalog/productsamples.ftl]:
> freemarker.template.TemplateModelException: Could not find
> an instance of
> freemarker.ext.servlet.ServletContextHashModel in the data
> model under
> either the name __FreeMarkerServlet.Application__ or
> Application
> Exception: freemarker.template.TemplateModelException
> Message: Could not find an instance of
> freemarker.ext.servlet.ServletContextHashModel in the data
> model under
> either the name __FreeMarkerServlet.Application__ or
> Application
>  stack trace
> ---
> Could not find an instance of
> freemarker.ext.servlet.ServletContextHashModel
> in the data model under either the name
> __FreeMarkerServlet.Application__ or
> Application
> The problematic instruction:
> --
> ==> user-directive img.image [on line 74, column 1 in
> component://brandsparadise/webapp/brandsparadise/includes/catalog/productsamples.ftl]
> --
> Java backtrace for programmers:
> --
> freemarker.template.TemplateModelException: Could not find
> an instance of
> freemarker.ext.servlet.ServletContextHashModel in the data
> model under
> either the name __FreeMarkerServlet.Application__ or
> Application
> freemarker.ext.jsp.FreeMarkerPageContext.(FreeMarkerPageContext.java:124)
> freemarker.ext.jsp.FreeMarkerPageContext2.(FreeMarkerPageContext2.java:21)
> freemarker.ext.jsp.FreeMarkerPageContext2.create(FreeMarkerPageContext2.java:25)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 
> 
> 
> 
> 
> 
> I added the Taglib to my freemarker file: 
> 
> <#assign
> img=JspTaglibs["/WEB-INF/taglibs-image.tld"]>
> 
> and also put all dependencies in place. I am accessing the
> taglib as such
> (this should be fine): 
> 
> <@img.image
> src="/images/bpimg/price_placeholder.gif"
>name="price.png"
>refresh="true"
> quality="1.0"
> display="false">
> 
> 
> 
> 
> 
> I think the dependencies get loaded just fine, so perhaps
> there is something
> else I am missing? I am using Revision 711975 btw
> -- 
> View this message in context:
> http://www.nabble.com/Freemarker-JspTaglibs-error-tp20850917p20850917.html
> Sent from the OFBiz - User mailing list archive at
> Nabble.com.


  


Re: GL Chart of Accounts

2008-12-05 Thread Bilgin Ibryam

Hi Wicus,

The best way to understand these entities is through reading  
Accounting chapter from Data Model Resource Book v1.
If you search in the ML, you can also find useful information about  
these entities.
Here is one http://ofbiz.markmail.org/search/? 
q=glaccountclassid#query:glaccountclassid+page:1+mid:k2zt3vyuycf32xye+state:results


Bilgin

On Dec 3, 2008, at 12:27 PM, Wicus wrote:



No response yet 

Very simply stated, I can not see the difference between

GL account Type Id
GL account Class Id

Should GL account Id refer to creating the Financial Statements,  
what is the

purpose of GL account Class Id ?

Thanks
--
View this message in context: 
http://www.nabble.com/GL-Chart-of-Accounts-tp20702023p20810318.html
Sent from the OFBiz - User mailing list archive at Nabble.com.





Re: Inserting Data through forms

2008-12-05 Thread Awdesh Singh Parihar
Hello Divya

Just check folowing thing in your application : -

1) Have you made entry of entity model in ofbiz-component.xml file .
2) Check all value of variable is coming at the time of services implementation 
.
3) What ever CRUD operation you written for your application is correct .

If this help you then good , otherwise provide more detail about your 
application .

Thanks and Regards
--Awdesh Parihar

- Original Message -
From: "Divya Nair" <[EMAIL PROTECTED]>
To: user@ofbiz.apache.org
Sent: Thursday, December 4, 2008 5:45:17 PM GMT +05:30 Chennai, Kolkata, 
Mumbai, New Delhi
Subject: Inserting Data through forms


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



Re: Synchronize POS from network database

2008-12-05 Thread BJ Freeman
the sync only work between of OfBiz instances.
one is running the POS
http://docs.ofbiz.org/display/OFBIZ/POS+System

the other is MCS.
the POS uses, usually the embedded derby database
the MSC then is attached to your SQL server, through the entityengine.xml.


nethanjavier sent the following on 12/5/2008 2:13 AM:
> :confused:Hi!
> Im a newbie here in OFBIZ and i'm kinda attracted about how fast it is and
> easy. Its been a week since I started to and I encounter a problem on how to
> synchronize my POS to a network database. I'm using SQL Server Database for
> my POS and all the products are in another computer and i want to
> synchronize to it so that i can't get products and customers for my POS and
> then pass my transactions to it. How can i do this?..please help. I just
> read this 
> and I really don't understand it. Can you step by step teach me about
> it?..please.
> 
> Best Regards,
> Nethan


Re: Freemarker JspTaglibs error

2008-12-05 Thread BJ Freeman
your are attempting things beyond ofbiz design.
so you on your own.

madppiper sent the following on 12/5/2008 2:26 AM:
> hmm... so is there any possible way to include jsptaglibs? or would I need to
> access the taglibs using bash files?


Re: passing map parameter from ftl to event type java

2008-12-05 Thread BJ Freeman
the basic flow in ofbiz is to submit through the request-map in the
controller, then return through the request-map to a view.
1) if you mapped the JRDataSource in the service it is part off the
context and or httprequest till it is removed.
2) not sure what parameters you catching in the bsh file that you can
catch in the service. so they should be available to the ftl in the view
you designate in the controller that is returning from the service.
3) then flt links and or submits then go through the controller again to
the next or same service any data that is in the FTL is already in the
context and/or httprequest
your map must be cast to get it from a request

find some event code in ofbiz




Hari Plaikoil sent the following on 12/4/2008 7:07 PM:
> 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
>> 
>> 
>> between screens  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:
>>>
>>>  Map jPrm = (Map>> 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.
>>>
>>
> 


Re: Freemarker JspTaglibs error

2008-12-05 Thread madppiper

hmm... so is there any possible way to include jsptaglibs? or would I need to
access the taglibs using bash files?
-- 
View this message in context: 
http://www.nabble.com/Freemarker-JspTaglibs-error-tp20850917p20851219.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: Freemarker JspTaglibs error

2008-12-05 Thread BJ Freeman
the Regions, Taglib, and Jsp have been deprecated some time ago.
Freemaker FtL extention is the only ones recognized.


madppiper sent the following on 12/5/2008 2:06 AM:
> Hey,
> 
> when trying to use an external taglib (jakarta image taglib) in ofbiz, i
> receive the following error:
> 
>  exception report
> --
> Error rendering included template at location
> [component://brandsparadise/webapp/brandsparadise/includes/catalog/productsamples.ftl]:
> freemarker.template.TemplateModelException: Could not find an instance of
> freemarker.ext.servlet.ServletContextHashModel in the data model under
> either the name __FreeMarkerServlet.Application__ or Application
> Exception: freemarker.template.TemplateModelException
> Message: Could not find an instance of
> freemarker.ext.servlet.ServletContextHashModel in the data model under
> either the name __FreeMarkerServlet.Application__ or Application
>  stack trace
> ---
> Could not find an instance of freemarker.ext.servlet.ServletContextHashModel
> in the data model under either the name __FreeMarkerServlet.Application__ or
> Application
> The problematic instruction:
> --
> ==> user-directive img.image [on line 74, column 1 in
> component://brandsparadise/webapp/brandsparadise/includes/catalog/productsamples.ftl]
> --
> Java backtrace for programmers:
> --
> freemarker.template.TemplateModelException: Could not find an instance of
> freemarker.ext.servlet.ServletContextHashModel in the data model under
> either the name __FreeMarkerServlet.Application__ or Application
> freemarker.ext.jsp.FreeMarkerPageContext.(FreeMarkerPageContext.java:124)
> freemarker.ext.jsp.FreeMarkerPageContext2.(FreeMarkerPageContext2.java:21)
> freemarker.ext.jsp.FreeMarkerPageContext2.create(FreeMarkerPageContext2.java:25)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 
> 
> 
> 
> 
> 
> I added the Taglib to my freemarker file: 
> 
> <#assign img=JspTaglibs["/WEB-INF/taglibs-image.tld"]>
> 
> and also put all dependencies in place. I am accessing the taglib as such
> (this should be fine): 
> 
> <@img.image src="/images/bpimg/price_placeholder.gif"
>name="price.png"
>refresh="true"
> quality="1.0" display="false">
> 
> 
> 
> 
> 
> I think the dependencies get loaded just fine, so perhaps there is something
> else I am missing? I am using Revision 711975 btw


Synchronize POS from network database

2008-12-05 Thread nethanjavier

:confused:Hi!
Im a newbie here in OFBIZ and i'm kinda attracted about how fast it is and
easy. Its been a week since I started to and I encounter a problem on how to
synchronize my POS to a network database. I'm using SQL Server Database for
my POS and all the products are in another computer and i want to
synchronize to it so that i can't get products and customers for my POS and
then pass my transactions to it. How can i do this?..please help. I just
read this 
and I really don't understand it. Can you step by step teach me about
it?..please.

Best Regards,
Nethan
-- 
View this message in context: 
http://www.nabble.com/Synchronize-POS-from-network-database-tp20851014p20851014.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Freemarker JspTaglibs error

2008-12-05 Thread madppiper

Hey,

when trying to use an external taglib (jakarta image taglib) in ofbiz, i
receive the following error:

 exception report
--
Error rendering included template at location
[component://brandsparadise/webapp/brandsparadise/includes/catalog/productsamples.ftl]:
freemarker.template.TemplateModelException: Could not find an instance of
freemarker.ext.servlet.ServletContextHashModel in the data model under
either the name __FreeMarkerServlet.Application__ or Application
Exception: freemarker.template.TemplateModelException
Message: Could not find an instance of
freemarker.ext.servlet.ServletContextHashModel in the data model under
either the name __FreeMarkerServlet.Application__ or Application
 stack trace
---
Could not find an instance of freemarker.ext.servlet.ServletContextHashModel
in the data model under either the name __FreeMarkerServlet.Application__ or
Application
The problematic instruction:
--
==> user-directive img.image [on line 74, column 1 in
component://brandsparadise/webapp/brandsparadise/includes/catalog/productsamples.ftl]
--
Java backtrace for programmers:
--
freemarker.template.TemplateModelException: Could not find an instance of
freemarker.ext.servlet.ServletContextHashModel in the data model under
either the name __FreeMarkerServlet.Application__ or Application
freemarker.ext.jsp.FreeMarkerPageContext.(FreeMarkerPageContext.java:124)
freemarker.ext.jsp.FreeMarkerPageContext2.(FreeMarkerPageContext2.java:21)
freemarker.ext.jsp.FreeMarkerPageContext2.create(FreeMarkerPageContext2.java:25)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)






I added the Taglib to my freemarker file: 

<#assign img=JspTaglibs["/WEB-INF/taglibs-image.tld"]>

and also put all dependencies in place. I am accessing the taglib as such
(this should be fine): 

<@img.image src="/images/bpimg/price_placeholder.gif"
   name="price.png"
   refresh="true"
quality="1.0" display="false">





I think the dependencies get loaded just fine, so perhaps there is something
else I am missing? I am using Revision 711975 btw
-- 
View this message in context: 
http://www.nabble.com/Freemarker-JspTaglibs-error-tp20850917p20850917.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 Raj Saini
I dont think you can do this. ftl templates generate the html fragment 
and nothing else. In my opinion you have the following choices:


1. Pass these values as hidden parameters.
2. Pass them as query string to the next request.
3. Add them to session.
4. Save them somewhere in the database and retrieve in the next request.

Thanks,

Raj


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


between screens  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:

 Map jPrm = (Map)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.