[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Spacewalk-devel] Sharing state between Java and Perl stacks

Hello Silvio,

I migrated the page from Perl to Java. (Still need to remove the old perl page.)
Yes, it's more work, but migrating perl pages to java is our long-term effort.
We do not want to introduce any extra parameters, but rather migrate.

Tomas Lestach
Red Hat Satellite Engineering, Red Hat

----- Original Message -----
> From: "Silvio Moioli" <smoioli suse de>
> To: spacewalk-devel redhat com
> Sent: Thursday, May 16, 2013 2:50:52 PM
> Subject: [Spacewalk-devel] Sharing state between Java and Perl stacks
> Hello everyone,
>   I am trying to fix a minor bug in the "Manage Software Channels"
>   section, and I would like to know your opinion about the possible
>   solutions.
> Steps to reproduce the bug:
>  - click on the "Channels" tab,
>  - click on "Manage Software Channels",
>  - click on any one of the available channels (the "Details" sub-tab
>  gets opened),
>  - click on the "Managers" sub-tab,
>  - click on "delete software channel"
> Expected output: the "Managers" sub-tab stays selected
> Actual output: the "Details" sub-tab gets selected
> Basically the navigation bar will "remember" whatever sub-tab you had
> opened before "Managers" and will select it after you click on
> "delete software channel". Note that this does not happen in any of
> the other sub-tabs ("Details", "Patches", "Packages" and
> "Repositories").
> As far as I understand that happens because NavTreeIndex tries to
> determine the current sub-tab in order to "select" it, and since
> none of the URLs match the current one it will pick the most
> recently used:
> // If we have a lastActive URL we
> // will add it to the end of the list of URLs to
> // use it as a last resort.
> if (lastActive != null) {
>     …
> }
> This does not work for the "Managers" sub-tab because it is actually
> implemented in Perl, thus it has no visibility over Java session
> state variables and lastActive will remain untouched.
> So:
>  - as far as I understand there is no standard mechanism to share
>  session data between the Perl and Java stacks;
>  - as far as I understand this is a general problem whenever Perl and
>  Java pages need to share temporary state information; anyway I am
>  not aware of other cases in which that is necessary;
>  - the specific problem could be worked around by adding an extra
>  query string parameter to the "delete software channel" link and
>  having NavTreeIndex (or some other controller class) interpret it.
>  Similar solutions could be implemented if analogous bugs are found;
>  - the specific problem could also be resolved by porting the page
>  form Perl to Java, even if it seems to be quite a lot of effort for
>  this bug alone.
> What are your thoughts about this? Do you think that adding a
> parameter would be acceptable?
> Thanks in advance,
> Silvio
> _______________________________________________
> Spacewalk-devel mailing list
> Spacewalk-devel redhat com
> https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]