🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: pl.comp.www.server-side
1 messages
1 total messages Started by Marcin Wieczorek Thu, 31 Mar 2011 09:33
JSF 2.0 Ajax, problem z korzeniem
#61368
Author: Marcin Wieczorek
Date: Thu, 31 Mar 2011 09:33
23 lines
1561 bytes
Witam,
mam stronę z prostym kodem JSF używającym Ajaxa. Wszystko działa dopóki 
korzystam w przeglądarce z URLa "/index.xhtml". Jeśli wchodzę na tą samą 
stronę poprzez sam root (czyli "/") to Ajax się sypie, serwer 
przekierowuje mnie na "http://index.xhtml/".

Kod Ajaxowy jest prosty, to co jest wpisywane do input boxa ma pojawiać 
się jako tekst obok:

<h:form id="ajax_test_form">
   <h:inputText id="ajtest2" value="#{bean.address}">
     <f:ajax event="keyup" execute="@this" render="ajtest"/>
   </h:inputText>
   <h:outputText id="ajtest" value="#{bean.ajaxTest}"/>
</h:form>

Po stronie serwera kod jest taki:

public String getAjaxTest() {
         return address;
}

Czy jest coś co trzeba dodatkowo dokonfigurować aby root też działał?
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads