Where is the "delete" component?? I only found the jwcid="delete", but not
the component on the page with "delete" id...

[] 's

Mael

On 10/11/06, Andrés Nates <[EMAIL PROTECTED]> wrote:

Hello



I have the following problem



I have a list of checkboxes, when i select a checkbox the page recharges
itself. But if i select the last of the checkboxes in the list, when the
page recharges, all checkboxes appears selected. Anybody knows Why this
happens?, and What can I do to solve this problem?





This is the code





HTML

<form jwcid="categoriesListForm">

<input type="submit" value="Eliminar" jwcid="deleteCategory" />

<table width="100%"  border="0" cellpadding="0" cellspacing="1">

  <tr>

    <td width="5%" align="center">&nbsp;</td>

    <td width="95%" align="left">Nombre</td>

    </tr>

  <tr jwcid="categoriesList">

    <td width="5%" align="center"><input type="checkbox"
jwcid="delete"/></td>

    <td width="95%" align="left"><span
jwcid="categoryName">NombreCategor&iacute;a</span></td>

    <span jwcid="updateCategories"/>

    </tr>

</table>

</form>





PAGE

<page-specification
class="ws.nuevosmedios.quicklearnCRUD.CategoriesManager">

            <component id="categoriesList" type="For">

                        <binding name="source" value="categoriesList"/>

                        <binding name="value" value="currentCategory"/>

                        <binding name="element" value="literal:tr"/>

            </component>

            <component id="categoryName" type="Insert">

                        <binding name="value" value="currentCategory.name
"/>

            </component>

            <component id="updateCategories" type="InvokeListener">

                        <binding name="listener"
value="listener:updateCategories"/>

            </component>

            <component id="categoriesListForm" type="Form">

                        <binding name="listener"
value="listener:actionOnCategory"/>

            </component>

        <component id="deleteCategory" type="Submit">

                        <binding name="selected" value="buttonClicked"/>

                        <binding name="tag" value="literal:DELETE"/>

        <binding name="listener" value="listener:updateCategories"/>

            </component>

</page-specification>



JAVA

public abstract class CategoriesManager extends BasePage implements
PageBeginRenderListener{

            private List categoriesList;

            public abstract CategoriesGUI getCurrentCategory();



            public void pageBeginRender(PageEvent event) {

                        .......

                        categoriesList = .....;

            }



            public List getCategoriesList() {

                        return categoriesList;

            }



            private String buttonClicked;

            public void setButtonClicked(String buttonClicked) {

                        this.buttonClicked = buttonClicked;

            }

            public String actionOnCategory(IRequestCycle cycle) {


                        if (buttonClicked.equals("DELETE")) {


                                   return null;

                        }

                        return null;

            }

            public abstract boolean isToDeleteCategory();

            boolean category;

            public boolean getToDeleteCategory(){

                        return category;

            }

            public void setToDeleteCategory(boolean cat){

                        this.category = cat;;

            }

            public void updateCategories(IRequestCycle cycle) {

                        IValidationDelegate delegate =
(IValidationDelegate)
getBeans().getBean("delegate");

                        if (cycle.isRewinding()) {

                                   if (isToDeleteCategory()) {


                                               Integer i =
getCurrentCategory().getQlCateId();

                                               deleteCategory(i);

                                   }

                        }

            }









Thanks







Cordialmente,
~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~
ANDRÉS NATES M.
Director de implantación e infraestructura.
Nuevos Medios
Calle 25 No. 127-220 Autopista Cali-Jamundí Km. 7
Tel: (572) - 524 07 77 Ext. 2173
Email:  <mailto:[EMAIL PROTECTED]>
[EMAIL PROTECTED]
Cali <mailto:[EMAIL PROTECTED]>  - Colombia
POLÍTICA DE CALIDAD
Proveer soluciones tecnológicas de software para la gestión del
conocimiento cumpliendo lo pactado con los clientes mediante el
mejoramiento continuo y la innovación, apoyado en la sinergia
corporativa de Parquesoft.





Reply via email to