the inner class should be static, but first you've to change the constructor to `Stack(String id, IModel<Integer> model)`