Tag Name: <a2:push />

Description

Push value on stack for simplified usage.

Push value on stack for simplified usage.

Examples

  <a:push value="user"> <a:propery value="firstName" /> <a:propery value="lastName" /> </a:push>  
Pushed user into the stack, and hence property tag could access user's properties (firstName, lastName etc) since user is not at the top of the stack
  <a:push value="myObject"> ----- (1) <a:bean name="jp.SomeBean" id="myBean"/> ----- (2) <a:param name="myParam" value="top"/> ----- (3) </a:bean> </a:push>  
  when in (1), myObject is at the top of the stack when in (2), jp.SomeBean is in the top of stack, also in stack's context with key myBean when in (3), top will get the jp.SomeBean instance  
  <a:push value="myObject"> ---(A) <a:bean name="jp.SomeBean" id="myBean"/> ---(B) <a:param name="myParam" value="top.mySomeOtherValue"/> ---(C) </a:bean> </a:push>  
  when in (A), myObject is at the top of the stack when in (B), jp.SomeBean is at the top of the stack, also in context with key myBean when in (C), top refers to jp.SomeBean instance. so top.mySomeOtherValue would invoke SomeBean's mySomeOtherValue() method  
  <a:push value="myObject"> ---- (i) <a:bean name="jp.SomeBean" id="myBean"/> ---- (ii) <a:param name="myParam" value="[1].top"/> -----(iii) </a:bean> </a:push>  
  when in (i), myObject is at the top of the stack when in (ii), jp.SomeBean is at the top of the stack, followed by myObject when in (iii), [1].top will returned top of the cut of stack starting from myObject, namely myObject itself  

Attributes

Name

Required

Default

Type

Description

value true   Object/String Value to push on stack
id false   Object/String id for referencing element. For UI and form tags it will be used as HTML id attribute

Back to Taglib Index