jsf - Why do I need to use getter for a public attribute? -


In my table, I just want to get one attribute, why do I have to write a gator in my data object?

I am declaring a variable 'O' (this is my data object) and I want to get public value 'commission'. It does not work without a clogging method.

view.xhtml:

  & lt; H: DataTable value = "# {ABList.unreadedABs}" var = "o" style class = "ABList-table" headerClass = "ABList-table-header" rowClasses = "ABList-table-weird-line, ABList-table- Even-row "& gt; & Lt; H: column & gt; & Lt; F: aspect names = "header" & gt; Commission & lt; / F: Aspect & gt; # {O.commission} & lt; / H: column & gt;   

DataObact:

  public class AB {public string commissions; }    

refers to the recipient from that code The property is due to the default EL resolver, which is implemented in such a way. You can write your own EL RESOLTOR which directly resolves public properties.

See the questions and answers.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -