tag not receiving the model bean (it's null) b

2019-08-22 08:53发布

We are testing out playframework from a port of a few pages of our seam application. We have one page where alot of the html is reused between two forms where one form adds 3 more fields. After porting this, we discovered that

The email is ${user.email}

works in the containing page but in the tag page, playframework says user is null???? What is going on? Is this a bug or is this intended? Aren't tag files useless if I can't access dynamic data? so I believe it has to be me, but I cut and paste the same line. Any ideas? Anyone have a simple case like this that works?

1条回答
贼婆χ
2楼-- · 2019-08-22 09:51

Tags are self contained, and do not assume that data or items exist. This is because a tag can be re-used between many pages. Therefore, you have to pass any data items into the tags as parameters.

查看更多
登录 后发表回答