Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Setting data in the context

Ok, I will admit I'm very much a Web Dynpro newbie, and this whole context thing is really confusing for me, though I've been a Java programmer for 6 years.

Here's what's going on. Basically, I'm trying to make a more simplified version of the spell checker (using Jazzy) that was written about in a weblog on here. But, the part that's messing me up is the context. In my Component Controller, I defined a couple things. I defined a value attribute called "misspelledWord", a value node called "Suggestions", and under that a value attribute called "word" (I have more defined than that, but for the purposes of this post, that's all you need to know)

I have a text area, and a "Check Spelling" button underneath it, and in the action for that button, I want to set all those context attributes so that I can display them in the pop-up screen that comes up, which shows the user a misspelled word and all the suggestions for it. Or, at least, it's SUPPOSED to.

In my code I do the following:


"ew" is an object I defined called ErrorWord, which contains all the information about each misspelled word and gets populated in my spell checking class.

This works GREAT. misspelledWord gets populated and displayed on the pop-up screen.

My problem is getting all the suggestions. I have them all in an ArrayList in my ErrorWord object, so I HAVE them, I just can't seem to store them in the context. Everything I try gives me a NullPointerException.

All I want to do is loop through my ArrayList, and assign the String value I have in there to the "word" attribute.

Thanks in advance for any help you are able to provide,


Former Member
Not what you were looking for? View more on this topic or Ask a question