struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (WW-4365) Problems with "optiontransferselect, attributes doubleHeaderKey and doubleHeaderValue"
Date Fri, 27 Jun 2014 05:48:25 GMT

     [ https://issues.apache.org/jira/browse/WW-4365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Lukasz Lenart updated WW-4365:
------------------------------

    Description: 
s:optiontransferselect: Can not remove initial doublelist entries if attributes "doubleHeaderKey"
and "doubleHeaderValue" are used

Code example:
=============
Action:
{code:java}
package de.dwd.prodkat.action;
import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.Logger;
import com.opensymphony.xwork2.ActionSupport;
import de.dwd.prodkat.model.Keyword;

public class OptionTransferSelectAction extends ActionSupport{
	private static Logger log = Logger.getLogger("log." +OptionTransferSelectAction.class.getName());
	private static final long serialVersionUID = 1L;
	private Keyword kw;
	private List<Keyword> leftKwList= new ArrayList<Keyword>();
	private List<Keyword> rightKwList= new ArrayList<Keyword>();

	private List<Integer> selectMetElement=new ArrayList<Integer>();
	private List<Integer> metElement=new ArrayList<Integer>();
	
	public OptionTransferSelectAction(){
		kw =new Keyword();
		kw.setId(1);
		kw.setAnzeige("erster Wert");
		leftKwList.add(kw);
		kw =new Keyword();
		kw.setId(2);
		kw.setAnzeige("zweiter Wert");
		leftKwList.add(kw);
		
		kw =new Keyword();
		kw.setId(20);
		kw.setAnzeige("Vorgabewert");
		rightKwList.add(kw);
	}
	
	public Keyword getKw() { return kw; }
	public void setKw(Keyword kw) { this.kw = kw; }
	public List<Keyword> getLeftKwList() { return leftKwList; }
	public void setLeftKwList(List<Keyword> leftKwList) { this.leftKwList = leftKwList;
}
	public List<Keyword> getRightKwList() { return rightKwList; }
	public void setRightKwList(List<Keyword> rightKwList) { this.rightKwList = rightKwList;
}
	public List<Integer> getSelectMetElement() { return selectMetElement; }
	public void setSelectMetElement(List<Integer> selectMetElement) { this.selectMetElement
= selectMetElement; }
	public List<Integer> getMetElement() { return metElement; }
	public void setMetElement(List<Integer> metElement) { this.metElement = metElement;
}

	public String execute() { return SUCCESS; }
	public String display() { return NONE; }
}
{code}

website (jsp):
==============
Case 1: doubleHeaderKey&doubleHeaderValue
{code:html}
...
<s:form action="resultAction" method="post" >
<s:optiontransferselect
	id="metElement"
	label="Tranfer from List to List (ArrayList of Objekt)"
	name="metElement"
	leftTitle="vorgabe"
	rightTitle="auswahl"
	list="leftKwList"
	listKey="id"
	listValue="anzeige"
	multiple="true"
	headerKey="0"
	headerValue="%{getText('select')}"
	cssClass="input_text_mittel"
	listCssClass="input_text_langExt"	

	doubleList="rightKwList"
	doubleListKey="id"
	doubleListValue="anzeige"
	doubleName="selectMetElement"
	doubleHeaderKey="0"
	doubleHeaderValue="%{getText('select')}"
	doubleCssClass="input_text_mittel"
	doubleListCssClass="input_text_langExt"
/>
 <s:submit key="submit" value="submit"/>
</s:form>
...
{code}
Case 2: without doubleHeaderKey and doubleHeaderValue
{code:html}
...
<s:form action="resultAction" method="post" >
<s:optiontransferselect
	id="metElement"
	label="Tranfer from List to List (ArrayList of Objekt)"
	name="metElement"
	leftTitle="vorgabe"
	rightTitle="auswahl"
	list="leftKwList"
	listKey="id"
	listValue="anzeige"
	multiple="true"
	headerKey="0"
	headerValue="%{getText('select')}"
	cssClass="input_text_mittel"
	listCssClass="input_text_langExt"	

	doubleList="rightKwList"
	doubleListKey="id"
	doubleListValue="anzeige"
	doubleName="selectMetElement"
	doubleCssClass="input_text_mittel"
	doubleListCssClass="input_text_langExt"
/>
{code}
Problem:
Case1: can not remove initional doublelist entry "Vorgabewert"
Case2: can remove initional doublelist entry "Vorgabewert"

  was:
s:optiontransferselect: Can not remove initial doublelist entries if attributes "doubleHeaderKey"
and "doubleHeaderValue" are used

Code example:
=============
Action:
package de.dwd.prodkat.action;
import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.Logger;
import com.opensymphony.xwork2.ActionSupport;
import de.dwd.prodkat.model.Keyword;

public class OptionTransferSelectAction extends ActionSupport{
	private static Logger log = Logger.getLogger("log." +OptionTransferSelectAction.class.getName());
	private static final long serialVersionUID = 1L;
	private Keyword kw;
	private List<Keyword> leftKwList= new ArrayList<Keyword>();
	private List<Keyword> rightKwList= new ArrayList<Keyword>();

	private List<Integer> selectMetElement=new ArrayList<Integer>();
	private List<Integer> metElement=new ArrayList<Integer>();
	
	public OptionTransferSelectAction(){
		kw =new Keyword();
		kw.setId(1);
		kw.setAnzeige("erster Wert");
		leftKwList.add(kw);
		kw =new Keyword();
		kw.setId(2);
		kw.setAnzeige("zweiter Wert");
		leftKwList.add(kw);
		
		kw =new Keyword();
		kw.setId(20);
		kw.setAnzeige("Vorgabewert");
		rightKwList.add(kw);
	}
	
	public Keyword getKw() { return kw; }
	public void setKw(Keyword kw) { this.kw = kw; }
	public List<Keyword> getLeftKwList() { return leftKwList; }
	public void setLeftKwList(List<Keyword> leftKwList) { this.leftKwList = leftKwList;
}
	public List<Keyword> getRightKwList() { return rightKwList; }
	public void setRightKwList(List<Keyword> rightKwList) { this.rightKwList = rightKwList;
}
	public List<Integer> getSelectMetElement() { return selectMetElement; }
	public void setSelectMetElement(List<Integer> selectMetElement) { this.selectMetElement
= selectMetElement; }
	public List<Integer> getMetElement() { return metElement; }
	public void setMetElement(List<Integer> metElement) { this.metElement = metElement;
}

	public String execute() { return SUCCESS; }
	public String display() { return NONE; }
}

website (jsp):
==============
Case 1: doubleHeaderKey&doubleHeaderValue
...
<s:form action="resultAction" method="post" >
<s:optiontransferselect
	id="metElement"
	label="Tranfer from List to List (ArrayList of Objekt)"
	name="metElement"
	leftTitle="vorgabe"
	rightTitle="auswahl"
	list="leftKwList"
	listKey="id"
	listValue="anzeige"
	multiple="true"
	headerKey="0"
	headerValue="%{getText('select')}"
	cssClass="input_text_mittel"
	listCssClass="input_text_langExt"	

	doubleList="rightKwList"
	doubleListKey="id"
	doubleListValue="anzeige"
	doubleName="selectMetElement"
	doubleHeaderKey="0"
	doubleHeaderValue="%{getText('select')}"
	doubleCssClass="input_text_mittel"
	doubleListCssClass="input_text_langExt"
/>
 <s:submit key="submit" value="submit"/>
</s:form>
...

Case 2: without doubleHeaderKey and doubleHeaderValue
...
<s:form action="resultAction" method="post" >
<s:optiontransferselect
	id="metElement"
	label="Tranfer from List to List (ArrayList of Objekt)"
	name="metElement"
	leftTitle="vorgabe"
	rightTitle="auswahl"
	list="leftKwList"
	listKey="id"
	listValue="anzeige"
	multiple="true"
	headerKey="0"
	headerValue="%{getText('select')}"
	cssClass="input_text_mittel"
	listCssClass="input_text_langExt"	

	doubleList="rightKwList"
	doubleListKey="id"
	doubleListValue="anzeige"
	doubleName="selectMetElement"
	doubleCssClass="input_text_mittel"
	doubleListCssClass="input_text_langExt"
/>

Problem:
Case1: can not remove initional doublelist entry "Vorgabewert"
Case2: can remove initional doublelist entry "Vorgabewert"


> Problems with "optiontransferselect, attributes doubleHeaderKey and doubleHeaderValue"
> --------------------------------------------------------------------------------------
>
>                 Key: WW-4365
>                 URL: https://issues.apache.org/jira/browse/WW-4365
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.3.15.3
>            Reporter: Fechner
>
> s:optiontransferselect: Can not remove initial doublelist entries if attributes "doubleHeaderKey"
and "doubleHeaderValue" are used
> Code example:
> =============
> Action:
> {code:java}
> package de.dwd.prodkat.action;
> import java.util.ArrayList;
> import java.util.List;
> import org.apache.log4j.Logger;
> import com.opensymphony.xwork2.ActionSupport;
> import de.dwd.prodkat.model.Keyword;
> public class OptionTransferSelectAction extends ActionSupport{
> 	private static Logger log = Logger.getLogger("log." +OptionTransferSelectAction.class.getName());
> 	private static final long serialVersionUID = 1L;
> 	private Keyword kw;
> 	private List<Keyword> leftKwList= new ArrayList<Keyword>();
> 	private List<Keyword> rightKwList= new ArrayList<Keyword>();
> 	private List<Integer> selectMetElement=new ArrayList<Integer>();
> 	private List<Integer> metElement=new ArrayList<Integer>();
> 	
> 	public OptionTransferSelectAction(){
> 		kw =new Keyword();
> 		kw.setId(1);
> 		kw.setAnzeige("erster Wert");
> 		leftKwList.add(kw);
> 		kw =new Keyword();
> 		kw.setId(2);
> 		kw.setAnzeige("zweiter Wert");
> 		leftKwList.add(kw);
> 		
> 		kw =new Keyword();
> 		kw.setId(20);
> 		kw.setAnzeige("Vorgabewert");
> 		rightKwList.add(kw);
> 	}
> 	
> 	public Keyword getKw() { return kw; }
> 	public void setKw(Keyword kw) { this.kw = kw; }
> 	public List<Keyword> getLeftKwList() { return leftKwList; }
> 	public void setLeftKwList(List<Keyword> leftKwList) { this.leftKwList = leftKwList;
}
> 	public List<Keyword> getRightKwList() { return rightKwList; }
> 	public void setRightKwList(List<Keyword> rightKwList) { this.rightKwList = rightKwList;
}
> 	public List<Integer> getSelectMetElement() { return selectMetElement; }
> 	public void setSelectMetElement(List<Integer> selectMetElement) { this.selectMetElement
= selectMetElement; }
> 	public List<Integer> getMetElement() { return metElement; }
> 	public void setMetElement(List<Integer> metElement) { this.metElement = metElement;
}
> 	public String execute() { return SUCCESS; }
> 	public String display() { return NONE; }
> }
> {code}
> website (jsp):
> ==============
> Case 1: doubleHeaderKey&doubleHeaderValue
> {code:html}
> ...
> <s:form action="resultAction" method="post" >
> <s:optiontransferselect
> 	id="metElement"
> 	label="Tranfer from List to List (ArrayList of Objekt)"
> 	name="metElement"
> 	leftTitle="vorgabe"
> 	rightTitle="auswahl"
> 	list="leftKwList"
> 	listKey="id"
> 	listValue="anzeige"
> 	multiple="true"
> 	headerKey="0"
> 	headerValue="%{getText('select')}"
> 	cssClass="input_text_mittel"
> 	listCssClass="input_text_langExt"	
> 	doubleList="rightKwList"
> 	doubleListKey="id"
> 	doubleListValue="anzeige"
> 	doubleName="selectMetElement"
> 	doubleHeaderKey="0"
> 	doubleHeaderValue="%{getText('select')}"
> 	doubleCssClass="input_text_mittel"
> 	doubleListCssClass="input_text_langExt"
> />
>  <s:submit key="submit" value="submit"/>
> </s:form>
> ...
> {code}
> Case 2: without doubleHeaderKey and doubleHeaderValue
> {code:html}
> ...
> <s:form action="resultAction" method="post" >
> <s:optiontransferselect
> 	id="metElement"
> 	label="Tranfer from List to List (ArrayList of Objekt)"
> 	name="metElement"
> 	leftTitle="vorgabe"
> 	rightTitle="auswahl"
> 	list="leftKwList"
> 	listKey="id"
> 	listValue="anzeige"
> 	multiple="true"
> 	headerKey="0"
> 	headerValue="%{getText('select')}"
> 	cssClass="input_text_mittel"
> 	listCssClass="input_text_langExt"	
> 	doubleList="rightKwList"
> 	doubleListKey="id"
> 	doubleListValue="anzeige"
> 	doubleName="selectMetElement"
> 	doubleCssClass="input_text_mittel"
> 	doubleListCssClass="input_text_langExt"
> />
> {code}
> Problem:
> Case1: can not remove initional doublelist entry "Vorgabewert"
> Case2: can remove initional doublelist entry "Vorgabewert"



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message