You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Rene Scheibe <re...@tngtech.com> on 2010/08/11 17:31:44 UTC

HTML href from a component to another component

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

1. The ofbizUrl macro only works for intra-component links:
<a href="<@ofbizUrl>viewimage?orderId=${orderId}>

2. For inter-component links I have seen such constructs:
<a href="/ordermgr/control/viewimage?orderId=${orderId}>

Is there a better way (macro) to refer to another component href?
The information should be in the framework as each component defines the
following in its ofbiz-component.xml:

<ofbiz-component name="YOUR_COMPONENT_NAME">

<webapp name="YOUR_WEBAPP_NAME"
        title="..."
        server="default-server"
        location="webapp/PATH_TO_YOUR_WEBAPP"
        base-permission="OFBTOOLS,WEBTOOLS"
        mount-point="/YOUR_WEBAPP_MOUNTPOINT"/>

So the below should technically be possbile to create a proper href:

<a href="<@ofbizUrl component="YOUR_COMPONENT_NAME"
webapp="YOUR_WEBAPP_NAME">viewimage?orderId=${orderId}>

Any thoughts or comments?

Regards,
René
- -- 
René Scheibe * rene.scheibe@tngtech.com
TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring
Geschäftsführer: Henrik Klagges, Gerhard Müller, Christoph Stock
Sitz: Unterföhring * Amtsgericht München * HRB 135082
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxiwmAACgkQUXs9EHvIuCrk6wCeImQ0PmuPT4cNZa1J5S+o/Wc5
reEAnjU8jIIWgIUYAE1nabUFeepCmp6j
=75Wi
-----END PGP SIGNATURE-----

Re: HTML href from a component to another component

Posted by rrhati2010 <rr...@tcs.com>.
Hi Rene,

You can use include statements in your custom component's controller to
include controller's of other component's and use it.

Such as:
<include
location="component://common/webcommon/WEB-INF/common-controller.xml"/>


-----
RRH
-- 
View this message in context: http://ofbiz.135035.n4.nabble.com/HTML-href-from-a-component-to-another-component-tp2321407p2322285.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: HTML href from a component to another component

Posted by BJ Freeman <bj...@free-man.net>.
I suggest you dig into ofbiz deeper.
things like controller directives
using Widgets.
start by looking at the xsd for them.
then look at example and other components.


Rene Scheibe sent the following on 8/11/2010 8:31 AM:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> 1. The ofbizUrl macro only works for intra-component links:
> <a href="<@ofbizUrl>viewimage?orderId=${orderId}>
>
> 2. For inter-component links I have seen such constructs:
> <a href="/ordermgr/control/viewimage?orderId=${orderId}>
>
> Is there a better way (macro) to refer to another component href?
> The information should be in the framework as each component defines the
> following in its ofbiz-component.xml:
>
> <ofbiz-component name="YOUR_COMPONENT_NAME">
>
> <webapp name="YOUR_WEBAPP_NAME"
>          title="..."
>          server="default-server"
>          location="webapp/PATH_TO_YOUR_WEBAPP"
>          base-permission="OFBTOOLS,WEBTOOLS"
>          mount-point="/YOUR_WEBAPP_MOUNTPOINT"/>
>
> So the below should technically be possbile to create a proper href:
>
> <a href="<@ofbizUrl component="YOUR_COMPONENT_NAME"
> webapp="YOUR_WEBAPP_NAME">viewimage?orderId=${orderId}>
>
> Any thoughts or comments?
>
> Regards,
> René
> - --
> René Scheibe * rene.scheibe@tngtech.com
> TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring
> Geschäftsführer: Henrik Klagges, Gerhard Müller, Christoph Stock
> Sitz: Unterföhring * Amtsgericht München * HRB 135082
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkxiwmAACgkQUXs9EHvIuCrk6wCeImQ0PmuPT4cNZa1J5S+o/Wc5
> reEAnjU8jIIWgIUYAE1nabUFeepCmp6j
> =75Wi
> -----END PGP SIGNATURE-----
>