Hi all,

I am refering to the portlet example (workbench) supplied with the
distribution.

This happens if the user submits rapidly the addition of portlets. You can
end up with
multiple copies of the same portlet!!

One way to replicate this is by replacing the Form Submit button with 
an ImageSubmit button, so that it always stays on the screen and you 
can rapidly hit the mouse to end up with duplicate portlets added to your
page.

Please add the following code to tutorial.portal.Vist class:

public void addModel(int id) {
...
...
if(models == null)
        models = new ArrayList();
if(! models.contains(model) )
        models.add(model);
....
...
}

Basically, we check if the model already exists in the ArrayList, if not we
add it. 

BTW, should we also "synchronized" the addModel() function ?

Cheers,

Rajesh.

-----Original Message-----
From: Natesh Babu Lakshmanan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 26, 2002 3:46 PM
To: [EMAIL PROTECTED]
Subject: Re: [Tapestry-developer] Bookmarkable urls and page redirection


Hi all,

I am using ListEdit component in one of my pages. It has list of objects and

the content of each row comes from an object from the list. I have check 
box, property selection, text box and text area in the ListEdit. The problem

I have is I don't know how to retrieve the user entered values. I have to 
even persist the user entered values.

Snippet of my page specification is:
  <component id="editEachDay" type="ListEdit">
    <binding name="source" expression="workDetailList"/>
    <binding name="value" expression="workDetail"/>
  </component>
<component id="selectCheckbox" type="Checkbox">
    <binding name="selected" expression="workDetail.rowSelected"/>
</component>

        <component id="selectWeekDays" type="PropertySelection">
                <binding name="model" expression="weekDaysModel"/>
                <binding name="value" expression="workDetail.selectedDay"/>
        </component>

        <component id="inputBillableHours" type="TextField">
    <binding name="displayWidth" expression="3"/>
    <binding name="maximumLength" expression="2"/>
    <binding name="value" expression="workDetail.billableHours"/>
    <static-binding name="displayName">Billable Hours</static-binding>
    <static-binding name="type">double</static-binding>
        </component>

        <component id="inputWorkDescription" type="TextArea">
    <binding name="value" expression="workDetail.workDescription"/>
    <binding name="columns" expression="20"/>
    <binding name="rows" expression="2"/>
    <static-binding name="displayName">Work Description</static-binding>
        </component>

I do not know how to get the updated workDetail objects back into a List.

Any help (or examples) is highly appreciated.

Thanks,
Natesh


_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 3 months FREE*. 
http://join.msn.com/?page=features/virus&xAPID=42&PS=47575&PI=7324&DI=7474&S
U= 
http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_virusprotec
tion_3mf



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to