Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. @Entity
  2. @DiscriminatorValue("YesNo")
  3. public class Child extends Parent{ // parent entity has inheritance strategy
  4. .....
  5.  
  6. DiscriminatorValue type; //want to access this variable in spring form
  7.  
  8. @Transient
  9. public String getDiscriminatorValue(){
  10. type= this.getClass().getAnnotation( DiscriminatorValue.class );
  11. return type == null ? null : val.value();
  12. }
  13. }
  14.  
  15. //somewhere in jsp i have,
  16. ${child.type}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement