Martijn & Igor;

Thanks for your help, unfortunatily I have to deliver something today, and I had to do it in a different way (edit each item alone, client don't like it :)) I will wrap the project and send it to you, although I don't want you to waist you time because someone like me don't fully understand how to work with models, it has to be a model problem (I dreamt about it in my sleep) :), Thanks allot again.

Regards, Ali

On 2/19/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
ali this doesnt compile when i drop it into the kickstart project.
could you dumb down your code so it can run in kickstart and attach that. i dont have time to do it myself. a rar with kickstart in it would be the best so i can just unrar and run it.

i think in this situation we need to have see it run to help you better because as martijn mentioned it ran fine in his mock up. remove the daos and simply hardcode the list in or something like that.

-Igor



On 2/19/06, Ali Zaid < [EMAIL PROTECTED]> wrote:
HI;

I'm posting the sourse code of what I have, the project is really big, anyway, I really can't understand what I'm doing wrong :(

Guys I really appreciate your help, even if I don't reach a olution, I may consider an alternative way, but I really want to understand what I'm doing wrong.

@Martijn, I will try this, I'm sure that the form get posted because it show the message in the onSubmit "FORM SUBMITTED!!!", but for some reason values don't get updated in the model.

Regards, Ali


On 2/19/06, Martijn Dashorst < [EMAIL PROTECTED]> wrote:
Ali,

I tried to create a mockup, and it works for me. Can you debug the
application and see whether the request parameters are available in
the RequestCycle?

Martijn


On 2/19/06, Ali Zaid < [EMAIL PROTECTED]> wrote:
> NO nested forms for sure, I'm attaching the form generated, I tried both way
> to inatiated the list using onBeginRequest and in constructor, but it
> shouldn't be a problem should it? my problem is that values don't submit at
> all! I do get FORM SUBMITTED!!! and I do get values which are all zeros.
>
>
> <form
> action=""
> method="post"
> id="pnl_items:lst_items:0:row:pnl_priceRequestItems:frm_orderQuantity">
>                 <input type="hidden"
> name="pnl_items:lst_items:0:row:pnl_priceRequestItems:frm_orderQuantity:hf:0"
> id="pnl_items:lst_items:0:row:pnl_priceRequestItems:frm_orderQuantity:hf:0"/>
>                 <tr class="tableRow_forToolTip">
>                   <td><span>PRI AEA3734</span></td>
>                   <td><span>Gist Group</span></td>
>                   <td><span>0</span></td>
>                   <td><input value="0" type="text" size="6"
> name="lst_PriceRequestItems:0:requestedQuantity"/></td>
>                 </tr>
>                 <tr class="tableRow_forToolTip">
>                   <td><span>PRI 3A82F4F</span></td>
>                   <td><span>Raid Al-Nia&#039;ami</span></td>
>                   <td><span>0</span></td>
>                   <td><input value="0" type="text" size="6"
> name="lst_PriceRequestItems:1:requestedQuantity"/></td>
>                 </tr>
>                 <tr class="tableRow_forToolTip">
>                   <td><span>PRI C491231</span></td>
>                   <td><span>Aous</span></td>
>                   <td><span>0</span></td>
>                   <td><input value="0" type="text" size="6"
> name="lst_PriceRequestItems:2:requestedQuantity"/></td>
>                 </tr>
>                 <tr class="tableRow_forToolTip">
>                   <td><span>PRI 5EBCA9E</span></td>
>                   <td><span>Time Technology</span></td>
>                   <td><span>0</span></td>
>                   <td><input value="0" type="text" size="6"
> name="lst_PriceRequestItems:3:requestedQuantity"/></td>
>                 </tr>
>                 <tr class="tableRow_forToolTip">
>                   <td><span>PRI AAF9121</span></td>
>                   <td><span>Haider Zaid</span></td>
>                   <td><span>0</span></td>
>                   <td><input value="0" type="text" size="6"
> name="lst_PriceRequestItems:4:requestedQuantity"/></td>
>                 </tr>
>                 <tr class="tableRow_forToolTip">
>                   <td><span>PRI 13B6700</span></td>
>                   <td><span>Ali Zaid</span></td>
>                   <td><span>0</span></td>
>                   <td><input value="0" type="text" size="6"
> name="lst_PriceRequestItems:5:requestedQuantity"/></td>
>                 </tr>
>                 <tr class="tableRow_forToolTip">
>                   <td><span>PRI A5CD697</span></td>
>                   <td><span>Mohammed Jassim</span></td>
>                   <td><span>0</span></td>
>                   <td><input value="0" type="text" size="6"
> name="lst_PriceRequestItems:6:requestedQuantity"/></td>
>                 </tr>
>                 <tr class="tableRow_forToolTip">
>                   <td><span>PRI 7829AC0</span></td>
>                   <td><span>Smart Systems</span></td>
>                   <td><span>0</span></td>
>                   <td><input value="0" type="text" size="6"
> name="lst_PriceRequestItems:7:requestedQuantity"/></td>
>                 </tr>
>                 <input name="" type="submit" value="Submit" />
>               </form>
>
>
>
>
> On 2/19/06, Matej Knopp <[EMAIL PROTECTED] > wrote:
> > Do you mean that the values you enter to the form aren't preserved?
> > Well, you reload the list of items on every request
> > (onBeginRequest()). So they can't be preserved. Instead, try to lead
> > the list only once (in page constructor). That might help.
> >
> > -Matej
> >
> > On 2/19/06, Ali Zaid <[EMAIL PROTECTED]> wrote:
> > > Guys, PLEASE! PLEASE! PLEASE!!!! tell me why on earth this is not
> working,
> > > the values don't update, It's extreemly Urgent, and I would really
> > > appreciate your help here.
> > >
> > >
> > > package com.yakhdor.application ;
> > >
> > > import java.util.ArrayList;
> > > import java.util.List;
> > >
> > > import wicket.markup.html.basic.Label ;
> > > import wicket.markup.html.form.Form ;
> > > import wicket.markup.html.form.TextField;
> > > import wicket.markup.html.list.ListItem;
> > > import wicket.markup.html.list.ListView;
> > > import wicket.markup.html.panel.Panel ;
> > > import wicket.model.CompoundPropertyModel;
> > > import wicket.model.IModel;
> > > import wicket.model.PropertyModel;
> > >
> > > import com.yakhdor.businessLogic.OfferItem ;
> > > import com.yakhdor.businessLogic.PriceRequestItem ;
> > > import com.yakhdor.database.PriceRequestItemDAO;
> > >
> > > public class OfferItemView_PriceRequestItems_Panel
> extends
> > > Panel {
> > >
> > >     private UserSession session = (UserSession) getSession();
> > >
> > >     private List priceRequestItemsList = new ArrayList();
> > >
> > >     private ListView lst_items;
> > >
> > >     public OfferItemView_PriceRequestItems_Panel(String
> id,
> > > IModel model) {
> > >         super(id, model);
> > >         init();
> > >     }
> > >
> > >     @Override
> > >     protected void onBeginRequest() {
> > >         OfferItem OfferItem = (OfferItem) getModelObject();
> > >         priceRequestItemsList =
> > > PriceRequestItemDAO.getListByRfqItem
> > > (OfferItem.getRfqItem());
> > >         lst_items.modelChanged();
> > >     }
> > >
> > >     private void init()
> > >     {
> > >
> > >         Form frm_orderQuantity = new Form("frm_orderQuantity") {
> > >             @Override
> > >             protected void onSubmit() {
> > >                 // TODO Auto-generated method stub
> > >                 System.out.println("FORM SUBMITTED!!!!!!!!");
> > >                 super.onSubmit();
> > >
> > >                 for (PriceRequestItem item : getPriceRequestItemsList())
> {
> > >                     System.out.println (item.getRequestedQuantity());
> > >                 }
> > >             }
> > >         };
> > >         frm_orderQuantity.setModel(new
> > > PropertyModel(this,"priceRequestItemsList"));
> > >
> > >         lst_items = new
> ListView("lst_PriceRequestItems",
> > > new PropertyModel(this,"priceRequestItemsList"))
> > >         {
> > >
> > >             protected IModel getListItemModel(final IModel
> listViewModel,
> > > final int index)
> > >             {
> > >                 return new
> > > CompoundPropertyModel(super.getListItemModel(listViewModel, index));
> > >             }
> > >
> > >             @Override
> > >             protected void populateItem(ListItem item) {
> > >
> > >                 item.add(new Label("priceRequestItemID"));
> > >                 item.add(new Label(" priceRequest.supplier.name "));
> > >                 item.add(new Label("price"));
> > >                 item.add(new
> > > TextField("requestedQuantity"));
> > >
> > >             }
> > >         };
> > >         lst_items.setOptimizeItemRemoval(true);
> > >         frm_orderQuantity.add(lst_items);
> > >
> > >         add(frm_orderQuantity);
> > >
> > >     }
> > >
> > >     public List
> > > <PriceRequestItem>getPriceRequestItemsList() {
> > >         return priceRequestItemsList;
> > >     }
> > >
> > > }
> > >
> > >
> > > What am I doing wrong ( I used wicket 1.2 (12 Feb) but I also try
> several
> > > other builds)
> > >
> > > PLEASE help me get over this tonight or I'm dead :(
> > >
> > > --
> > > Regards, Ali
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> >
> http://sel.as-us.falkag.net/sel?cmdlnk&kid3432&bid#0486&dat1642
> > _______________________________________________
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
>
> --
> Regards, Ali


--
Living a wicket life...

Martijn Dashorst - http://www.jroller.com/page/dashorst

Wicket 1.1.1 is out: http://wicket.sourceforge.net/wicket-1.1


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmdlnk&kid3432&bid#0486&dat1642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



--
Regards, Ali





--
Regards, Ali

Reply via email to