Re: Applying patch for ofbiz 18.12.06

2022-09-05 Thread Avijit Bose
Thank you Jacques. Its clear now.
Avijit

On Mon, Sep 5, 2022 at 11:05 AM Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:

> Hi Avijit,
>
> There is no other reporting tool integrated in OFBiz.
> If your backend is not open to Internet you could still use Birt since
> then the security issue would no be a problem for you.
>
> About Jasper Reports or alike tools  please help yourself, eg:
> https://ofbiz.markmail.org/search/?q=Jasper+reports
>
> HTH
>
> Jacques
>
> Le 05/09/2022 à 03:24, Avijit Bose a écrit :
> > Hi Jacques,
> >
> > Ofbiz development team has decided to disable BIRT component from
> 18.12.06
> > version onwards for security issuesfine.
> >
> > Pls let us know which other reporting tool is integrated with Ofbiz
> > 18.12.06 version instead of BIRT?
> >
> > In case, if one wishes to use any other reporting tool like Jasper
> reports
> > or any other reporting tool, then how do one integrate the new reporting
> > tool in ofbiz?
> >
> > It is not clearly mentioned in the release notes.
> >
> > regards
> > Avijit
> >
> > On Sun, Sep 4, 2022 at 11:45 AM Jacques Le Roux <
> > jacques.le.r...@les7arts.com> wrote:
> >
> >> Hi Avijit,
> >>
> >> If you need this component then you can re-enable it by changing the
> >> "enabled" attribute of the "ofbiz-component" element in its
> >> ofbiz-component.xml file
> >>
> >> Jacques
> >>
> >> Le 04/09/2022 à 04:08, Avijit Bose a écrit :
> >>> Hi Jacques,
> >>>
> >>> "but eventually decided to release OFBiz 18.12.06 with the Birt
> component
> >>> disabled" what does it mean?
> >>>
> >>> Does it mean that we cannot use BIRT in Ofbiz 18.12.06 onwards for
> >> reports?
> >>> If yes, then which other reporting api is added in ofbiz 18.12.06?
> >>>
> >>> Does it mean  those java files which we all are using for BIRT for
> >>> reporting will no longer work?
> >>>
> >>> Will we all have to design and develop all the reports new and re-code
> >> its
> >>> corresponding java classes with the help of new API's?
> >>>
> >>> Pls clarify properly. Statements are not complete and clear enough to
> >>> understand clearly and that is why we have to ask repeatedly.
> >>>
> >>> regards
> >>> Avijit
> >>>
> >>>
> >>> On Sat, Sep 3, 2022 at 11:25 PM Jacques Le Roux <
> >>> jacques.le.r...@les7arts.com> wrote:
> >>>
> >>>> Hi Nicolas, Avijit,
> >>>>
> >>>> Note that today I have modified OFBIZ-12646 there are 3 already done
> for
> >>>> weeks commits there with one for 18.12.06. Did you include them?
> >>>>
> >>>> Le 03/09/2022 à 19:25, Nicolas Malin a écrit :
> >>>>> Hello,
> >>>>>
> >>>>> You can extract the needed patch with git between official tag.
> >>>>>
> >>>>> If you want I already do that and available from the nereide's cloud
> >> [1]
> >>>> but it's unofficial and own our risk
> >>>>> Cheers,
> >>>>> Nicolas
> >>>>>
> >>>>> [1] https://cloud.nereide.fr/index.php/s/8PsEJiE2LQnqGRM
> >>>>>
> >>>>> On 03/09/2022 04:08, Avijit Bose wrote:
> >>>>>> Hi Jac,
> >>>>>>
> >>>>>> Your message is not clear. Request...pls clarify it clearly how to
> >> apply
> >>>>>> patch for individual cases or for all items together.
> >>>>>>
> >>>>>> regards
> >>>>>> Avijit
> >>>>>>
> >>>>>> On Fri, Sep 2, 2022 at 5:21 PM Jacques Le Roux<
> >>>> jacques.le.r...@les7arts.com>
> >>>>>> wrote:
> >>>>>>
> >>>>>>> Hi,
> >>>>>>>
> >>>>>>> You need at least the Sub-task (related to security) and Bug lists
> >>>> here:
> >>>>>>> https://ofbiz.apache.org/release-notes-18.12.06.html
> >>>>>>>
> >>>>>>> For the rest it's up to you...
> >>>>>>>
> >>>>>>> HTH
> >>>>>>>
> >>>>>>> Jacques
> >>>>>>>
> >>>>>>> Le 02/09/2022 à 12:54, Avijit Bose a écrit :
> >>>>>>>> Hi,
> >>>>>>>>
> >>>>>>>> Presently I am using 18.12.05. All applications are set. I wish
> not
> >> to
> >>>>>>>> install 18.12.06 afresh and new. I am thinking of applying patch
> to
> >>>>>>> upgrade
> >>>>>>>> from 18.12.05 to 18.12.06.
> >>>>>>>>
> >>>>>>>> Please let us know how to apply patches correctly with patch
> files.
> >>>>>>>>
> >>>>>>>> regards
> >>>>>>>> Avijit
> >>
>


Re: Applying patch for ofbiz 18.12.06

2022-09-04 Thread Avijit Bose
Hi Jacques,

Ofbiz development team has decided to disable BIRT component from 18.12.06
version onwards for security issuesfine.

Pls let us know which other reporting tool is integrated with Ofbiz
18.12.06 version instead of BIRT?

In case, if one wishes to use any other reporting tool like Jasper reports
or any other reporting tool, then how do one integrate the new reporting
tool in ofbiz?

It is not clearly mentioned in the release notes.

regards
Avijit

On Sun, Sep 4, 2022 at 11:45 AM Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:

> Hi Avijit,
>
> If you need this component then you can re-enable it by changing the
> "enabled" attribute of the "ofbiz-component" element in its
> ofbiz-component.xml file
>
> Jacques
>
> Le 04/09/2022 à 04:08, Avijit Bose a écrit :
> > Hi Jacques,
> >
> > "but eventually decided to release OFBiz 18.12.06 with the Birt component
> > disabled" what does it mean?
> >
> > Does it mean that we cannot use BIRT in Ofbiz 18.12.06 onwards for
> reports?
> >
> > If yes, then which other reporting api is added in ofbiz 18.12.06?
> >
> > Does it mean  those java files which we all are using for BIRT for
> > reporting will no longer work?
> >
> > Will we all have to design and develop all the reports new and re-code
> its
> > corresponding java classes with the help of new API's?
> >
> > Pls clarify properly. Statements are not complete and clear enough to
> > understand clearly and that is why we have to ask repeatedly.
> >
> > regards
> > Avijit
> >
> >
> > On Sat, Sep 3, 2022 at 11:25 PM Jacques Le Roux <
> > jacques.le.r...@les7arts.com> wrote:
> >
> >> Hi Nicolas, Avijit,
> >>
> >> Note that today I have modified OFBIZ-12646 there are 3 already done for
> >> weeks commits there with one for 18.12.06. Did you include them?
> >>
> >> Le 03/09/2022 à 19:25, Nicolas Malin a écrit :
> >>> Hello,
> >>>
> >>> You can extract the needed patch with git between official tag.
> >>>
> >>> If you want I already do that and available from the nereide's cloud
> [1]
> >> but it's unofficial and own our risk
> >>> Cheers,
> >>> Nicolas
> >>>
> >>> [1] https://cloud.nereide.fr/index.php/s/8PsEJiE2LQnqGRM
> >>>
> >>> On 03/09/2022 04:08, Avijit Bose wrote:
> >>>> Hi Jac,
> >>>>
> >>>> Your message is not clear. Request...pls clarify it clearly how to
> apply
> >>>> patch for individual cases or for all items together.
> >>>>
> >>>> regards
> >>>> Avijit
> >>>>
> >>>> On Fri, Sep 2, 2022 at 5:21 PM Jacques Le Roux<
> >> jacques.le.r...@les7arts.com>
> >>>> wrote:
> >>>>
> >>>>> Hi,
> >>>>>
> >>>>> You need at least the Sub-task (related to security) and Bug lists
> >> here:
> >>>>> https://ofbiz.apache.org/release-notes-18.12.06.html
> >>>>>
> >>>>> For the rest it's up to you...
> >>>>>
> >>>>> HTH
> >>>>>
> >>>>> Jacques
> >>>>>
> >>>>> Le 02/09/2022 à 12:54, Avijit Bose a écrit :
> >>>>>> Hi,
> >>>>>>
> >>>>>> Presently I am using 18.12.05. All applications are set. I wish not
> to
> >>>>>> install 18.12.06 afresh and new. I am thinking of applying patch to
> >>>>> upgrade
> >>>>>> from 18.12.05 to 18.12.06.
> >>>>>>
> >>>>>> Please let us know how to apply patches correctly with patch files.
> >>>>>>
> >>>>>> regards
> >>>>>> Avijit
>
>


Re: Applying patch for ofbiz 18.12.06

2022-09-03 Thread Avijit Bose
Hi Jacques,

"but eventually decided to release OFBiz 18.12.06 with the Birt component
disabled" what does it mean?

Does it mean that we cannot use BIRT in Ofbiz 18.12.06 onwards for reports?

If yes, then which other reporting api is added in ofbiz 18.12.06?

Does it mean  those java files which we all are using for BIRT for
reporting will no longer work?

Will we all have to design and develop all the reports new and re-code its
corresponding java classes with the help of new API's?

Pls clarify properly. Statements are not complete and clear enough to
understand clearly and that is why we have to ask repeatedly.

regards
Avijit


On Sat, Sep 3, 2022 at 11:25 PM Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:

> Hi Nicolas, Avijit,
>
> Note that today I have modified OFBIZ-12646 there are 3 already done for
> weeks commits there with one for 18.12.06. Did you include them?
>
> Le 03/09/2022 à 19:25, Nicolas Malin a écrit :
> > Hello,
> >
> > You can extract the needed patch with git between official tag.
> >
> > If you want I already do that and available from the nereide's cloud [1]
> but it's unofficial and own our risk
> >
> > Cheers,
> > Nicolas
> >
> > [1] https://cloud.nereide.fr/index.php/s/8PsEJiE2LQnqGRM
> >
> > On 03/09/2022 04:08, Avijit Bose wrote:
> >> Hi Jac,
> >>
> >> Your message is not clear. Request...pls clarify it clearly how to apply
> >> patch for individual cases or for all items together.
> >>
> >> regards
> >> Avijit
> >>
> >> On Fri, Sep 2, 2022 at 5:21 PM Jacques Le Roux<
> jacques.le.r...@les7arts.com>
> >> wrote:
> >>
> >>> Hi,
> >>>
> >>> You need at least the Sub-task (related to security) and Bug lists
> here:
> >>> https://ofbiz.apache.org/release-notes-18.12.06.html
> >>>
> >>> For the rest it's up to you...
> >>>
> >>> HTH
> >>>
> >>> Jacques
> >>>
> >>> Le 02/09/2022 à 12:54, Avijit Bose a écrit :
> >>>> Hi,
> >>>>
> >>>> Presently I am using 18.12.05. All applications are set. I wish not to
> >>>> install 18.12.06 afresh and new. I am thinking of applying patch to
> >>> upgrade
> >>>> from 18.12.05 to 18.12.06.
> >>>>
> >>>> Please let us know how to apply patches correctly with patch files.
> >>>>
> >>>> regards
> >>>> Avijit
> >>>
>


Re: Apache OFBiz - Unauth Path Traversal with file corruption (CVE-2022-25371)

2022-09-03 Thread Avijit Bose
Hi Jacques,

"but eventually decided to release OFBiz 18.12.06 with the Birt component
disabled" what does it mean?

Does it mean that we cannot use BIRT in Ofbiz 18.12.06 onwards for reports?

If yes, then which other reporting api is added in ofbiz 18.12.06?

Does it mean  those java files which we all are using for BIRT for
reporting will no longer work?

Will we all have to design and develop all the reports new and re-code its
corresponding java classes with the help of new API's?

Pls clarify properly. Statements are not complete and clear enough to
understand clearly and that is why we have to ask repeatedly.

regards
Avijit

On Sat, Sep 3, 2022 at 6:57 PM Jacques Le Roux  wrote:

> Hi I'm sorry, I forgot to mention here the same than for (CVE-2022-25370)
> for the mitigation.
>
> Obviously there is no patch to apply since we waited [too] long for
> https://github.com/eclipse/birt/issues/625
> to resolve but eventually decided to release OFBiz 18.12.06 with
> the Birt component disabled.
>
> My apologies
>
> Jacques
>
> Le 02/09/2022 à 08:34, Jacques Le Roux a écrit :
> > Severity:
> > High
> >
> > Vendor:
> > The Apache Software Foundation
> >
> > Versions Affected:
> > OFBiz versions prior to 18.12.06
> >
> > Description:
> > The Birt viewer version 4.5.0 has a security issue that allows this
> exploit.
> > We waited long for https://github.com/eclipse/birt/issues/625
> > to resolve but eventually decided to release OFBiz 18.12.06 without
> > the Birt component
> >
> > Mitigation:
> > Upgrade to at least 18.12.06
> > or apply patches at https://issues.apache.org/jira/browse/OFBIZ-...
> >
> > Credit:
> > npodoty...@ptsecurity.com
> >
> > References:
> > http://ofbiz.apache.org/download.html#vulnerabilities
> >
>


Re: Applying patch for ofbiz 18.12.06

2022-09-02 Thread Avijit Bose
Hi Jac,

Your message is not clear. Request...pls clarify it clearly how to apply
patch for individual cases or for all items together.

regards
Avijit

On Fri, Sep 2, 2022 at 5:21 PM Jacques Le Roux 
wrote:

> Hi,
>
> You need at least the Sub-task (related to security) and Bug lists here:
> https://ofbiz.apache.org/release-notes-18.12.06.html
>
> For the rest it's up to you...
>
> HTH
>
> Jacques
>
> Le 02/09/2022 à 12:54, Avijit Bose a écrit :
> > Hi,
> >
> > Presently I am using 18.12.05. All applications are set. I wish not to
> > install 18.12.06 afresh and new. I am thinking of applying patch to
> upgrade
> > from 18.12.05 to 18.12.06.
> >
> > Please let us know how to apply patches correctly with patch files.
> >
> > regards
> > Avijit
>
>


