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

[EMAIL PROTECTED] wrote:
> if you do need assistance with this, it would also be helpful to know the 
> exact page/component structure of your setup. A working source-example is not 
> strictly necessary (though it helps, of course).
> Especially:
>   - are components from different pages rendered while rendering any of the 
> relevant pages (via the @Block/@RenderBlock mechanism)?  

Yes! The VesselSuggest component contains three @RenderBlock in a @For
loop. The blocks are defined by the component user (i.e. the page) and
they render a custom link and/or text which is displayed inside the
component for each search result that matches the search string.

The @For loop is updated via the EventListener mechanism, since the set
of result entities changes with each character typed in by the user.

Component HTML:
- ---------------
<form jwcid="@Form">
<span jwcid="@For"> <-- iterate over ajax search results
        <span jwcid="@RenderBlock" block="ognl:block1" />
        <span jwcid="@RenderBlock" block="ognl:block2" />
        <span jwcid="@RenderBlock" block="ognl:block3" />
</span>
</form>

Page HTML:
- ----------
<span jwcid="@VesselSuggest"></span>
<span jwcid="[EMAIL PROTECTED]"> ... </span>
<span jwcid="[EMAIL PROTECTED]"> ... </span>
<span jwcid="[EMAIL PROTECTED]"> ... </span>

Component Java Code:
- --------------------
private Block getBlockByName(String name)
{
  for (Object e:getContainer().getComponents().values())
    if (e instanceof Block && ((Block)e).getId().equalsIgnoreCase(name))
      return (Block)e;
  return null;
}
public Block getBlock1() {
 return getBlockByName("block1");
}
public Block getBlock2() {
 return getBlockByName("block2");
}
public Block getBlock3() {
 return getBlockByName("block3");
}


>   - is the form to be submitted asynchronously contained in the vesselSelect 
> component or does it contain the component?

The form is contained in the component.


Hope this helps!!

Regards
Bastian

- --
Bastian Voigt
Neumünstersche Straße 4
20251 Hamburg
telefon +49 - 40  - 67957171
mobil   +49 - 179 - 4826359

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGlPYN9+lAHD7HULYRAjP/AJ9r5Aex/PNS5oIVyQYVL/E4cArBzgCeMTMF
PSv+fsz3YFkEym+OvUXcksM=
=bz95
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to