[JBoss Seam] - Re: url parameters
by enrokuta
Use Seam Page Parameters and the s:link tag:
In pages.xml you define a param tag for your commodity page:
| <page view-id="/commodity.xhtml">
| <param name="commodityid" value="#{commodity.id}"
| </page>
|
Now in your Commodity you need to define a public method to set the commodity id
| public void setCommodityId(String id){
| this.id = id;
| }
|
According to Seam Documentation, any s:link transparently includes the request parameters so you might consider it. I didn't use the tag before so I cannot help you here. Or, you can use the standard outputLink tag of JSF:
| <h:outputLink value="/commodity.seam">
| <f:param name="commodityid" value="#{commodity.id}"/>
| </h:commandLink>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4091382#4091382
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4091382
18Â years, 6Â months
[JBoss Seam] - Re: [2.0.0.CR1] selectManyListbox + convertEntity yields con
by davidjoseph
I have the same problem: I noticed then when I try to use a Collection for the selectmanyselectbox value, it won't call the setter method. If I use a List this seems to work fine. Is this wanted behaviour? After all a List is a Collection.
my code:
private Collection<SelectionItem> value;
|
| @ManyToMany(cascade = CascadeType.ALL)
| public Collection<SelectionItem> getValue() {
| if (value == null)
| value = new ArrayList<SelectionItem>();
| return value;
| }
|
| public void setValue(Collection<SelectionItem> value) {
| System.out.println("test");
| this.value = value;
| }
|
<h:selectManyListbox id="genderTrainee" value="#{coach.request.genderTrainee.value}" required="false">
| <s:selectItems value="#{selectionItemManager.findSelectionItemByType('GENDER')}"
| var="g" label="#{g.name}" noSelectionLabel="#{messages.no_selection_label}" />
| <s:convertEntity/>
| </h:selectManyListbox>
if have the same kind of error:
Conversion Error setting value '42 43' for '#{coach.request.genderTrainee.value}'.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4091379#4091379
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4091379
18Â years, 6Â months