Applying patch for ofbiz 18.12.06

2022-09-02 Thread Avijit Bose
Hi,

Presently I am using 18.12.05. All applications are set. I wish not to
install 18.12.06 afresh and new. I am thinking of applying patch to upgrade
from 18.12.05 to 18.12.06.

Please let us know how to apply patches correctly with patch files.

regards
Avijit


Re: Apache OFBiz - Unauth Path Traversal with file corruption (CVE-2022-25371)

2022-09-02 Thread Avijit Bose
Hi Jacques,

Presently I am using 18.12.05. All applications are set. I wish not to
install 18.12.06 afresh and new. I am thinking of applying patch to upgrade
from 18.12.05 to 18.12.06.

Please let us know how to apply patches correctly with patch files.

regards
Avijit



On Fri, Sep 2, 2022 at 12:04 PM Jacques Le Roux  wrote:

> Severity:
> High
>
> Vendor:
> The Apache Software Foundation
>
> Versions Affected:
> OFBiz versions prior to 18.12.06
>
> Description:
> The Birt viewer version 4.5.0 has a security issue that allows this
> exploit.
> We waited long for https://github.com/eclipse/birt/issues/625
> to resolve but eventually decided to release OFBiz 18.12.06 without
> the Birt component
>
> Mitigation:
> Upgrade to at least 18.12.06
> or apply patches at https://issues.apache.org/jira/browse/OFBIZ-...
>
> Credit:
> npodoty...@ptsecurity.com
>
> References:
> http://ofbiz.apache.org/download.html#vulnerabilities
>
>


Re: JQuery validation in ofbiz

2022-08-08 Thread Avijit Bose
Hi Aditya,

Could you pls clarify more by giving an example if possible?

regards
Avijit

On Mon, Aug 8, 2022 at 10:38 AM Aditya Sharma 
wrote:

> Hello Avijit,
>
> >> Question 1: How do I use jquery validation in ftl forms?
> Add class requireValidation to form
>
> Reference implementation of form macro:
>
> https://github.com/apache/ofbiz-framework/blob/release18.12/themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl#L247
>
> Implementation that initialises the validate plugin on form:
>
> https://github.com/apache/ofbiz-framework/blob/release18.12/themes/common-theme/webapp/common/js/util/OfbizUtil.js#L259
>
>
>
> >> Question 2: How do I upgrade the jquery version to the latest version?
> You need to download and replace files here
>
> https://github.com/apache/ofbiz-framework/tree/release18.12/themes/common-theme/webapp/common/js/jquery/plugins/validate
>
>
> HTH
>
> Thanks and Regards,
> Aditya Sharma
>
> On Sun, Aug 7, 2022 at 10:58 AM Avijit Bose  wrote:
>
> > Hello,
> >
> > It seems that currently ofbiz 18.12.05 is using jquery version 3.5.1.
> >
> > Question 1: How do I use jquery validation in ftl forms?
> >
> > Question 2: How do I upgrade the jquery version to the latest version?
> >
> > regards
> > Avijit
> >
>


JQuery validation in ofbiz

2022-08-06 Thread Avijit Bose
Hello,

It seems that currently ofbiz 18.12.05 is using jquery version 3.5.1.

Question 1: How do I use jquery validation in ftl forms?

Question 2: How do I upgrade the jquery version to the latest version?

regards
Avijit


Re: Success message stuck

2022-07-30 Thread Avijit Bose
No Sir. I am not asking to modify the success message.

What I am saying is ... the blue success message alert which appears and
gets displayed on "return success" goes off all on its own after a few
seconds by default. This is not vanishing on its own. It is staying
displayed. Even if 'X' is clicked, it's still not closing. In other cases
it's working fine. But in the above case it is not working. I am unable to
send you the screenshot in this mail because its text only mail format.

Even I have a java process where I am inserting rows in many entities one
after the other. In that case too ... It is stucking.

My question is why it is staying stuck and not closing on its own. I am not
asking for a customized success message.

regards
Avijit

On Sat, Jul 30, 2022 at 10:26 PM Nicolas Malin 
wrote:

> This is normal process when you use entity-auto.
>
> If you want a dedicate message or no message, override you service by an
> other
>
>
> 
>   
>
> BookServices.groovy:
>
> def createBookForUser() {
>run service: 'createBook', with: parameters
>return success("My message")
> //or
> //   return success()
> }
>
> Nicolas
>
> On 30/07/2022 05:21, Avijit Bose wrote:
>
> Hello,
>
> 1. After completion of a db row creation, the blue success message (alert)
> is showing but gets stuck. It does not 'goes off' of its own. Clicking the
> close (X) button does not work. I am using a simple create service method
> to create a single row in db.
>
> *
>  engine="entity-auto" invoke="create" auth="true">
> Create New Book
> 
> 
> 
> *
>
> 2. It also happens when creating many rows in many database consecutively
> in a single process.
>
> No error message etc.
>
> Pls let me know why this happens?
>
>
>
>


Success message stuck

2022-07-29 Thread Avijit Bose
Hello,

1. After completion of a db row creation, the blue success message (alert)
is showing but gets stuck. It does not 'goes off' of its own. Clicking the
close (X) button does not work. I am using a simple create service method
to create a single row in db.

*

Create New Book



*

2. It also happens when creating many rows in many database consecutively
in a single process.

No error message etc.

Pls let me know why this happens?


Image in BIRT PDF Not visible

2022-07-19 Thread Avijit Bose
Dear Sir,

I have a DB column where I store URI for images. I want to get this images
in BIRT report, which changes in each report.

I can see the images when I view the BIRT report in web viewer. But when I
view the BIRT report in PDF form, the images are not showing.

Message shown in the PDF is " The resource of this report item is not
reachable. "

Images are kept in a folder and the image URI is stored in the DB.

Pls help.
regards
Avijit


Re: Viewing PDF and Image in New Tab/Window in Ofbiz

2022-07-19 Thread Avijit Bose
Thank you Deepak, Jacques for your kind help. It is solved.

On Tue, Jul 19, 2022 at 11:47 AM Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:

> There is also that:
> https://demo-stable.ofbiz.apache.org/example/control/fonts.pdf
>
> Le 19/07/2022 à 07:49, Deepak Dixit a écrit :
> > Hi Avijit,
> > There is an example exists OOTB for the same,
> >
> > Please refer following url
> >
> >
> https://demo-stable.ofbiz.apache.org/content/control/EditDataResource?dataResourceId=DR1103b
> >
> > Click on Download link at bottom of page, you will be able to download
> the
> > pdf file
> >
> >
> > Kind Regards,
> > Deepak Dixit
> > Vice President of Product Engineering
> > mobile: +91 9826754548
> > email: deepak.di...@hotwax.co
> > *www.hotwax.co <http://www.hotwax.co/>*
> >
> >
> > On Mon, Jul 18, 2022 at 5:19 PM Avijit Bose 
> wrote:
> >
> >> Dear Ashish,
> >>
> >> I have taken the 2nd approach. But instead of creating the folder inside
> >> /webapp folder I have created two folders namely 'pdf' and
> >> 'images' inside
> >> "C:\apache-ofbiz-18.12.05\themes\common-theme\webapp\images", and stored
> >> the relative path into the database. By default ofbiz is looking into
> this
> >> 'images' folder. It worked.
> >>
> >> Also tried by keeping inside the "/webapp" folder. It worked
> too.
> >>
> >> Thank you for your help.
> >> Avijit
> >>
> >> On Mon, Jul 18, 2022 at 3:00 PM Ashish Vijaywargiya <
> >> ashish.vijaywarg...@hotwaxsystems.com> wrote:
> >>
> >>> Hello Avijit,
> >>>
> >>> There can be two options:
> >>>
> >>> 1) If you wish to save images/pdf in the database then please go with
> the
> >>> option which Nicola suggested in his email. Basically content related
> >>> entities will be involved in this operation: Content, DataResource and
> >>> ImageDataResource. Please review the references in the "content"
> >> component
> >>> present inside the applications folder.
> >>>
> >>> 2) If you wish to keep the images/pdf on the file system then again you
> >> can
> >>> review the upload related functionality in the "content" component.
> >>> There are many examples available in the code. In this case you need to
> >>> create a webapp reference in the ofbiz-component.xml file:
> >>>
> >>>  >>>   title="Many Resources"
> >>>   server="default-server"
> >>>   location="webapp/siteresources"
> >>>   mount-point="/siteresources"
> >>>   app-bar-display="false"/>
> >>>
> >>> Then inside webapp folder:
> >>> - webapp
> >>> -- siteresources
> >>> --- images
> >>> --- pdf
> >>>
> >>> You can create your media contents inside the "siteresources" folder.
> In
> >>> the Form Widget you can use following code:
> >>>
> >>> http://localhost:8080/siteresources/images/ofbiz_logo.png";
> >>> style="cssImgXLarge"/>
> >>> 
> >>>   http://localhost:8080/siteresources/pdf/pdftest.pdf";
> >>> target-window="_BLANK"/>
> >>> 
> >>>
> >>> You can dynamically prepare the data inside groovy files for
> image->value
> >>> attribute and for hyperlink->target attribute and use it in the form
> >> widget
> >>> field tag.
> >>>
> >>> Hope this helps!
> >>>
> >>> --
> >>> Kind Regards,
> >>> Ashish Vijaywargiya
> >>> Vice President of Operations
> >>> *HotWax Systems*
> >>> *Enterprise open source experts*
> >>> http://www.hotwaxsystems.com
> >>>
> >>>
> >>>
> >>> On Mon, Jul 18, 2022 at 9:11 AM Avijit Bose 
> >> wrote:
> >>>> Dear Sir,
> >>>>
> >>>> I have a link in the form as shown below:
> >>>> --
> >>>>  >> use-when="${salaryCertificateUrl!='Not
> >>>> Applicable'}" title="${uiLabelMap.salaryCertificate}"
> >>> widget-style="text">
> >>>>   >>>> description="${salaryCertificateUrl}" also-hidden="false" size="25">
> >>>>
> >>>>  
> >>>> 
> >>>> --
> >>>>
> >>>> Note: "salaryCertificateUrl" is a path of a pdf file. I DON'T WANT TO
> >>>> GENERATE PDF FILE. JUST WANT TO VIEW PRE_GENERATED PDFs. I am
> uploading
> >>> it
> >>>> and then wants to view it from the link in my form. Same this for
> >> images.
> >>>> Pls let me know how do I view this.
> >>>>
> >>>> regards
> >>>> Avijit
> >>>>
>


Re: Viewing PDF and Image in New Tab/Window in Ofbiz

2022-07-18 Thread Avijit Bose
Dear Ashish,

I have taken the 2nd approach. But instead of creating the folder inside
/webapp folder I have created two folders namely 'pdf' and
'images' inside
"C:\apache-ofbiz-18.12.05\themes\common-theme\webapp\images", and stored
the relative path into the database. By default ofbiz is looking into this
'images' folder. It worked.

Also tried by keeping inside the "/webapp" folder. It worked too.

Thank you for your help.
Avijit

On Mon, Jul 18, 2022 at 3:00 PM Ashish Vijaywargiya <
ashish.vijaywarg...@hotwaxsystems.com> wrote:

> Hello Avijit,
>
> There can be two options:
>
> 1) If you wish to save images/pdf in the database then please go with the
> option which Nicola suggested in his email. Basically content related
> entities will be involved in this operation: Content, DataResource and
> ImageDataResource. Please review the references in the "content" component
> present inside the applications folder.
>
> 2) If you wish to keep the images/pdf on the file system then again you can
> review the upload related functionality in the "content" component.
> There are many examples available in the code. In this case you need to
> create a webapp reference in the ofbiz-component.xml file:
>
>   title="Many Resources"
>  server="default-server"
>  location="webapp/siteresources"
>  mount-point="/siteresources"
>  app-bar-display="false"/>
>
> Then inside webapp folder:
> - webapp
> -- siteresources
> --- images
> --- pdf
>
> You can create your media contents inside the "siteresources" folder. In
> the Form Widget you can use following code:
>
> http://localhost:8080/siteresources/images/ofbiz_logo.png";
> style="cssImgXLarge"/>
> 
>  http://localhost:8080/siteresources/pdf/pdftest.pdf";
> target-window="_BLANK"/>
> 
>
> You can dynamically prepare the data inside groovy files for image->value
> attribute and for hyperlink->target attribute and use it in the form widget
> field tag.
>
> Hope this helps!
>
> --
> Kind Regards,
> Ashish Vijaywargiya
> Vice President of Operations
> *HotWax Systems*
> *Enterprise open source experts*
> http://www.hotwaxsystems.com
>
>
>
> On Mon, Jul 18, 2022 at 9:11 AM Avijit Bose  wrote:
>
> > Dear Sir,
> >
> > I have a link in the form as shown below:
> > --
> >  widget-style="text">
> >  > description="${salaryCertificateUrl}" also-hidden="false" size="25">
> >   
> > 
> > 
> > --
> >
> > Note: "salaryCertificateUrl" is a path of a pdf file. I DON'T WANT TO
> > GENERATE PDF FILE. JUST WANT TO VIEW PRE_GENERATED PDFs. I am uploading
> it
> > and then wants to view it from the link in my form. Same this for images.
> >
> > Pls let me know how do I view this.
> >
> > regards
> > Avijit
> >
>


Transforming ofbiz FIND and corresponding LIST in FTL

2022-07-17 Thread Avijit Bose
Dear Sir,

Presently the ofbiz FIND and its corresponding LIST is written in minilang
in ofbiz Forms.

Pls let us all know how we can convert this into ftl file. In other
words how to implement FIND and its LIST in FTL.

If this can be done then we can use FTL in all the code except screens,
etc. which will make coding life very easy.

It seems that there are lots of bottlenecks in minilang which is making
coding tougher.

regards
Avijit


Viewing PDF and Image in New Tab/Window in Ofbiz

