WebMarkupContainer not refreshing after form error

2010-12-13 Thread taygolf

Hey guys,

I have a unique error. I have a form and I have a few fields in that form
wrapped in a webMarkupContainer to refresh once a selection has been made.
This handles default values based on another form value nicely and
everything works fine.

My problem is that I also have required fields in this form. If the user
tries to submit the form without filling out the required fields then they
get the proper error. The only issue is that once this is done, the
WebMarkupContainer no longer refreshes like it should.

It is like the Container has lost connection to the page or something.

Anyone have a clue what might be going on?

Thanks

T
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WebMarkupContainer-not-refreshing-after-form-error-tp3085989p3085989.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: tooltip inside webMarkupContainer refreshing

2010-11-10 Thread taygolf

wow you are my hero!!!

I have been stuck on this all week and could not figure out what I was doing
wrong. Of course it was something simple like that that I completely over
looked.

Thanks for the help for sure!

T
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/tooltip-inside-webMarkupContainer-refreshing-tp3036878p3036965.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



tooltip inside webMarkupContainer refreshing

2010-11-10 Thread taygolf

Hey guys. I have a ListView that contains a list of employee names. This list
is wrapped in a webMarkupContainer which allows the user to add and delete
names from the listview. All of this works properly. 

I have setup a tooltip that allows the user to hover over the employee name
and it will display more information about the employee like title and phone
number and such. This also works when it is added.

The problem comes in when the user deletes or edits the employee. Say the
user wants to delete an employee from the list. The employee is deleted from
the list but the tooltip for the old employee remains. The same thing
happens if the user wants to change one employee to another.

It seems that the data is getting refreshed but the tooltip is not.

Any clue on what I can do here? I posted this question on Sunday but it did
not show up on the message board so I thought I would post it again.

Here is the code for the ListView



