Re: c:if test with dynamic variable



On Mar 22, 11:40 am, "harshjain...@xxxxxxxxx" <harshjain...@xxxxxxxxx>
wrote:
Hi Guyz,

I have a set of variable that I am generating. For example xyz_1,
xyz_2, xyz_3 and I want to test if these variable are passed as param

how would i write a c:if statement such that it changes the variable
name in loop.

forexample.. something like.
<c:if test="${not empty param.$var}"/>
where var generates xyz_1, xyz_2,xyz,_3 .. and so on.

Kindly let me know.

Thanks,
Hj

You could try: <c:if test="${not empty param[var]}"> </c:if>


.



Relevant Pages

  • c:if test with dynamic variable
    ... xyz_3 and I want to test if these variable are passed as param ... name in loop. ... forexample.. ... where var generates xyz_1, xyz_2,xyz,_3 .. ...
    (comp.lang.java.programmer)
  • Google Closure: Style Points
    ... @param element The element to change. ... var styles = doc.defaultView.getComputedStyle; ... Gets the client rectangle of the DOM element. ... // Compensate for document scroll in non webkit browsers. ...
    (comp.lang.javascript)
  • Re: Message Dialog with custom captions
    ... var ... {When the button captions on the message form are translated ... Creates a MessageDlg with translated button captions and a configurable ... @Param aCaption Caption to use for the dialog. ...
    (borland.public.delphi.thirdpartytools.general)
  • Google Closure: The Baseless Parts
    ... var COMPILED = false; ... Base namespace for the Closure library. ... empirically tests whether eval works for globals). ... @param name name of the object that this file defines. ...
    (comp.lang.javascript)
  • Re: slowing a script down
    ... When I add an alert to check it for each step of the loop, ... var stringWidth = new String; ... panelwidth = the character position where the string px is first found? ... can be re-used to animate any panel. ...
    (microsoft.public.scripting.jscript)

Loading