2022-07-17 Thread Avijit Bose
Dear Sir,

I have a link in the form as shown below:
--


  


--

Note: "salaryCertificateUrl" is a path of a pdf file. I DON'T WANT TO
GENERATE PDF FILE. JUST WANT TO VIEW PRE_GENERATED PDFs. I am uploading it
and then wants to view it from the link in my form. Same this for images.

Pls let me know how do I view this.

regards
Avijit


Re: Give access to folder in ofbiz

2022-07-13 Thread Avijit Bose
Thank you Jacques. Its done.

On Wed, Jul 13, 2022 at 9:07 PM Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:

> Hi avijit,
>
> It depends if you are speaking about products or "general" images
>
> For general images, have a look into url.properties:
>
> # Static Content URLs to make it easy to move the serving load for
> static content to other machines
> # -- these are for general content such as images, js & css files, or
> non-dynamic HTML files
> content.url.prefix.secure=
> content.url.prefix.standard=
>
> Then have a look at ContentUrlTag::appendContentPrefix methods and how
> that's used in whole code.
>
> It allows you to move images and alike files in a specific place of a
> domain. For instance that's how it's used in demos:
>
>
> https://github.com/apache/ofbiz-tools/blob/master/demo-backup/patch/trunk/url.properties.patch
>
> Same for next (22.01) and stable (18.12). For instance the OFBiz logo is
> accessible at https://demo-trunk.ofbiz.apache.org/images/ofbiz_logo.png
> And is located into
> /home/ofbizDemo/trunk/themes/common-theme/webapp/images on the server for
> the domain https://demo-trunk.ofbiz.apache.org/
>
> That's the best way to handle general images location. If needed, a look
> into code should help.
>
> For products images have a look at catalog/control/Imagemanagement and
> catalog.properties
>
> HTH
>
> Jacques
>
>
> Le 12/07/2022 à 12:19, Avijit Bose a écrit :
> > Hi,
> >
> > I have few images in folder say ... "d:\images" and I am trying to
> > retrieve and display those images in a FTL file. But the image is not
> > displaying.
> >
> > When I put the same image in "webapp \ my app \ images" folder inside
> > ofbiz, the ftl file gets the access and image gets displayed.
> >
> > I think ofbiz is not allowing ftl file the access to "d:\images" folder.
> > Pls note ftl file has plain html code.
> >
> > Pls let me know how could I provide the same access in ofbiz.
> >
> > thank you
> > avijit
>


Give access to folder in ofbiz

2022-07-12 Thread Avijit Bose
Hi,

I have few images in folder say ... "d:\images" and I am trying to
retrieve and display those images in a FTL file. But the image is not
displaying.

When I put the same image in "webapp \ my app \ images" folder inside
ofbiz, the ftl file gets the access and image gets displayed.

I think ofbiz is not allowing ftl file the access to "d:\images" folder.
Pls note ftl file has plain html code.

Pls let me know how could I provide the same access in ofbiz.

thank you
avijit


Re: Passing "CONTEXT" from FTL to Java

2022-07-12 Thread Avijit Bose
Thank you Ashish. I will try it.

regards
Avijit

On Tue, Jul 12, 2022 at 10:04 AM Ashish Vijaywargiya <
ashish.vijaywarg...@hotwaxsystems.com> wrote:

> Hello Avijit,
>
> You have shared following code snippet in your previous email:
>  // Setting up all non primary key field values from context map
> smsSubjectMaster.setNonPKFields(context);
>
> "context" is just a map object from which you can get the parameters passed
> to the service definition in OFBiz.
>
> You can do similar thing in events by using similar code snippet as shown
> below:
>
> Map paramMap = UtilHttp.getParameterMap(request);
> String dataResourceId;
> GenericValue dataResource = delegator.makeValue("DataResource");
> dataResource.setPKFields(paramMap);
> dataResource.setNonPKFields(paramMap);
>
> All the 4 points which you have shared in this email can be taken care of
> either in Events or Services. You might have noticed that "delegator"(Used
> to interact with entities) and "dispatcher"(call services synchronously or
> asynchronously) objects are available in Events as well as in Services. So
> it is our personal choice where we wish to send form data either to Events
> or to Services. As I have said in the previous email that Services in OFBiz
> are session less.
>
> There are some best practices/conventions which are set in OFBiz framework:
>
> - "context" is a map object which is generally used in the *Services.java
> to read the parameters passed to the service definition.
> - The other place where you will see a "context" map is the groovy files.
>
> In groovy files you can prepare the data and put everything in the
> "context" map.
> This data will be used in the form which is included in the screen
> definition.
>
> Hope this helps!
>
> --
> Kind Regards,
> Ashish Vijaywargiya
> Vice President of Operations
> *HotWax Systems*
> *Enterprise open source experts*
> http://www.hotwaxsystems.com
>
>
>
> On Tue, Jul 12, 2022 at 6:22 AM Avijit Bose  wrote:
>
> > Hi Ashish,
> >
> > I completely understood your explanation. I also have a workable
> > understanding about service and events.
> >
> > Firstly ... I wanted to handle and manipulate request data before storing
> > it in the database.
> > Secondly... It is required to insert request data into 10 different
> > entities.
> > Thirdly... I wanted ofbiz to create auto increment of all the primary
> > fields in the database of all 10 tables and not to create them myself.
> > Fourthly... It is required to get primary key of the first table and
> insert
> > into 9 other tables as foreign keys.
> >
> > This is why I was trying to get the "context" in a java event.
> >
> > Anyway I have done it through Servlet and I am able to satisfy all the
> > above 4 conditions.
> >
> > NOTE: If in future ofbiz release, the ofbiz core can be updated, where
> > "context" can be passed from the screen itself as like other parameters,
> > and it can be called in the method ...
> > public static String updateStudent(HttpServletRequest request,
> > HttpServletResponse response) {}, then I think it will be helpful to all
> > users and the coding will be a bit easier.
> >
> > thank you for your help
> > Avijit
> >
> >
> > On Mon, Jul 11, 2022 at 10:09 AM Ashish Vijaywargiya <
> > ashish.vijaywarg...@hotwaxsystems.com> wrote:
> >
> > > Hello Avijit,
> > >
> > > It looks like you are getting confused from the concept of Events and
> > > Services in java. It is very well explained in the OFBiz tutorial:
> > >
> > >
> >
> https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Tutorial+-+A+Beginners+Development+Guide+for+18.12
> > >
> > > Now talking about your code snippet:
> > >
> > > You are calling an event from a controller so you need to get all the
> > > parameters from the method
> > request.getParameter("html_form_elements_name").
> > >
> > >
> > > And once you have read all the values in events then from here you
> should
> > > pass these values to the service where you can take care of business
> > logic
> > > and CRUD operations. Basically events are used to do the validations
> and
> > > extra manipulations with the form parameters.
> > >
> > > If you don't want to go with the Events route then you should change
> your
> > > controller.xml entry as shown below:
> > >
> > > 
> > > 
> 

Re: Passing "CONTEXT" from FTL to Java

2022-07-11 Thread Avijit Bose
Hi Ashish,

I completely understood your explanation. I also have a workable
understanding about service and events.

Firstly ... I wanted to handle and manipulate request data before storing
it in the database.
Secondly... It is required to insert request data into 10 different
entities.
Thirdly... I wanted ofbiz to create auto increment of all the primary
fields in the database of all 10 tables and not to create them myself.
Fourthly... It is required to get primary key of the first table and insert
into 9 other tables as foreign keys.

This is why I was trying to get the "context" in a java event.

Anyway I have done it through Servlet and I am able to satisfy all the
above 4 conditions.

NOTE: If in future ofbiz release, the ofbiz core can be updated, where
"context" can be passed from the screen itself as like other parameters,
and it can be called in the method ...
public static String updateStudent(HttpServletRequest request,
HttpServletResponse response) {}, then I think it will be helpful to all
users and the coding will be a bit easier.

thank you for your help
Avijit


On Mon, Jul 11, 2022 at 10:09 AM Ashish Vijaywargiya <
ashish.vijaywarg...@hotwaxsystems.com> wrote:

