[jboss-user] [JBoss Seam] - s:link + method parameter
w17chm4n
do-not-reply at jboss.com
Wed Jan 16 05:22:13 EST 2008
I`m having a problem, couse I have to use s:link but this component cannot pass the parameter to the method.
The view
| <div id="#{cat.categoryName}" class="showhide">
| <h:dataTable styleClass="dataTable" columnClasses="categoryName" var="question" value="#{cat.questionList}">
| <h:column>
| <h:outputText value="#{question.questionText}"/>
| </h:column>
| <h:column>
| <h:commandLink value="remove" action="#{QuestionController.removeQuestion(question)}"/>
| <s:link value="slink_remove" action="#{QuestionController.removeQuestion(question)}"/>
| </h:column>
| </h:dataTable>
| </div>
|
The method
| public void removeQuestion(Question question) {
| if(question == null) {
| log.fatal("Question is null ! [ERROR]");
| } else {
| log.info("Question [" + question.getQuestionText() + "]");
| }
| }
|
Error
| 11:09:18,250 INFO [QuestionControllerBean] Question [null]
|
Question Entity
| @Entity
| @Scope(ScopeType.CONVERSATION)
| @Name("question")
| @Table(name="Questions")
| public class Question implements Serializable {
|
| @Id @GeneratedValue
| private Long id;
|
| @NotNull @Length(min=5, max=100)
| private String questionText;
|
| @NotNull @OneToOne
| private QuestionType questionType;
|
| @ManyToOne
| private QuestionCategory category;
|
| @OneToOne
| private Picture picture;
|
| @NotNull
| private int questionValue;
|
| @NotNull @Temporal(value = TemporalType.TIMESTAMP)
| private Date created;
|
| //@OneToMany(cascade = {CascadeType.REMOVE, CascadeType.MERGE, CascadeType.REFRESH})
| @OneToMany
| private List<Answer> answers;
|
| @ManyToMany
| private List<Poll> pools;
|
| @ManyToMany
| private List<Test> tests;
| .
| .
| .
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120358#4120358
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120358
More information about the jboss-user
mailing list