Hi,

That's why I recommended initially to read the "documentation", ie the related 
content in site-conf.xsd:

                    <xs:enumeration value="url">
                        <xs:annotation>
                            <xs:documentation>
                                Any URL, relative or absolute. Redirected 
parameters are not used, you can put them in the url.
                            </xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="url-redirect">
                        <xs:annotation>
                            <xs:documentation>
                                Works like URL but you can also pass redirected 
parameters.
                            </xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>

As you can see these features don't allow dynamic URLs. What you can do is 
something like:

        <actions>
            <set field="targetUrl" 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)
        </actions>

[...]

   <field name="supplierWebsite" title="${uiLabelMap.supplierWebsite}">
        <hyperlink target="${targetUrl}" target-window="_BLANK" 
description="${supplierWebsite}" also-hidden="false"/>
   </field>

I did not try it, but it should work.

HTH

Jacques

Le 07/05/2022 à 05:52, Avijit Bose a écrit :
Hello Sir,

Your "<response name="success" type="url"
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 this....but unable to set the
supplierWebsite value in the "value" field.

<request-map uri="goToWebsite">
         <security https="true" auth="true"/>
         <response name="success" type="url" value="supplierWebsite">
               <redirect-parameter name="supplierWebsite"/>
         </response>
</request-map>

My form is like this...

<field name="supplierWebsite" title="${uiLabelMap.supplierWebsite}">
         <hyperlink target="goToWebsite"  target-window="_BLANK"
description="${supplierWebsite}" also-hidden="false">
                  <parameter param-name="supplierWebsite"/>
         </hyperlink>
</field>

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
<[email protected]>  wrote:
Hi,

You can do something like that in your controller

      <request-map uri="testUrl">
          <security https="true" auth="true"/>
          <response name="success" type="url" 
value="https://github.com/apache/ofbiz-framework"/>
      </request-map>

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
<[email protected]>  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:
----------------------------------------------------------------------------------------------------------------------------
<form name="ListSuppliers" type="list" list-name="listIt"
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">
           <actions>
                  <service service-name="performFind" result-map="result"
result-map-list="listIt">
<field-map field-name="inputFields" from-field="eximCtx"/>
<field-map field-name="entityName" value="AkmSupplier"/>
<field-map field-name="orderBy" from-field="parameters.sortField"/>
<field-map field-name="viewIndex" from-field="viewIndex"/>
<field-map field-name="viewSize" from-field="viewSize"/>
</service>
           </actions>

           <field name="supplierWebsite" title="${uiLabelMap.supplierWebsite}">
           <hyperlink target="external" description="${supplierWebsite}"
also-hidden="false">
           <parameter param-name="supplierWebsite"/>
           </hyperlink>
           </field>
           </form>
-----------------------------------------------------------------------------------------------------------------

${supplierWebsite} in the above form ishttp://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

Reply via email to