> Hello Avijit,
>
> It looks like you are getting confused from the concept of Events and
> Services in java. It is very well explained in the OFBiz tutorial:
>
> https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Tutorial+-+A+Beginners+Development+Guide+for+18.12
>
> Now talking about your code snippet:
>
> You are calling an event from a controller so you need to get all the
> parameters from the method request.getParameter("html_form_elements_name").
>
>
> And once you have read all the values in events then from here you should
> pass these values to the service where you can take care of business logic
> and CRUD operations. Basically events are used to do the validations and
> extra manipulations with the form parameters.
>
> If you don't want to go with the Events route then you should change your
> controller.xml entry as shown below:
>
> 
> 
> 
> 
> 
> 
>
> Here you will notice that I have used the event type as "service" where you
> don't need to specify the path of the service. You can specify the service
> definition and implement your service either in Java/Groovy/XML(Minilang).
> Services in OFBiz are session-less, so if you wish to do handling of
> HttpSession object then you need to do it in the Events.
>
> All these things are very well explained in the tutorial link which I have
> shared above. There is also a very good reference available for the
> comparison between Events and Services. Please take a look at it.
>
> Thank you.
>
> --
> Kind Regards,
> Ashish Vijaywargiya
> Vice President of Operations
> *HotWax Systems*
> *Enterprise open source experts*
> http://www.hotwaxsystems.com
>
>
>
> On Sat, Jul 9, 2022 at 7:32 AM Avijit Bose  wrote:
>
> > Hi Nicolas,
> >
> > First... I have a ftl file like this. Here I am calling "createStudent"
> in
> > the controller through "<@ofbizUrl>createStudent"
> > *
> >  > action="<@ofbizUrl>createStudent" name="regForm"
> > enctype="multipart/form-data">
> > 
> > . blah blah blah
> > 
> > 
> > *
> >
> > Second my controller as shown below
> > *
> > 
> > 
> >  > invoke="createStudent"/>
> > 
> > 
> > 
> > *
> > Third from the controller above I am going to a java file called
> > "StudentServices" and invoking a method in the java file called
> > "createStudent".
> >
> >
> > Fourth... In the "createStudent" method of the java file... I have the
> > following...
> > **
> > public static String createStudent(HttpServletRequest request,
> > HttpServletResponse response) {
> > Delegator delegator = (Delegator) request.getAttribute("delegator");
> > LocalDispatcher dispatcher = (LocalDispatcher)
> > request.getAttribute("dispatcher");
> > GenericValue userLogin = (GenericValue)
> > request.getSession().getAttribute("userLogin");
> > Map result = ServiceUtil.returnSuccess();
> >
> > try {
> > GenericValue smsSubjectMaster =
> > delegator.makeValue("smsSubjectMaster");
> > // Auto generating next sequence of studentId primary key
> > smsSubjectMaster.setNextSeqId();
> >

Re: Passing "CONTEXT" from FTL to Java

2022-07-08 Thread Avijit Bose
Hi Nicolas,

First... I have a ftl file like this. Here I am calling "createStudent" in
the controller through "<@ofbizUrl>createStudent"
*


. blah blah blah


*

Second my controller as shown below
*






*
Third from the controller above I am going to a java file called
"StudentServices" and invoking a method in the java file called
"createStudent".


Fourth... In the "createStudent" method of the java file... I have the
following...
**
public static String createStudent(HttpServletRequest request,
HttpServletResponse response) {
Delegator delegator = (Delegator) request.getAttribute("delegator");
LocalDispatcher dispatcher = (LocalDispatcher)
request.getAttribute("dispatcher");
GenericValue userLogin = (GenericValue)
request.getSession().getAttribute("userLogin");
Map result = ServiceUtil.returnSuccess();

try {
GenericValue smsSubjectMaster =
delegator.makeValue("smsSubjectMaster");
// Auto generating next sequence of studentId primary key
smsSubjectMaster.setNextSeqId();
// Setting up all non primary key field values from context map
smsSubjectMaster.setNonPKFields(context);
// Creating record in database for smsStudentMaster entity for
prepared value
smsSubjectMaster = delegator.create(smsSubjectMaster);
//subjectId = smsSubjectMaster.getString("studentId");
//context.putIfAbsent("subjectId", subjectId);
  context.put("subjectId", subjectId);
result.put("subjectId", smsSubjectMaster.getString("subjectId"));
Debug.log("==smsSubjectMaster record created successfully
with subjectId: "+smsSubjectMaster.getString("subjectId"));

} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError("Error in creating record in
smsSubjectMaster entity " +module);
}

}
**
In the try/catch block... pls notice this...
"smsSubjectMaster.setNonPKFields(context);". This 'context' I am talking
about. I want the context in this method ...

public static String createStudent(HttpServletRequest request,
HttpServletResponse response) {
// I NEED CONTEXT HERE
}

AND NOT IN THIS METHOD

public static Map createStudent(DispatchContext dctx,
Map context){
 ?? HERE I AM ALREADY PASSING CONTEXT AND GETTING IT
}

Now...

I see a 'globalContext' in this link...
https://cwiki.apache.org/confluence/display/OFBIZ/Variables+always+available+in+screen+context

But I think globalcontext is not the same as context. From the link above I
could pass the variables mentioned in the link from ftl to java by setting
screen parameters, but no parameter named 'context' in the link above.

Question: How do I get context in a method where I am passing
"HttpServletRequest request, HttpServletResponse response" as shown above.

regards
Avijit


On Fri, Jul 8, 2022 at 1:05 PM Nicolas Malin 
wrote:

> Hello Avijit,
>
> Can you share some peace of code, I didn't understand your ftl to java ?
>
> You have a ftl template and go to java service through request call or
> you want to call a java code on a ftl code ?
>
> Nicolas
>
> On 28/06/2022 12:45, Avijit Bose wrote:
> > Dear Sir,
> >
> > Can the 'context' be passed from a ftl file to java?
> >
> > I see a 'globalContext' in this link...
> >
> https://cwiki.apache.org/confluence/display/OFBIZ/Variables+always+available+in+screen+context
> >
> > My goal is to use context here..
> > ---
> > dbName.setNonPKFields(context);
> > -
> > in a method...
> > 
> > public static String createSubscriber(HttpServletRequest request,
> > HttpServletResponse response) {  }
> > ---
> > can I use 'globalContext' in place of 'context'?
> >
> > regards
> > Avijit
> >
>
>


Passing "CONTEXT" from FTL to Java

2022-06-28 Thread Avijit Bose
Dear Sir,

Can the 'context' be passed from a ftl file to java?

I see a 'globalContext' in this link...
https://cwiki.apache.org/confluence/display/OFBIZ/Variables+always+available+in+screen+context

My goal is to use context here..
---
dbName.setNonPKFields(context);
-
in a method...

public static String createSubscriber(HttpServletRequest request,
HttpServletResponse response) {  }
---
can I use 'globalContext' in place of 'context'?

regards
Avijit


Re: Fonts in Ofbiz

2022-06-22 Thread Avijit Bose
This might be helpful to others.

Ofbiz is taking fonts from "c:\windows\fonts" folder so as all the
browsers. To change fonts in any ofbiz theme, change your fonts in

body, textarea, input, select {
font-family: Quicksand, Verdana, Arial, Helvetica, sans-serif;
}

in the "style.css" file of the respective theme.

And put the font files (*.TTF) in the "c:\windows\fonts" folder. Restart
OFBIZ.

regards
Avijit



On Wed, Jun 22, 2022 at 1:02 PM Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:

> Hi Avijit,
>
> I'm very bad at CSS but Mozilla team is not:
> https://developer.mozilla.org/en-US/docs/Web/CSS/font-family
>
> Jacques
>
> Le 22/06/2022 à 06:38, Avijit Bose a écrit :
> > Referring to my previous mail I have found out a piece of css code in
> > the following file...
> >
> > OFBIZ_HOME/themes/flatgrey/webapp/flatgrey/style.css
> >
> > body, textarea, input, select {
> >  font-family: Quicksand, Verdana, Arial, Helvetica, sans-serif;
> > }
> >
> > Question: from where ofbiz is picking up the above mentioned font
> families?
> > Is it taking from the windows OS (system) which are already installed?
> >
> > Comments: If it takes from the system, then one can install any fonts in
> > the windows system and ofbiz is supposed to pick up that specific font,
> if
> > it is mentioned in the above css code. Am I thinking correctly?
> >
> > Pls let us know.
> >
> > regards
> > Avijit
> >
> > On Tue, Jun 21, 2022 at 12:09 PM Avijit Bose 
> wrote:
> >
> >> Dear Sir,
> >>
> >> I am making an app in Ofbiz. I need to change the font of the whole app.
> >>
> >> If I change in (OFBIZ_HOME/themes/flatgrey/webapp/flatgrey/style.css),
> >> then where will I put the font  .TTF files. Example like:
> "Roboto-Light.ttf"
> >>
> >> regards
> >> Avijit
> >>
> >> On Tue, Jun 21, 2022 at 12:02 PM Ashish Vijaywargiya <
> >> ashish.vijaywarg...@hotwaxsystems.com> wrote:
> >>
> >>> Hello Avijit,
> >>>
> >>> What are you trying to do? Can you please provide additional details?
> >>>
> >>> Apache OFBiz is a theme driven project and there are a few themes that
> are
> >>> available out of the box(OOTB).
> >>>
> >>> Please refer: OFBIZ_HOME/themes folder. Here you can see the style.css
> >>> file
> >>> present inside a
> >>> flatgrey theme(OFBIZ_HOME/themes/flatgrey/webapp/flatgrey/style.css).
> Same
> >>> style.css file is also present in other themes as well.
> >>>
> >>> --
> >>> Kind Regards,
> >>> Ashish Vijaywargiya
> >>> Vice President of Operations
> >>> *HotWax Systems*
> >>> *Enterprise open source experts*
> >>> http://www.hotwaxsystems.com
> >>>
> >>>
> >>>
> >>> On Tue, Jun 21, 2022 at 10:59 AM Avijit Bose 
> >>> wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>> Pls let me know how a different font could be used in ofbiz and where
> to
> >>>> put the files.
> >>>>
> >>>> regards
> >>>> Avijit
> >>>>
>


Re: Fonts in Ofbiz

2022-06-21 Thread Avijit Bose
Referring to my previous mail I have found out a piece of css code in
the following file...

OFBIZ_HOME/themes/flatgrey/webapp/flatgrey/style.css

body, textarea, input, select {
font-family: Quicksand, Verdana, Arial, Helvetica, sans-serif;
}

Question: from where ofbiz is picking up the above mentioned font families?
Is it taking from the windows OS (system) which are already installed?

Comments: If it takes from the system, then one can install any fonts in
the windows system and ofbiz is supposed to pick up that specific font, if
it is mentioned in the above css code. Am I thinking correctly?

Pls let us know.

regards
Avijit

On Tue, Jun 21, 2022 at 12:09 PM Avijit Bose  wrote:

> Dear Sir,
>
> I am making an app in Ofbiz. I need to change the font of the whole app.
>
> If I change in (OFBIZ_HOME/themes/flatgrey/webapp/flatgrey/style.css),
> then where will I put the font  .TTF files. Example like: "Roboto-Light.ttf"
>
> regards
> Avijit
>
> On Tue, Jun 21, 2022 at 12:02 PM Ashish Vijaywargiya <
> ashish.vijaywarg...@hotwaxsystems.com> wrote:
>
>> Hello Avijit,
>>
>> What are you trying to do? Can you please provide additional details?
>>
>> Apache OFBiz is a theme driven project and there are a few themes that are
>> available out of the box(OOTB).
>>
>> Please refer: OFBIZ_HOME/themes folder. Here you can see the style.css
>> file
>> present inside a
>> flatgrey theme(OFBIZ_HOME/themes/flatgrey/webapp/flatgrey/style.css). Same
>> style.css file is also present in other themes as well.
>>
>> --
>> Kind Regards,
>> Ashish Vijaywargiya
>> Vice President of Operations
>> *HotWax Systems*
>> *Enterprise open source experts*
>> http://www.hotwaxsystems.com
>>
>>
>>
>> On Tue, Jun 21, 2022 at 10:59 AM Avijit Bose 
>> wrote:
>>
>> > Hi,
>> >
>> > Pls let me know how a different font could be used in ofbiz and where to
>> > put the files.
>> >
>> > regards
>> > Avijit
>> >
>>
>


Re: Fonts in Ofbiz

2022-06-20 Thread Avijit Bose
Dear Sir,

I am making an app in Ofbiz. I need to change the font of the whole app.

If I change in (OFBIZ_HOME/themes/flatgrey/webapp/flatgrey/style.css), then
where will I put the font  .TTF files. Example like: "Roboto-Light.ttf"

regards
Avijit

On Tue, Jun 21, 2022 at 12:02 PM Ashish Vijaywargiya <
ashish.vijaywarg...@hotwaxsystems.com> wrote:

> Hello Avijit,
>
> What are you trying to do? Can you please provide additional details?
>
> Apache OFBiz is a theme driven project and there are a few themes that are
> available out of the box(OOTB).
>
> Please refer: OFBIZ_HOME/themes folder. Here you can see the style.css file
> present inside a
> flatgrey theme(OFBIZ_HOME/themes/flatgrey/webapp/flatgrey/style.css). Same
> style.css file is also present in other themes as well.
>
> --
> Kind Regards,
> Ashish Vijaywargiya
> Vice President of Operations
> *HotWax Systems*
> *Enterprise open source experts*
> http://www.hotwaxsystems.com
>
>
>
> On Tue, Jun 21, 2022 at 10:59 AM Avijit Bose 
> wrote:
>
> > Hi,
> >
> > Pls let me know how a different font could be used in ofbiz and where to
> > put the files.
> >
> > regards
> > Avijit
> >
>


Fonts in Ofbiz

2022-06-20 Thread Avijit Bose
Hi,

Pls let me know how a different font could be used in ofbiz and where to
put the files.

regards
Avijit


Re: Error in AppBar.ftl - Flatgrey theme

2022-06-13 Thread Avijit Bose
Dear Sir,

I am using latest version 18.12.05.

I installed BOOTSTRAP theme and that was causing the problem. I removed it
and got solved. I think BOOTSTRAP theme is not officially released.

Could you pls let us know from BOOTSTRAP theme will be released and when we
can use BOOTSTRAP theme in ofbiz?

regards
Avijit

On Mon, Jun 13, 2022 at 12:09 PM Daniel Watford  wrote:

> Hi Avijit,
>
> I don't recognise the issue from the error message you have posted and have
> not been able to reproduce it using a copy of ofbiz 18.12 with the demo
> data loaded.
>
> Please see if you can reproduce the issue using a new installation of ofbiz
> with the demonstration data loaded, or one of the demo sites (The Apache
> OFBiz® Project - Demos <https://ofbiz.apache.org/ofbiz-demos.html>)
>
> Please then provide:
> - The version of ofbiz you are using.
> - Steps we should follow to reproduce the issue.
>
> Thanks,
>
> Dan.
>
> On Sun, 12 Jun 2022 at 15:27, Avijit Bose  wrote:
>
> > Hi,
> >
> > I am getting the following error in the main navigation bar.
> >
> > 
> > 2022-06-12 19:49:01,720 |jsse-nio-8443-exec-1 |FreeMarkerWorker
> >  |E| null
> > freemarker.core._TemplateModelException: Java method "static
> >
> >
> org.apache.ofbiz.webapp.WebAppUtil.getControlServletPath(org.apache.ofbiz.base.component.ComponentConfig$WebappInfo)"
> > threw an exception; see cause exception in the Java stack trace.
> >
> > 
> > FTL stack trace ("~" means nesting-related):
> > - Failed at: #assign servletPath = Static["org.apa...  [in
> template
> > "component://flatgrey/template/AppBar.ftl" at line 65, column 11]
> > 
> > 
> >
> > The line of code isin AppBar.ftl file
> > ---
> > <#assign servletPath =
> >
> >
> Static["org.apache.ofbiz.webapp.WebAppUtil"].getControlServletPath(display)>
> > ---
> >
> > Pls let me know how to resolve this.
> >
> > thanks and regards
> > Avijit Bose
> >
>
>
> --
> Daniel Watford
>


Re: BIRT Email

2022-06-13 Thread Avijit Bose
Definitely Sir,

1. My BIRT email sending java portion is...
---
//This is for BIRT report email with attachment
dispatcher.runSync("sendBirtMail", UtilMisc.toMap(
"sendTo", supplierEmail,
"sendCc", sendCc,
"sendFrom", sendFrom,
"subject", subject,
"bodyText", body,//NOTE
HEREI HAVE USED "bodyText" INSTEAD OF "body". ALL OTHER KEYS  ARE SAME
"attachmentName", attachmentName,
"birtReportLocation", birtReportLocation,
"birtParameters", map,
"userLogin", userLogin
));
---

2. In the BIRT services.xml file, I have added ' allow-html="any" ' tag as
shown below...
--


BIRT Email Service

 // THIS IS BODYTEXT I USED...   allow-html="any"









// THIS BODY IS NOT CARRYING MY EMAIL BODY

---

Hope this might be helpful to others.

regards
Avijit

On Mon, Jun 13, 2022 at 12:12 PM Daniel Watford  wrote:

> Hi Avijit,
>
> Please could you follow up with how you solved your issue. It will add to
> the body of ofbiz knowledge and help those who might have similar issues in
> the future.
>
> Thanks,
>
> Dan.
>
> On Sat, 11 Jun 2022 at 04:04, Avijit Bose  wrote:
>
> > I have solved it.
> >
> > regards
> > Avijit
> >
> > On Sat, Jun 11, 2022 at 8:15 AM Avijit Bose 
> wrote:
> >
> > > Dear Sir,
> > >
> > > In connection to my previous email, I am getting the below mentioned
> > > error. Pls let me know how can I solve this.
> > >
> > > The Following Errors Occurred:
> > >
> > > Unable to send email:
> > org.apache.ofbiz.service.ServiceValidationException:
> > > In field [bodyText] less-than (<) and greater-than (>) symbols are not
> > > allowed.
> > >
> > > On Fri, Jun 10, 2022 at 6:26 PM Avijit Bose 
> > wrote:
> > >
> > >> Dear Sir,
> > >>
> > >> I am sending BIRT email as follows:
> > >> ---
> > >> dispatcher.runSync("sendBirtMail", UtilMisc.toMap(
> > >> "sendTo", supplierEmail,
> > >> "sendCc", sendCc,
> > >> "sendFrom", sendFrom,
> > >> "subject", subject,
> > >> "bodyText", body,
> > >> "contentType", "text/html",
> > >> "attachmentName", attachmentName,
> > >> "birtReportLocation", birtReportLocation,
> > >> "birtParameters", map,
> > >> "userLogin", userLogin
> > >> ));
> > >> ---
> > >>
> > >> Question: I am unable to send email body in HTML format. The above
> > >> "contentType", "text/html", is not working. When sending as
> "bodyText",
> > >> body, ... I am able to get the body in email but email body is showing
> > up
> > >> as plain text.
> > >>
> > >> Pls let me know how could I send email body as HTML format in BIRT
> > Email.
> > >>
> > >> regards
> > >> Avijit
> > >>
> > >>
> > >>
> >
>
>
> --
> Daniel Watford
>


Error in AppBar.ftl - Flatgrey theme

2022-06-12 Thread Avijit Bose
Hi,

I am getting the following error in the main navigation bar.


2022-06-12 19:49:01,720 |jsse-nio-8443-exec-1 |FreeMarkerWorker
 |E| null
freemarker.core._TemplateModelException: Java method "static
org.apache.ofbiz.webapp.WebAppUtil.getControlServletPath(org.apache.ofbiz.base.component.ComponentConfig$WebappInfo)"
threw an exception; see cause exception in the Java stack trace.


FTL stack trace ("~" means nesting-related):
- Failed at: #assign servletPath = Static["org.apa...  [in template
"component://flatgrey/template/AppBar.ftl" at line 65, column 11]



The line of code isin AppBar.ftl file
---
<#assign servletPath =
Static["org.apache.ofbiz.webapp.WebAppUtil"].getControlServletPath(display)>
---

Pls let me know how to resolve this.

thanks and regards
Avijit Bose


Re: BIRT Email

2022-06-10 Thread Avijit Bose
I have solved it.

regards
Avijit

On Sat, Jun 11, 2022 at 8:15 AM Avijit Bose  wrote:

> Dear Sir,
>
> In connection to my previous email, I am getting the below mentioned
> error. Pls let me know how can I solve this.
>
> The Following Errors Occurred:
>
> Unable to send email: org.apache.ofbiz.service.ServiceValidationException:
> In field [bodyText] less-than (<) and greater-than (>) symbols are not
> allowed.
>
> On Fri, Jun 10, 2022 at 6:26 PM Avijit Bose  wrote:
>
>> Dear Sir,
>>
>> I am sending BIRT email as follows:
>> ---
>> dispatcher.runSync("sendBirtMail", UtilMisc.toMap(
>> "sendTo", supplierEmail,
>> "sendCc", sendCc,
>> "sendFrom", sendFrom,
>> "subject", subject,
>> "bodyText", body,
>> "contentType", "text/html",
>> "attachmentName", attachmentName,
>> "birtReportLocation", birtReportLocation,
>> "birtParameters", map,
>> "userLogin", userLogin
>> ));
>> ---
>>
>> Question: I am unable to send email body in HTML format. The above
>> "contentType", "text/html", is not working. When sending as "bodyText",
>> body, ... I am able to get the body in email but email body is showing up
>> as plain text.
>>
>> Pls let me know how could I send email body as HTML format in BIRT Email.
>>
>> regards
>> Avijit
>>
>>
>>


Re: BIRT Email

2022-06-10 Thread Avijit Bose
Dear Sir,

In connection to my previous email, I am getting the below mentioned error.
Pls let me know how can I solve this.

The Following Errors Occurred:

Unable to send email: org.apache.ofbiz.service.ServiceValidationException:
In field [bodyText] less-than (<) and greater-than (>) symbols are not
allowed.

On Fri, Jun 10, 2022 at 6:26 PM Avijit Bose  wrote:

> Dear Sir,
>
> I am sending BIRT email as follows:
> ---
> dispatcher.runSync("sendBirtMail", UtilMisc.toMap(
> "sendTo", supplierEmail,
> "sendCc", sendCc,
> "sendFrom", sendFrom,
> "subject", subject,
> "bodyText", body,
> "contentType", "text/html",
> "attachmentName", attachmentName,
> "birtReportLocation", birtReportLocation,
> "birtParameters", map,
> "userLogin", userLogin
> ));
> ---
>
> Question: I am unable to send email body in HTML format. The above
> "contentType", "text/html", is not working. When sending as "bodyText",
> body, ... I am able to get the body in email but email body is showing up
> as plain text.
>
> Pls let me know how could I send email body as HTML format in BIRT Email.
>
> regards
> Avijit
>
>
>


BIRT Email

2022-06-10 Thread Avijit Bose
Dear Sir,

I am sending BIRT email as follows:
---
dispatcher.runSync("sendBirtMail", UtilMisc.toMap(
"sendTo", supplierEmail,
"sendCc", sendCc,
"sendFrom", sendFrom,
"subject", subject,
"bodyText", body,
"contentType", "text/html",
"attachmentName", attachmentName,
"birtReportLocation", birtReportLocation,
"birtParameters", map,
"userLogin", userLogin
));
---

Question: I am unable to send email body in HTML format. The above
"contentType", "text/html", is not working. When sending as "bodyText",
body, ... I am able to get the body in email but email body is showing up
as plain text.

Pls let me know how could I send email body as HTML format in BIRT Email.

regards
Avijit


Correct setting of javascript file

2022-05-28 Thread Avijit Bose
Dear Sir,

I am trying hard to place my javascript file in screens, etc. Seen examples
but my application is not picking up my javascript file.

my javascript file location is..
plugins / my-app / webapp / my-app / js / script.js

Pls let me know exactly where I should keep the javascript tag and the pls
let me know the complete tag itself.

regards
Avijit


Re: Get Delegator

2022-05-26 Thread Avijit Bose
Dear Jacques,

Thank you. It worked.

Also referring to my previous email subject... "Referencing form field from
different table"... all issues got solved.

regards
Avijit

On Thu, May 26, 2022 at 5:48 PM Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:

> Hi Avijit,
>
> This should help you:
>
> https://cwiki.apache.org/confluence/display/OFBIZ/Variables+always+available+in+screen+context
>
> So you only need to pass "delegator" to your DataUtils::getCompanyName
> method, it's already present.
>
> To convince yourself, you may also look for "delegator" in "*een*.xml,
> *form*.xml"
>
> HTH
>
> Jacques
>
> Le 25/05/2022 à 15:38, Avijit Bose a écrit :
> > Dear Sir,
> >
> > I have a java class...
> > ---
> > public class DataUtils {
> >
> >   public static final String module = DataUtils.class.getName();
> >
> >   public static String getCompanyName(String customerId) {
> > Debug.logInfo("===customerId=", customerId);
> >
> > return customerId;
> >   }
> > ---
> >
> > I am calling this class from ...
> > 
> >  key-field-name="customerId"
> > description="${customerId} -
> > ${groovy:com.akm.exim.events.DataUtils.getCompanyName(customerId);}">
> > ---
> >
> > It's calling the class and working fine until now, but I have to make
> > a database query using this...
> > ---
> > GenericValue newlyCreatedValues99 = EntityQuery.use(delegator)
> >.from("AkmCustomer")
> >.where(EntityCondition.makeCondition("customerId",
> > EntityOperator.EQUALS, customerId))
> >.orderBy("customerId")
> >.queryOne();
> > ---
> >
> > Question: How do I get "Delegator" in the above java class without
> > passing 'HTTPRequest' or 'DispatchContext' in the
> > 'getCompanyName(String customerId)' method (I can only pass
> > customerId). Because I am calling the class from a FORM from where I
> > cannot pass 'HTTPRequest' or 'DispatchContext'.
> >
> > Pls help.
> > regards
> > Avijit
>
>


Re: Referencing form field from different table

2022-05-25 Thread Avijit Bose
Dear Sir,

I got the column value from entityB in the list which was referring entityA.

thank you
Avijit

On Tue, May 24, 2022 at 6:21 AM Avijit Bose  wrote:

> Dear Sir,
>
> No. It did not got me the desired result. The drop down remains blank.
> Probably because I have to search 'AkmMasterEnquiry' table in the
> search form as shown
> "  target="FindExportEnquiries" default-entity-name="AkmMasterEnquiry"> "
>
>
> To do it in another way...
>
> 1. Can we call the default search service " service-name="performFind"
> " using FTL? In other words how do i call 'performFind' from FTL?
> 2. And then get the return list named 'listIt' as shown in Minilang
> tag " result-map="result" result-map-list="listIt" " in the same FTL?
>
> Pls help.
> regards
> Avijit
>
> On Mon, May 23, 2022 at 10:24 PM Rishi Solanki 
> wrote:
> >
> > Dear Avijit,
> > 
> > 
> >  > key-field-name="customerId" description="${customerId} -
> ${customerAddress}
> > ">
> >  > env-name="customerId" />
> > 
> > 
> > 
> > 
> >
> > Above is the overall signature you can pass entity name and constraints
> as
> > you wish.
> >
> > Hope that helps!
> >
> > Best Regards,
> > --
> > Rishi Solanki
> > *CTO, Mindpath Technology*
> > Intelligent Solutions
> > cell: +91-98932-87847
> > LinkedIn <https://www.linkedin.com/in/rishi-solanki-62271b7/>
> >
> >
> > On Mon, May 23, 2022 at 4:45 PM Avijit Bose 
> wrote:
> >
> > > Dear Sir,
> > >
> > > Second Question: How do I get ${customerAddress} from
> > > 'AkmCustomerAddress' table in list fieldwhen the list is finding
> > > the table named "AkmCustomer".
> > >
> > > regards
> > > Avijit
> > >
> > > On Mon, May 23, 2022 at 2:34 PM Jacques Le Roux
> > >  wrote:
> > > >
> > > > Hi Avijit,
> > > >
> > > > I did not read all the details. Are you looking for "dependent
> > > drop-downs"? If yes, you may have a look at
> > > >
> > >
> https://demo-trunk.ofbiz.apache.org/example/control/FormWidgetExamples#DropDownFieldsExampleForm_dependendDropDownFields_title
> > > >
> > > > HTH
> > > >
> > > > Jacques
> > > >
> > > > Le 23/05/2022 à 10:31, Avijit Bose a écrit :
> > > > > Dear Sir,
> > > > > My customer entity is as follows:
> > > > > ---
> > > > >   > > > > package-name="com.akm.ofbiz.import" title="Customer Entity">
> > > > >  primary
> > > > > sequenced ID
> > > > >  
> > > > >  
> > > > >  
> > > > >  
> > > > > --
> > > > > Then I have a customer address entity as follows:
> > > > > 
> > > > >   > > > > package-name="com.akm.ofbiz.import" title="Customer Address
> Entity">
> > > > >   type="id">primary
> > > > > sequenced ID
> > > > >  
> > > > >  
> > > > >  
> > > > >  
> > > > >  
> > > > > 
> > > > >
> > > > > I have find form as follows. This find is from "AKMCustomer"
> entity.
> > > > > ---
> > > > >   > > > > target="FindCustomers" default-entity-name="AkmCustomer">
> > > > >  
> > > > >  
> > > > >  
> > > > >  > > current-description="">
> > > > >   > > > > description="${customerId} - ${customerAddress}"
> > > > > key-field-name="customerId" entity-name="AkmCustomer">
> > > > >   > > field-name="customer

Re: Calling java class from groovy error

2022-05-25 Thread Avijit Bose
Sir,
FYI to all...


description="${groovy:com.akm.exim.events.DataUtils.getcompanyName(customerId);}"
-


Pls note that the letter 'c' in 'getcompanyName' was in lowercase as shown
above in the description field. But the same letter 'c' in my java method
name was in uppercase 'getCompanyName(String format)' as shown below. I
changed the lowercase to uppercase in the description field and it resolved.


-
public static String getCompanyName(String format) {

Debug.logInfo("===format=", format);

 return format;
 }


regards
Avijit

On Wed, May 25, 2022 at 7:21 PM Daniel Watford  wrote:

> Hi Avijit,
>
> Please could you follow up with an explanation of what the cause of the
> problem was and how you solved it.
>
> Doing so will add to the ofbiz knowledge pool and will help others who
> might have similar issues in the future.
>
> Thanks,
>
> Dan.
>
> On Wed, 25 May 2022 at 14:30, Avijit Bose  wrote:
>
> > Dear Sir
> >
> > I got this.
> > thank you
> >
> > On Wed, May 25, 2022 at 4:17 PM Avijit Bose 
> wrote:
> > >
> > > Hello,
> > >
> > > My java class file...
> > > ---
> > > public class DataUtils {
> > >
> > >  public static final String module = DataUtils.class.getName();
> > >
> > >  public static String getCompanyName(String format) {
> > >
> > > Debug.logInfo("===format=", format);
> > >
> > >  return format;
> > >  }
> > > --
> > >
> > > I am calling this java class from this...
> > > ---
> > >  > key-field-name="customerId"
> > >
> >
> description="${groovy:com.akm.exim.events.DataUtils.getcompanyName(customerId);}">
> > > --
> > >
> > > Error in short 
> > > --
> > > 2022-05-25 15:57:52,536 |jsse-nio-8443-exec-1 |FlexibleStringExpander
> > >   |W| Error evaluating scriptlet
> > > [${groovy:com.akm.exim.events.DataUtils.getcompanyName(customerId);}];
> > > error was: groovy.lang.MissingMethodException: No signature of method:
> > > static com.akm.exim.events.DataUtils.getcompanyName() is applicable
> > > for argument types: (java.lang.String) values: [10046]
> > > Possible solutions: getCompanyName(java.lang.String)
> > > groovy.lang.MissingMethodException: No signature of method: static
> > > com.akm.exim.events.DataUtils.getcompanyName() is applicable for
> > > argument types: (java.lang.String) values: [10046]
> > > Possible solutions: getCompanyName(java.lang.String)
> > > at
> >
> groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1501)
> > > ~[groovy-all-2.4.13.jar:2.4.13]
> > > at
> > groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1487)
> > > ~[groovy-all-2.4.13.jar:2.4.13]
> > > at
> >
> org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:53)
> > > ~[groovy-all-2.4.13.jar:2.4.13]
> > > at
> >
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
> > > ~[groovy-all-2.4.13.jar:2.4.13]
> > > at
> > script16534660370052082802180.run(script16534660370052082802180.groovy:1)
> > > ~[?:?]
> > > --
> > >
> > > Pls let me know why this error is occuring?
> > >
> > > NOTE: There is an example in ofbiz in displaying the date field. I
> > > have followed that.
> > >
> > > regards
> > > Avijit
> >
>
>
> --
> Daniel Watford
>


Get Delegator

2022-05-25 Thread Avijit Bose
Dear Sir,

I have a java class...
---
public class DataUtils {

 public static final String module = DataUtils.class.getName();

 public static String getCompanyName(String customerId) {
Debug.logInfo("===customerId=", customerId);

return customerId;
 }
---

I am calling this class from ...


---

It's calling the class and working fine until now, but I have to make
a database query using this...
---
GenericValue newlyCreatedValues99 = EntityQuery.use(delegator)
  .from("AkmCustomer")
  .where(EntityCondition.makeCondition("customerId",
EntityOperator.EQUALS, customerId))
  .orderBy("customerId")
  .queryOne();
---

Question: How do I get "Delegator" in the above java class without
passing 'HTTPRequest' or 'DispatchContext' in the
'getCompanyName(String customerId)' method (I can only pass
customerId). Because I am calling the class from a FORM from where I
cannot pass 'HTTPRequest' or 'DispatchContext'.

Pls help.
regards
Avijit


Re: Calling java class from groovy error

2022-05-25 Thread Avijit Bose
Dear Sir

I got this.
thank you

On Wed, May 25, 2022 at 4:17 PM Avijit Bose  wrote:
>
> Hello,
>
> My java class file...
> ---
> public class DataUtils {
>
>  public static final String module = DataUtils.class.getName();
>
>  public static String getCompanyName(String format) {
>
> Debug.logInfo("===format=", format);
>
>  return format;
>  }
> --
>
> I am calling this java class from this...
> ---
>  description="${groovy:com.akm.exim.events.DataUtils.getcompanyName(customerId);}">
> --
>
> Error in short 
> --
> 2022-05-25 15:57:52,536 |jsse-nio-8443-exec-1 |FlexibleStringExpander
>   |W| Error evaluating scriptlet
> [${groovy:com.akm.exim.events.DataUtils.getcompanyName(customerId);}];
> error was: groovy.lang.MissingMethodException: No signature of method:
> static com.akm.exim.events.DataUtils.getcompanyName() is applicable
> for argument types: (java.lang.String) values: [10046]
> Possible solutions: getCompanyName(java.lang.String)
> groovy.lang.MissingMethodException: No signature of method: static
> com.akm.exim.events.DataUtils.getcompanyName() is applicable for
> argument types: (java.lang.String) values: [10046]
> Possible solutions: getCompanyName(java.lang.String)
> at 
> groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1501)
> ~[groovy-all-2.4.13.jar:2.4.13]
> at 
> groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1487)
> ~[groovy-all-2.4.13.jar:2.4.13]
> at 
> org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:53)
> ~[groovy-all-2.4.13.jar:2.4.13]
> at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
> ~[groovy-all-2.4.13.jar:2.4.13]
> at 
> script16534660370052082802180.run(script16534660370052082802180.groovy:1)
> ~[?:?]
> --
>
> Pls let me know why this error is occuring?
>
> NOTE: There is an example in ofbiz in displaying the date field. I
> have followed that.
>
> regards
> Avijit


