Announcement Announcement Module
Collapse
No announcement yet.
render fragments with simple jsp + SWF 2.1 + tiles 2.2.2 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • render fragments with simple jsp + SWF 2.1 + tiles 2.2.2

    Hi all,

    I've a jsp with two tiles.
    In the first tile there are a text string and a submit button.
    In the second tile, I've a result text.
    In tile definition, I've inserted this simple configuration:

    Code:
    <definition name="tiles/testSearch" template="/WEB-INF/jsp.tiles/test.jsp">
    <put-attribute name="tiles/testSearch/form" value="/WEB-INF/jsp.tiles/form.jsp" />
    <put-attribute name="tiles/testSearch/table" value="/WEB-INF/jsp.tiles/table.jsp" />
    </definition>
    In web flow configuration I've put this:

    Code:
    <view-state id="enterSearch" view="tiles/testSearch">
    <on-entry>
    ...
    </on-entry>
    <transition on="search">
    <evaluate expression="tileTestService.find(requestParameters.searchText)" result="viewScope.testTable" />
    <render fragments="tiles/testSearch/table" />
    </transition>
    </view-state>
    The test.jsp contains:
    Code:
    ...
    <div id="test-form"><tiles:insertAttribute name="tiles/testSearch/form" /></div>
    <div id="test-table"><tiles:insertAttribute name="tiles/testSearch/table" /></div>
    ...
    The form.jsp contains:
    Code:
    ...
    <form:form modelAttribute="testForm" id="testForm">
    <form:input id="searchText" path="searchText" />
    <input type="submit" id="search" name="_eventId_search" value="Search" />
    </form:form>
    ...
    The table.jsp contains:
    Code:
    ...
    <form:form modelAttribute="testTable" id="testTable">
    <form:input id="searchTable" path="searchTable" />
    </form:form>
    ...

    When I entry in my jsp, I see the two tiles correctly, both empty.
    On submit event of the search, I'd like to re-render only the result section, with updated data but the page is completely reloaded.

    Is it possible to render single tile without jsf facelets? I cannot find an example with only jsp + swf + tiles.

    Thanks.
Working...
X