Skip to main content

Posts

Showing posts with the label Combobox

Struts Generic Tags

The struts generic tags are used to control the execution flow when pages are rendered. Another use of struts generic tags are data extraction. Further Generic Tags are classified into Control Tags and Data Tags. Control Tags: The Control Tags are used for flow control, such as if, else and iterate. Here are the list of Control Tags: * if tag - Details * elseIf tag - Details * else tag - Details * append tag - Details * generator tag - Details * iterator tag - Details * merge tag - Details * subset tag - Details Data Tags: The Data Tags are used for data manipulation or creation, such as bean, push, and i18n. Here are the list of Data Tags: * action - Details * bean - Details * date - Details * include - Details * param - Details * set - Details * text - Details * property - Details Struts UI tags: Struts UI Tags are mainly designed to use the data from your action/value stack or from Data Tags. These tags are used to display the data on the...

Struts2 - Combobox Tag (Form Tags)

The struts2 combobox is basically an HTML INPUT of type text and HTML SELECT grouped together to give you a combo box functionality. You can place text in the INPUT control by using the SELECT control or type it in directly in the text field. Add the following code snippet into the struts.xml file. struts.xml <action name="comboboxTag" class="net.struts2.comboboxTag">    <result>/pages/uiTags/comboboxTag.jsp</result> </action> Create "comboboxTag " action class and a list in the class and populate it with various items as shown in the class. comboboxTag.java package net.struts2; import com.opensymphony.xwork2.ActionSupport; import java.util.*; public class comboboxTag extends ActionSupport{      private List fruits;   public String execute()throws Exception{   fruits = new ArrayList();   fruits.add("Appl...