Calling java class from groovy error

2022-05-25 Thread Avijit Bose
Hello,

My java class file...
---
public class DataUtils {

 public static final String module = DataUtils.class.getName();

 public static String getCompanyName(String format) {

Debug.logInfo("===format=", format);

 return format;
 }
--

I am calling this java class from this...
---

--

Error in short 
--
2022-05-25 15:57:52,536 |jsse-nio-8443-exec-1 |FlexibleStringExpander
  |W| Error evaluating scriptlet
[${groovy:com.akm.exim.events.DataUtils.getcompanyName(customerId);}];
error was: groovy.lang.MissingMethodException: No signature of method:
static com.akm.exim.events.DataUtils.getcompanyName() is applicable
for argument types: (java.lang.String) values: [10046]
Possible solutions: getCompanyName(java.lang.String)
groovy.lang.MissingMethodException: No signature of method: static
com.akm.exim.events.DataUtils.getcompanyName() is applicable for
argument types: (java.lang.String) values: [10046]
Possible solutions: getCompanyName(java.lang.String)
at 
groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1501)
~[groovy-all-2.4.13.jar:2.4.13]
at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1487)
~[groovy-all-2.4.13.jar:2.4.13]
at 
org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:53)
~[groovy-all-2.4.13.jar:2.4.13]
at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
~[groovy-all-2.4.13.jar:2.4.13]
at 
script16534660370052082802180.run(script16534660370052082802180.groovy:1)
~[?:?]
--

