1
votes

I have a datatable with multiple rows, I want to put one link to redirect the values to one Servlet. The old call that I use is similar like this :

a onclick=openWindow('./Servlet?param1=xx&param2=xxx')

I'm newbie in ICEfaces... I need your help because I don't know how can I put one parameter only like this :

ice:outputLinktarget="mainFrame" value="./Servlet?param1=#{item.id}

but when I put two parameters, I got an errors in the code.

ice:outputLinktarget="mainFrame" value="./Servlet?param1=#{item.id}&param2=#{item.id}

Somebody knows how to do it?

3

3 Answers

0
votes

The ampersand (&) is the culprit; you need to escape it or else IceFaces gets confused about the page structure.

0
votes

Another way to do it:

<ice:outputLink target="mainFrame" value="./Servlet">
  <f:param name="param1" value="#{item.id}"/>
  <f:param name="param2" value="#{item.id}"/>
</ice:outputLink>

The f:param tags add the parameters to the base URL automatically.

0
votes

You haven't said about what technology you use (jsp/jsf)?

For jsf try:

<ice:outputLinktarget="mainFrame" value="./Servlet>
<f:param name="param1" value="#{item.id}"/>
<ice:outputLinktarget=>