HTML href from a component to another component

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

HTML href from a component to another component

Rene Scheibe
-----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 * [hidden email]
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-----
Reply | Threaded
Open this post in threaded view
|

Re: HTML href from a component to another component

BJ Freeman
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 * [hidden email]
> 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-----
>
Reply | Threaded
Open this post in threaded view
|

Re: HTML href from a component to another component

rrhati2010
In reply to this post by Rene Scheibe
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