Pls let me know why this error is occuring?

NOTE: There is an example in ofbiz in displaying the date field. I
have followed that.

regards
Avijit


Re: Referencing form field from different table

2022-05-23 Thread Avijit Bose
Dear Sir,

No. It did not got me the desired result. The drop down remains blank.
Probably because I have to search 'AkmMasterEnquiry' table in the
search form as shown
"  "


To do it in another way...

1. Can we call the default search service " service-name="performFind"
" using FTL? In other words how do i call 'performFind' from FTL?
2. And then get the return list named 'listIt' as shown in Minilang
tag " result-map="result" result-map-list="listIt" " in the same FTL?

Pls help.
regards
Avijit

On Mon, May 23, 2022 at 10:24 PM Rishi Solanki  wrote:
>
> Dear Avijit,
> 
> 
>  key-field-name="customerId" description="${customerId} - ${customerAddress}
> ">
>  env-name="customerId" />
> 
> 
> 
> 
>
> Above is the overall signature you can pass entity name and constraints as
> you wish.
>
> Hope that helps!
>
> Best Regards,
> --
> Rishi Solanki
> *CTO, Mindpath Technology*
> Intelligent Solutions
> cell: +91-98932-87847
> LinkedIn <https://www.linkedin.com/in/rishi-solanki-62271b7/>
>
>
> On Mon, May 23, 2022 at 4:45 PM Avijit Bose  wrote:
>
> > Dear Sir,
> >
> > Second Question: How do I get ${customerAddress} from
> > 'AkmCustomerAddress' table in list fieldwhen the list is finding
> > the table named "AkmCustomer".
> >
> > regards
> > Avijit
> >
> > On Mon, May 23, 2022 at 2:34 PM Jacques Le Roux
> >  wrote:
> > >
> > > Hi Avijit,
> > >
> > > I did not read all the details. Are you looking for "dependent
> > drop-downs"? If yes, you may have a look at
> > >
> > https://demo-trunk.ofbiz.apache.org/example/control/FormWidgetExamples#DropDownFieldsExampleForm_dependendDropDownFields_title
> > >
> > > HTH
> > >
> > > Jacques
> > >
> > > Le 23/05/2022 à 10:31, Avijit Bose a écrit :
> > > > Dear Sir,
> > > > My customer entity is as follows:
> > > > ---
> > > >   > > > package-name="com.akm.ofbiz.import" title="Customer Entity">
> > > >  primary
> > > > sequenced ID
> > > >  
> > > >  
> > > >  
> > > >  
> > > > --
> > > > Then I have a customer address entity as follows:
> > > > 
> > > >   > > > package-name="com.akm.ofbiz.import" title="Customer Address Entity">
> > > >  primary
> > > > sequenced ID
> > > >  
> > > >  
> > > >  
> > > >  
> > > >  
> > > > 
> > > >
> > > > I have find form as follows. This find is from "AKMCustomer" entity.
> > > > ---
> > > >   > > > target="FindCustomers" default-entity-name="AkmCustomer">
> > > >  
> > > >  
> > > >  
> > > >  > current-description="">
> > > >   > > > description="${customerId} - ${customerAddress}"
> > > > key-field-name="customerId" entity-name="AkmCustomer">
> > > >   > field-name="customerId"/>
> > > >  
> > > >
> > > >  
> > > >   > > > title="${uiLabelMap.customerContactPerson}">
> > > >   > > > widget-style="smallSubmit">
> > > >   > > > image-location="/images/icons/magnifier.png"/>
> > > >  
> > > >  
> > > > ---
> > > > Request question 1: How do I get the '${customerAddress}' value from
> > > > 'AkmCustomerAddress' entity in the above drop down list with
> > > > 'customerId' as the key value?
> > > >
> > > > Then I have list form as follows corresponding to the above find form:
> > > > ---
> > > >
> > > >   > > > paginate-target="FindCustomers"
> > > >  default-entity-name="AkmCustomer" separate-columns="true"
> > > > odd-row-style="alternate-row"
> > > >  header-row-style="header-row-2"
> > > > default-table-style="basic-table hover-bar">
> > > >  
> > > >  
> > > >   > > > result-map-list="listIt">
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > >  > > > sort-field="false">
> > > >  > > > sort-field="false">
> > > >  > > > sort-field="false">
> > > >  > > > sort-field="false">
> > > >   
> > > > ---
> > > > Request question 2: Again how do I get the 'customerAddress' field
> > > > value in the list with 'customerId' as the key?
> > > >
> > > > In short how do I get a value from a second entity in a dropdown and
> > > > list form field with a first entity key value as a reference in the
> > > > second table.
> > > >
> > > > regards
> > > > Avijit Bose
> > >
> >


Re: Referencing form field from different table

2022-05-23 Thread Avijit Bose
Dear Sir,

Second Question: How do I get ${customerAddress} from
'AkmCustomerAddress' table in list fieldwhen the list is finding
the table named "AkmCustomer".

regards
Avijit

On Mon, May 23, 2022 at 2:34 PM Jacques Le Roux
 wrote:
>
> Hi Avijit,
>
> I did not read all the details. Are you looking for "dependent drop-downs"? 
> If yes, you may have a look at
> https://demo-trunk.ofbiz.apache.org/example/control/FormWidgetExamples#DropDownFieldsExampleForm_dependendDropDownFields_title
>
> HTH
>
> Jacques
>
> Le 23/05/2022 à 10:31, Avijit Bose a écrit :
> > Dear Sir,
> > My customer entity is as follows:
> > ---
> >   > package-name="com.akm.ofbiz.import" title="Customer Entity">
> >  primary
> > sequenced ID
> >  
> >  
> >  
> >  
> > --
> > Then I have a customer address entity as follows:
> > 
> >   > package-name="com.akm.ofbiz.import" title="Customer Address Entity">
> >  primary
> > sequenced ID
> >  
> >  
> >  
> >  
> >  
> > 
> >
> > I have find form as follows. This find is from "AKMCustomer" entity.
> > ---
> >   > target="FindCustomers" default-entity-name="AkmCustomer">
> >  
> >  
> >  
> >  > current-description="">
> >   > description="${customerId} - ${customerAddress}"
> > key-field-name="customerId" entity-name="AkmCustomer">
> >   > field-name="customerId"/>
> >  
> >
> >  
> >   > title="${uiLabelMap.customerContactPerson}">
> >   > widget-style="smallSubmit">
> >   > image-location="/images/icons/magnifier.png"/>
> >  
> >  
> > ---
> > Request question 1: How do I get the '${customerAddress}' value from
> > 'AkmCustomerAddress' entity in the above drop down list with
> > 'customerId' as the key value?
> >
> > Then I have list form as follows corresponding to the above find form:
> > ---
> >
> >   > paginate-target="FindCustomers"
> >  default-entity-name="AkmCustomer" separate-columns="true"
> > odd-row-style="alternate-row"
> >      header-row-style="header-row-2"
> > default-table-style="basic-table hover-bar">
> >  
> >  
> >   > result-map-list="listIt">
> > 
> > 
> > 
> > 
> > 
> > 
> >  > sort-field="false">
> >  > sort-field="false">
> >  > sort-field="false">
> >  > sort-field="false">
> >   
> > ---
> > Request question 2: Again how do I get the 'customerAddress' field
> > value in the list with 'customerId' as the key?
> >
> > In short how do I get a value from a second entity in a dropdown and
> > list form field with a first entity key value as a reference in the
> > second table.
> >
> > regards
> > Avijit Bose
>


Re: Referencing form field from different table

2022-05-23 Thread Avijit Bose
Dear Sir,

No. I am not looking at 'dependent drop downs'.

To make it simple... I have a dropdown like this...
---







---
In the ''...pls note that the entity-name is
''AkmCustomer" where 'customerId' is primary key. Getting
${customerId} from 'AkmCustomer' table. But I have to get
${customerAddress} from "AkmCustomerAddress" table which is different
from "AkmCustomer". ${customerId} and ${customerAddress} fields are
not dependent on each other.

The field "${customerAddress}" is coming from a different entity where
'customerId' is a foreign key. Its entity-name is
"AkmCustomerAddress".

Question: how do I get the  ${customerAddress} from
"AkmCustomerAddress" table name when my drop down table name is
"AkmCustomer"?

On Mon, May 23, 2022 at 2:34 PM Jacques Le Roux
 wrote:
>
> Hi Avijit,
>
> I did not read all the details. Are you looking for "dependent drop-downs"? 
> If yes, you may have a look at
> https://demo-trunk.ofbiz.apache.org/example/control/FormWidgetExamples#DropDownFieldsExampleForm_dependendDropDownFields_title
>
> HTH
>
> Jacques
>
> Le 23/05/2022 à 10:31, Avijit Bose a écrit :
> > Dear Sir,
> > My customer entity is as follows:
> > ---
> >   > package-name="com.akm.ofbiz.import" title="Customer Entity">
> >  primary
> > sequenced ID
> >  
> >  
> >  
> >  
> > --
> > Then I have a customer address entity as follows:
> > 
> >   > package-name="com.akm.ofbiz.import" title="Customer Address Entity">
> >  primary
> > sequenced ID
> >  
> >  
> >  
> >  
> >  
> > 
> >
> > I have find form as follows. This find is from "AKMCustomer" entity.
> > ---
> >   > target="FindCustomers" default-entity-name="AkmCustomer">
> >  
> >  
> >  
> >  > current-description="">
> >   > description="${customerId} - ${customerAddress}"
> > key-field-name="customerId" entity-name="AkmCustomer">
> >   > field-name="customerId"/>
> >  
> >
> >  
> >   > title="${uiLabelMap.customerContactPerson}">
> >   > widget-style="smallSubmit">
> >   > image-location="/images/icons/magnifier.png"/>
> >  
> >  
> > ---
> > Request question 1: How do I get the '${customerAddress}' value from
> > 'AkmCustomerAddress' entity in the above drop down list with
> > 'customerId' as the key value?
> >
> > Then I have list form as follows corresponding to the above find form:
> > ---
> >
> >   > paginate-target="FindCustomers"
> >  default-entity-name="AkmCustomer" separate-columns="true"
> > odd-row-style="alternate-row"
> >  header-row-style="header-row-2"
> > default-table-style="basic-table hover-bar">
> >  
> >  
> >   > result-map-list="listIt">
> > 
> > 
> > 
> > 
> > 
> > 
> >  > sort-field="false">
> >  > sort-field="false">
> >  > sort-field="false">
> >  > sort-field="false">
> >   
> > ---
> > Request question 2: Again how do I get the 'customerAddress' field
> > value in the list with 'customerId' as the key?
> >
> > In short how do I get a value from a second entity in a dropdown and
> > list form field with a first entity key value as a reference in the
> > second table.
> >
> > regards
> > Avijit Bose
>


