0

Redirected link showing blank page

asked 2015-01-07 12:13:30 +0800

ChaitanyaIssueTracker gravatar image ChaitanyaIssueTracker
1

Their are list of links,on click of those links we redirect to another page. But sometimes on click of one perticular link the page get redirect but display empty page. This happens only that perticular link and all other links redirects proper and shows content in page.

delete flag offensive retag edit

Comments

Hi terrytornado, On click at the link it calls method @Command public void showIssueDetails(@BindingParam("issueID") String issueID,@BindingParam("effortBreakUp") String effortBreakUp,@BindingParam("activityID") int activityID){ Executions.sendRedirect("/viewRequest.htm");}

ChaitanyaIssueTracker ( 2015-01-07 13:29:41 +0800 )edit

5 Answers

Sort by ยป oldest newest most voted
0

answered 2015-01-07 12:23:39 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Hard to reproduce. Can you show us the dependend code?

link publish delete flag offensive edit
0

answered 2015-01-07 14:59:11 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2015-01-07 15:03:58 +0800

Aaahh, Multi page design. I recommend my two eBooks. The second is for multi page websites.

Executions.sendRedirect() accepts NO params. So you must store the params in the user session. Next i think you mean 'viewRequest.zul' not 'viewRequest.html'.

VM1 calls zul for VM2:

 // put the params in the session
 Sessions.getCurrent().setAttribute("myParams", map);
 Executions.sendRedirect("viewRequest.zul");

VM2:

   /**
     * Init. We use this method if we have a multi-page application for getting
     * the needed params from the session. Otherwise we get the params in the @AfterCompose
     * method.
     */
    @SuppressWarnings("unchecked")
    @Init
    public void init() {
        final HashMap<String, Object> map = (HashMap<String, Object>) Sessions.getCurrent().getAttribute("myParams");

        /**
         * Check if this page is called as 'Executions.sendRedirect()'.<br>
         * If so than we get the needed parameters from the session variables.
         */
        if (map != null) {
            if (map.containsKey("mode")) {
          . . .

best Stephan

link publish delete flag offensive edit
0

answered 2015-01-07 17:31:37 +0800

cyiannoulis gravatar image cyiannoulis
1201 10

updated 2015-01-08 10:37:52 +0800

I don't think it is necessary to store the parameters in the session to use sendRedirect. You may pass the parameters inside the url query string:

String url = "my-page.zul?id=" + myParamerer; 
Executions.getCurrent().sendRedirect(url);

and then retrieve your parameters while initializing the view model:

@Init
public void init(@QueryParam("id") String myParameter) { ... }

Hope that helps

Costas

link publish delete flag offensive edit
0

answered 2015-01-07 20:59:49 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Yes Costas, you are right. That's an other way to do such things.

link publish delete flag offensive edit
0

answered 2015-01-09 13:31:47 +0800

Darksu gravatar image Darksu
1991 1 4

Hello ChaitanyaIssueTracker,

Since the specific page is not displayed correctly, you have to debug it and see if:

  1. The parameters are sent
  2. The parameters are retrieved and used as expected

*As an alternative way to get the parameter that is included in the url please use the following:

String parameter = Executions.getCurrent().getParameter("parameter-name");

Best Regards,

Darksu

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2015-01-07 12:13:30 +0800

Seen: 28 times

Last updated: Jan 09 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More