Applets in OFBiz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Applets in OFBiz

Oleg Kozyrev Jr.
Hello all,

I'm trying to add applet into my OFBiz page. But there is a problem.
I'm including ftl file (I had replcaed all path for absolute for a while):

  <h4>Pie Chart Applet Test</h4>
  <hr />
  <applet code="org.ofbiz.datawarehouse.olap.pic.PieChart3D"
    codebase="/home/ookozyrev/ofbiz-config/my-applications/datawarehouse/webapp/datawarehouse/../../build/lib"
    archive="jfreechart-1.0.1.jar,jcommon-1.0.0.jar,ofbiz-datawarehouse.jar"
    width="400"
    height="300">
  </applet>

So, when I'm requesting this page thru OFbiz request:
  https://localhost:8443/datawarehouse/control/AppletTest
I get an error

and when I'm opening this page with browser everything goes fine.

Any ideas why this happen?

Thanks,

Oleg.

===================
Oleg Kozyrev Jr.
[hidden email]
===================
 
Reply | Threaded
Open this post in threaded view
|

Re: Applets in OFBiz

David E. Jones

I don't have enough experience with applets to guess at what might be going wrong here... There are some other applets in use in OFBiz that you might want to check out, and in fact we create a special jar for one during the build process (the new print applet if I remember right). That combines the stuff from various jars to simplify the client side and signs the jar and such.

-David


Oleg Kozyrev Jr. wrote:

> Hello all,
>
> I'm trying to add applet into my OFBiz page. But there is a problem.
> I'm including ftl file (I had replcaed all path for absolute for a while):
>
>   <h4>Pie Chart Applet Test</h4>
>   <hr />
>   <applet code="org.ofbiz.datawarehouse.olap.pic.PieChart3D"
>     codebase="/home/ookozyrev/ofbiz-config/my-applications/datawarehouse/webapp/datawarehouse/../../build/lib"
>     archive="jfreechart-1.0.1.jar,jcommon-1.0.0.jar,ofbiz-datawarehouse.jar"
>     width="400"
>     height="300">
>   </applet>
>
> So, when I'm requesting this page thru OFbiz request:
>   https://localhost:8443/datawarehouse/control/AppletTest
> I get an error
>
> and when I'm opening this page with browser everything goes fine.
>
> Any ideas why this happen?
>
> Thanks,
>
> Oleg.
>
> ===================
> Oleg Kozyrev Jr.
> [hidden email]
> ===================
>  
Reply | Threaded
Open this post in threaded view
|

Re: Applets in OFBiz

BJ Freeman
What did you put in the the Control.xml

David E. Jones sent the following on 6/25/2006 3:16 PM:

>
> I don't have enough experience with applets to guess at what might be
> going wrong here... There are some other applets in use in OFBiz that
> you might want to check out, and in fact we create a special jar for one
> during the build process (the new print applet if I remember right).
> That combines the stuff from various jars to simplify the client side
> and signs the jar and such.
>
> -David
>
>
> Oleg Kozyrev Jr. wrote:
>> Hello all,
>>
>> I'm trying to add applet into my OFBiz page. But there is a problem.
>> I'm including ftl file (I had replcaed all path for absolute for a
>> while):
>>
>>   <h4>Pie Chart Applet Test</h4>
>>   <hr />
>>   <applet code="org.ofbiz.datawarehouse.olap.pic.PieChart3D"
>>    
>> codebase="/home/ookozyrev/ofbiz-config/my-applications/datawarehouse/webapp/datawarehouse/../../build/lib"
>>
>>    
>> archive="jfreechart-1.0.1.jar,jcommon-1.0.0.jar,ofbiz-datawarehouse.jar"
>>     width="400"
>>     height="300">
>>   </applet>
>>
>> So, when I'm requesting this page thru OFbiz request:
>>   https://localhost:8443/datawarehouse/control/AppletTest
>> I get an error
>>
>> and when I'm opening this page with browser everything goes fine.
>>
>> Any ideas why this happen?
>>
>> Thanks,
>>
>> Oleg.
>>
>> ===================
>> Oleg Kozyrev Jr.
>> [hidden email]
>> ===================
>>  
>
Reply | Threaded
Open this post in threaded view
|

Re: Applets in OFBiz

Oleg Kozyrev Jr.
In reply to this post by Oleg Kozyrev Jr.

BJ,

If you mean controller.xml, then this is just a simple request:
    <request-map uri="AppletTest">
        <security https="false" auth="true"/>
        <response name="success" type="view" value="AppletTest"/>
        <response name="error" type="view" value="AppletTest"/>
    </request-map>

and in AppletTest screen I have simple ftl file include:

<widgets>
  <container style="screenlet">
    <container style="screenlet-header">
      <label style="boxhead" text="${uiLabelMap.DatawarehousePictureTitle}"/>
    </container>
    <container style="screenlet-body">
      <!-- pictureButton is visible -->
      <platform-specific>
        <html>
          <html-template location="component://datawarehouse/webapp/datawarehouse/includes/applet.ftl"/>
        </html>
      </platform-specific>
    </container>
  </container>
</widgets>

David, is where a way to subscribe to new mailing list to get messages directly into mailbox as it was earlier?

Thanks,

Oleg.


Reply | Threaded
Open this post in threaded view
|

Re: Applets in OFBiz

BJ Freeman
my guess is that in the applet you specify the path codebase="/
is being reference from
datawarehouse/webapp/datawarehouse/includes/
where the ftl is.
probably best to make the codebase a URL. which means you need to move
the jars into the webapp section.



Oleg Kozyrev Jr. sent the following on 6/26/2006 5:05 AM:

> BJ,
>
> If you mean controller.xml, then this is just a simple request:
>     <request-map uri="AppletTest">
>         <security https="false" auth="true"/>
>         <response name="success" type="view" value="AppletTest"/>
>         <response name="error" type="view" value="AppletTest"/>
>     </request-map>
>
> and in AppletTest screen I have simple ftl file include:
>
> <widgets>
>   <container style="screenlet">
>     <container style="screenlet-header">
>       <label style="boxhead" text="${uiLabelMap.DatawarehousePictureTitle}"/>
>     </container>
>     <container style="screenlet-body">
>       <!-- pictureButton is visible -->
>       <platform-specific>
>         <html>
>           <html-template location="component://datawarehouse/webapp/datawarehouse/includes/applet.ftl"/>
>         </html>
>       </platform-specific>
>     </container>
>   </container>
> </widgets>
>
> David, is where a way to subscribe to new mailing list to get messages directly into mailbox as it was earlier?
>
> Thanks,
>
> Oleg.
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Applets in OFBiz

Oleg Kozyrev Jr.
In reply to this post by Oleg Kozyrev Jr.
BJ,

It works! Thanks a lot.

Oleg.