Referencing form field from different table

2022-05-23 Thread Avijit Bose
Dear Sir,
My customer entity is as follows:
---

primary
sequenced ID




--
Then I have a customer address entity as follows:


primary
sequenced ID







I have find form as follows. This find is from "AKMCustomer" entity.
---




   



  






---
Request question 1: How do I get the '${customerAddress}' value from
'AkmCustomerAddress' entity in the above drop down list with
'customerId' as the key value?

Then I have list form as follows corresponding to the above find form:
---















 
---
Request question 2: Again how do I get the 'customerAddress' field
value in the list with 'customerId' as the key?

In short how do I get a value from a second entity in a dropdown and
list form field with a first entity key value as a reference in the
second table.

regards
Avijit Bose


Re: List table field width or column size

2022-05-18 Thread Avijit Bose
Thank you Sir.

On Wed, May 18, 2022 at 12:51 PM Nicolas Malin  wrote:
>
> Yes use size attribute on the child element of the field
> Nicolas
>
> On 17/05/2022 04:01, Avijit Bose wrote:
>
> Hello Sir,
>
> I am using lots of List table after performFind in ofbiz. When a
> certain column data is long...it pushes the entire table leftward or
> rightward disturbing the table UI. Is it possible to set the column
> width or size for individual field in find list?
>
> regards
> Avijit
>
>


List table field width or column size

2022-05-16 Thread Avijit Bose
Hello Sir,

I am using lots of List table after performFind in ofbiz. When a
certain column data is long...it pushes the entire table leftward or
rightward disturbing the table UI. Is it possible to set the column
width or size for individual field in find list?

regards
Avijit


Re: Unable to hyperlink external URL from ofbiz form list

2022-05-16 Thread Avijit Bose
Dear Sir,

FYI...I have done it through the following way.

My solution...

controller.xml
_






_

