Web app : JavaStack- Section Expandable - Label - JavaLang null pointer

Web app : JavaStack- Section Expandable - Label - JavaLang null pointer

  

hi there,

i found a weird use case when using pattern Section Expandable in Java Stack. Every time i put widget label, an error comes up- java.lang.NullPointerException, but it run smooth in the cloud personal environment (.Net Stack):



regards,

indra


Hi Indra,

I'm not exactly sure what's going on, if you could share the error log/message would be helpful.

Meanwhile, why are you using a Label widget? It seems like you either want just regular static text (in which case the Text widget would work best) or simple dynamic text, in which case you should use an Expression widget. A Label widget will translate into an HTML Label element, which is only really interesting in the context of Forms...

hi Jorge,

here you are:

We use static and dynamic expression. My mate uses it, i do not know his reason (just drag and drop label as it is easy to do). 

regards,

indra

Hi Indra,

well... your mate should not use it when it's not the right choice. In this case, from the screen you show, if you want some dynamic value you should use an Expression. (and it's as easy as drag and drop an Expression as well...)

Regarding the error your seeing, I'm curious if it could be related to not binding your label to any input widget... can you show me the properties of the Label you added there?

Hi Jorge,

I do incremental debug.. from the primitive that work.. than i add a label.. and error. After removing all label, all is being well.

here you are:

regards,

indra 

That's not the label I asked to see... it's when you add the second Label (that you circled in red) that you get the problem, right?... then I want to see that Label's properties (the one that's displaying "label" on your image, not the one displaying "Appl No ").

Also, in order to try and troubleshoot the issue, try and replace the second Label (that is displaying "label") with an Expression with the same Value, and let me know if it still produces the same error.

Solution

The first one - applno- is an expression. When i run it, it is okay, Then i add a label that makes it error. so, i conclude that label is the troublemaker. Now, after all labels are deleted, the section expandable works like a charm. 

Then i try in the Personal Cloud... surprisingly, with label still works. So, i come to a conclusion that in dot net stack is okay, but not in java stack.


regards,

indra

Solution