Skip to Content
author's profile photo Former Member
Former Member

problem with different controllers

Hi,

I took up an example of making a discussion forum to get better at Web Dynpro. I am stuck at this one problem since almost a week...please help.

I have 4 custom controllers

1. login - for login

2. newthread - to start a new thread

3. mythreads - to view the threads he has posted

4. getthread - to get the entire thread

For which i have 4 views.

1. loginView

2. newThreadView

3. myThreadsView

4. showThread

Now for each custom controller I have initialized the "_input" objects and also any input node objects if it has.

The Problem :

After the login, I make a new thread in the newThreadView. the thread is posted and i can see it when in the myThreadsView. All my posts are displyed in a table in this view. Now if i wish to see the details of any particular post, i select its lead and click a button. The button action copies the issue-id of the thread selected to a model attribute which is context mapped to the issue-id of the getThread custom controller. Now I call the custom controller's method in which i execute the model object. Then i invalidate the output node. But this fails to get any values from it context and the getter for a return value wdContext.nodeOutput.getResult() throws a null pointer exception in the getThread custom controller.

Similarly if now if i rerun the application and first see any of my threads and then try to make a new thread post, again it gives me a null pointer exception in the newThread custom controller.

So at any given time, i either view my posts or make a new post, otherwise whatever i do second throws a null pointer exception.

Please help!!!

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 05, 2005 at 11:53 AM

    Hi Nirav,

    Please check the cardinality defined for the context of

    which the data when empty dumps. Please change it to 0..1 or 0..n as essential. This will not crib if it is unable to fetch any data.

    Hope this helps.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.