CallExternalWebsite java file
--
public class CallExternalWebsite {
public static final String module = CallExternalWebsite.class.getName();
public static String callExternalWebsite(HttpServletRequest request,
HttpServletResponse response) {

Map parameters = UtilHttp.getParameterMap(request); //
To get parameters from ftl file

String url = parameters.get("customerWebsite").toString().trim();
String os = System.getProperty("os.name").toLowerCase();
Runtime rt = Runtime.getRuntime();

Debug.logInfo("===url=", url);

try {
if (os.indexOf( "win" ) >= 0) {
rt.exec( "rundll32 url.dll, FileProtocolHandler " + url);
//pls read this. this opens up new browser window
} else if (os.indexOf( "mac" ) >= 0) { // for Mac
rt.exec( "open " + url);
}
   else if (os.indexOf( "nix") >=0 || os.indexOf( "nux") >=0) { // for unix
String[] browsers = {"epiphany", "firefox", "mozilla",
"konqueror", "netscape","opera","links","lynx"};
StringBuffer cmd = new StringBuffer();
for (int i=0; i

















---

List view form
-















 
-

Result: on find... the table shows up the rows. on clicking the
customerWebsite on each row, it is opening up a new window and taking
me to the respective url.

Thank you for your kind help.

regards
Avijit

On Sat, May 7, 2022 at 1:18 PM Jacques Le Roux
 wrote:
>
> Hi,
>
> That's why I recommended initially to read the "documentation", ie the 
> related content in site-conf.xsd:
>
>  
>  
>  
>  Any URL, relative or absolute. Redirected 
> parameters are not used, you can put them in the url.
>  
>  
>  
>  
>  
>  
>  Works like URL but you can also pass 
> redirected parameters.
>  
>  
>  
>
> As you can see these features don't allow dynamic URLs. What you can do is 
> something like:
>
>  
>   value="https://github.com/apache/ofbiz-framework"/> (here you need to 
> dynamically set the value, like by using
> "${groovy:", see examples in code - none about URL though)
>  
>
> [...]
>
> 
>   description="${supplierWebsite}" also-hidden="false"/>
> 
>
> I did not try it, but it should work.
>
> HTH
>
> Jacques
>
> Le 07/05/2022 à 05:52, Avijit Bose a écrit :
> > Hello Sir,
> >
> > Your " > value="https://github.com/apache/ofbiz-framework"/>" is working. It is
> > going to the external site, but the value is hard coded as
> > "https://github.com/apache/ofbiz-framework";.
> >
> > I am trying to set this value like thisbut unable to set the
> > supplierWebsite value in the "value" field.
> >
> > 
> >  
> >  
> >
> >  
> > 
> >
> > My form is like this...
> >
> > 
> >   > description="${supplierWebsite}" also-hidden="false">
> >   
> >  
> > 
> >
> > How can I set dynamic value in the "value" attribute of the "response"
> > tag? Pls help.
> >
> > On Fri, May 6, 2022 at 12:46 PM Jacques Le Roux
> >   wrote:
> >> Hi,
> >>
> >> You can do something like that in your controller
> >>
> >>   
> >>   
> >>>> value="https://github.com/apache/ofbiz-framework"/>
> >>   
> >>
> >> Jacques
> >>
> >> Le 06/05/2022 à 03:11, Avijit Bose a écrit :
> >>> Dear Sir,
> >>>
> >>> Unable to do so. Pls help with the code.

Re: Unable to hyperlink external URL from ofbiz form list

2022-05-16 Thread Avijit Bose
Dear Sir,

I have done it through the following way, though there is an error
which I will mention at the last.

My solution...

controller.xml
_






_

CallExternalWebsite java file
--
public class CallExternalWebsite {
public static final String module = CallExternalWebsite.class.getName();

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

//Delegator delegator = (Delegator) request.getAttribute("delegator");
 //LocalDispatcher dispatcher = (LocalDispatcher)
request.getAttribute("dispatcher");
 //GenericValue userLogin = (GenericValue)
request.getSession().getAttribute("userLogin");
//Map result = ServiceUtil.returnSuccess();

Map parameters = UtilHttp.getParameterMap(request); //
To get parameters from ftl file

String url = parameters.get("customerWebsite").toString().trim();
String os = System.getProperty("os.name").toLowerCase();
 Runtime rt = Runtime.getRuntime();

Debug.logInfo("===url=", url);

try {
if (os.indexOf( "win" ) >= 0) {
// this doesn't support showing urls in the form of "page.html#nameLink"
rt.exec( "rundll32 url.dll, FileProtocolHandler " + url);
} else if (os.indexOf( "mac" ) >= 0) {
rt.exec( "open " + url);
} else if (os.indexOf( "nix") >=0 || os.indexOf( "nux") >=0) {
// Do a best guess on unix until we get a platform independent way
// Build a list of browsers to try, in this order.
String[] browsers = {"epiphany", "firefox", "mozilla", "konqueror",
 "netscape","opera","links","lynx"};
// Build a command string which looks like "browser1 "url" ||
browser2 "url" ||..."
StringBuffer cmd = new StringBuffer();
for (int i=0; i wrote:
>
> Hi,
>
> That's why I recommended initially to read the "documentation", ie the 
> related content in site-conf.xsd:
>
>  
>  
>  
>  Any URL, relative or absolute. Redirected 
> parameters are not used, you can put them in the url.
>  
>  
>  
>  
>  
>  
>  Works like URL but you can also pass 
> redirected parameters.
>  
>  
>  
>
> As you can see these features don't allow dynamic URLs. What you can do is 
> something like:
>
>  
>   value="https://github.com/apache/ofbiz-framework"/> (here you need to 
> dynamically set the value, like by using
> "${groovy:", see examples in code - none about URL though)
>  
>
> [...]
>
> 
>   description="${supplierWebsite}" also-hidden="false"/>
> 
>
> I did not try it, but it should work.
>
> HTH
>
> Jacques
>
> Le 07/05/2022 à 05:52, Avijit Bose a écrit :
> > Hello Sir,
> >
> > Your " > value="https://github.com/apache/ofbiz-framework"/>" is working. It is
> > going to the external site, but the value is hard coded as
> > "https://github.com/apache/ofbiz-framework";.
> >
> > I am trying to set this value like thisbut unable to set the
> > supplierWebsite value in the "value" field.
> >
> > 
> >  
> >  
> >    
> >  
> > 
> >
> > My form is like this...
> >
> > 
> >   > description="${supplierWebsite}" also-hidden="false">
> >   
> >  
> > 
> >
> > How can I set dynamic value in the "value" attribute of the "response"
> > tag? Pls help.
> >
> > On Fri, May 6, 2022 at 12:46 PM Jacques Le Roux
> >   wrote:
> >> Hi,
> >>
> >> You can do something like that in your controller
> >>
> >>   
> >>   
> >>>> value="https://github.com/apache/ofbiz-framework"/>
> >>   
> >>
> >> Jacques
> >>
> >> Le 06/05/2022 à 03:11, Avijit Bose a écrit :
> >>> Dear Sir,
&g

Re: Ofbiz FIND Constraints

2022-05-14 Thread Avijit Bose
Dear Sir,

Can I get the target return from the performFind to a .FTL page.

regards
Avijit

On Fri, May 13, 2022 at 5:31 PM Nicolas Malin  wrote:
>
>  target="FindDomesticCustomers">
>
>
> 
>
> And your target return on form with performFind like 
> applications/order/widget/ordermgr/FieldLookupForms.xml#ListLookupOrderHeader
>
> Nicolas
>
> On 13/05/2022 06:27, Avijit Bose wrote:
> > Hello,
> >
> > Presently I am using FIND as mentioned below:
> > ---
> >  > target="FindDomesticCustomers" default-entity-name="AkmCustomer">
> >   
> > 
> > 
> > 
> >  > key-field-name="customerId" entity-name="AkmCustomer">
> >  > value="Domestic"/>
> > 
> > 
> > 
> > 
> >  > widget-style="smallSubmit">
> >  > image-location="/images/icons/magnifier.png"/>
> > 
> > 
> > --
> >
> > I need to put some entity constraints in FETCHING rows from the
> > AkmCustomer entity. Like ' where customerTypeId = 'Domestic' '.
> >
> > Pls let me know how to put the constraints in the search form. So that
> > when I click the 'Find' button with noConditionFind = Y, the list
> > should show only rows whose   " customerTypeId = ''Domestic" ".
> >
> > Pls help.
> >
> > regards
> > Avijit
>


FIND return in FTL file

2022-05-14 Thread Avijit Bose
Dear Sir,

My find form is as follows:
-










-

I am getting the find result in a List form as shown below:
















listing.ftl
---



  ${uiLabelMap.customerContactPerson}



<#list domesticCustomerList as domCustomer>

  ${domCustomer.customerContactPerson!}




---

My query :: Instead of getting the find result in the list form as
mentioned above, is it possible to get the find result list in a FTL
page as shown above. In other words ... how do I populate the find
return in a FTL page.

regards
Avijit


Re: Ofbiz FIND Constraints

2022-05-13 Thread Avijit Bose
Dear Sir,

It worked. Thank you very much. Have a nice day.

regards
Avijit

On Fri, May 13, 2022 at 5:31 PM Nicolas Malin  wrote:
>
>  target="FindDomesticCustomers">
>
>
> 
>
> And your target return on form with performFind like 
> applications/order/widget/ordermgr/FieldLookupForms.xml#ListLookupOrderHeader
>
> Nicolas
>
> On 13/05/2022 06:27, Avijit Bose wrote:
> > Hello,
> >
> > Presently I am using FIND as mentioned below:
> > ---
> >  > target="FindDomesticCustomers" default-entity-name="AkmCustomer">
> >   
> > 
> > 
> > 
> >  > key-field-name="customerId" entity-name="AkmCustomer">
> >  > value="Domestic"/>
> > 
> > 
> > 
> > 
> >  > widget-style="smallSubmit">
> >  > image-location="/images/icons/magnifier.png"/>
> > 
> > 
> > --
> >
> > I need to put some entity constraints in FETCHING rows from the
> > AkmCustomer entity. Like ' where customerTypeId = 'Domestic' '.
> >
> > Pls let me know how to put the constraints in the search form. So that
> > when I click the 'Find' button with noConditionFind = Y, the list
> > should show only rows whose   " customerTypeId = ''Domestic" ".
> >
> > Pls help.
> >
> > regards
> > Avijit
>


Ofbiz FIND Constraints

2022-05-12 Thread Avijit Bose
Hello,

Presently I am using FIND as mentioned below:
---

  













--

I need to put some entity constraints in FETCHING rows from the
AkmCustomer entity. Like ' where customerTypeId = 'Domestic' '.

Pls let me know how to put the constraints in the search form. So that
when I click the 'Find' button with noConditionFind = Y, the list
should show only rows whose   " customerTypeId = ''Domestic" ".

Pls help.

regards
Avijit


Help needed - Ofbiz Find from list

2022-05-12 Thread Avijit Bose
Hello,

First: I have a list in the groovy file which as follows:

EntityCondition condition1 = EntityCondition.makeCondition(
EntityCondition.makeCondition("customerTypeId", "Domestic")
)
List domesticCustomerList = from("AkmCustomer").where(condition1).queryList();
context.domesticCustomerList = domesticCustomerList;
---

Second: I have a search form which is mentioned below. I am referring
to the above list "domesticCustomerList " as  '
list-name="domesticCustomerList" ' in the below mentioned form both in
the  tag and in the  tags. It is showing the
entries from the "domesticCustomerList".
---





















---

Third: I have a list form as mentioned below.
---



   
   
   
   
   




---

Problem: I am not able to search items from the '
list-name="domesticCustomerList" ' when clicking the 'Find' button.

Please help.

regards
Avijit


Re: Unable to hyperlink external URL from ofbiz form list

2022-05-06 Thread Avijit Bose
Hello Sir,

Your "https://github.com/apache/ofbiz-framework"/>" is working. It is
going to the external site, but the value is hard coded as
"https://github.com/apache/ofbiz-framework";.

I am trying to set this value like thisbut unable to set the
supplierWebsite value in the "value" field.




  



My form is like this...



 



How can I set dynamic value in the "value" attribute of the "response"
tag? Pls help.

On Fri, May 6, 2022 at 12:46 PM Jacques Le Roux
 wrote:
>
> Hi,
>
> You can do something like that in your controller
>
>  
>  
>   value="https://github.com/apache/ofbiz-framework"/>
>  
>
> Jacques
>
> Le 06/05/2022 à 03:11, Avijit Bose a écrit :
> > Dear Sir,
> >
> > Unable to do so. Pls help with the code.
> >
> > regards
> > Avijit
> >
> > On Thu, May 5, 2022 at 11:52 AM Jacques Le Roux
> >  wrote:
> >> Hi Avijit
> >>
> >> TL;DR: use the "url" response type
> >>
> >> You could have helped yourself. If you look into a controller file you 
> >> will see its related schemaLocation: site-conf.xsd
> >>
> >> In site-conf.xsd you can find under response element (for reques-map 
> >> element) the possible types, "url" is there explained.
> >>
> >> A faster way, if you use an IDE (I guess you do), is to hover over the 
> >> reques-map response type and you will see "url", though there there is no
> >> explanation shown
> >>
> >> HTH
> >>
> >> Jacques
> >>
> >> Le 05/05/2022 à 03:59, Avijit Bose a écrit :
> >>> Hello,
> >>>
> >>> My form list is as follows:
> >>> 
> >>>  >>> paginate-target="FindSuppliers"
> >>>   default-entity-name="AkmSupplier" separate-columns="true"
> >>> odd-row-style="alternate-row"
> >>>   header-row-style="header-row-2"
> >>> default-table-style="basic-table hover-bar">
> >>>   
> >>>   >>> result-map-list="listIt">
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>>       
> >>>
> >>>>>> title="${uiLabelMap.supplierWebsite}">
> >>>>>> also-hidden="false">
> >>>   
> >>>   
> >>>   
> >>>   
> >>> -
> >>>
> >>> ${supplierWebsite} in the above form is http://www.abconsultancy.co.in
> >>> which is an external website.
> >>>
> >>> While clicking the above link in the form, it is taking through the
> >>> controller. I want to open the external website directly bypassing the
> >>> controller and in a different window.
> >>>
> >>> Pls help.
> >>>
> >>> regards
> >>> Avijit Bose
>


Re: Help required in Ofbiz development - Unable to retrieve parameter using HTTPRequest

2022-05-05 Thread Avijit Bose
I understood your suggestion. But for knowledge sake i have to
pass the field hidden else the fields or parameters will not be
available in the java class. As I am calling request.getParameters
method it is expecting some parameters.

Is it so that all the form fields/parameters are available to the
corresponding class file by default in ofbiz?

Pls clarify.

On Tue, May 3, 2022 at 8:18 PM Scott Gray  wrote:
>
> Your form contains duplicate inputs for each of your field names, one
> hidden for each and one visible (date, number etc.).
>
> When this is submitted, the duplicates will be combined into an array of
> values for the given parameter name.
>
> ServletRequest#getParameter will only return the FIRST value in the array
> (i.e. your empty hidden inputs).
>
> See the servlet spec for more info, section 3.1:
> https://javaee.github.io/servlet-spec/downloads/servlet-4.0/servlet-4_0_FINAL.pdf
>
> Regards
> Scott
>
> On Thu, 28 Apr 2022 at 04:49, Avijit Bose  wrote:
>
> > My code is as follows:
> >
> > “finalizeLC.ftl”
> >  
> > 
> >>  name="finalizeLCUpdate" id="finalizeLCUpdate">
> >
> >
> >
> >
> >
> >
> >  
> > 
> >   
> > 
> > 
> > 
> > > for="LcReceiveDate">${uiLabelMap.LcReceiveDate} 
> > 
> > 
> > > style="background-color:#D6F2FF" value="${LcReceiveDate!}" required>
> > 
> > 
> >   
> >   
> > 
> > 
> > 
> > > for="countDownDays">${uiLabelMap.countDownDays} 
> > 
> > 
> > > name="countDownDays" style="background-color:#D6F2FF"
> > value="${countDownDays!}" required>
> > 
> > 
> >   
> > 
> > 
> > 
> > 
> > > for="remarks">${uiLabelMap.remarks} 
> > 
> > 
> >   > value="${remarks!}" name="remarks" size="100"
> > style="background-color:#D6F2FF" required>
> > 
> > 
> >   
> > 
> >   
> >
> >  
> > 
> >   
> > 
> > 
> > 
> >
> > 
> > 
> >
> >   > value="Submit">${uiLabelMap.finalizeLC}
> >
> > 
> >   
> > 
> >   
> > 
> > 
> >
> >
> > “UpdateLCServices.java and method finalizeLCUpdate”
> >
> > 
> >public static String finalizeLCUpdate(HttpServletRequest
> > request, HttpServletResponse response) {
> >
> >   Delegator delegator = (Delegator)
> > request.getAttribute("delegator");
> >
> >   String LcReceiveDate =
> > request.getParameter("LcReceiveDate").trim();
> >  String countDownDays =
> > request.getParameter("countDownDays").trim();
> >       String remarks =
> > request.getParameter("remarks").trim();
> >
> >  Debug.logInfo("===LcReceiveDate=",
> > LcReceiveDate);
> >  Debug.logInfo("===countDownDays=",
> > countDownDays);
> >  Debug.logInfo("===remarks=", remarks);
> >}
> >
> >
> > “Controller”
> > 
> > 
> > 
> >  > invoke="finalizeLCUpdate"/>
> > 
> > 
> >
> >
> > I am passing hidden values from the “finalizeLC.ftl” file and unable
> > to retrieve data in the java class “UpdateLCServices.java and method
> > finalizeLCUpdate”. Debug.loginfo showing null values.
> >
> > Pls help in how to pass form parameter values to ftl java class in Ofbiz.
> >
> > Regards
> > Avijit Bose
> >


Re: Unable to hyperlink external URL from ofbiz form list

2022-05-05 Thread Avijit Bose
Dear Sir,

Unable to do so. Pls help with the code.

regards
Avijit

On Thu, May 5, 2022 at 11:52 AM Jacques Le Roux
 wrote:
>
> Hi Avijit
>
> TL;DR: use the "url" response type
>
> You could have helped yourself. If you look into a controller file you will 
> see its related schemaLocation: site-conf.xsd
>
> In site-conf.xsd you can find under response element (for reques-map element) 
> the possible types, "url" is there explained.
>
> A faster way, if you use an IDE (I guess you do), is to hover over the 
> reques-map response type and you will see "url", though there there is no
> explanation shown
>
> HTH
>
> Jacques
>
> Le 05/05/2022 à 03:59, Avijit Bose a écrit :
> > Hello,
> >
> > My form list is as follows:
> > 
> >  > paginate-target="FindSuppliers"
> >  default-entity-name="AkmSupplier" separate-columns="true"
> > odd-row-style="alternate-row"
> >  header-row-style="header-row-2"
> > default-table-style="basic-table hover-bar">
> >  
> >  > result-map-list="listIt">
> > 
> > 
> > 
> > 
> > 
> > 
> >  
> >
> >   > title="${uiLabelMap.supplierWebsite}">
> >   > also-hidden="false">
> >  
> >  
> >  
> >  
> > -----
> >
> > ${supplierWebsite} in the above form is http://www.abconsultancy.co.in
> > which is an external website.
> >
> > While clicking the above link in the form, it is taking through the
> > controller. I want to open the external website directly bypassing the
> > controller and in a different window.
> >
> > Pls help.
> >
> > regards
> > Avijit Bose
>


Unable to hyperlink external URL from ofbiz form list

2022-05-04 Thread Avijit Bose
Hello,

My form list is as follows:



   














-

${supplierWebsite} in the above form is http://www.abconsultancy.co.in
which is an external website.

While clicking the above link in the form, it is taking through the
controller. I want to open the external website directly bypassing the
controller and in a different window.

Pls help.

regards
Avijit Bose


Re: Help required in Ofbiz development - Unable to retrieve parameter using HTTPRequest

2022-04-28 Thread Avijit Bose
Hello Nicolas,

Could you pls give me an example or some piece of code of how to use
“raw method to resolve parameters from the request”?

I am sending you this reply again because I had sent it in html format
which the server refused.

regards
Avijit Bose

On Thu, Apr 28, 2022 at 7:29 PM Avijit Bose  wrote:
>
> Hello Sir,
>
>
>
> Could you pls show me an example of how to use “raw method to resolve 
> parameters from the request”?
>
>
>
> regards
>
>
>
> Sent from Mail for Windows
>
>
>
> From: Nicolas Malin
> Sent: 28 April 2022 12:19 PM
> To: user@ofbiz.apache.org
> Subject: Re: Help required in Ofbiz development - Unable to retrieve 
> parameter using HTTPRequest
>
>
>
> Hello,
>
>
>
> You use a raw method to resolve parameters from the request.
>
>
>
> I suggest that the problem came from the form html definition. When you
>
> submit do you analyzed the request send by your browser ? (F12 ->
>
> Network on firefox)
>
>
>
> Nicolas
>
>
>
> On 28/04/2022 05:48, Avijit Bose wrote:
>
> > My code is as follows:
>
> >
>
> > “finalizeLC.ftl”
>
> >  
>
> > 
>
> >   
> >  name="finalizeLCUpdate" id="finalizeLCUpdate">
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >  
>
> > 
>
> >   
>
> > 
>
> > 
>
> > 
>
> >
> > for="LcReceiveDate">${uiLabelMap.LcReceiveDate} 
>
> > 
>
> > 
>
> >
> > style="background-color:#D6F2FF" value="${LcReceiveDate!}" required>
>
> > 
>
> > 
>
> >   
>
> >   
>
> > 
>
> > 
>
> > 
>
> >
> > for="countDownDays">${uiLabelMap.countDownDays} 
>
> > 
>
> > 
>
> >
> > name="countDownDays" style="background-color:#D6F2FF"
>
> > value="${countDownDays!}" required>
>
> > 
>
> > 
>
> >   
>
> > 
>
> > 
>
> > 
>
> > 
>
> >
> > for="remarks">${uiLabelMap.remarks} 
>
> > 
>
> > 
>
> >  
> > value="${remarks!}" name="remarks" size="100"
>
> > style="background-color:#D6F2FF" required>
>
> > 
>
> > 
>
> >   
>
> > 
>
> >   
>
> >
>
> >  
>
> > 
>
> >   
>
> > 
>
> > 
>
> > 
>
> >
>
> > 
>
> > 
>
> >
>
> >  
> > value="Submit">${uiLabelMap.finalizeLC}
>
> >
>
> > 
>
> >   
>
> > 
>
> >   
>
> > 
>
> > 
>
> >
>
> >
>
> > “UpdateLCServices.java and method finalizeLCUpdate”
>
> > 
>
> >public static String finalizeLCUpdate(HttpServletRequest
>
> > request, HttpServletResponse response) {
>
> >
>
> >   Delegator delegator = (Delegator)
>
> > request.getAttribute("delegator");
>
> >
>
> >   String LcReceiveDate =
>
> > request.getParameter("LcReceiveDate").trim();
>
> >  String countDownDays =
>
> > request.getParameter("countDownDays").trim();
>
> >   String remarks = 
> > request.getParameter("remarks").trim();
>
> >
>
> >  Debug.logInfo("===LcReceiveDate=",
>
> > LcReceiveDate);
>
> >  Debug.logInfo("===countDownDays=",
>
> > countDownDays);
>
> >  Debug.logInfo("===remarks=", remarks);
>
> >}
>
> >
>
> >
>
> > “Controller”
>
> > 
>
> > 
>
> > 
>
> > 
> > invoke="finalizeLCUpdate"/>
>
> > 
>
> > 
>
> >
>
> >
>
> > I am passing hidden values from the “finalizeLC.ftl” file and unable
>
> > to retrieve data in the java class “UpdateLCServices.java and method
>
> > finalizeLCUpdate”. Debug.loginfo showing null values.
>
> >
>
> > Pls help in how to pass form parameter values to ftl java class in Ofbiz.
>
> >
>
> > Regards
>
> > Avijit Bose
>
>
>
>


Help required in Ofbiz development - Unable to retrieve parameter using HTTPRequest

2022-04-27 Thread Avijit Bose
My code is as follows:

“finalizeLC.ftl”
 

  

   
   
   


 

  



   ${uiLabelMap.LcReceiveDate} 


   


  
  



   ${uiLabelMap.countDownDays} 


   


  




   ${uiLabelMap.remarks} 


 


  

  

 

  







 ${uiLabelMap.finalizeLC}
   

  

  




“UpdateLCServices.java and method finalizeLCUpdate”

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

  Delegator delegator = (Delegator)
request.getAttribute("delegator");

  String LcReceiveDate =
request.getParameter("LcReceiveDate").trim();
 String countDownDays =
request.getParameter("countDownDays").trim();
  String remarks = request.getParameter("remarks").trim();

 Debug.logInfo("===LcReceiveDate=",
LcReceiveDate);
 Debug.logInfo("===countDownDays=",
countDownDays);
 Debug.logInfo("===remarks=", remarks);
   }


“Controller”








I am passing hidden values from the “finalizeLC.ftl” file and unable
to retrieve data in the java class “UpdateLCServices.java and method
finalizeLCUpdate”. Debug.loginfo showing null values.

Pls help in how to pass form parameter values to ftl java class in Ofbiz.

Regards
Avijit Bose


Help needed for Ofbiz version 17.12 Update operation

2020-12-17 Thread Avijit Bose
Hello,

I am new to ofbiz and trying to get CRUD operation run. I have
completed insert and delete operation.

Issue: The update operation is taking me to a new page.

Details are as follows:

Services.xml
-

Update Supplier




===
Controller.xml
--








===

ImportScreens.xml
-
















==

ImportForms.xml
--






















==

My issue: When 'Update' button is clicked, Database is getting updated
but the landing page is going to a new page. I need to get it back to
the calling page which is findSuppliers.

Pls. help me where I am getting mistaken.

Thank you and regards
Avijit Bose
9874833933 Kolkata India.