분할 레이아웃 컨텐츠를 동적으로 변경하고 싶습니다. 내용은 데이터베이스에서 취하는 텍스트입니다. 사용자가 메뉴에서 상호 작용하고 옵션을 선택하면 센터의 콘텐츠가 변경됩니다. 여기동적으로 분할 레이아웃 컨텐츠를 변경하십시오.
onModule :
public void onSuccess(List<BibleTxt> result)
{
int i = 0 ;
String chapterText ="";
//chapterText = result.get(1).getVerseText();
for(i=0;i<50;i++)
{
chapterText = result.get(i).getVerseText();
//Label chapterLabel = new Label(chapterText);
p.add(new HTML(chapterText));
}
}
서버 측 : 데이터베이스 구절로 나눈
public List<BibleTxt> getChapterTxt(int book,int chapter) throws Exception
{
BibleTxt cText = null;
List<BibleTxt> chapterTxt = new ArrayList<BibleTxt>();
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet result = null;
try{
conn = getConnection();
pstmt = conn.prepareStatement("SELECT * FROM bibledb_kjv WHERE BOOKID = ? AND CHAPTERNO = ?");
pstmt.setInt(1,book);
pstmt.setInt(2,chapter);
result = pstmt.executeQuery();
//cText = new BibleTxt();
int i=0;
while (result.next())
{
cText = new BibleTxt(result.getInt("BOOKID"), result.getInt("CHAPTERNO"), result.getString("VERSETEXT"));
chapterTxt.add(i, cText);
// ((ResultSet) cText.getChapterList()).next();
i++;
}
}
텍스트 ID입니다. 예를 들어 책 1 장 1의 모든 구절을 표시하고 싶습니다.
더 정교해질 수 있습니까? 언제든지 센터의 콘텐츠를 변경할 수 있습니다. 어떤 코드를 넣으려고하면 –
이 –