Thanks!
On 11/28/06, Ate Douma <[EMAIL PROTECTED]> wrote:
Ethan Adams wrote:
> I'm trying to understand what some of the attributes mean in the encoded
> part of the Portal URL. For instance, what do the b, c, and d mean in
this
> decoded value?
>
> b644|c0|d0
>
> Any help would be greatly appreciated.
>
I can help with that :)
The en/decoding is done by the
o.a.j.container.state.impl.JetspeedNavigationalStateCodec class in the
portal component.
You'll find the following definitions there:
protected static final char PARAMETER_SEPARATOR = '|';
protected static final char PARAMETER_ELEMENT_SEPARATOR = '=';
protected static final char RENDER_WINDOW_ID_KEY = 'a';
protected static final char ACTION_WINDOW_ID_KEY = 'b';
protected static final char MODE_KEY = 'c';
protected static final char STATE_KEY = 'd';
protected static final char PARAM_KEY = 'e';
protected static final char CLEAR_PARAMS_KEY = 'f';
protected static final String keytable =
"01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
Each PortletMode and WindowState is encoded using a single character from
the keytable, where the ordering is determined from
WEB-INF/conf/jetspeed.properties.
So, you better not change the ordering of the modes and states defined
there if you would like bookmarked pages to behave correctly :)
Using this, it becomes easy to decode your above example:
b644 -> ActionPortletURL targetting the portlet with entityId 644
c0 -> PortletMode.VIEW
d0 -> WindowState.NORMAL
HTH,
Ate
BTW, its a good thing you asked about this, because only now I notice the
keytable above accidentally contains 2x the character "0".
Luckily, we don't yet support more than 10 modes/states so this hasn't
been a problem yet, but will result in a nasty bug once we get that far.
I better fix this right away!
Thanks :)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]