ListView lv = new ListView("rows", kmList) {
public void populateItem(final ListItem 
item)
{
final int index = item.getIndex();
item.add(new AttributeModifier("class", true, 
new
AbstractReadOnlyModel()
{
public String getObject()
{
return (index % 2 == 1) ? "even" : "odd";
}
}));
item.add(new AttributeModifier("height", true, 
new
Model("20")));
//create delete button using a modal and ajax 
link
final ModalWindow deletemodal;
deletemodal = new ModalWindow("deletemodal");
deletemodal.setInitialHeight(100);
deletemodal.setInitialWidth(350);
deletemodal.setResizable(true);
deletemodal.setPageMapName("KeymemberDelete");
deletemodal.setCookieName("KeymemberDelete");
deletemodal.setTitle("Delete Key Member");
deletemodal.setPageCreator(new 
ModalWindow.PageCreator() {
public Page createPage() {
return new DeleteRow(item.getIndex(), 
deletemodal, pd,
"keymember");
}
});
deletemodal.setWindowClosedCallback(new
ModalWindow.WindowClosedCallback() {
public void onClose(AjaxRequestTarget target) {
target.addComponent(listContainer);
if(pd.getKeyMemberList().isEmpty()){
listContainer.setVisible(false);
}
}
});
item.add(new AjaxFallbackLink("deletelink") {
public void onClick(AjaxRequestTarget target) {
  deletemodal.show(target);
}
});

item.add(deletemodal);

//create modal and ajax link to edit keymembers
final ModalWindow editmodal;
editmodal = new ModalWindow("editmodal");
editmodal.setInitialHeight(300);
editmodal.setInitialWidth(700);
editmodal.setResizable(true);
editmodal.setPageMapName("KeymemberEdit");
editmodal.setCookieName("KeymemberEdit");
editmodal.setTitle("Update Key Member");
editmodal.setPageCreator(new 
ModalWindow.PageCreator() {
public Page createPage() {
return new KeyMemberPopup(item.getIndex(), 
"update",
editmodal, pd);
}
});
editmodal.setWindowClosedCallback(new
ModalWindow.WindowClosedCallback() {
public void onClose(AjaxRequestTarget target) {
target.addComponent(listContainer);
}
});
AjaxFallbackLink kmlink = new 
AjaxFallbackLink("kmlink") {
public void onClick(AjaxRequestTarget target) {
editmodal.show(target);
 

JS and CSS issues with Panel or WebMarkupContainer

2010-05-24 Thread taygolf

Hey guys,

I have a webpage that contains several panels. Some of these panels have
WebMarkupContainers that allow the user to add stuff to a listview and be
refreshed without refreshing the page.

My problem is applying JS and CSS to the data in the WebMarkupContainer. I
am trying to use sweetTitles to give me tooltips for this data.

I have to refresh the page and it works fine but without refreshing it is
like the CSS and the JS can not communicate with the data in the
WebMarkupConatiner.

I know I am doing something wrong but I can not figure it out.

I have made a small example with a Customer already added to the listView
inside the WebMarkupContainer. I get the same results with this code. The JS
and CSS do not work on the hoverover.

I have tried adding the JS and CSS to the MarkupContainer, Panel, and the
webpage with no luck. I get the same results no mater what.

Here is the code. Any help would be much appreciated. In this example I am
adding the tooltip to the POC.


public class HoverPanel extends Panel {

ProjectData pd;

public HoverPanel(String id, final ProjectData pdata) {
  super(id);
  
  add(JavascriptPackageResource.getHeaderContribution(HoverPanel.class,
"addEvent.js"));
  add(JavascriptPackageResource.getHeaderContribution(HoverPanel.class,
"sweetTitles.js"));
  add(CSSPackageResource.getHeaderContribution(HoverPanel.class,
"sweetTitles.css"));
  
  pd = pdata;
  List customerList = new ArrayList();
  CustomerData cd = new CustomerData();
  cd.setId(1234);
  cd.setName("Customer 1");

  //create poc for customer
  List pocList = new ArrayList();
  POCData poc = new POCData();
  poc.setId(10);
  poc.setName("Peterson, Tracy");
  poc.setPhone("555-555-");
  poc.setTitle("Big Shot");
  poc.setEmail("em...@something.com");
  poc.setCustPocId(3);
  pocList.add(poc);

  cd.setPOCList(pocList);
  customerList.add(cd);
  pd.setCustomerList(customerList);
  
  //create container to hold listview
  final WebMarkupContainer listContainer = new
WebMarkupContainer("theContainer");
  listContainer.setOutputMarkupId(true);
  listContainer.setVisible(true);
  listContainer.setOutputMarkupPlaceholderTag(true);
  add(listContainer);
  
  //get Customer List
  IModel> custList =  new
LoadableDetachableModel>() {
  protected List load() {
  return pd.getCustomerList();
  }
  };
 
  //create listview of customers
  ListView lv = new ListView("rows",
custList) {
public void populateItem(final ListItem item)
{
final int index = item.getIndex();
item.add(new AttributeModifier("class", true, new
AbstractReadOnlyModel()
{
public String getObject()
{
return (index % 2 == 1) ? "even" : "odd";
}
}));
item.add(new AttributeModifier("height", true, new
Model("20")));

//create modal and ajax link to edit customers
final ModalWindow editmodal;
editmodal = new ModalWindow("editmodal");
editmodal.setInitialHeight(350);
editmodal.setInitialWidth(600);
editmodal.setResizable(true);
editmodal.setPageMapName("CustomerEdit");
editmodal.setCookieName("CustomerEdit");
editmodal.setTitle("Update Customer");
editmodal.setPageCreator(new ModalWindow.PageCreator() {
public Page createPage() {
return new CustomerPopup(item.getIndex(), "update",
editmodal, pd);
}
});
editmodal.setWindowClosedCallback(new 
ModalWindow.WindowClosedCallback()
{
public void onClose(AjaxRequestTarget target) {
target.addComponent(listContainer);
}
});
AjaxFallbackLink custlink = new
AjaxFallbackLink("hoverlink") {
public void onClick(AjaxRequestTarget target) { 
editmodal.show(target);
}
};
   //do not allow them to close the modal window by clicking 
the X
editmodal.setCloseButtonCallback(new 
ModalWindow.CloseButtonCallback(){
  public boolean 
onCloseButtonClicked(AjaxRequestTarget target)

Re: DateTextField and DatePicker returning wrong date

2010-05-06 Thread taygolf

no that is not the issue although I did see that issue and I am happy that it
is fixed.

My issue is that dealing with the boolean applyTimeZoneDifference for
PatternDateConverter. It doesn't matter if I set applyTimeZoneDifference to
true or false. The difference is still applied. I would like to not apply
the difference but it does not seem to be working.

I wanted to make sure I was not doing something wrong before I officially
called it a bug.

Has anyone else had issues with applyTimeZoneDifference when they try and
set it to false?

T
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DateTextField-and-DatePicker-returning-wrong-date-tp2126267p2132868.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: DateTextField and DatePicker returning wrong date

2010-05-05 Thread taygolf

anyone have any help here? I really think this is a bug inside wicket but I
may be doing something wrong. Any opinions would be greatly appreciated

T
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DateTextField-and-DatePicker-returning-wrong-date-tp2126267p2131360.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



DateTextField and DatePicker returning wrong date

2010-05-04 Thread taygolf

Hey guys,

I guess I am confused on how DateTextField and DatePicker work

Here is my code

DateTextField dateTextField = new DateTextField("textField", new
PropertyModel(this, "value"), new PatternDateConverter("MM/dd/",
false));
DatePicker dp = new DatePicker(){
public boolean enableMonthYearSelection(){
return true;
}
};
dateTextField.add(dp);

What is happening is that value is being set to server time and the actual
date that I have selected is being displayed on the screen. So if I select
05/20/2010 that is what shows up in the dateTextField on the screen but the
actual value that is going to the server is 05/19/2010 because the server is
GMT and I am Central.

I thought by setting the timezone difference to false I would get the actual
date selected which is what I want but that does not seem to be the case. I
get the same value on the screen and in the server no matter if the value is
set to true or false.

Am I doing something wrong or is this a bug?

I am using wicket 1.4.8

Thanks

T
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DateTextField-and-DatePicker-returning-wrong-date-tp2126267p2126267.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: CSS not loading on WebMarkupContainer refresh

2010-04-22 Thread taygolf

I am using wicket 1.3.7 currently so I can not use the CSSPackageResource.

Is there a way to just use PackageResource? I know that I need to upgrade
but right now that is not possible.

Also why can't I just add the CSS file to my html with a link and be done
with it like this:


Why does the markupcontainer not pick it up? If I move the data out of the
markup container then everything works fine but of course I need to have the
ability to allow the user to add data without having to refresh the page all
the time.

Thanks

T
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CSS-not-loading-on-WebMarkupContainer-refresh-tp2019665p2020736.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: CSS not loading on WebMarkupContainer refresh

2010-04-22 Thread taygolf

ok I just added a label outside of the webmarkupcontainer and added the
tooltip stuff to it and it works perfectly.

So the problem is the webmarkupcontainer. Everytime it is refreshed through
ajax instead of refreshing the entire page, I lose the connection between
the css and the html inside the container.

I am sure I have to add something to link these together but I am not sure
what that is.

Any ideas would be greatly appreciated.

T
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CSS-not-loading-on-WebMarkupContainer-refresh-tp2019665p2020666.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: CSS not loading on WebMarkupContainer refresh

2010-04-22 Thread taygolf

absolutely.

I have tried two things and they both work the same way.

first using a wicket id
add(new StyleSheetReference("stylesheet", CustomerPanel.class,
"jquery.tooltip.css")); 

and
straight html


What I have found through looking at the code is that the WebMarkupContainer
is not being shown in the view page source. 

So when the page first loads I look at the page source and everything is
showing up just like it should. The listview is empty so it is hidden.

I then click the ajaxlink that open up a modal that allows me to add data to
the list view. When the modal is closed the listview which is inside the
webmarkupcontainer is refreshed and the new data is shown on the screen.

I then hover over the new data and the hover over works but the css
formatting is not there. I view the page source again and it still shows
that the listview is empty. If I refresh the page then the hover over works
perfect with the css.

My guess is that the refreshed listview and the css do not know that each
other exist. Maybe I am refreshing the webmarkupcontainer wrong or maybe I
should add the css to it instead of the entire html page.


Any ideas?

Thanks

T
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CSS-not-loading-on-WebMarkupContainer-refresh-tp2019665p2020630.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



CSS not loading on WebMarkupContainer refresh

2010-04-21 Thread taygolf


Hey guys. I have a page that contains 4 panels. In one of these panels I
have a listview that is inside a WebMarkupContainer.

The user click on an ajax link which opens up a modal. The user fills out
the form and clicks submit. On submit the new information is added to the
list view and the WebMarkupContainer is refreshed and the new information is
displayed in the panel

All of this is working just fine.

The problem that I am running into now is that I want to add a tooltip to
the data that is in the listview. I have done this by adding a
AttributeModifier to my code and then adding the css file to my html code.

FOr some reason this will not work unless I refresh the entire page. So when
the new data is added to the listview the css does not work. After I click
the page refresh button it works prefectly.

How can I get it to work when the WebMarkupContainer is refreshed?

Thanks

T
-- 
View this message in context: 
http://n4.nabble.com/CSS-not-loading-on-WebMarkupContainer-refresh-tp2019665p2019665.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Ajax update DefaultDataTable using textfield

2008-10-10 Thread taygolf

I guess I just needed some time away from the computer to figure this one
out. After looking at it this morning I found my error. In the
AjaxFormComponentUpdatingBehavior I was setting the table equal to a new
DefaultDataTable when I should have been using table.replaceWith(new
DataTable).

Thanks

T

Timo Rantalaiho wrote:
> 
> On Thu, 09 Oct 2008, taygolf wrote:
>> Basically what I want to do is have a textfield on my page. when the user
>> types a letter in the textfield I want to take that letter and update the
>> query that I send to my dataprovider. The dataprovider will then update
>> the
>> DefaultDataTable.
>> 
>> I have place the DefaultDataTable in a WebMarkupContainer and I am
>> updating
>> the query and then calling then setting the DefaultDataTable to the new
>> provider and the adding the WebMarkupContainer to the target of the
>> AjaxFormComponentUpdatingBehavior but it does not seem to want to work.
>> All
>> of this is in a panel which might be causing some issues I am not sure.
> 
> It should be fine, we've done something like this using
> DataView (for easier customising). 
> 
> To help you it would be important to have the problem in a
> runnable quickstart (or at least see the code).
> 
> Best wishes,
> Timo
> 
> -- 
> Timo Rantalaiho   
> Reaktor Innovations Oyhttp://www.ri.fi/ >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Ajax-update-DefaultDataTable-using-textfield-tp19906974p19920718.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Ajax update DefaultDataTable using textfield

2008-10-09 Thread taygolf

Hey guys,

I am trying to update a DefaultDataTable using a textfield and ajax. I have
done it to a ListChoice before but for some reason I can not get it to work
with a DefaultDataTable.

Basically what I want to do is have a textfield on my page. when the user
types a letter in the textfield I want to take that letter and update the
query that I send to my dataprovider. The dataprovider will then update the
DefaultDataTable.

I have place the DefaultDataTable in a WebMarkupContainer and I am updating
the query and then calling then setting the DefaultDataTable to the new
provider and the adding the WebMarkupContainer to the target of the
AjaxFormComponentUpdatingBehavior but it does not seem to want to work. All
of this is in a panel which might be causing some issues I am not sure.

Am I looking at this the right way ir is there somewhere else I need to
look.

All I really want is a DefaultDataTable with a searchbox at the top to
narrow down what is being shown in the Table.

Thanks

T
-- 
View this message in context: 
http://www.nabble.com/Ajax-update-DefaultDataTable-using-textfield-tp19906974p19906974.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AJAX target cache issues I think please help

2008-08-05 Thread taygolf

Hey guys I have a small problem. I have 2 fields. One named type and one
named subtype. They both are textfields with buttons next to them. When the
user clicks the button a modal window comes up and asks the user to select a
value. The value is selected and when the user clicks ok the modal window
closes and ajax puts the value in the textfield for me. For subtype the list
that appears for the user to select from is narrowed down by what type was
first selected. fairly easy so far.

The problem I encounter is when I select a type and subtype and then decide
to change the type. I have a function setup that when the type is changed
the subtype is automatically set to blank. This works fine as well. THe
problem occurs when I go to select a new subtype. the correct list of values
is shown but if I decide to close the modal without selecting a new value
then the old value returns! I can not have this. the old value as far as I
know has been erased with blank. I can only thin k that it is coming back
through cache or something like that.

How can I fix this issue?

Thanks for the help

T
-- 
View this message in context: 
http://www.nabble.com/AJAX-target-cache-issues-I-think-please-help-tp18839894p18839894.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



listchoice filtered by textfield ajax help

2008-07-10 Thread taygolf

Hey guys,

I have a question for yall. I want to have a listchoice that holds a list of
options that can be selected by the user. Then I want to have an optional
textfield. IF the textfield is blank I want all choices to show up in the
listchoice. If it is not blank I want to filter the choices in the
listchoice by the text that is typed in the textfield. I also want this to
happen as the user types in the textfield so I want to us ajax.

Is this possible with wicket? I have looked at the autocompletetextfiled and
it does some of the stuff that I wnat to do but it also allows the user to
type whatever they want to type and I want to force the user to select an
option from the list of choices.

Any help would be greatly appreciated

Thanks

T
-- 
View this message in context: 
http://www.nabble.com/listchoice-filtered-by-textfield-ajax-help-tp18384359p18384359.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: modal CloseButtonCallback returning old value

2008-07-07 Thread taygolf

Still having this issue. Can anyone tell me what it might be. I think it is a
cache issue but I am really not sure

Thanks

T


taygolf wrote:
> 
> hey guys. I have a problem that is stumping me. I have 2 textfields one
> called type and one called subtype. They both have modal windows that are
> opened to show the list of values that can be selected for them. Of course
> I have it setup where the user can not select a subtype before they select
> a type and the list of values for subtype changes depending on what
> subtype is selected.
> 
> Now if I user selects a type and subtype and then decideds to change the
> type I am setting the subtype to blank. This all works fine. Now when the
> user decides to select a new subtype they are presented with the correct
> list to choose from. If instead of selecting a value and clicking submit
> the user for some strange reason decides to click the X button to close
> the modal window the old value that was whipped out and replaced with
> blank when the user choose a new type returns to the blank! I can not
> allow this to happen even though it will probably not happen often in the
> real world.
> 
> My quick fix is to set onCloseButtonClicked to return false. This forces
> the user to pick a value but I would rather figure out what is allowing it
> to put in the old value. I am guessing that it is coming from cache some
> how but I am not sure.
> 
> Any suggestions?
> 
> Thanks
> 
> T 
> 

-- 
View this message in context: 
http://www.nabble.com/modal-CloseButtonCallback-returning-old-value-tp18198443p18325030.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



modal CloseButtonCallback returning old value

2008-06-30 Thread taygolf

hey guys. I have a problem that is stumping me. I have 2 textfields one
called type and one called subtype. THey both have modal windows that are
opened to show the list of values that can be selected for them. Of course I
have it setup where the user can not select a subtype before they select a
type and the list of values for subtype changes depending on what subtype is
selected.

Now if I user selects a type and subtype and then decideds to change the
type I am setting the subtype to blank. This all works fine. Now when the
user decides to select a new subtype they are presented with the correct
list to choose from. If instead of selecting a value and clicking submit the
user for some strange reason decides to click the X button to close the
modal window the old value that was whipped out and replaced with blank when
the user choose a new type returns to the blank! I can not allow this to
happen even though it will probably not happen often in the real world.

My quick fix is to set onCloseButtonClicked to return false. This forces the
user to pick a value but I would rather figure out what is allowing it to
put in the old value. I am guessing that it is coming from cache some how
but I am not sure.

Any suggestions?

Thanks

T 
-- 
View this message in context: 
http://www.nabble.com/modal-CloseButtonCallback-returning-old-value-tp18198443p18198443.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



lossing form data on ajax repaint

2008-06-25 Thread taygolf

Hey guys. I have a small problem. I have a group of textfields that are
created on the fly from the database by using a panel. All of the textfields
use modal windows as popups to populate them with data except for 2. These 2
are manually filled in my the user. All of the textfields are in a
WebMarkupContainer. The reason I have them in a WebMarkupContainer is
because I need to default some fields based on what is selected in another
field and I use ajax to repaint the WebMarkupContainer to show my changes.

The problem is when I repaint the WebMarkupContainer the 2 testfields that
have data that was manually entered by the users are completely erased and
set back to blank.

How can I keep the data from being cleared on an ajax repaint?

Thanks

T
-- 
View this message in context: 
http://www.nabble.com/lossing-form-data-on-ajax-repaint-tp18114293p18114293.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



What is DateTextFields Max and Min date or range?

2008-06-23 Thread taygolf

Hey guys I have been looking and I wanted to know what the DateTextField max
and min dates were. so if my user wanted to click back to say December 1950
could they? I know it is not very practical and I do not think this will
happen but I wanted to see how far back they could go and how far ahead they
could go.

Thanks

T
-- 
View this message in context: 
http://www.nabble.com/What-is-DateTextFields-Max-and-Min-date-or-range--tp18076245p18076245.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DateTextField and DatePicker are not using the same date pattern

2008-06-20 Thread taygolf

Yes it is doing the same thing to me. The formats are off unless I use S- for
my date style which is not really what I want to use.

Have you found a fix for this?

Thanks

T

Eric Rotick wrote:
> 
> Further to this I've now checked the source and the DatePicker does
> correctly pick up the date format from the DateTextField or,
> alternatively,
> an overridden getDatePattern also works.
> 
> It seems to be going wrong when the date is sent from the DatePicker back
> to
> the DateTextField via the onchange Javascript event handler. I've not yet
> figured out how this works yet.
> 
> Has anyone used the DatePicker in this way to confirm that it does or does
> not work as expected?
> 
> 
> On Fri, Mar 28, 2008 at 1:18 PM, Eric Rotick <[EMAIL PROTECTED]> wrote:
> 
>> I have a situation where the DateTextField and DatePicker are not using
>> the same date pattern although I set them to the same value.
>>
>> If I have an existing date in the model then it is formatted correctly
>> and
>> that date is also inherited correctly when the DatePicker opens. When I
>> then
>> select a different date in the DatePicker the correct date value is
>> returned
>> to the DateTextField but the format it wrong. Then if I submit the form I
>> get an error on the DateTextField.
>>
>> For example, if I select a date of "28/Mar/2008" in the DatePicker it
>> gets
>> returned to the DateTextField as "28/3/2008".
>>
>> Any ideas?
>>
>> import org.apache.wicket.datetime.markup.html.form.DateTextField;
>> import org.apache.wicket.datetime.PatternDateConverter;
>> import org.apache.wicket.extensions.yui.calendar.DatePicker;
>> ...
>>
>> public class DateField extends Panel {
>>
>> public DateField(
>> String id,
>> boolean readonly,
>> IField field,
>> IModel model
>> )
>> {
>> super( id );
>>
>>
>> final String dateFormat = "dd/MMM/";
>> PatternDateConverter pdc = new PatternDateConverter( dateFormat,
>> true );
>>
>> DateTextField dtf = new DateTextField( "textValue", new
>> NamedAccessorModel( model, field.getModelName( ) ), pdc );
>> add( dtf );
>>
>> DatePicker dp = new DatePicker( ) {
>> protected boolean enableMonthYearSelection( ) {
>> return true;
>> }
>> protected String getDatePattern( ) {
>> return dateFormat;
>> }
>> };
>> dtf.add( dp );
>> }
>>
>> }
>>
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/DateTextField-and-DatePicker-are-not-using-the-same-date-pattern-tp16351493p18030470.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: autocomplete: no popup when field is empty

2008-06-18 Thread taygolf

I am still having issues with this. I am using 1.4-m2 with your newest
additions. It is much better but it really only half way gives the user what
he is asking for. He wants to list to show up on an empty input. The way you
have it implemented is the user has to click on the textfield and then press
the down key to get the entire list to show up on an empty input. While this
sort of fixes the issue I think it would be more useful if you simply had
the list show up when the textfield loads instead of having to click on the
textfield and press the down arrow. This will knock down a lot of user
confusion. Is there a way to simply always show the div that holds the list
of values? I may be confused here but I have not found a way to fix this
issue on my own.

Thanks

T 


Gerolf Seitz wrote:
> 
> right, but since it's in extensions, everything has to be homegrown :/
> 
> On Wed, Apr 23, 2008 at 11:11 PM, Johan Compagner <[EMAIL PROTECTED]>
> wrote:
> 
>> not by us ;)
>> Gerolf is ofcourse using a "standard" fully tested lib right ;)
>>
>>
>> On Wed, Apr 23, 2008 at 10:58 PM, Igor Vaynberg <[EMAIL PROTECTED]>
>> wrote:
>>
>> > heh, that is 10kb more of javascript to maintain
>> >
>> > -igor
>> >
>> >
>> > On Wed, Apr 23, 2008 at 12:40 PM, Johan Compagner
>> <[EMAIL PROTECTED]>
>> > wrote:
>> > > i really dont care about a 3kb or 13kb script ..
>> > >  Those are cached anyway so thats fine by me
>> > >  its not that it its 100kb+ or something like that
>> > >
>> > >  johan
>> > >
>> > >
>> > >  On Wed, Apr 23, 2008 at 8:34 PM, Gerolf Seitz
>> <[EMAIL PROTECTED]
>> >
>> > >  wrote:
>> > >
>> > >
>> > >
>> > >  > i _could_ use something from a combobox i did some time ago:
>> > >  >
>> http://people.apache.org/~gseitz/combo/
>> 
>> > 
>> > >  > 
>> > >  > but that script is 13kb (unstripped) compared to
>> wicket-autocomplete
>> > >  > 3k (stripped) and it's based on YUI...
>> > >  >
>> > >  > On Wed, Apr 23, 2008 at 4:49 PM, Gerolf Seitz <
>> [EMAIL PROTECTED]
>> > >
>> > >  > wrote:
>> > >  >
>> > >  > > k, it's basically done.
>> > >  > > if the list is longer than the browser's height, scrolling with
>> > both the
>> > >  > > keyboard
>> > >  > > and the mouse either feels kinda awkward (because the entire
>> page
>> > gets
>> > >  > > scrolled
>> > >  > > with .scrollIntoView) or even impossible.
>> > >  > > what we could do now is the following:
>> > >  > > put the list in another div with style "overflow:scroll; height:
>> > XYpx;"
>> > >  > > this way scrollIntoView does not affect the entire page.
>> > >  > >
>> > >  > > now if anyone can think of better names than "allowEmptyInput"
>> or
>> > >  > > "showListOnEmptyInput" i will happily use the better suggestions
>> ;)
>> > >  > >
>> > >  > > Gerolf
>> > >  > >
>> > >  > >
>> > >  > > On Wed, Apr 23, 2008 at 4:26 PM, Gerolf Seitz <
>> > [EMAIL PROTECTED]>
>> > >  > > wrote:
>> > >  > >
>> > >  > > > nah, i think this should be pretty straight forward.
>> > >  > > > let me take a look.
>> > >  > > >
>> > >  > > > Gabriel, can you file a jira issue for that? thanks.
>> > >  > > >
>> > >  > > > Gerolf
>> > >  > > >
>> > >  > > >
>> > >  > > > On Wed, Apr 23, 2008 at 4:14 PM, Johan Compagner <
>> > [EMAIL PROTECTED]
>> > >  > >
>> > >  > > > wrote:
>> > >  > > >
>> > >  > > > > I guess this is being done because when nothing is typed
>> there
>> > is
>> > >  > > > > normally
>> > >  > > > > no list?
>> > >  > > > >
>> > >  > > > > Gerolf do you see any problem making this configurable so
>> that
>> > it
>> > >  > does
>> > >  > > > > show
>> > >  > > > > always a list if there are values?
>> > >  > > > >
>> > >  > > > > johan
>> > >  > > > >
>> > >  > > > >
>> > >  > > > > On Wed, Apr 23, 2008 at 2:53 PM, Gabriel Erzse <
>> > >  > > > > [EMAIL PROTECTED]>
>> > >  > > > > wrote:
>> > >  > > > >
>> > >  > > > > > Hi,
>> > >  > > > > >
>> > >  > > > > > I am using the autocomplete feature of Wicket, and I would
>> > like
>> > >  > the
>> > >  > > > > user
>> > >  > > > > > to see the entire list of available values when the input
>> > field is
>> > >  > > > > empty.
>> > >  > > > > > Then, as he starts typing values in the input field, the
>> list
>> > of
>> > >  > > > > values will
>> > >  > > > > > narrow down.
>> > >  > > > > >
>> > >  > > > > > However I see that when the input field is empty, the
>> popup
>> > for
>> > >  > > > > > autocomplete is not displayed (for example when I press
>> down
>> > >  > arrow).
>> > >  > > > > I
>> > >  > > > > > searched in the wicket code and I saw that in file
>> > >  > > > > "wicket-autocomplete.js",
>> > >  > > > > > in function "doUpdateChoices" there are two checks for the
>> > >  > situation
>> > >  > > > > when
>> > >  > > > > > the input field is empty. These checks don't allow for the
>> > popup
>> > >  > to
>> > >  > > > > be
>> > 

Re: How can I customize Autocomplete?

2008-06-05 Thread taygolf

I am bumping this because this is an issue I know people are interested in. I
am not the only one wanting the choices for autocomplete to be shown on a
null value. I know technically you have this fixed in 1.4-m2 but you still
have to press the down arrow. I would like the choices to show up
automatically which I am sure is what most users wanting this feature want
as well. please respond and help me customize my settings to do this or
please add this feature in the next release

Thanks

T



taygolf wrote:
> 
> Hey everyone. I am wanting to customize autocomplete textfield a little
> and I am not sure what I need to do to get the behavior I would like. I am
> using the 1.4-m2 jars for my development because I am really wanting the
> choices to show up with an empty textfield.
> 
> Basically I would like the Div to be visible at all times. So when the
> page is created you would see the textfield as well as the div with all
> the choices listed below it. The user can then type in the textfield to
> narrow down the choices or simply choose from the list of choices.
> 
> I have implemented autocompletesettings and I have set
> showlistonemptyinput to true but you still have to physically click on the
> textfield and press the down arrow to get the list to show. This is going
> to confuse my users and they will not get it at all.
> 
> So is there a way to show the list at all times without having to press
> the down arrow. Is there something I can do on my end that can make this
> happen or is this a new feature that needs to be added? I have talked to
> Gerolf about this some but i am still unsure about what I need to do to
> get this to work the way my users want it.
> 
> Thanks
> 
> T
> 

-- 
View this message in context: 
http://www.nabble.com/How-can-I-customize-Autocomplete--tp17624104p17678516.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How can I customize Autocomplete?

2008-06-03 Thread taygolf

Hey everyone. I am wanting to customize autocomplete textfield a little and I
am not sure what I need to do to get the behavior I would like. I am using
the 1.4-m2 jars for my development because I am really wanting the choices
to show up with an empty textfield.

Basically I would like the Div to be visible at all times. So when the page
is created you would see the textfield as well as the div with all the
choices listed below it. The user can then type in the textfield to narrow
down the choices or simply choose from the list of choices.

I have implemented autocompletesettings and I have set showlistonemptyinput
to true but you still have to physically click on the textfield and press
the down arrow to get the list to show. This is going to confuse my users
and they will not get it at all.

So is there a way to show the list at all times without having to press the
down arrow. Is there something I can do on my end that can make this happen
or is this a new feature that needs to be added? I have talked to Gerolf
about this some but i am still unsure about what I need to do to get this to
work the way my users want it.

Thanks

T
-- 
View this message in context: 
http://www.nabble.com/How-can-I-customize-Autocomplete--tp17624104p17624104.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: autocomplete show div while textfield is empty

2008-06-02 Thread taygolf

Got it. It is being released in the new 1.4-m2 that came out today.

Thanks

T

taygolf wrote:
> 
> no one???
> 
> 
> 
> 
> 
> taygolf wrote:
>> 
>> Hey guys. I have been playing with autocompletetextfield and I really
>> like it now that the ie bug is fixed with the 1.4 milestone. The only
>> question I have about it is how do I make the list visible all the time.
>> Basically I want the div to be visible all the time no matter what has
>> been entered in the textfield. that way the user can start typing the
>> name and the choices will be narrowed down but if they simply want to
>> select from all choices they can. I have tried several things but none of
>> them have worked so far. There has to be a set div to visible some where
>> that I am missing
>> 
>> Thanks
>> 
>> T
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/autocomplete-show-div-while-textfield-is-empty-tp17497376p17609336.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: autocomplete show div while textfield is empty

2008-06-02 Thread taygolf

no one???





taygolf wrote:
> 
> Hey guys. I have been playing with autocompletetextfield and I really like
> it now that the ie bug is fixed with the 1.4 milestone. The only question
> I have about it is how do I make the list visible all the time. Basically
> I want the div to be visible all the time no matter what has been entered
> in the textfield. that way the user can start typing the name and the
> choices will be narrowed down but if they simply want to select from all
> choices they can. I have tried several things but none of them have worked
> so far. There has to be a set div to visible some where that I am missing
> 
> Thanks
> 
> T
> 

-- 
View this message in context: 
http://www.nabble.com/autocomplete-show-div-while-textfield-is-empty-tp17497376p17602208.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: autocomplete: no popup when field is empty

2008-05-27 Thread taygolf

has this been implemented yet? I just posted a similar question to this and I
would like to show the list of choices even if the textfield is blank as
well.

Thanks

T



Johan Compagner wrote:
> 
> showListOnEmptyInput looks descriptive enough for me :)
> 
> On Wed, Apr 23, 2008 at 4:49 PM, Gerolf Seitz <[EMAIL PROTECTED]>
> wrote:
> 
>> k, it's basically done.
>> if the list is longer than the browser's height, scrolling with both the
>> keyboard
>> and the mouse either feels kinda awkward (because the entire page gets
>> scrolled
>> with .scrollIntoView) or even impossible.
>> what we could do now is the following:
>> put the list in another div with style "overflow:scroll; height: XYpx;"
>> this way scrollIntoView does not affect the entire page.
>>
>> now if anyone can think of better names than "allowEmptyInput" or
>> "showListOnEmptyInput" i will happily use the better suggestions ;)
>>
>> Gerolf
>>
>> On Wed, Apr 23, 2008 at 4:26 PM, Gerolf Seitz <[EMAIL PROTECTED]>
>> wrote:
>>
>> > nah, i think this should be pretty straight forward.
>> > let me take a look.
>> >
>> > Gabriel, can you file a jira issue for that? thanks.
>> >
>> > Gerolf
>> >
>> >
>> > On Wed, Apr 23, 2008 at 4:14 PM, Johan Compagner <[EMAIL PROTECTED]>
>> > wrote:
>> >
>> > > I guess this is being done because when nothing is typed there is
>> > > normally
>> > > no list?
>> > >
>> > > Gerolf do you see any problem making this configurable so that it
>> does
>> > > show
>> > > always a list if there are values?
>> > >
>> > > johan
>> > >
>> > >
>> > > On Wed, Apr 23, 2008 at 2:53 PM, Gabriel Erzse <
>> [EMAIL PROTECTED]>
>> > > wrote:
>> > >
>> > > > Hi,
>> > > >
>> > > > I am using the autocomplete feature of Wicket, and I would like the
>> > > user
>> > > > to see the entire list of available values when the input field is
>> > > empty.
>> > > > Then, as he starts typing values in the input field, the list of
>> > > values will
>> > > > narrow down.
>> > > >
>> > > > However I see that when the input field is empty, the popup for
>> > > > autocomplete is not displayed (for example when I press down
>> arrow).
>> I
>> > > > searched in the wicket code and I saw that in file
>> > > "wicket-autocomplete.js",
>> > > > in function "doUpdateChoices" there are two checks for the
>> situation
>> > > when
>> > > > the input field is empty. These checks don't allow for the popup to
>> be
>> > > > visible.
>> > > >
>> > > > So, my questions would be: does anyone know why this was done so,
>> and
>> > > can
>> > > > I somehow disable this behavior? I would find it really useful to
>> be
>> > > able to
>> > > > display a list of values even when the input field is empty.
>> > > >
>> > > > Thank you,
>> > > > Gabi.
>> > > >
>> > > >
>> > > >
>> -
>> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > > > For additional commands, e-mail: [EMAIL PROTECTED]
>> > > >
>> > > >
>> > >
>> >
>> >
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/autocomplete%3A-no-popup-when-field-is-empty-tp16855424p17497544.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



autocomplete show div while textfield is empty

2008-05-27 Thread taygolf

Hey guys. I have been playing with autocompletetextfield and I really like it
now that the ie bug is fixed with the 1.4 milestone. The only question I
have about it is how do I make the list visible all the time. Basically I
want the div to be visible all the time no matter what has been entered in
the textfield. that way the user can start typing the name and the choices
will be narrowed down but if they simply want to select from all choices
they can. I have tried several things but none of them have worked so far.
There has to be a set div to visible some where that I am missing

Thanks

T
-- 
View this message in context: 
http://www.nabble.com/autocomplete-show-div-while-textfield-is-empty-tp17497376p17497376.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AjaxLazyLoadPanel question

2008-05-12 Thread taygolf

got ya. yeah I eventually figure that is what had to happen to make it work
correctly. I was trying to make it do something that it was not meant to do.
When I put everything in a panel it all worked prefectly.

Thanks

T


Johan Compagner wrote:
> 
> just to make it more clear to you
> 
> AjaxLazyLoadPanel == a Panel == Own markup
> 
> so what you have is not possible
> 
> you can have that code just fine in lazy load panel but the panel must
> have
> its own markup
> that is this:
> 
> 
>  
>option 1
>option 2
>  
>  
>      
>
> 
> 
> 
> On Mon, May 5, 2008 at 4:51 PM, taygolf <[EMAIL PROTECTED]> wrote:
> 
>>
>> Hey guys,
>>
>> I have a question about the lazyloadpanel. I have a modal window. in that
>> modal window I have a form with a ListChoice and an ajaxbutton. What I
>> want
>> to do is have the entire modal window or the entire form lazyload. the
>> ListChoice can be very large sometime and I want do not want the page to
>> load until I have the executed the quesry that populates the listchoice
>> and
>> saved the values in it.
>>
>> I tried to create a div for the ajaxlazyloadpanel and simply put all the
>> code for the page in the allp but this did not work.
>>
>> What do I need to do to make this happen? I don't know if I am just
>> confused
>> about how this works or what. I have looked at the example on wicket
>> stuff
>> but I am still confused
>>
>> Here is the code I want to wrap in an ajaxlazyloadpanel:
>>
>> final ListChoice list = createList();
>>
>> Form form = new Form("form");
>> form.add(list);
>> final AjaxButton ajx = new AjaxButton("asubmit",form) {
>>protected void onSubmit(AjaxRequestTarget target, Form form) {
>>window.setWindowClosedCallback(new
>> ModalWindow.WindowClosedCallback(){
>>public void onClose(AjaxRequestTarget target) {
>>targetField.setModelObject(list.getValue());
>>target.addComponent(targetField);
>>}
>>});
>>window.close(target);
>>}
>> };
>> form.add(ajx);
>> add(form);
>>
>> 
>> 
>>  
>>
>>
>>  
>>option 1
>>option 2
>>  
>>  
>>  
>>
>>
>>  
>> 
>> 
>>
>> Thanks for the help
>>
>> T
>> --
>> View this message in context:
>> http://www.nabble.com/AjaxLazyLoadPanel-question-tp17063419p17063419.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/AjaxLazyLoadPanel-question-tp17063419p17186908.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AutoCompleteTextField "type mismatch" in line 227

2008-05-08 Thread taygolf

Yes I am just starting to try and get the autocompletetextfield working on my
app and I am using wicket 1.3. as well and it is doing the same thing. It is
throwing a js type mismatch error. Works fine in firefox but not in IE.

Did you figure out the problem?

T


Niels Bo wrote:
> 
> Hi
> 
> I just swithed from 1.3.2 to 1.3.3 and that resultet in a javascript error
> "type mismatch" in line 227,
> wich is this line in wicket-autocomplete.js:
> 
> menu.style.zIndex=index=="auto"?index:Number(index)+1;
> 
> Only in IE (6.0) - firefox works fine.
> Does anyone else see this problem?
> 
> Niels
> 

-- 
View this message in context: 
http://www.nabble.com/AutoCompleteTextField-%22type-mismatch%22-in-line-227-tp16560166p17135623.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AjaxLazyLoadPanel question

2008-05-07 Thread taygolf

ok I guess you can say that i fixed this myself since noone else offered any
advice. I could not figure out the error that I was getting about not being
able to find the div closing tag so I decided to put all of my code that was
for the form in an actual panel and then just make the call from lazyload.
This worked prefectly. I would like to suggest that you make some type of
lazyload that will work on any type of popup such as a webpage or a modal. I
know you can just put the webpage and modal in a panel and it will work but
it seems like extra code that may not be necessary. Just a thought though

Hope this helps someone in the future

T

taygolf wrote:
> 
> ok I have this working with IndicatingAjaxFallbackLink for my link instead
> of a normal AjaxFallbackLink but I would still rather have the
> lazyloadingpanel. Everytime I try to wrap my form in a div for the allp I
> get an error saying that I do not have a closing tag for my div but I do.
> Any help would be appreciated
> 
> Thanks
> 
> T
> 
> 
> taygolf wrote:
>> 
>> no one?
>> 
>> 
>> 
>> taygolf wrote:
>>> 
>>> Hey guys,
>>> 
>>> I have a question about the lazyloadpanel. I have a modal window. in
>>> that modal window I have a form with a ListChoice and an ajaxbutton.
>>> What I want to do is have the entire modal window or the entire form
>>> lazyload. the ListChoice can be very large sometime and I want do not
>>> want the page to load until I have the executed the quesry that
>>> populates the listchoice and saved the values in it.
>>> 
>>> I tried to create a div for the ajaxlazyloadpanel and simply put all the
>>> code for the page in the allp but this did not work.
>>> 
>>> What do I need to do to make this happen? I don't know if I am just
>>> confused about how this works or what. I have looked at the example on
>>> wicket stuff but I am still confused
>>> 
>>> Here is the code I want to wrap in an ajaxlazyloadpanel:
>>> 
>>> final ListChoice list = createList();
>>> 
>>> Form form = new Form("form");
>>> form.add(list);
>>> final AjaxButton ajx = new AjaxButton("asubmit",form) {
>>> protected void onSubmit(AjaxRequestTarget target, Form form) {
>>> window.setWindowClosedCallback(new
>>> ModalWindow.WindowClosedCallback(){
>>> public void onClose(AjaxRequestTarget target) {
>>> targetField.setModelObject(list.getValue());
>>> target.addComponent(targetField);
>>> } 
>>> });
>>> window.close(target);
>>> }
>>> };
>>> form.add(ajx);
>>> add(form);
>>> 
>>> 
>>> 
>>>   
>>> 
>>> 
>>>   
>>> option 1
>>> option 2
>>>   
>>>   
>>>   
>>> 
>>> 
>>>   
>>> 
>>> 
>>> 
>>> Thanks for the help
>>> 
>>> T
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/AjaxLazyLoadPanel-question-tp17063419p17106431.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AjaxLazyLoadPanel question

2008-05-06 Thread taygolf

ok I have this working with IndicatingAjaxFallbackLink for my link instead of
a normal AjaxFallbackLink but I would still rather have the
lazyloadingpanel. Everytime I try to wrap my form in a div for the allp I
get an error saying that I do not have a closing tag for my div but I do.
Any help would be appreciated

Thanks

T


taygolf wrote:
> 
> no one?
> 
> 
> 
> taygolf wrote:
>> 
>> Hey guys,
>> 
>> I have a question about the lazyloadpanel. I have a modal window. in that
>> modal window I have a form with a ListChoice and an ajaxbutton. What I
>> want to do is have the entire modal window or the entire form lazyload.
>> the ListChoice can be very large sometime and I want do not want the page
>> to load until I have the executed the quesry that populates the
>> listchoice and saved the values in it.
>> 
>> I tried to create a div for the ajaxlazyloadpanel and simply put all the
>> code for the page in the allp but this did not work.
>> 
>> What do I need to do to make this happen? I don't know if I am just
>> confused about how this works or what. I have looked at the example on
>> wicket stuff but I am still confused
>> 
>> Here is the code I want to wrap in an ajaxlazyloadpanel:
>> 
>> final ListChoice list = createList();
>>  
>> Form form = new Form("form");
>> form.add(list);
>> final AjaxButton ajx = new AjaxButton("asubmit",form) {
>> protected void onSubmit(AjaxRequestTarget target, Form form) {
>> window.setWindowClosedCallback(new
>> ModalWindow.WindowClosedCallback(){
>>  public void onClose(AjaxRequestTarget target) {
>> targetField.setModelObject(list.getValue());
>>  target.addComponent(targetField);
>>  } 
>> });
>> window.close(target);
>> }
>> };
>> form.add(ajx);
>> add(form);
>> 
>> 
>> 
>>   
>> 
>>  
>>
>>  option 1
>>  option 2
>>
>>
>>
>>  
>>  
>>   
>> 
>> 
>> 
>> Thanks for the help
>> 
>> T
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/AjaxLazyLoadPanel-question-tp17063419p17083176.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AjaxLazyLoadPanel question

2008-05-06 Thread taygolf

no one?



taygolf wrote:
> 
> Hey guys,
> 
> I have a question about the lazyloadpanel. I have a modal window. in that
> modal window I have a form with a ListChoice and an ajaxbutton. What I
> want to do is have the entire modal window or the entire form lazyload.
> the ListChoice can be very large sometime and I want do not want the page
> to load until I have the executed the quesry that populates the listchoice
> and saved the values in it.
> 
> I tried to create a div for the ajaxlazyloadpanel and simply put all the
> code for the page in the allp but this did not work.
> 
> What do I need to do to make this happen? I don't know if I am just
> confused about how this works or what. I have looked at the example on
> wicket stuff but I am still confused
> 
> Here is the code I want to wrap in an ajaxlazyloadpanel:
> 
> final ListChoice list = createList();
>   
> Form form = new Form("form");
> form.add(list);
> final AjaxButton ajx = new AjaxButton("asubmit",form) {
> protected void onSubmit(AjaxRequestTarget target, Form form) {
> window.setWindowClosedCallback(new
> ModalWindow.WindowClosedCallback(){
>   public void onClose(AjaxRequestTarget target) {
> targetField.setModelObject(list.getValue());
>   target.addComponent(targetField);
>   } 
> });
> window.close(target);
> }
> };
> form.add(ajx);
> add(form);
> 
> 
> 
>   
> 
>   
> 
>   option 1
>   option 2
> 
> 
> 
>   
>   
>   
> 
> 
> 
> Thanks for the help
> 
> T
> 

-- 
View this message in context: 
http://www.nabble.com/AjaxLazyLoadPanel-question-tp17063419p17082485.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AjaxLazyLoadPanel question

2008-05-05 Thread taygolf

Hey guys,

I have a question about the lazyloadpanel. I have a modal window. in that
modal window I have a form with a ListChoice and an ajaxbutton. What I want
to do is have the entire modal window or the entire form lazyload. the
ListChoice can be very large sometime and I want do not want the page to
load until I have the executed the quesry that populates the listchoice and
saved the values in it.

I tried to create a div for the ajaxlazyloadpanel and simply put all the
code for the page in the allp but this did not work.

What do I need to do to make this happen? I don't know if I am just confused
about how this works or what. I have looked at the example on wicket stuff
but I am still confused

Here is the code I want to wrap in an ajaxlazyloadpanel:

final ListChoice list = createList();

Form form = new Form("form");
form.add(list);
final AjaxButton ajx = new AjaxButton("asubmit",form) {
protected void onSubmit(AjaxRequestTarget target, Form form) {
window.setWindowClosedCallback(new
ModalWindow.WindowClosedCallback(){
public void onClose(AjaxRequestTarget target) {
targetField.setModelObject(list.getValue());
target.addComponent(targetField);
} 
});
window.close(target);
}
};
form.add(ajx);
add(form);



  


  
option 1
option 2
  
  
  


  



Thanks for the help

T
-- 
View this message in context: 
http://www.nabble.com/AjaxLazyLoadPanel-question-tp17063419p17063419.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can I use LazyLoad or something like it with a modal?

2008-04-16 Thread taygolf


That is what I looked at which brought about this question. I guess you are
saying that I can use it with a modal?

Should I be trying to use it where the modal is created or should I be using
it on the page the the modal shows?

I am just confused by it. Also is there a way to set the sleep time to
something other than a static time. In other words can i set it to sleep
until the query is done?

Thanks

T


Gerolf Seitz wrote:
> 
> take a look at AjaxLazyLoadPanel. this might do the trick.
> 
> 
> 
>   Gerolf
> 
> On Wed, Apr 16, 2008 at 4:52 PM, taygolf <[EMAIL PROTECTED]> wrote:
> 
>>
>> Ok here is my issue. I have a modal that has a lot of information in it
>> and
>> it has to get back a large amount of data from the database and it is
>> taking
>> about 4 seconds to load because of all the data. I wish I was allowed to
>> fliter the data more so there was not so much information but I do not
>> get
>> to make that decision.
>>
>> Anyway when you click on the button to open the modal it takes about 4 or
>> 5
>> seconds for the modal window to open. I would like to have something like
>> lazyload has come up and show that the application is working and loading
>> the modal instead of the screen just sitting there. If it just sits there
>> while it is trying to load the user will click the button multiple times
>> thinking the application is broken.
>>
>> So can I Lazy load a modal window? Or is there a better approach to
>> tellign
>> the user to wait for 5 seconds for the modal window to open?
>>
>> Thanks
>>
>> T
>> --
>> View this message in context:
>> http://www.nabble.com/Can-I-use-LazyLoad-or-something-like-it-with-a-modal--tp16722524p16722524.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Can-I-use-LazyLoad-or-something-like-it-with-a-modal--tp16722524p16726065.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Can I use LazyLoad or something like it with a modal?

2008-04-16 Thread taygolf

Ok here is my issue. I have a modal that has a lot of information in it and
it has to get back a large amount of data from the database and it is taking
about 4 seconds to load because of all the data. I wish I was allowed to
fliter the data more so there was not so much information but I do not get
to make that decision.

Anyway when you click on the button to open the modal it takes about 4 or 5
seconds for the modal window to open. I would like to have something like
lazyload has come up and show that the application is working and loading
the modal instead of the screen just sitting there. If it just sits there
while it is trying to load the user will click the button multiple times
thinking the application is broken.

So can I Lazy load a modal window? Or is there a better approach to tellign
the user to wait for 5 seconds for the modal window to open?

Thanks

T
-- 
View this message in context: 
http://www.nabble.com/Can-I-use-LazyLoad-or-something-like-it-with-a-modal--tp16722524p16722524.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: MOdal window feedback panel something strange is going on

2008-04-15 Thread taygolf

I think i have figured out the problem but I am not sure why it did not work
in my original code.

In the original code I have Page 1
in page one I have a Feedbackpanel, a RequiredTextfield and a modal. The
Textfield has a property model and i want this particular testfield to use
"name" from that model.

now the modalwindow on page one has a setWindowClosedCallback() like this

modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
public void onClose(AjaxRequestTarget target) {
target.addComponent(nameField);
}
});

where nameField is the name of my required testfield.

The modal opens up page 2. I pass the model for the propertymodel from the
textfield to page 2. When the user makes a select and clicks submit I call a
model.setName=list.getValue(). and I close the modal.

This will set the name in the model to the name I selected. NOw the
windowclosecallback should refresh the textfield because of my code above.

This works unless I try to move on with out first assigning a name. IF I try
to move on with out assigning a name the feedbackpanel tell me a name is
required. If I then click on the button to open the modal which contains
page 2 everything goes as planned but when the modal is closed the textfield
is given a blank value. I know it is blank because I can see it in the ajax
debug.

I am not sure why I am getting a blank value but to fix it I simple moved
the setWindowClosedCallback from page one to page 2 in the onsubmit part of
the form. Instead of passing the model I am passing the window and I can
simply say window.setWindowClosedCallback and and set the ModelObject there.

Anyway this works for me but I am still curious as to why my previous code
did not work. If you have any ideas I would appreciate it

Thanks

T

Nino.Martinez wrote:
> 
> Could you create a quickstart?
> 
> taygolf wrote:
>> Nope I am not getting an error in the ajax debug. From what I can see the
>> popup is sending back the correct value when I go through my normal steps
>> but when I have the feedback panel come up and then bring up the popup I
>> am
>> allowed to select my choice but the popupmodal window is sending back a
>> blank value. I wonder why. I am really stumped on this one. Any help
>> would
>> be greatly appreciated.
>>
>> T
>>
>>
>>
>> Mr Mean wrote:
>>   
>>> Can you take a look in the ajax debug window to see if you get an error?
>>>
>>> Maurice
>>>
>>> On Mon, Apr 14, 2008 at 4:35 PM, taygolf <[EMAIL PROTECTED]>
>>> wrote:
>>> 
>>>>  Hey guys. I am not sure that this has anything to do with the feed
>>>> back
>>>> panel
>>>>  or not but I wanted to mention it.
>>>>
>>>>  Here is what I have. I have a modal window with required textfields in
>>>> it.
>>>>  The textfields have another modal window that creates a 'popup' and
>>>> the
>>>> user
>>>>  selects the value they want entered into the requiredtextfield.
>>>>
>>>>  When the user opens the first modal window they see the required
>>>> textfields.
>>>>  when they click on the button to open the second modal window the user
>>>> sees
>>>>  their options in a select list. They select one and hit submit and the
>>>>  textfield is populated with their choice vie ajax.
>>>>
>>>>  The problem I have is what happens when the user trys to submit the
>>>> first
>>>>  modal window with out filling out the required textfield. I have a
>>>> feedback
>>>>  panel that popups up and tells the user that the must selct a user
>>>> name.
>>>>
>>>>  After the feedback panel is shown the user will click on the button to
>>>> show
>>>>  second modal window. Again their choices appear in a modal window.
>>>> They
>>>> can
>>>>  select one and hit submit just like before but this time the textfield
>>>> is
>>>>  not populated.
>>>>
>>>>  So the question is why does it do this. It works great until there is
>>>> an
>>>>  error in the modal window and then everything goes to hell. I have to
>>>>  require the testfield so I can not just remove the requirement. What
>>>> is
>>>> the
>>>>  problem here.  I am sure it is something simple I have over looked
>>>>
>>>>  Thanks
>>>>
>>>>  T
>>>>  --

Re: MOdal window feedback panel something strange is going on

2008-04-15 Thread taygolf

Nope I am not getting an error in the ajax debug. From what I can see the
popup is sending back the correct value when I go through my normal steps
but when I have the feedback panel come up and then bring up the popup I am
allowed to select my choice but the popupmodal window is sending back a
blank value. I wonder why. I am really stumped on this one. Any help would
be greatly appreciated.

T



Mr Mean wrote:
> 
> Can you take a look in the ajax debug window to see if you get an error?
> 
> Maurice
> 
> On Mon, Apr 14, 2008 at 4:35 PM, taygolf <[EMAIL PROTECTED]> wrote:
>>
>>  Hey guys. I am not sure that this has anything to do with the feed back
>> panel
>>  or not but I wanted to mention it.
>>
>>  Here is what I have. I have a modal window with required textfields in
>> it.
>>  The textfields have another modal window that creates a 'popup' and the
>> user
>>  selects the value they want entered into the requiredtextfield.
>>
>>  When the user opens the first modal window they see the required
>> textfields.
>>  when they click on the button to open the second modal window the user
>> sees
>>  their options in a select list. They select one and hit submit and the
>>  textfield is populated with their choice vie ajax.
>>
>>  The problem I have is what happens when the user trys to submit the
>> first
>>  modal window with out filling out the required textfield. I have a
>> feedback
>>  panel that popups up and tells the user that the must selct a user name.
>>
>>  After the feedback panel is shown the user will click on the button to
>> show
>>  second modal window. Again their choices appear in a modal window. They
>> can
>>  select one and hit submit just like before but this time the textfield
>> is
>>  not populated.
>>
>>  So the question is why does it do this. It works great until there is an
>>  error in the modal window and then everything goes to hell. I have to
>>  require the testfield so I can not just remove the requirement. What is
>> the
>>  problem here.  I am sure it is something simple I have over looked
>>
>>  Thanks
>>
>>  T
>>  --
>>  View this message in context:
>> http://www.nabble.com/MOdal-window-feedback-panel-something-strange-is-going-on-tp16678101p16678101.html
>>  Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>>  -
>>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/MOdal-window-feedback-panel-something-strange-is-going-on-tp16678101p16700355.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



MOdal window feedback panel something strange is going on

2008-04-14 Thread taygolf

Hey guys. I am not sure that this has anything to do with the feed back panel
or not but I wanted to mention it.

Here is what I have. I have a modal window with required textfields in it.
The textfields have another modal window that creates a 'popup' and the user
selects the value they want entered into the requiredtextfield.

When the user opens the first modal window they see the required textfields.
when they click on the button to open the second modal window the user sees
their options in a select list. They select one and hit submit and the
textfield is populated with their choice vie ajax.

The problem I have is what happens when the user trys to submit the first
modal window with out filling out the required textfield. I have a feedback
panel that popups up and tells the user that the must selct a user name. 

After the feedback panel is shown the user will click on the button to show
second modal window. Again their choices appear in a modal window. They can
select one and hit submit just like before but this time the textfield is
not populated.

So the question is why does it do this. It works great until there is an
error in the modal window and then everything goes to hell. I have to
require the testfield so I can not just remove the requirement. What is the
problem here.  I am sure it is something simple I have over looked

Thanks

T
-- 
View this message in context: 
http://www.nabble.com/MOdal-window-feedback-panel-something-strange-is-going-on-tp16678101p16678101.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ListView not updating when changed

2008-03-27 Thread taygolf

 Can I change my popup window from a standard popup window to a modal window.
would that allow me to do what I am wanting to do.

All I want to do is have a main page. on that main page click a link. the
link will bring up a popup or a modal window, or a hidden div or what ever
that will allow me to enter information into a form. when the submit button
is clicked the popup will disappear and the information entered will be
displayed on the main page in a table form. After I get that working I want
to create a link that will allow me to edit that information and I also want
a button to delete that information.

I have all of this working with the way I am doing it currently but I do not
like the timer because it will refresh the parent page while i have the
popup window up.

Thanks

T

igor.vaynberg wrote:
> 
> i suppose you can try issuing a window.opener.wicket.ajax.get request
> to trigger an ajax request, but i am not sure how and if
> xmlhttprequest works across windows...
> 
> -igor
> 
> 
> On Thu, Mar 27, 2008 at 7:56 AM, taygolf <[EMAIL PROTECTED]> wrote:
>>
>>  I would have thought there was another way to do this. I can not refresh
>> the
>>  whole page because I have other textfields and I will lose the data
>> entered
>>  in them on a page refresh.
>>
>>  I just want to refresh the markupcontainer that the ListView is in.
>>
>>  I guess I need to look into change my popup class from a popup page to a
>>  div.
>>
>>  Are there any other suggestions?
>>
>>
>>
>>  Thanks
>>
>>  T
>>
>>
>>  igor.vaynberg wrote:
>>  >
>>  > since its in a different page there isnt much you can do except
>>  > something like outputting
>>  > 
>>  > 
>>  > window.opener.refresh();
>>  > window.close();
>>  > 
>>  > 
>>  >
>>  > after the form has been submitted
>>  >
>>  > -igor
>>  >
>>  >
>>  > On Wed, Mar 26, 2008 at 6:39 PM, taygolf <[EMAIL PROTECTED]>
>> wrote:
>>  >>
>>  >>  The popup is a different page. Just a simple page with 2 textfields
>> and
>>  >> a few
>>  >>  check boxes and a submit button and I submit it via a regular post
>> right
>>  >> now
>>  >>  but I can change that to ajax if that is what I need to do.
>>  >>
>>  >>
>>  >>
>>  >>
>>  >>
>>  >>  igor.vaynberg wrote:
>>  >>  >
>>  >>  > your popup is a different page or a div inside the current page?
>> do
>>  >>  > you submit the form in it via ajax or a regular post?
>>  >>  >
>>  >>  > -igor
>>  >>  >
>>  >>  >
>>  >>  > On Wed, Mar 26, 2008 at 3:00 PM, taygolf
>> <[EMAIL PROTECTED]>
>>  >> wrote:
>>  >>  >>
>>  >>  >>  THanks for explaining it to me igor. I have been doing some
>>  >> searching
>>  >>  >> about
>>  >>  >>  my other problem. Again my new problem is that I really do not
>> want
>>  >> this
>>  >>  >>  listview to refresh on a timer. Here is the process of my app.
>> The
>>  >> user
>>  >>  >> can
>>  >>  >>  click on a link that says add member. that link inturn creates a
>>  >> popup
>>  >>  >> page
>>  >>  >>  that has a form and some textfields. When the form is submitted
>> I
>>  >> update
>>  >>  >> the
>>  >>  >>  Session List to add that member and the popup is closed. Then
>> when
>>  >> the
>>  >>  >> timer
>>  >>  >>  tells the listview to refresh it gets the new informationfrom
>> the
>>  >>  >> session
>>  >>  >>  list the user just entered and updates the listview. Instead of
>>  >> having
>>  >>  >> the
>>  >>  >>  listview refresh on a timer I would like for it to refresh when
>> the
>>  >>  >> popup
>>  >>  >>  window form is submited.
>>  >>  >>
>>  >>  >>  How would I go about doing this? I have done some looking and I
>>  >> think
>>  >>  >> maybe
>>  >>  >>  instead of using a listview I should be using a refreshingview.
>> I
>>  >> made
>>  >>  >> this
>>  >>  >>  change but it still d

Re: ListView not updating when changed

2008-03-27 Thread taygolf

I would have thought there was another way to do this. I can not refresh the
whole page because I have other textfields and I will lose the data entered
in them on a page refresh. 

I just want to refresh the markupcontainer that the ListView is in.

I guess I need to look into change my popup class from a popup page to a
div.

Are there any other suggestions?

Thanks

T


igor.vaynberg wrote:
> 
> since its in a different page there isnt much you can do except
> something like outputting
> 
> 
> window.opener.refresh();
> window.close();
> 
> 
> 
> after the form has been submitted
> 
> -igor
> 
> 
> On Wed, Mar 26, 2008 at 6:39 PM, taygolf <[EMAIL PROTECTED]> wrote:
>>
>>  The popup is a different page. Just a simple page with 2 textfields and
>> a few
>>  check boxes and a submit button and I submit it via a regular post right
>> now
>>  but I can change that to ajax if that is what I need to do.
>>
>>
>>
>>
>>
>>  igor.vaynberg wrote:
>>  >
>>  > your popup is a different page or a div inside the current page? do
>>  > you submit the form in it via ajax or a regular post?
>>  >
>>  > -igor
>>  >
>>  >
>>  > On Wed, Mar 26, 2008 at 3:00 PM, taygolf <[EMAIL PROTECTED]>
>> wrote:
>>  >>
>>  >>  THanks for explaining it to me igor. I have been doing some
>> searching
>>  >> about
>>  >>  my other problem. Again my new problem is that I really do not want
>> this
>>  >>  listview to refresh on a timer. Here is the process of my app. The
>> user
>>  >> can
>>  >>  click on a link that says add member. that link inturn creates a
>> popup
>>  >> page
>>  >>  that has a form and some textfields. When the form is submitted I
>> update
>>  >> the
>>  >>  Session List to add that member and the popup is closed. Then when
>> the
>>  >> timer
>>  >>  tells the listview to refresh it gets the new informationfrom the
>>  >> session
>>  >>  list the user just entered and updates the listview. Instead of
>> having
>>  >> the
>>  >>  listview refresh on a timer I would like for it to refresh when the
>>  >> popup
>>  >>  window form is submited.
>>  >>
>>  >>  How would I go about doing this? I have done some looking and I
>> think
>>  >> maybe
>>  >>  instead of using a listview I should be using a refreshingview. I
>> made
>>  >> this
>>  >>  change but it still does not solve my problem. Can I refresh the
>> markup
>>  >>  container from the popup? if so how? I was thinking maybe a
>> AjaxSubmit
>>  >>  button on the popup page but I am not sure. Anyway a little help
>> with
>>  >> this
>>  >>  would be awesome
>>  >>
>>  >>  Thanks
>>  >>
>>  >>  T
>>  >>
>>  >>
>>  >>
>>  >>
>>  >>
>>  >>
>>  >>  igor.vaynberg wrote:
>>  >>  >
>>  >>  > On Wed, Mar 26, 2008 at 6:57 AM, taygolf
>> <[EMAIL PROTECTED]>
>>  >> wrote:
>>  >>  >>
>>  >>  >>  that worked prefect Thanks for the help. I decided to go with
>> the
>>  >> Model
>>  >>  >>  example. I do have a few more questions though. First why cant I
>> use
>>  >> a
>>  >>  >>  PropertyModel instead of a AbstractReadOnlyModel. I tried to do
>>  >> this:
>>  >>  >>
>>  >>  >>  New Label("kmname", new PropertyModel(kmd, "name");
>>  >>  >
>>  >>  > because you are still caching the instance of kmd in the model by
>>  >>  > passing it directly, instead
>>  >>  > new PropertyModel(item.getModel(), "name"); that way the models
>> are
>>  >>  > chained properly
>>  >>  >
>>  >>  > -igor
>>  >>  >
>>  >>  >
>>  >>  >
>>  >>  >>
>>  >>  >>  but that did not work. I am guessing that getObject has to be
>> called
>>  >> or
>>  >>  >> the
>>  >>  >>  ListView will not get updated but that is just my guess.
>>  >>  >>
>>  >>  >>  Also right now I am using
>>  >>  >> AjaxSelfUpdatingTimerBehavior(

Re: ListView not updating when changed

2008-03-26 Thread taygolf

The popup is a different page. Just a simple page with 2 textfields and a few
check boxes and a submit button and I submit it via a regular post right now
but I can change that to ajax if that is what I need to do.



igor.vaynberg wrote:
> 
> your popup is a different page or a div inside the current page? do
> you submit the form in it via ajax or a regular post?
> 
> -igor
> 
> 
> On Wed, Mar 26, 2008 at 3:00 PM, taygolf <[EMAIL PROTECTED]> wrote:
>>
>>  THanks for explaining it to me igor. I have been doing some searching
>> about
>>  my other problem. Again my new problem is that I really do not want this
>>  listview to refresh on a timer. Here is the process of my app. The user
>> can
>>  click on a link that says add member. that link inturn creates a popup
>> page
>>  that has a form and some textfields. When the form is submitted I update
>> the
>>  Session List to add that member and the popup is closed. Then when the
>> timer
>>  tells the listview to refresh it gets the new informationfrom the
>> session
>>  list the user just entered and updates the listview. Instead of having
>> the
>>  listview refresh on a timer I would like for it to refresh when the
>> popup
>>  window form is submited.
>>
>>  How would I go about doing this? I have done some looking and I think
>> maybe
>>  instead of using a listview I should be using a refreshingview. I made
>> this
>>  change but it still does not solve my problem. Can I refresh the markup
>>  container from the popup? if so how? I was thinking maybe a AjaxSubmit
>>  button on the popup page but I am not sure. Anyway a little help with
>> this
>>  would be awesome
>>
>>  Thanks
>>
>>  T
>>
>>
>>
>>
>>
>>
>>  igor.vaynberg wrote:
>>  >
>>  > On Wed, Mar 26, 2008 at 6:57 AM, taygolf <[EMAIL PROTECTED]>
>> wrote:
>>  >>
>>  >>  that worked prefect Thanks for the help. I decided to go with the
>> Model
>>  >>  example. I do have a few more questions though. First why cant I use
>> a
>>  >>  PropertyModel instead of a AbstractReadOnlyModel. I tried to do
>> this:
>>  >>
>>  >>  New Label("kmname", new PropertyModel(kmd, "name");
>>  >
>>  > because you are still caching the instance of kmd in the model by
>>  > passing it directly, instead
>>  > new PropertyModel(item.getModel(), "name"); that way the models are
>>  > chained properly
>>  >
>>  > -igor
>>  >
>>  >
>>  >
>>  >>
>>  >>  but that did not work. I am guessing that getObject has to be called
>> or
>>  >> the
>>  >>  ListView will not get updated but that is just my guess.
>>  >>
>>  >>  Also right now I am using
>>  >> AjaxSelfUpdatingTimerBehavior(Duration.seconds(5))
>>  >>  to get the ListView to updated but I would like to do this from my
>> popup
>>  >>  instead. So there is a link that will create a popup and that popup
>> adds
>>  >>  info to the session variable that the ListView uses. When the submit
>>  >> button
>>  >>  is clicked on that popup I would like to refresh the ListView
>> instead of
>>  >>  waiting for the 5 seconds to go by. I have done some looking and I
>> think
>>  >> I
>>  >>  need to us an AjaxFullBackLink but I wnated to go ahead and ask to
>> make
>>  >> sure
>>  >>  I was looking in the right direction
>>  >>
>>  >>  Thanks
>>  >>
>>  >>  T
>>  >>
>>  >>
>>  >>
>>  >>  Thomas Maeder wrote:
>>  >>  >
>>  >>  > If memory serves, the ListView will not repopulate already
>> existing
>>  >> items.
>>  >>  > I see two options:
>>  >>  >
>>  >>  > 1) setReuseItems(false)
>>  >>  > 2) instead of creating the label with a fixed String (I assume
>> that
>>  >>  > kmd.getName() returns a String) pass an IModel to the label like
>> so:
>>  >>  >
>>  >>  > New Label("kmname", new AbstractReadOnlyModel() {
>>  >>  >   public Object getObject() {
>>  >>  >   KeyMemberData kmd =
>>  >> (KeyMemberData)item.getModelObject();
>>  >>  >   return kmd.getName();
>>  >>  >   }
>

Re: ListView not updating when changed

2008-03-26 Thread taygolf

THanks for explaining it to me igor. I have been doing some searching about
my other problem. Again my new problem is that I really do not want this
listview to refresh on a timer. Here is the process of my app. The user can
click on a link that says add member. that link inturn creates a popup page
that has a form and some textfields. When the form is submitted I update the
Session List to add that member and the popup is closed. Then when the timer
tells the listview to refresh it gets the new informationfrom the session
list the user just entered and updates the listview. Instead of having the
listview refresh on a timer I would like for it to refresh when the popup
window form is submited.

How would I go about doing this? I have done some looking and I think maybe
instead of using a listview I should be using a refreshingview. I made this
change but it still does not solve my problem. Can I refresh the markup
container from the popup? if so how? I was thinking maybe a AjaxSubmit
button on the popup page but I am not sure. Anyway a little help with this
would be awesome

Thanks

T




igor.vaynberg wrote:
> 
> On Wed, Mar 26, 2008 at 6:57 AM, taygolf <[EMAIL PROTECTED]> wrote:
>>
>>  that worked prefect Thanks for the help. I decided to go with the Model
>>  example. I do have a few more questions though. First why cant I use a
>>  PropertyModel instead of a AbstractReadOnlyModel. I tried to do this:
>>
>>  New Label("kmname", new PropertyModel(kmd, "name");
> 
> because you are still caching the instance of kmd in the model by
> passing it directly, instead
> new PropertyModel(item.getModel(), "name"); that way the models are
> chained properly
> 
> -igor
> 
> 
> 
>>
>>  but that did not work. I am guessing that getObject has to be called or
>> the
>>  ListView will not get updated but that is just my guess.
>>
>>  Also right now I am using
>> AjaxSelfUpdatingTimerBehavior(Duration.seconds(5))
>>  to get the ListView to updated but I would like to do this from my popup
>>  instead. So there is a link that will create a popup and that popup adds
>>  info to the session variable that the ListView uses. When the submit
>> button
>>  is clicked on that popup I would like to refresh the ListView instead of
>>  waiting for the 5 seconds to go by. I have done some looking and I think
>> I
>>  need to us an AjaxFullBackLink but I wnated to go ahead and ask to make
>> sure
>>  I was looking in the right direction
>>
>>  Thanks
>>
>>  T
>>
>>
>>
>>  Thomas Maeder wrote:
>>  >
>>  > If memory serves, the ListView will not repopulate already existing
>> items.
>>  > I see two options:
>>  >
>>  > 1) setReuseItems(false)
>>  > 2) instead of creating the label with a fixed String (I assume that
>>  > kmd.getName() returns a String) pass an IModel to the label like so:
>>  >
>>  > New Label("kmname", new AbstractReadOnlyModel() {
>>  >   public Object getObject() {
>>  >   KeyMemberData kmd =
>> (KeyMemberData)item.getModelObject();
>>  >   return kmd.getName();
>>  >   }
>>  > });
>>  >
>>  > Hth
>>  >
>>  > Thomas
>>  >
>>  >
>>  >
>>  >> -Original Message-
>>  >> From: taygolf [mailto:[EMAIL PROTECTED]
>>  >> Sent: Dienstag, 25. MƤrz 2008 15:03
>>  >> To: users@wicket.apache.org
>>  >> Subject: ListView not updating when changed
>>  >>
>>  >>
>>  >> ok here is what I have. i have a listview that I want to
>>  >> update on the fly.
>>  >> The user clicks a link and that link opens a popup. in that
>>  >> popup the user will put in the information required and hit
>>  >> submit. once the information is submitted I am saving it in a
>>  >> session list of models. So the model that was created on the
>>  >> popup page is added to the list.
>>  >>
>>  >> THe listview is created using the session list as a
>>  >> loadabledetachablemodel.
>>  >> Everytime a new entry is entered everything works fine but if
>>  >> I want to go back and edit a previous entry then the listview
>>  >> never shows that update.
>>  >>
>>  >> So how can I get the listview to see the update. I am
>>  >> thinking that the loadabledetachable model is not getting the
>>  >> latest and greatest session list. I think it may only be
>>  >> looking

RE: ListView not updating when changed

2008-03-26 Thread taygolf

that worked prefect Thanks for the help. I decided to go with the Model
example. I do have a few more questions though. First why cant I use a
PropertyModel instead of a AbstractReadOnlyModel. I tried to do this:

New Label("kmname", new PropertyModel(kmd, "name");

but that did not work. I am guessing that getObject has to be called or the
ListView will not get updated but that is just my guess.

Also right now I am using AjaxSelfUpdatingTimerBehavior(Duration.seconds(5))
to get the ListView to updated but I would like to do this from my popup
instead. So there is a link that will create a popup and that popup adds
info to the session variable that the ListView uses. When the submit button
is clicked on that popup I would like to refresh the ListView instead of
waiting for the 5 seconds to go by. I have done some looking and I think I
need to us an AjaxFullBackLink but I wnated to go ahead and ask to make sure
I was looking in the right direction

Thanks

T

Thomas Maeder wrote:
> 
> If memory serves, the ListView will not repopulate already existing items.
> I see two options: 
> 
> 1) setReuseItems(false)
> 2) instead of creating the label with a fixed String (I assume that
> kmd.getName() returns a String) pass an IModel to the label like so:
> 
> New Label("kmname", new AbstractReadOnlyModel() {
>   public Object getObject() {
>   KeyMemberData kmd = (KeyMemberData)item.getModelObject();
>   return kmd.getName();
>   }
> });
> 
> Hth
> 
> Thomas
> 
> 
> 
>> -Original Message-
>> From: taygolf [mailto:[EMAIL PROTECTED] 
>> Sent: Dienstag, 25. MƤrz 2008 15:03
>> To: users@wicket.apache.org
>> Subject: ListView not updating when changed
>> 
>> 
>> ok here is what I have. i have a listview that I want to 
>> update on the fly.
>> The user clicks a link and that link opens a popup. in that 
>> popup the user will put in the information required and hit 
>> submit. once the information is submitted I am saving it in a 
>> session list of models. So the model that was created on the 
>> popup page is added to the list. 
>> 
>> THe listview is created using the session list as a 
>> loadabledetachablemodel.
>> Everytime a new entry is entered everything works fine but if 
>> I want to go back and edit a previous entry then the listview 
>> never shows that update.
>> 
>> So how can I get the listview to see the update. I am 
>> thinking that the loadabledetachable model is not getting the 
>> latest and greatest session list. I think it may only be 
>> looking for additions and not getting all of them. HOw do I fix that.
>> 
>> Here is my code
>> 
>> IModel kmList =  new LoadableDetachableModel()
>>   {
>>   protected Object load() {
>>   return MySession.get().getKeymemberList();
>>   }
>>   };
>>
>>ListView lv = new ListView("rows", kmList)
>>{
>>  public void populateItem(final ListItem item)
>>  {
>>  KeyMemberData kmd = 
>> (KeyMemberData)item.getModelObject();
>>  item.add(new Label("kmname", kmd.getName()));
>>  item.add(new Label("kmsec", kmd.getSecurity()));
>>  item.add(new Label("kmroles", kmd.getRoles()));
>>  }
>>};
>>lv.setReuseItems(true);
>>lv.setOutputMarkupId(true);
>>WebMarkupContainer listContainer = new 
>> WebMarkupContainer("theContainer");
>>listContainer.setOutputMarkupId(true);
>>   listContainer.add(new
>> AjaxSelfUpdatingTimerBehavior(Duration.seconds(5)));
>>   
>>   listContainer.add(lv);
>>   add(listContainer);
>> --
>> View this message in context: 
>> http://www.nabble.com/ListView-not-updating-when-changed-tp162
>> 74984p16274984.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>> 
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/ListView-not-updating-when-changed-tp16274984p16301167.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ListView not updating when changed

2008-03-25 Thread taygolf

ok here is what I have. i have a listview that I want to update on the fly.
The user clicks a link and that link opens a popup. in that popup the user
will put in the information required and hit submit. once the information is
submitted I am saving it in a session list of models. So the model that was
created on the popup page is added to the list. 

THe listview is created using the session list as a loadabledetachablemodel.
Everytime a new entry is entered everything works fine but if I want to go
back and edit a previous entry then the listview never shows that update.

So how can I get the listview to see the update. I am thinking that the
loadabledetachable model is not getting the latest and greatest session
list. I think it may only be looking for additions and not getting all of
them. HOw do I fix that.

Here is my code

IModel kmList =  new LoadableDetachableModel()
  {
  protected Object load() {
  return MySession.get().getKeymemberList();
  }
  };
  
  ListView lv = new ListView("rows", kmList)
  {
public void populateItem(final ListItem item)
{
KeyMemberData kmd = 
(KeyMemberData)item.getModelObject();
item.add(new Label("kmname", kmd.getName()));
item.add(new Label("kmsec", kmd.getSecurity()));
item.add(new Label("kmroles", kmd.getRoles()));
}
  };
  lv.setReuseItems(true);
  lv.setOutputMarkupId(true);
  WebMarkupContainer listContainer = new
WebMarkupContainer("theContainer");
  listContainer.setOutputMarkupId(true);
  listContainer.add(new
AjaxSelfUpdatingTimerBehavior(Duration.seconds(5)));
  
  listContainer.add(lv);
  add(listContainer);
-- 
View this message in context: 
http://www.nabble.com/ListView-not-updating-when-changed-tp16274984p16274984.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Delete from RepeatingView from Panel Page

2008-03-21 Thread taygolf

Hey guys I really have learned a lot about wicket over the last month from
this board and I really appreciate it. I am stuck on how to solve a problem
and I wanted some input on the direction I should go.

I have a link that says add employees. When that link is clicked a popup is
created with a form that has textfields(first name, last, name, function).
There is a one to one relationship for forst and last name for each employee
but an employee can have many functions.

So I create a RepeatingView and a TextFieldPanel. I think create a link and
onClick I add a TextFieldPanel to the RepeatingView so a new field will show
up under function and will allow the user to enter a new function. This all
works prefectly.

Now to the problem. I want to add a delete button next to the new TextField
I have just created in case the user wants to delete the function they just
created. I know I need to remove the the entry from my RepeatingView but the
delete button will be created in the creation of the TextFieldPanel so how
do I delete from my RepeatingView from the Panel page? Do I need to make the
RepeatingView or the PropertyModel for the RepeatingView a Session Variable
or can I pass it to the Panel and then back? I am just lost as to the best
way to delete from my repeatingview.

Thanks for the help

T
-- 
View this message in context: 
http://www.nabble.com/Delete-from-RepeatingView-from-Panel-Page-tp16197416p16197416.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: link onClick add panel

2008-03-11 Thread taygolf

Thought I would post back my solution to this problem in case anyone else
needed to do this one day.

I found that I could use the wicket call urlFor to solve my problem.

So I can get the url for the page I want to link to in javascript and then
simply pass that url to the javascript and set it in my link. here is my
code.

PageParameters parameters = new PageParameters();
parameters.put("targetId", targetId);
String url = urlFor(MyPage.class, parameters).toString();
form.add(new AttributeModifier("onsubmit", true, new Model("return
MyJSFunction('"+url+"')")));

This works prefect for what I am wanting to do.

Thanks

T



taygolf wrote:
> 
> I have a problem and I have thought of 2 ways to get it done but I can not
> make either work nor am I sure which one is the best.
> 
> I want the user to be able to add as many customers as they want.
> 
> So I have thought of 2 ways to do this.
> 
> 1) I have a link that when clicked creates a popup with all the necessary
> form fields that need to be filled out to create a customer. When the the
> page is submitted I want the information to be stored on the parent page
> in a table. I also want the customer name to be a link so they can edit
> the customer if need be.
> 
> I have the popup working and collecting all the data but the only way I
> see to get it to put the data on the parent page is with javascript and I
> can not seem to get the customer name to be a wicket link. so I guess the
> problem with this method is how can I get javascript to create a new
> wicket link on the fly or how can I populate the parent page from the
> onSubmit of the form on the popup page.
> 
> 2) I have a link and when that link is clicked it opens a panel with all
> the necessary fields that need to be filled out. For some reason I can not
> get the link to add the panel to the parent page so I am stuck there.
> 
> I would prefer option one because I think it looks cleaner. How can I fix
> these issues? am I thinking in the right direction for what I want to do?
> If not what do I need to be looking at?
> 
> Thanks
> 
> T
> 

-- 
View this message in context: 
http://www.nabble.com/link-onClick-add-panel-tp15860001p15988558.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: link onClick add panel

2008-03-06 Thread taygolf

This isnt going to work for me. At least I do not think it will. Lets start
with the first issue and then move from there.

The link calls the popup which has a form. when the link is submitted I want
to add the customer info to the parent page.

You suggest storing the info in a database but that will not work for me
because they will be adding and deleting these customers a lot and i do not
want to have to call the database every time they do this. I would like to
pass the info with a model but I can not refresh the parent page because I
do not want to lose any information in any other textfield on that page.

So is there a way I can pass the model to the popup page, add the customer
info to the model, and then get that model data to show up on the parent
page without a refresh? I have this part of my code in a panel. Can I just
refresh the panel without refreshing the whole page?

After we get this done I would like to make the name of the customer a link
but i think I can handle that with no problem in the repeater.

Thanks

T


Mr Mean wrote:
> 
> Assuming you are using a listview or dataview to display all the
> customers you can simply add a link to the items, attach a label
> displaying the name and you have your clickable name. You could rig
> the link to open the popup.
> To get the customer data from the popup to the page i would choose to
> simply store the customer in the db using a form submit before closing
> the popup, from there you can use ajax or a simple setResponsePage to
> the parentpage to update its content.
> Alternatively if you do not yet want to store your customer you need
> to add it to the model of the listview. Note do not replace the
> listviews model but do something like
> ((List)model.getObject()).add(myCustomer); then you could use either
> ajax or setresponsepage to trigger a refresh on the parentpage.
> 
> If you are using ModalWindow as your popup you might need to add a
> WindowClosedCallbackHandler to redraw the listview.
> 
> Maurice
> 
> On Wed, Mar 5, 2008 at 9:52 PM, taygolf <[EMAIL PROTECTED]> wrote:
>>
>>  I have a problem and I have thought of 2 ways to get it done but I can
>> not
>>  make either work nor am I sure which one is the best.
>>
>>  I want the user to be able to add as many customers as they want.
>>
>>  So I have thought of 2 ways to do this.
>>
>>  1) I have a link that when clicked creates a popup with all the
>> necessary
>>  form fields that need to be filled out to create a customer. When the
>> the
>>  page is submitted I want the information to be stored on the parent page
>> in
>>  a table. I also want the customer name to be a link so they can edit the
>>  customer if need be.
>>
>>  I have the popup working and collecting all the data but the only way I
>> see
>>  to get it to put the data on the parent page is with javascript and I
>> can
>>  not seem to get the customer name to be a wicket link. so I guess the
>>  problem with this method is how can I get javascript to create a new
>> wicket
>>  link on the fly or how can I populate the parent page from the onSubmit
>> of
>>  the form on the popup page.
>>
>>  2) I have a link and when that link is clicked it opens a panel with all
>> the
>>  necessary fields that need to be filled out. For some reason I can not
>> get
>>  the link to add the panel to the parent page so I am stuck there.
>>
>>  I would prefer option one because I think it looks cleaner. How can I
>> fix
>>  these issues? am I thinking in the right direction for what I want to
>> do? If
>>  not what do I need to be looking at?
>>
>>  Thanks
>>
>>  T
>>  --
>>  View this message in context:
>> http://www.nabble.com/link-onClick-add-panel-tp15860001p15860001.html
>>  Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>>  -
>>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/link-onClick-add-panel-tp15860001p15877182.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



link onClick add panel

2008-03-05 Thread taygolf

I have a problem and I have thought of 2 ways to get it done but I can not
make either work nor am I sure which one is the best.

I want the user to be able to add as many customers as they want.

So I have thought of 2 ways to do this.

1) I have a link that when clicked creates a popup with all the necessary
form fields that need to be filled out to create a customer. When the the
page is submitted I want the information to be stored on the parent page in
a table. I also want the customer name to be a link so they can edit the
customer if need be.

I have the popup working and collecting all the data but the only way I see
to get it to put the data on the parent page is with javascript and I can
not seem to get the customer name to be a wicket link. so I guess the
problem with this method is how can I get javascript to create a new wicket
link on the fly or how can I populate the parent page from the onSubmit of
the form on the popup page.

2) I have a link and when that link is clicked it opens a panel with all the
necessary fields that need to be filled out. For some reason I can not get
the link to add the panel to the parent page so I am stuck there.

I would prefer option one because I think it looks cleaner. How can I fix
these issues? am I thinking in the right direction for what I want to do? If
not what do I need to be looking at?

Thanks

T
-- 
View this message in context: 
http://www.nabble.com/link-onClick-add-panel-tp15860001p15860001.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



autosuggest options in wicket

2008-03-04 Thread taygolf

Hey everyone. I am not sure wicket deals with anything like this but I wanted
to check before I decided to go the javascript route.

I want an autosuggest textfield for a listchoice. So say I have a a
listchoice that is supposed to show customer names from a table in the
database and say there are 2000 customers in that database.

Instead of scrolling through all 2000 customer names to get the one I want I
would like to have a autosuggest textfield that will narrow down the choices
for me as I type. so if I typed in the letter "C" in the textfield it would
automatically change the options in the list choice to only those customers
that star with the letter "C". Then is I type "r" it would get only thouse
starting with "Cr"

I have done this with Javascript but as you can imagine as you get over
about 5000 fields it slows down and does not preform well. I know having
this many options in a listchoice is not ideal nor is it with just a plain
html sleect tag but in some cases it has to happen especially with the
constrants that i have on my development.

Is there a way to do this with wicket or should I just do it with
javascript?

Thanks

T
-- 
View this message in context: 
http://www.nabble.com/autosuggest-options-in-wicket-tp15832404p15832404.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: get Form information after submit

2008-03-03 Thread taygolf

it sure does. I had it extending panel first and then changed it to see if
formcomponentpanel would work better and I forgot to change it back.

I got it working now and it is prefect. Thanks for the help

T

igor.vaynberg wrote:
> 
> does your textfieldpanel extend formcomponentpanel? if so that would
> be why, formcomponetpanel would also be setting the value - but always
> to null. you should simply extend panel, and super(id) should do fine,
> panel's dont require/do anything with  models.
> 
> -igor
> 
> 
> On Mon, Mar 3, 2008 at 9:12 AM, taygolf <[EMAIL PROTECTED]> wrote:
>>
>>  I think I found the problem in my code igor. It seems that I was messing
>> it
>>  all up by setting the panel model to the same model I wanted to pass to
>> the
>>  textfield
>>
>>
>>  TextFieldPanel.java
>>
>>  public TextFieldPanel(String id, PropertyModel pm) {
>>   super(id, pm);
>>   add(new RequiredTextField("textField1", pm));
>>  }
>>
>>  I am setting pm in super(id, pm) and i am trying to use it for the
>> required
>>  textfield. when I change super(id, pm) to super(id, new model()) it
>> seems to
>>  be working fine.
>>
>>  I have read the wiki pages for models a few times and it seems I need to
>> do
>>  it a few more. This is totally new to me but so far it looks like it is
>> head
>>  above everything else.
>>
>>  Thanks so much for your help
>>
>>
>>
>>  T
>>
>>  igor.vaynberg wrote:
>>  >
>>  > On Mon, Mar 3, 2008 at 5:33 AM, taygolf <[EMAIL PROTECTED]>
>> wrote:
>>  >>  I am just really confused by all of this. I do not understand why
>> there
>>  >> is
>>  >>  not a way to get all the form fields onSubmit. There has got to be a
>> way
>>  >> to
>>  >>  just say get all form fields or something. If not can we think about
>>  >> adding
>>  >>  it in the next version. it would make things a lot easier than
>> passing a
>>  >>  model from the from to a panel and then back.
>>  >
>>  >  because wicket abstracts request/response nature of http with event
>>  > based programming model. all newbies struggle with models, then when
>>  > they get them they cant live without them. have you read the model
>>  > page on the wiki like i suggested?
>>  >
>>  > it is already possible to get all form values for all textfields...
>>  > form.visit(TextField.class, new ivisitor() { visitComponent(Component
>>  > c) { System.out.println((TextField)c).getInput(); }}
>>  >
>>  >>
>>  >>  Do you want me to just post the whole java and html files on here?
>> is
>>  >> that
>>  >>  what you mean by a quickstart? I am using 1.3 if that help any
>>  >
>>  > that will do
>>  >
>>  > -igor
>>  >
>>  >>
>>  >>  Thanks
>>  >>
>>  >>  T
>>  >>
>>  >>
>>  >>
>>  >>  igor.vaynberg wrote:
>>  >>  >
>>  >>  > if you create a quickstart it will make it very easy for me to see
>> and
>>  >>  > will give us both something to work with...
>>  >>  >
>>  >>  > -igor
>>  >>  >
>>  >>  >
>>  >>  > On Fri, Feb 29, 2008 at 12:48 PM, taygolf
>> <[EMAIL PROTECTED]>
>>  >>  > wrote:
>>  >>  >>
>>  >>  >>  teststring in onSubmit is always null no matter what I have
>> entered
>>  >> in
>>  >>  >> the
>>  >>  >>  textfield.
>>  >>  >>
>>  >>  >>  Any help with this would be most appreciated.
>>  >>  >>
>>  >>  >>  Thanks
>>  >>  >>
>>  >>  >>  T
>>  >>  >>
>>  >>  >>
>>  >>  >>
>>  >>  >>  igor.vaynberg wrote:
>>  >>  >>  >
>>  >>  >>  > what about it didnt work? it looks fine...
>>  >>  >>  >
>>  >>  >>  > -igor
>>  >>  >>  >
>>  >>  >>  >
>>  >>  >>  > On Thu, Feb 28, 2008 at 12:43 PM, taygolf
>>  >> <[EMAIL PROTECTED]>
>>  >>  >>  > wrote:
>>  >>  >>  >>
>>  >>  >>  >>  hey igor t

Re: get Form information after submit

2008-03-03 Thread taygolf

I think I found the problem in my code igor. It seems that I was messing it
all up by setting the panel model to the same model I wanted to pass to the
textfield

TextFieldPanel.java

public TextFieldPanel(String id, PropertyModel pm) {
  super(id, pm);
  add(new RequiredTextField("textField1", pm));
} 

I am setting pm in super(id, pm) and i am trying to use it for the required
textfield. when I change super(id, pm) to super(id, new model()) it seems to
be working fine.

I have read the wiki pages for models a few times and it seems I need to do
it a few more. This is totally new to me but so far it looks like it is head
above everything else.

Thanks so much for your help

T

igor.vaynberg wrote:
> 
> On Mon, Mar 3, 2008 at 5:33 AM, taygolf <[EMAIL PROTECTED]> wrote:
>>  I am just really confused by all of this. I do not understand why there
>> is
>>  not a way to get all the form fields onSubmit. There has got to be a way
>> to
>>  just say get all form fields or something. If not can we think about
>> adding
>>  it in the next version. it would make things a lot easier than passing a
>>  model from the from to a panel and then back.
> 
>  because wicket abstracts request/response nature of http with event
> based programming model. all newbies struggle with models, then when
> they get them they cant live without them. have you read the model
> page on the wiki like i suggested?
> 
> it is already possible to get all form values for all textfields...
> form.visit(TextField.class, new ivisitor() { visitComponent(Component
> c) { System.out.println((TextField)c).getInput(); }}
> 
>>
>>  Do you want me to just post the whole java and html files on here? is
>> that
>>  what you mean by a quickstart? I am using 1.3 if that help any
> 
> that will do
> 
> -igor
> 
>>
>>  Thanks
>>
>>  T
>>
>>
>>
>>  igor.vaynberg wrote:
>>  >
>>  > if you create a quickstart it will make it very easy for me to see and
>>  > will give us both something to work with...
>>  >
>>  > -igor
>>  >
>>  >
>>  > On Fri, Feb 29, 2008 at 12:48 PM, taygolf <[EMAIL PROTECTED]>
>>  > wrote:
>>  >>
>>  >>  teststring in onSubmit is always null no matter what I have entered
>> in
>>  >> the
>>  >>  textfield.
>>  >>
>>  >>  Any help with this would be most appreciated.
>>  >>
>>  >>  Thanks
>>  >>
>>  >>  T
>>  >>
>>  >>
>>  >>
>>  >>  igor.vaynberg wrote:
>>  >>  >
>>  >>  > what about it didnt work? it looks fine...
>>  >>  >
>>  >>  > -igor
>>  >>  >
>>  >>  >
>>  >>  > On Thu, Feb 28, 2008 at 12:43 PM, taygolf
>> <[EMAIL PROTECTED]>
>>  >>  > wrote:
>>  >>  >>
>>  >>  >>  hey igor thanks for all the help I really am learning a lot
>> here.
>>  >>  >>
>>  >>  >>  I am having an issue forwarding the model tp my textfiled in my
>>  >> panel
>>  >>  >> and I
>>  >>  >>  wanted to show you my code and see what you thought the issue
>> is. I
>>  >> am
>>  >>  >> sure
>>  >>  >>  it is something simple I have overlooked.
>>  >>  >>
>>  >>  >>  Template.java
>>  >>  >>  public class Template extends WebPage {
>>  >>  >>  private String teststring;
>>  >>  >>  Form form = new Form("myform") {
>>  >>  >> protected void onSubmit() {
>>  >>  >> callDatabase(teststring);//this is always coming
>> back
>>  >>  >> null and I am not
>>  >>  >>  sure why.
>>  >>  >> };
>>  >>  >>  };
>>  >>  >>  form.setMarkupId("myform");
>>  >>  >>  form.setOutputMarkupId(true);
>>  >>  >>  add(form);
>>  >>  >>  form.add(new FeedbackPanel("feedback"));
>>  >>  >>  form.add(new TextFieldPanel("textfield", new PropertyModel(this,
>>  >>  >>  "teststring")));
>>  >>  >>  }
>>  >>  >>
>>  >>  >>
>>  >>  >>  Template.html
>>  >>  >>  
>>  >>  >> 
>>  >>  >>   all feedback messages

Re: get Form information after submit

2008-03-03 Thread taygolf

I am just really confused by all of this. I do not understand why there is
not a way to get all the form fields onSubmit. There has got to be a way to
just say get all form fields or something. If not can we think about adding
it in the next version. it would make things a lot easier than passing a
model from the from to a panel and then back.

Do you want me to just post the whole java and html files on here? is that
what you mean by a quickstart? I am using 1.3 if that help any

Thanks

T



igor.vaynberg wrote:
> 
> if you create a quickstart it will make it very easy for me to see and
> will give us both something to work with...
> 
> -igor
> 
> 
> On Fri, Feb 29, 2008 at 12:48 PM, taygolf <[EMAIL PROTECTED]>
> wrote:
>>
>>  teststring in onSubmit is always null no matter what I have entered in
>> the
>>  textfield.
>>
>>  Any help with this would be most appreciated.
>>
>>  Thanks
>>
>>  T
>>
>>
>>
>>  igor.vaynberg wrote:
>>  >
>>  > what about it didnt work? it looks fine...
>>  >
>>  > -igor
>>  >
>>  >
>>  > On Thu, Feb 28, 2008 at 12:43 PM, taygolf <[EMAIL PROTECTED]>
>>  > wrote:
>>  >>
>>  >>  hey igor thanks for all the help I really am learning a lot here.
>>  >>
>>  >>  I am having an issue forwarding the model tp my textfiled in my
>> panel
>>  >> and I
>>  >>  wanted to show you my code and see what you thought the issue is. I
>> am
>>  >> sure
>>  >>  it is something simple I have overlooked.
>>  >>
>>  >>  Template.java
>>  >>  public class Template extends WebPage {
>>  >>  private String teststring;
>>  >>  Form form = new Form("myform") {
>>  >> protected void onSubmit() {
>>  >> callDatabase(teststring);//this is always coming back
>>  >> null and I am not
>>  >>  sure why.
>>  >> };
>>  >>  };
>>  >>  form.setMarkupId("myform");
>>  >>  form.setOutputMarkupId(true);
>>  >>  add(form);
>>  >>  form.add(new FeedbackPanel("feedback"));
>>  >>  form.add(new TextFieldPanel("textfield", new PropertyModel(this,
>>  >>  "teststring")));
>>  >>  }
>>  >>
>>  >>
>>  >>  Template.html
>>  >>  
>>  >> 
>>  >>   all feedback messages go here!
>>  >>   TextFieldPanel go here
>>  >> 
>>  >>  
>>  >>
>>  >>  TextFieldPanel.java
>>  >>
>>  >>  public TextFieldPanel(String id, PropertyModel pm) {
>>  >>   super(id, pm);
>>  >>   add(new RequiredTextField("textField1", pm));
>>  >>  }
>>  >>
>>  >>
>>  >>  TextFieldPanel.html
>>  >>  
>>  >>  
>>  >>  
>>  >>
>>  >>
>>  >>  Now I was thinking that since I sent the PropertyModel to the
>>  >> TextFieldPanel
>>  >>  it should work but it did not. Is there an inheritance that i need
>> to do
>>  >> to
>>  >>  get this to work? The goal here is to create a bunch of textFields
>> on
>>  >> the
>>  >>  fly but first I would like to get this working so I know what I am
>> doing
>>  >>  hince the simple example of my code.
>>  >>
>>  >>  Thanks again for the help
>>  >>
>>  >>
>>  >>
>>  >>  T
>>  >>
>>  >>
>>  >>  igor.vaynberg wrote:
>>  >>  >
>>  >>  > no, it wont change, just have the panel forward the model to the
>>  >>  > textfield.
>>  >>  >
>>  >>  > -igor
>>  >>  >
>>  >>  >
>>  >>  > On Wed, Feb 27, 2008 at 1:50 PM, taygolf
>> <[EMAIL PROTECTED]>
>>  >> wrote:
>>  >>  >>
>>  >>  >>  Thanks igor I really appreciate the help. My code was really
>> close
>>  >> but I
>>  >>  >> was
>>  >>  >>  not creating:
>>  >>  >>
>>  >>  >> private object selection1;
>>  >>  >>   private object selection2;
>>  >>  >>
>>  >>  >>  which was giving me my issues of getting the object in the
>> onSub

Re: get Form information after submit

2008-02-29 Thread taygolf

teststring in onSubmit is always null no matter what I have entered in the
textfield. 

Any help with this would be most appreciated.

Thanks

T

igor.vaynberg wrote:
> 
> what about it didnt work? it looks fine...
> 
> -igor
> 
> 
> On Thu, Feb 28, 2008 at 12:43 PM, taygolf <[EMAIL PROTECTED]>
> wrote:
>>
>>  hey igor thanks for all the help I really am learning a lot here.
>>
>>  I am having an issue forwarding the model tp my textfiled in my panel
>> and I
>>  wanted to show you my code and see what you thought the issue is. I am
>> sure
>>  it is something simple I have overlooked.
>>
>>  Template.java
>>  public class Template extends WebPage {
>>  private String teststring;
>>  Form form = new Form("myform") {
>> protected void onSubmit() {
>> callDatabase(teststring);//this is always coming back
>> null and I am not
>>  sure why.
>> };
>>  };
>>  form.setMarkupId("myform");
>>  form.setOutputMarkupId(true);
>>  add(form);
>>  form.add(new FeedbackPanel("feedback"));
>>  form.add(new TextFieldPanel("textfield", new PropertyModel(this,
>>  "teststring")));
>>  }
>>
>>
>>  Template.html
>>  
>> 
>>   all feedback messages go here!
>>   TextFieldPanel go here
>> 
>>  
>>
>>  TextFieldPanel.java
>>
>>  public TextFieldPanel(String id, PropertyModel pm) {
>>   super(id, pm);
>>   add(new RequiredTextField("textField1", pm));
>>  }
>>
>>
>>  TextFieldPanel.html
>>  
>>  
>>  
>>
>>
>>  Now I was thinking that since I sent the PropertyModel to the
>> TextFieldPanel
>>  it should work but it did not. Is there an inheritance that i need to do
>> to
>>  get this to work? The goal here is to create a bunch of textFields on
>> the
>>  fly but first I would like to get this working so I know what I am doing
>>  hince the simple example of my code.
>>
>>  Thanks again for the help
>>
>>
>>
>>  T
>>
>>
>>  igor.vaynberg wrote:
>>  >
>>  > no, it wont change, just have the panel forward the model to the
>>  > textfield.
>>  >
>>  > -igor
>>  >
>>  >
>>  > On Wed, Feb 27, 2008 at 1:50 PM, taygolf <[EMAIL PROTECTED]>
>> wrote:
>>  >>
>>  >>  Thanks igor I really appreciate the help. My code was really close
>> but I
>>  >> was
>>  >>  not creating:
>>  >>
>>  >> private object selection1;
>>  >>   private object selection2;
>>  >>
>>  >>  which was giving me my issues of getting the object in the onSubmit
>>  >>  override. I do not know why I did not see something that simple I
>> think
>>  >> I
>>  >>  was just blocked.
>>  >>
>>  >>  Will the code change at all if the textfield on page 2 is created in
>>  >> nested
>>  >>  panels. Since I am creating my form on the fly the textfield will be
>> in
>>  >> a
>>  >>  panel nested in a panel. I might be able to change my code to allow
>> just
>>  >> one
>>  >>  panel but I am not sure yet.
>>  >>
>>  >>  Thanks again
>>  >>
>>  >>  T
>>  >>
>>  >>
>>  >>
>>  >>  igor.vaynberg wrote:
>>  >>  >
>>  >>  > class page1 {
>>  >>  >   private object selection1;
>>  >>  >   private object selection2;
>>  >>  >
>>  >>  >   public page1() {
>>  >>  >   form form=new form("form") {
>>  >>  >  onsubmit() { setresponsepage(new
>>  >> page2(selection1,selection2)); }
>>  >>  >   }
>>  >>  >   form.add(new dropdownchoice("s1", new propertymodel(this,
>>  >>  > "selection1"), ...));
>>  >>  >   form.add(new dropdownchoice("s2", new propertymodel(this,
>>  >>  > "selection2"), ...));
>>  >>  >   }
>>  >>  > }
>>  >>  >
>>  >>  > class page2 {
>>  >>  >private final object selection1;
>>  >>  >private final object selection2;
>>  >>  >private final String text;
>>  >>  >
>>  >>

Re: get Form information after submit

2008-02-28 Thread taygolf

hey igor thanks for all the help I really am learning a lot here.

I am having an issue forwarding the model tp my textfiled in my panel and I
wanted to show you my code and see what you thought the issue is. I am sure
it is something simple I have overlooked.

Template.java
public class Template extends WebPage {
private String teststring;
Form form = new Form("myform") {
protected void onSubmit() {
callDatabase(teststring);//this is always coming back null and 
I am not
sure why.
};
};
form.setMarkupId("myform");
form.setOutputMarkupId(true);
add(form);
form.add(new FeedbackPanel("feedback"));
form.add(new TextFieldPanel("textfield", new PropertyModel(this,
"teststring")));
}


Template.html


  all feedback messages go here!
  TextFieldPanel go here



TextFieldPanel.java

public TextFieldPanel(String id, PropertyModel pm) {
  super(id, pm);
  add(new RequiredTextField("textField1", pm));
}


TextFieldPanel.html





Now I was thinking that since I sent the PropertyModel to the TextFieldPanel
it should work but it did not. Is there an inheritance that i need to do to
get this to work? The goal here is to create a bunch of textFields on the
fly but first I would like to get this working so I know what I am doing
hince the simple example of my code.

Thanks again for the help

T


igor.vaynberg wrote:
> 
> no, it wont change, just have the panel forward the model to the
> textfield.
> 
> -igor
> 
> 
> On Wed, Feb 27, 2008 at 1:50 PM, taygolf <[EMAIL PROTECTED]> wrote:
>>
>>  Thanks igor I really appreciate the help. My code was really close but I
>> was
>>  not creating:
>>
>> private object selection1;
>>   private object selection2;
>>
>>  which was giving me my issues of getting the object in the onSubmit
>>  override. I do not know why I did not see something that simple I think
>> I
>>  was just blocked.
>>
>>  Will the code change at all if the textfield on page 2 is created in
>> nested
>>  panels. Since I am creating my form on the fly the textfield will be in
>> a
>>  panel nested in a panel. I might be able to change my code to allow just
>> one
>>  panel but I am not sure yet.
>>
>>  Thanks again
>>
>>  T
>>
>>
>>
>>  igor.vaynberg wrote:
>>  >
>>  > class page1 {
>>  >   private object selection1;
>>  >   private object selection2;
>>  >
>>  >   public page1() {
>>  >   form form=new form("form") {
>>  >  onsubmit() { setresponsepage(new
>> page2(selection1,selection2)); }
>>  >   }
>>  >   form.add(new dropdownchoice("s1", new propertymodel(this,
>>  > "selection1"), ...));
>>  >   form.add(new dropdownchoice("s2", new propertymodel(this,
>>  > "selection2"), ...));
>>  >   }
>>  > }
>>  >
>>  > class page2 {
>>  >private final object selection1;
>>  >private final object selection2;
>>  >private final String text;
>>  >
>>  >public page2(object selection1, object selection2) {
>>  >   this.selection1=selection1; this.selection2=selection2;
>>  >   form=new form("form") {
>>  >   onsubmit() {
>>  >   sendemails(selection1,selection2,text);
>>  >   savetodb(selection1,selection2,text);
>>  >setresponsepage(donepage.class);
>>  >}
>>  >}
>>  >form.add(new textfield("tf", new propertymodel(this,"text")));
>>  >  }
>>  > }
>>  >
>>  > -igor
>>  >
>>  > On Wed, Feb 27, 2008 at 11:16 AM, taygolf <[EMAIL PROTECTED]>
>>  > wrote:
>>  >>
>>  >>  yes all of my experiance is in JSP so I guess I am just confused
>> about
>>  >> how
>>  >>  forms work in wicket compared to JSP.  Maybe you can help me
>> understand
>>  >> and
>>  >>  suggest a way to accomplish what I am looking to do.
>>  >>
>>  >>  I have a form that takes in 2 dropdown chioces. When selected these
>>  >>  dropdownchoices are set to session variables. I then set the
>> response
>>  >> page
>>  >>  to a new page with a form. that form is created off of a query based
>> on
>>  >> what
>>  >>  was selected in the 2 dropdown choices. I have all of this working
>>  >> today

Re: get Form information after submit

2008-02-27 Thread taygolf

Thanks igor I really appreciate the help. My code was really close but I was
not creating:
private object selection1;
 private object selection2;

which was giving me my issues of getting the object in the onSubmit
override. I do not know why I did not see something that simple I think I
was just blocked.

Will the code change at all if the textfield on page 2 is created in nested
panels. Since I am creating my form on the fly the textfield will be in a
panel nested in a panel. I might be able to change my code to allow just one
panel but I am not sure yet.

Thanks again

T

igor.vaynberg wrote:
> 
> class page1 {
>   private object selection1;
>   private object selection2;
> 
>   public page1() {
>   form form=new form("form") {
>  onsubmit() { setresponsepage(new page2(selection1,selection2)); }
>   }
>   form.add(new dropdownchoice("s1", new propertymodel(this,
> "selection1"), ...));
>   form.add(new dropdownchoice("s2", new propertymodel(this,
> "selection2"), ...));
>   }
> }
> 
> class page2 {
>private final object selection1;
>private final object selection2;
>private final String text;
> 
>public page2(object selection1, object selection2) {
>   this.selection1=selection1; this.selection2=selection2;
>   form=new form("form") {
>   onsubmit() {
>   sendemails(selection1,selection2,text);
>   savetodb(selection1,selection2,text);
>setresponsepage(donepage.class);
>}
>    }
>form.add(new textfield("tf", new propertymodel(this,"text")));
>  }
> }
> 
> -igor
> 
> On Wed, Feb 27, 2008 at 11:16 AM, taygolf <[EMAIL PROTECTED]>
> wrote:
>>
>>  yes all of my experiance is in JSP so I guess I am just confused about
>> how
>>  forms work in wicket compared to JSP.  Maybe you can help me understand
>> and
>>  suggest a way to accomplish what I am looking to do.
>>
>>  I have a form that takes in 2 dropdown chioces. When selected these
>>  dropdownchoices are set to session variables. I then set the response
>> page
>>  to a new page with a form. that form is created off of a query based on
>> what
>>  was selected in the 2 dropdown choices. I have all of this working
>> today.
>>
>>  Now when the form is filled out I want to save the information to the
>>  database, make a few other calls to push the data to outside
>> applications
>>  and databases and send emails and things like that. Then I simply want
>> to
>>  display that the form was submitted properly.
>>
>>  There is no need to see the form once it is submitted so that is why I
>> want
>>  to push it to another page but if I can override onSubmit to insert the
>> data
>>  in the database then all I would have to do is set the response page to
>> a
>>  simple html page that said your work is done or something like that.
>>
>>  I guess that would work perfect.
>>
>>  The one question I still have is how can I get the fileds from the panel
>> in
>>  the onsubmit call? say my panel has a textfield in it and I set the
>> markupId
>>  to "test". how can I get that in the onsubmit call so I can create my
>> new
>>  record in the database?
>>
>>  I am sorry that i have so many questions. I am very new to wicket. only
>>  about 2 weeks worth of looking at it and I think I have made a lot of
>>  strides going from knowing nothing to what I have so far. a little more
>>  knowledge and I will be set.
>>
>>  Thanks
>>
>>  T
>>
>>  SO you are saying that
>>
>>
>>
>>  igor.vaynberg wrote:
>>  >
>>  > why do you want to pass it to another page for processing?
>>  >
>>  > sounds like you are thinking about the old jsp model. in wicket
>>  > components are stateful and so the lifecycle is different...
>>  >
>>  > the form submits to itself, and updates models of any form components
>>  > inside. then you can override form.onsubmit() and redirect to another
>>  > page if that is what is needed, or just do nothing to have the current
>>  > page rerendered...
>>  >
>>  > -igor
>>  >
>>  > On Wed, Feb 27, 2008 at 7:34 AM, taygolf <[EMAIL PROTECTED]>
>> wrote:
>>  >>
>>  >>  I have been looking at that today but I am still lost.
>>  >>
>>  >>  Basically what I want to do is have a form with panels in it. the
>> panel
>>  >> 

Re: get Form information after submit

2008-02-27 Thread taygolf

yes all of my experiance is in JSP so I guess I am just confused about how
forms work in wicket compared to JSP.  Maybe you can help me understand and
suggest a way to accomplish what I am looking to do.

I have a form that takes in 2 dropdown chioces. When selected these
dropdownchoices are set to session variables. I then set the response page
to a new page with a form. that form is created off of a query based on what
was selected in the 2 dropdown choices. I have all of this working today.

Now when the form is filled out I want to save the information to the
database, make a few other calls to push the data to outside applications
and databases and send emails and things like that. Then I simply want to
display that the form was submitted properly.

There is no need to see the form once it is submitted so that is why I want
to push it to another page but if I can override onSubmit to insert the data
in the database then all I would have to do is set the response page to a
simple html page that said your work is done or something like that.

I guess that would work perfect.

The one question I still have is how can I get the fileds from the panel in
the onsubmit call? say my panel has a textfield in it and I set the markupId
to "test". how can I get that in the onsubmit call so I can create my new
record in the database?

I am sorry that i have so many questions. I am very new to wicket. only
about 2 weeks worth of looking at it and I think I have made a lot of
strides going from knowing nothing to what I have so far. a little more
knowledge and I will be set.

Thanks

T 

SO you are saying that 

igor.vaynberg wrote:
> 
> why do you want to pass it to another page for processing?
> 
> sounds like you are thinking about the old jsp model. in wicket
> components are stateful and so the lifecycle is different...
> 
> the form submits to itself, and updates models of any form components
> inside. then you can override form.onsubmit() and redirect to another
> page if that is what is needed, or just do nothing to have the current
> page rerendered...
> 
> -igor
> 
> On Wed, Feb 27, 2008 at 7:34 AM, taygolf <[EMAIL PROTECTED]> wrote:
>>
>>  I have been looking at that today but I am still lost.
>>
>>  Basically what I want to do is have a form with panels in it. the panel
>> will
>>  add a textfield everytime it is called. and it will set the markupId to
>> a
>>  unique id that I am generating and well as setOutputMarkupId to true.
>>
>>  Then when the user has submitted the form I want to pass all the form
>> values
>>  to another page for processing.
>>
>>  Is there a way to get the form to submit to a new page by using
>>  setResponsePage or is there a was to get all the form information into a
>>  PageParameters variable and pass it that way in the onSubmit() call?
>>
>>
>>  Thanks for the help
>>
>>  T
>>
>>
>>
>>
>>
>> igor.vaynberg wrote:
>>  >
>>  > when a form is posted all the values the user entered are pushed into
>>  > the model. i suggest you read the models page on the wiki and look at
>>  > forminput example. in wicket you do not have a "post" page, the form
>>  > submits to itself...
>>  >
>>  > -igor
>>  >
>>  >
>>  > On Tue, Feb 26, 2008 at 12:52 PM, taygolf <[EMAIL PROTECTED]>
>>  > wrote:
>>  >>
>>  >>  ok I know I am missing something simple but I do not know what. I
>> have a
>>  >> form
>>  >>  with a CompoundPropertyModel. I am creating several textfields using
>>  >> panels
>>  >>  so it is all on the fly and can be created from a query.
>>  >>
>>  >>  Anyway I now want to submit my form and get the values in the Post
>> page
>>  >> but
>>  >>  I am not sure how to do this. I am guessing it has something to do
>> with
>>  >>  PageParameters but I have not gotten the right call yet.
>>  >>
>>  >>  SO the question is simple. How do I get all the values from a form
>> after
>>  >> it
>>  >>  is posted on another page. in JSP I would call
>>  >>  request.getParameter("filedname"); What do I do for wicket?
>>  >>
>>  >>  I am really not sure where to look but i have been playing with
>>  >>  PageParameters and form.getMarkupAttributes with no luck so far.
>> Please
>>  >>  point me in the right direction
>>  >>
>>  >>  Thanks for the help
>>  >>
>>  >>  T
>>  >>  --
>>  >>  View this message in context:
&

Re: Open new page after submit a form

2008-02-27 Thread taygolf

did you find a way to do what you want? I am looking to do close to the same
thing.

Thanks

T

Newgro wrote:
> 
> Hi *,
> 
> i have a wicket page with a form and some other components. On click on a
> button i want to submit the form and go to another page of my application.
> The problem i have is that the form has to be send to an external script,
> which i canĀ“t change. This script opens a new page (not of my
> application). I just can assign an url to the script it should redirect
> to.
> 
> How can i get the url for my result wicket page with a model?
> Or how can i submit the form and let wicket open my new page (Then i would
> need the url for the result page, which is not generated at "submit"
> time).
> 
> Thanks for help,
> per
> 

-- 
View this message in context: 
http://www.nabble.com/Open-new-page-after-submit-a-form-tp14753898p15716396.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: get Form information after submit

2008-02-27 Thread taygolf

I have been looking at that today but I am still lost.

Basically what I want to do is have a form with panels in it. the panel will
add a textfield everytime it is called. and it will set the markupId to a
unique id that I am generating and well as setOutputMarkupId to true.

Then when the user has submitted the form I want to pass all the form values
to another page for processing. 

Is there a way to get the form to submit to a new page by using
setResponsePage or is there a was to get all the form information into a
PageParameters variable and pass it that way in the onSubmit() call?

Thanks for the help

T



igor.vaynberg wrote:
> 
> when a form is posted all the values the user entered are pushed into
> the model. i suggest you read the models page on the wiki and look at
> forminput example. in wicket you do not have a "post" page, the form
> submits to itself...
> 
> -igor
> 
> 
> On Tue, Feb 26, 2008 at 12:52 PM, taygolf <[EMAIL PROTECTED]>
> wrote:
>>
>>  ok I know I am missing something simple but I do not know what. I have a
>> form
>>  with a CompoundPropertyModel. I am creating several textfields using
>> panels
>>  so it is all on the fly and can be created from a query.
>>
>>  Anyway I now want to submit my form and get the values in the Post page
>> but
>>  I am not sure how to do this. I am guessing it has something to do with
>>  PageParameters but I have not gotten the right call yet.
>>
>>  SO the question is simple. How do I get all the values from a form after
>> it
>>  is posted on another page. in JSP I would call
>>  request.getParameter("filedname"); What do I do for wicket?
>>
>>  I am really not sure where to look but i have been playing with
>>  PageParameters and form.getMarkupAttributes with no luck so far. Please
>>  point me in the right direction
>>
>>  Thanks for the help
>>
>>  T
>>  --
>>  View this message in context:
>> http://www.nabble.com/get-Form-information-after-submit-tp15699234p15699234.html
>>  Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>>  -
>>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/get-Form-information-after-submit-tp15699234p15715751.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



get Form information after submit

2008-02-26 Thread taygolf

ok I know I am missing something simple but I do not know what. I have a form
with a CompoundPropertyModel. I am creating several textfields using panels
so it is all on the fly and can be created from a query.

Anyway I now want to submit my form and get the values in the Post page but
I am not sure how to do this. I am guessing it has something to do with
PageParameters but I have not gotten the right call yet.

SO the question is simple. How do I get all the values from a form after it
is posted on another page. in JSP I would call
request.getParameter("filedname"); What do I do for wicket?

I am really not sure where to look but i have been playing with
PageParameters and form.getMarkupAttributes with no luck so far. Please
point me in the right direction

Thanks for the help

T
-- 
View this message in context: 
http://www.nabble.com/get-Form-information-after-submit-tp15699234p15699234.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Panels and feedback messages

2008-02-21 Thread taygolf

ok I am wanting to have a custom feedback message for a testfield that is
created in a panel. I know how to do this for a simple textfield in a form
but I am createing these textfields on the fly using nested panels so I
wanted to know how to do this. Right now I am only adding one panel but I
plan on adding several. here is some code:

template.java
Form form = new Form("myform", new CompoundPropertyModel(request)) {
protected void onSubmit() {
setResponsePage(post.class);
};
};
form.setMarkupId("myform");
form.setOutputMarkupId(true);
form.add(new FeedbackPanel("feedback"));
RepeatingView sections=new RepeatingView("Sections");
sections.add(new generalPanel(sections.newChildId()));
//add other sections here

generalPanel.java
//basically this is a section on my template page. I am going to do a query
and get all the info and create //the panel as needed weither I need
textfields or whatever. again only doing on row right now but I will //soon
add many more.
public class generalPanel extends Panel {
public generalPanel(String id) {
  super(id);
  RepeatingView generalRows=new RepeatingView("generalRows");
  generalRows.add(new textFieldPanel(generalRows.newChildId(), "Test 1",
"Test 2"));
  //add more rows to the general Panel here
  add(generalRows);
}
}

textFieldPanel.java
public class textFieldPanel extends Panel {

public textFieldPanel(String id, String name1, String name2) {
  super(id);

  TextField t1 = new TextField("textField1");
  t1.setRequired(true);
  TextField t2 = new TextField("textField2");
  t2.setRequired(true);

Now I want a custom message that says something like: name1 is required
instead of textField1 is required because I can have several of these panels
and the user will not know what textField1 is.

I tried setting the properties file for template.properties to:
myform.Sections.generalRows.textField1.Required=Name is required

but that did not work. once I get this simple change working I will look
into setting the label of textField1 and getting the message to print with
that so I can pass name1 to the message but first I would like to get it
working with a simple generic message.

Do I need to set the properties for the panels as well? do I not need to use
.newChildId() for the panel ids so I can know what the id is? Can I get the
id some how?

please help me and I am sorry this is so long but I felt looking at the code
you would understand what I want more.

Thanks

T 
-- 
View this message in context: 
http://www.nabble.com/Panels-and-feedback-messages-tp15613738p15613738.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



create wicket form on the fly

2008-02-19 Thread taygolf

Hey guys,

I am very new to wicket and I have a quick question. What I have is a page
that takes in a type and subtype in a form and submits it to the next page.
based on that information I want to query my table and create the form that
needs to be completed. How can I do this with wicket. I am currently using
JSp to loop through the resultset and create the html but how do I do this
with wicket. I have done some searching and I will continue to do so but if
you could point me in the right direction I would appreciate it.

Thanks

-- 
View this message in context: 
http://www.nabble.com/create-wicket-form-on-the-fly-tp15568030p15568030.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]