선택된 값을 표시하지 않습니다,하지만 난 목록에서 값을 선택하면, 선택한 값은 상자에 표시되지 않습니다 심지어 불구하고 getModelObject()가 올바른 값 (내가 선택한 값)을 검색하고 반환한다는 것을 알 수 있습니다. 상자에 표시되지 않습니다. 나는 로컬 부두 서버 6.1.26과 파이어 폭스 17.0, JQuery와 모바일 1.2.0, JQuery와 1.8.3를 사용하여 테스트, 개찰구 6.3.0 사용합니다. 어떤 제안이나 아이디어? 저도 같은 문제를 가지고 같은 양식에 DropDownChoice 상자의 무리가DropDownChoice 내가 부하()에 값 목록을로드하는 DropDownChoice 상자가
<tr id="oxeNodeRow" name="oxeNodeRow" style="display:none">
<td align="right" nowrap class="fieldLabel"><label for="oxeNode" wicket:id="oxeNodeLabel" class="requiredLabel">OXE Node</label></td>
<td colspan="-1"><select id="oxeNode" name="oxeNode" wicket:id="oxeNode">
<option selected>OXENode</option> </select>
</td>
</tr>
:
MetaProfile profile = null;
...
IModel<List<String>> oxeNodeModel = null;
oxeNodeModel = new LoadableDetachableModel<List<String>>() {
private static final long serialVersionUID = 1L;
@Override
protected List<String> load() {
try {
List<String> names = getOXENodeList();
//load the OXE node list
if (names == null)
return Collections.emptyList();
else {
return names;
}
}catch (Exception e) {
return Collections.emptyList();
}
}
};
oxeNodeBox = new DropDownChoice("oxeNode",
new PropertyModel<String>(profile, "oxeNodeName"), oxeNodeModel);
oxeNodeBox.setEnabled(true);
oxeNodeBox.setOutputMarkupId(true);
add(oxeNodeBox);
HTML 템플릿은 다음과 같습니다
은 개찰구 코드입니다. 그러나 양식의 첫 번째 DropDownChoice 즉, 문제가 없습니다., 내가 목록에서 선택을하면 선택된 값을 표시한다. 그것의 개찰구 코드와 HTML 마크 업은 아래와 같습니다. 바라 건데, 선명한 눈을 가진 사람은 문제를 촉발 할 수있는 차이를 발견 할 수 있습니다profileTypeBox = new DropDownChoice<MetaProfileType>("type",
new PropertyModel<MetaProfileType>(profile, "type"),
Arrays.asList(MetaProfileType.values()),
new IChoiceRenderer<MetaProfileType>() {
private static final long serialVersionUID = 1L;
@Override
public Object getDisplayValue(MetaProfileType object) {
return object.name();
}
@Override
public String getIdValue(MetaProfileType object, int index) {
return object.name();
}
}
);
profileTypeBox.setOutputMarkupId(true);
add(profileTypeBox);
HTML :
그런데 <td colspan="-1"> <select id="profileType" name="profileType" wicket:id="type">
<option>default</option>
</select> </td>
, 나도 그냥 수도 경우에 여기에 HTML 헤더를 포함하고있다
<html xmlns:wicket="http://wicket.apache.org/">
<head>
<!-- meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="css/custom.css" media="only screen and (max-width: 480px)"/>
<link rel="stylesheet" type="text/css" href="css/default.css" media="only screen and (min-width: 1025px)"/>
<link rel="stylesheet" type="text/css" href="css/portrait.css"
media="all and (max-device-width: 1024px) and (orientation:portrait)"/>
<link rel="stylesheet" type="text/css" href="css/landscape.css"
media="all and (max-device-width: 1024px) and (orientation:landscape)"/>
<meta name="viewport" content="user-scalable=no, width=device-width"/>
<link rel="stylesheet" href="css/iphone-style-checkboxes.css" type="text/css"/>
<script type="text/javascript" src="js/iphone-style-checkboxes.js"></script-->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"> </script>
</head>
당신이 브라우저를 통해 응용 프로그램을 사용할 때 값을 선택 뜻 "목록에서 값을 선택"그건 잘못된 HTML입니까? 아니면 코드의 목록에서 값을 선택한다는 의미입니까? 분명히 아니었다면 사용자가 수동으로 브라우저에서 웹 페이지의 DropDownChoice 목록에서 값을 선택하면 죄송합니다 – Sarhanis
, 나는 의미, 선택된 값은 GUI에있는 상자에 표시되지 않습니다. 아니, 프로그래밍 방식으로 값을 선택하는 것은 아닙니다. –
그건 불가능한 것 같습니다. HTML이 표시되는 것을 보여줄 수 있습니까? 일부 AJAX 호출이 만들어 졌습니까? 그리고 왜 colspan = -1입니까? 그건 말이되지 않습니다. – Sarhanis