Need help with AutoCompleteTextField

2008-08-25 Thread jnorris

Hi All,

I have an AutoCompleteTextField on a form along with 2 DateTimeFields used
to provide a start and end date range that is to be used by the autocomplete
field to limit the number of choices returned by the getChoices() method. 
The problem is that the date values are always the original values for the
fields and not the modified values which makes sense since the form has not
been submitted.  Any ideas or hints on how to get the current values for the
dates on the form in the getChoices() method?  Or is it even possible?

Thanks,
Jim
-- 
View this message in context: 
http://www.nabble.com/Need-help-with-AutoCompleteTextField-tp19143438p19143438.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: Need help with AutoCompleteTextField

2008-08-25 Thread jnorris

Hi All,

I have the date part of the DateTimeField updating to the entered value by
adding an AjaxFormComponentUpdatingBehavior to it.  However the hours and
minutes in the Date is now always 00:00:00 instead of the original value,
even with an AjaxFormComponentUpdatingBehavior added to the hours and
minutes TextFields.  I've tried also adding the DateTimeField and the
DateTextFields to the target but that doesn't change anything.

Jim


jnorris wrote:
 
 Hi All,
 
 I have an AutoCompleteTextField on a form along with 2 DateTimeFields used
 to provide a start and end date range that is to be used by the
 autocomplete field to limit the number of choices returned by the
 getChoices() method.  The problem is that the date values are always the
 original values for the fields and not the modified values which makes
 sense since the form has not been submitted.  Any ideas or hints on how to
 get the current values for the dates on the form in the getChoices()
 method?  Or is it even possible?
 
 Thanks,
 Jim
 

-- 
View this message in context: 
http://www.nabble.com/Need-help-with-AutoCompleteTextField-tp19143438p19143962.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]



DateTimeField validation

2008-08-20 Thread jnorris

The DateTimeField validation message for hours for a 12-hour format indicates
that the date must be between 0 and 12.  Shouldn't this be between 1 and 12? 
The validator has the following:

protected Map variablesMap(IValidatable validatable)
{
final Map map = super.variablesMap(validatable);
map.put(minimum, new Long(0));
map.put(maximum, new Long(getMaximumHours()));
return map;
}

Shouldn't the minimum setting be 1 instead of 0 or am I missing something?

Jim
-- 
View this message in context: 
http://www.nabble.com/DateTimeField-validation-tp19077792p19077792.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: DateTimeField validation

2008-08-20 Thread jnorris

Hi All,

Forget what I said before - I was convinced by a colleague that the hour
range was wrong when in fact it isn't wrong for the 12-hour range which has
the AM/PM.  I'm not sure that the 24-hour range should allow an hour of 24
to be entered but I'm not too familiar with how people use a 24 hour clock.

Jim


jnorris wrote:
 
 The DateTimeField validation message for hours for a 12-hour format
 indicates that the date must be between 0 and 12.  Shouldn't this be
 between 1 and 12?  The validator has the following:
 
 protected Map variablesMap(IValidatable validatable)
 {
   final Map map = super.variablesMap(validatable);
   map.put(minimum, new Long(0));
   map.put(maximum, new Long(getMaximumHours()));
   return map;
 }
 
 Shouldn't the minimum setting be 1 instead of 0 or am I missing something?
 
 Jim
 

-- 
View this message in context: 
http://www.nabble.com/DateTimeField-validation-tp19077792p19078120.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]



Problem getting value from DateTimeField

2008-08-18 Thread jnorris

Hi All,

I have a couple of DateTimeField components on a form on a page that has a
Link that opens another page.  In the onClick() method for the Link I need
to get the values for the dates to put into a PageParameters object.  
However I can't seem to get the modified values for the dates.  I've tried
adding startdatefield.processInput() and startdatefield.validate().  In
either (or both) cases the value that is returned from the field in the
getModelObject() method is always the original date value, and the value
returned for getInput() is always null, null:null.  OTOH in an onSubmit()
method for a Button on the form I can get the modified value as expected.  I
also tried form.process() but that didn't work either.  I don't want to do a
submit since other components may cause validation errors that don't mean
anything in this case.

I'm probably missing something obvious but I can't figure it out and I
didn't find anything helpful in searching this forum.  Any ideas on how to
get the date values without submitting the form would be appreciated.

Thanks,
Jim

-- 
View this message in context: 
http://www.nabble.com/Problem-getting-value-from-DateTimeField-tp19031215p19031215.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: Problem getting value from DateTimeField

2008-08-18 Thread jnorris

I was passing the dates (and some other fields) in parameters so they could
be restored when returning back to the page.  I just came across a different
technique for doing this in Wicket In Action (listing 6.7) so it is no
longer an issue for me.  Thanks WIA!  Great book - has helped me numerous
times.

Jim

-- 
View this message in context: 
http://www.nabble.com/Problem-getting-value-from-DateTimeField-tp19031215p19032604.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]



Help with ModalWindow

2008-08-05 Thread jnorris

Hi All,

I'm trying to use a ModalWindow for a confirmation dialog.  Based on the
button clicked I'm setting a value in  in a hidden field that has an
AjaxFormComponentUpdatingBehavior that I'm trying to use to invoke an action
method based on the user selection.  I want to reuse this for pages that use
a confirmation dialog so I have it in a base page.  Everything works as
expected except that the onchange method on the hidden field is not invoked. 
I've attached a quickstart that illustrates what I am trying to do with the
hidden field replaced by a text field.  The field value does change based on
which button in the modal window is clicked.  However, the onUpdate method
for the text field at line 64 in BasePage.java is never called.

If anyone can take a look at this and help me out I'd appreciate it.

Also if there is a better way to do a confirmation dialog that invokes a
method when the Yes button is selected I'd be interested in hearing how to
go about  http://www.nabble.com/file/p18831847/ModalTest.zip ModalTest.zip
it.  

Thanks,
Jim
-- 
View this message in context: 
http://www.nabble.com/Help-with-ModalWindow-tp18831847p18831847.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: Help with ModalWindow

2008-08-05 Thread jnorris

For anyone interested I solved the problem I was having by changing the
onClose() method in setWindowClosedCallback in BasePage.java to the
following:

public void onClose( AjaxRequestTarget target )
{
Form form = (Form) BasePage.this.get(  baseForm );
HiddenField field = (HiddenField) form.get( confirmResultField );
target.addComponent( field );
doConfirmAction( target );
}

I also removed the adding of the resultfield to the target in the onSubmit
methods in the ConfirmPage class and the AjaxFormComponentUpdatingBehavior
on the confirm field.

In my application the doConfirmAction() method checks the value of the
hidden field.  If it is Yes it does some DB updates.  When finished it
sets a result message in the PageParameters object and then calls
setResponsePage(new MyPage( parms ))  to open up the previous page with the
changed values.  The message is added to the feedback panel in
onBeforeRender() when the page opens.

So the use case would be something like select a user from a user list page
and open a user edit page.  When edits are done click the Save button.  If
there are no validation errors open the modal window to confirm the
operation.  If the user clicks Yes update the DB, add a message to be
displayed to page parameters and set the response page to the user list
page.  If the user clicks no just reopen the user list page.

Jim


jnorris wrote:
 
 Hi All,
 
 I'm trying to use a ModalWindow for a confirmation dialog.  Based on the
 button clicked I'm setting a value in  in a hidden field that has an
 AjaxFormComponentUpdatingBehavior that I'm trying to use to invoke an
 action method based on the user selection.  I want to reuse this for pages
 that use a confirmation dialog so I have it in a base page.  Everything
 works as expected except that the onchange method on the hidden field is
 not invoked.  I've attached a quickstart that illustrates what I am trying
 to do with the hidden field replaced by a text field.  The field value
 does change based on which button in the modal window is clicked. 
 However, the onUpdate method for the text field at line 64 in
 BasePage.java is never called.
 
 If anyone can take a look at this and help me out I'd appreciate it.
 
 Also if there is a better way to do a confirmation dialog that invokes a
 method when the Yes button is selected I'd be interested in hearing how to
 go about  http://www.nabble.com/file/p18831847/ModalTest.zip ModalTest.zip
 it.  
 
 Thanks,
 Jim
 

-- 
View this message in context: 
http://www.nabble.com/Help-with-ModalWindow-tp18831847p18836701.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: help with RadioGroup in Table

2008-06-25 Thread jnorris

Hi Thomas,

Using the row model worked.  I changed the value of the text box with data
from the domain object in the row model, and set that as the target and
bingo!

Thank you for your help.

Jim
-- 
View this message in context: 
http://www.nabble.com/help-with-RadioGroup-in-Table-tp18036005p18112563.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: help with RadioGroup in Table

2008-06-24 Thread jnorris

This problem is a real show-stopper for me so I really need some help if
anyone has done something similiar.  I added
AjaxFormChoiceComponentUpdatingBehavior to the RadioGroup as mentioned in
another post and it hits onUpdate every time a radio button is selected. 
However, I can't figure out 1) how to get the selected row item's data
object from the table and 2) what component to add to the AjaxRequestTarget
(tried the radio group but it throws an exception).

BTW, I gave a prezo to my group a couple of weeks ago and there was some
real interest in migrating to wicket in place of our bloated legacy system,
providing I can finish off this proof of concept that I'm working on.  There
is also some pressure here to do a complete re-design in asp.net so I'm
really hoping to provide an alternative to doing that.  If I can't get the
radio group in the table working soon I'll have to abandon the wicket
approach.  So, any hints, help, url's to examples, etc. will be greatly
appreciated.

Thanks,
Jim
-- 
View this message in context: 
http://www.nabble.com/help-with-RadioGroup-in-Table-tp18036005p18089479.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: Including wicket in JSPs?

2008-06-23 Thread jnorris

Hi Jan,

I have a legacy home-grown jsp application where I'm showing wicket pages in
the content area using an inframe tag.  Initially I had a problem that
turned out to be caused by not using the closing tag for the iframe.  Here's
an example that works in IE6/7:

head
style type=text/css
iframe{ float:left; height:500px; width:100%; display:block;
frameborder:0;}
/style
/head

body
jsp:include page=/leftside.jsp flush=true /
jsp:include page=/top.jsp flush=true /
iframe src=http://someserver/WicketDemoPage?someparm=somevalue;
frameborder=0/iframe
jsp:include page=/bottom.jsp flush=true /
jsp:include page=/rightside.jsp flush=true /
/body

This technique works for me with bookmarkable pages, so in the above case
the following would be put in the init() method of the Application class: 
mountBookmarkablePage( /WicketDemoPage, WicketDemoPage.class );

HTH,
Jim


Jan.Koops wrote:
 
 Hello !
 
 We are using a JSP-based content management system for navigation, page 
 layout etc.
 Now we're evaluating Wicket as our application framework: A Wicket 
 application should appear in the center of the JSP based layout and 
 navigation.
 Has somebody already included a wicket page via jsp:include or other ways?
 It seems to me a Page would be the wrong Wicket component to include, 
 since no body or header should be rendered.
 
 Best regards
  Jan
 

-- 
View this message in context: 
http://www.nabble.com/Including-wicket-in-JSPs--tp18071635p18072855.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]



help with RadioGroup in Table

2008-06-20 Thread jnorris

Hi All,

I have a requirement for a radio button column in a data table.  When a row
is selected data from one of the columns needs to be placed in a text box on
the form.  The problem is how to get the selected row to update the text
box.  I've searched the forums and googled and haven't found a solution that
I can get to work.  The radio buttons themselves work fine until I try to
use an event such as onSelectionChanged which then causes the selection to
be lost which has been discussed in other posts.  I've read in another
similar post that using an ajax behavior is a way to deal with the issue but
I haven't been able to figure out how to do that.  I'm also struggling to
get my head around the correct way to use models for the radio's.  The class
in the model passed in when creating the RadioPanel containing the Radio has
a selected property that I've been trying to use for the value of the
radio.

I can get a solution to work using checkboxes but the requirement is
specifically for radio buttons in order to be compatible with the existing
JSP pages in the application.  BTW, if I can pull this off there is a good
chance future application features will be implemented in Wicket with the
idea of eventually migrating the entire application to wicket.

If anyone has got something like this working I'd really appreciate some
direction.  

Code snippets:

The following code is in addComponents() called from constructor:

final RadioGroup selected = new RadioGroup( selected )
//  {
//  @Override
//  protected void onSelectionChanged( Object newSelection )
//  {
//  super.onSelectionChanged( newSelection );   
// newSelection is always
null
//  }
//  @Override
//  protected boolean wantOnSelectionChangedNotifications()
//  {
//  return true;
//  }
//  }
;

columns.add( new AbstractColumn( new Model(  )) 
{
public void populateItem( final Item cellItem, final 
String componentId,
final IModel rowModel ) 
{
cellItem.add( new RadioPanel( componentId, 
rowModel ));
}
});
AjaxFallbackDefaultDataTable table = new 
AjaxFallbackDefaultDataTable(
table, columns, provider, 15 );

selected.add( table );
this.add( selected );

The panel with the Radio:

private class RadioPanel extends Panel  
{
public RadioPanel( String id, IModel model ) 
{
super( id, model );
add( new Radio( select, new PropertyModel( model, 
selected )));
}
} 

The html for the panel:

wicket:panel
input wicket:id=select type=radio/
/wicket:panel

The html for the radio group and table:

div wicket:id=selected
table wicket:id=table/table
/div


Thanks in advance,
Jim
-- 
View this message in context: 
http://www.nabble.com/help-with-RadioGroup-in-Table-tp18036005p18036005.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]



Dynamic updating of property file

2008-03-19 Thread jnorris

Hi all,

Does anyone know if it is possible to dynamically modify a property file or
overwrite it using Wicket?  The property files are all in .xml format and
the keys are taken from a database when a tree is dynamically built based on
the values read in.  The keys are used in a StringResourceModel to provide
the text for the tree nodes.  On another page, the admin user can add/edit
new entries and I would like to also have the new or revised key-value data
items written to the property file(s) (including supported locales) at the
same time.  The app deployment is expanded.  I know I can get the path
starting with the package nameusing getAbsolutePath() on a PackageResource
but I'm not sure how to get the full path from the root folder.

Thanks,
Jim
-- 
View this message in context: 
http://www.nabble.com/Dynamic-updating-of-property-file-tp16146867p16146867.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: Dynamic updating of property file

2008-03-19 Thread jnorris

Hi All,

I was able to get this to work for a tomcat deployment by adding the
\WEB-INF\classes\ as shown in the code snippet below but this obviously
won't work with jetty for testing and is not generic. I'm sure there must be
a simple generic way to accomplish this using Wicket classes but I haven't
found anything in the archives that gives me a clue.

Any help in coming up with a generic solution would be appreciated!

Jim

Code Snippet:
String propsPath = PackageResource.get( ReportsPage.class, ReportsPage.xml
).getAbsolutePath();
File file = new File ( DemoApp.get().getServletContext().getRealPath(
/WEB-INF/classes/ + propsPath ));
String absPath = file.getAbsolutePath();
StringBuffer sbuf =    // create the xml
Writer out = new BufferedWriter( new OutputStreamWriter( new
FileOutputStream( absPath ), UTF8 ));
out.write( sbuf.toString());


jnorris wrote:
 
 Hi all,
 
 Does anyone know if it is possible to dynamically modify a property file
 or overwrite it using Wicket?  The property files are all in .xml format
 and the keys are taken from a database when a tree is dynamically built
 based on the values read in.  The keys are used in a StringResourceModel
 to provide the text for the tree nodes.  On another page, the admin user
 can add/edit new entries and I would like to also have the new or revised
 key-value data items written to the property file(s) (including supported
 locales) at the same time.  The app deployment is expanded.  I know I can
 get the path starting with the package nameusing getAbsolutePath() on a
 PackageResource but I'm not sure how to get the full path from the root
 folder.
 
 Thanks,
 Jim
 

-- 
View this message in context: 
http://www.nabble.com/Dynamic-updating-of-property-file-tp16146867p16148601.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: Quickstart TestHomePage exception with AuthWebSession

2008-03-17 Thread jnorris

Thank you Igor, that resolved the problem with the exception.

Jim

igor.vaynberg wrote:
 
 public void setUp()
   {
   tester = new WicketTester(new MyApplication());
   }
 
 -igor
 
 On Fri, Mar 14, 2008 at 11:27 AM, jnorris [EMAIL PROTECTED] wrote:

  Hi everyone,

  The TestHomePage test class that is created by the wicket quickstart
  archetype is throwing a ClassCastException when AuthenticatedWebSession
 is
  extended:

  Caused by: java.lang.ClassCastException:
  org.apache.wicket.protocol.http.WebSession
 at
 
 org.apache.wicket.authentication.AuthenticatedWebSession.get(AuthenticatedWebSession.java:43)
 at com.test.MyWebSession.get(MyWebSession.java:48)
 at com.test.HomePage.init(HomePage.java:21)

  However running the application does not cause this exception to happen. 
 Do
  I need to change something in that default test case?  I haven't used
  WicketTester before so I'm not sure if this is expected behavior since
 the
  page requires a role of User.  However I still wouldn't expect the
 class
  cast exception on the .get() method.  BTW, this happens with 1.3.1 and
  1.3.2.

  I've attached a quickstart which illustrates this.

  Jim

  http://www.nabble.com/file/p16049037/SessionTest.zip SessionTest.zip


  --
  View this message in context:
 http://www.nabble.com/Quickstart-TestHomePage-exception-with-AuthWebSession-tp16049037p16049037.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/Quickstart-TestHomePage-exception-with-AuthWebSession-tp16049037p16092058.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: [vote] Release 1.4 with only generics and stop support for 1.3

2008-03-17 Thread jnorris

[X] +1, Wicket 1.4 is 1.3 + generics, drop support for 1.3

-- 
View this message in context: 
http://www.nabble.com/-vote--Release-1.4-with-only-generics-and-stop-support-for-1.3-tp16090054p16096362.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]



Quickstart TestHomePage exception with AuthWebSession

2008-03-14 Thread jnorris

Hi everyone,

The TestHomePage test class that is created by the wicket quickstart
archetype is throwing a ClassCastException when AuthenticatedWebSession is
extended:

Caused by: java.lang.ClassCastException:
org.apache.wicket.protocol.http.WebSession
at
org.apache.wicket.authentication.AuthenticatedWebSession.get(AuthenticatedWebSession.java:43)
at com.test.MyWebSession.get(MyWebSession.java:48)
at com.test.HomePage.init(HomePage.java:21)

However running the application does not cause this exception to happen.  Do
I need to change something in that default test case?  I haven't used
WicketTester before so I'm not sure if this is expected behavior since the
page requires a role of User.  However I still wouldn't expect the class
cast exception on the .get() method.  BTW, this happens with 1.3.1 and
1.3.2.

I've attached a quickstart which illustrates this.

Jim

http://www.nabble.com/file/p16049037/SessionTest.zip SessionTest.zip 


-- 
View this message in context: 
http://www.nabble.com/Quickstart-TestHomePage-exception-with-AuthWebSession-tp16049037p16049037.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]



Page redirect behavior

2008-03-13 Thread jnorris

Hi All,

I have different behavior when using a RedirectPage which I'm trying to
understand.  I have a web page which has a Tree.  In one case when a tree
node is clicked, in the onNodeClicked() method this.setResponsePage( new
RedirectPage( http.)) is called and the URL opens in the same browser
window.  In another case the tree node click makes visible a panel which has
a form for some input parameters and a Link used for the redirect.  In that
panel in the onClick() method for the link this.setResponsePage( new
RedirectPage( http ...)) is called and the URL is opened in a new browser
window which is what I want to happen in both cases.

Does anyone know why the first case opens the URL in the same browser window
but the second case opens the URL in a new window?  Or is there a better way
to have the URL opened in an new window?

Thanks,
Jim
-- 
View this message in context: 
http://www.nabble.com/Page-redirect-behavior-tp16024984p16024984.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: AjaxFallbackDefaultDataTable and DropDownChoice

2008-03-11 Thread jnorris

Thanks Martijn! 

Adding the ddc to a panel worked.

Jim


Martijn Dashorst wrote:
 
 Instead of directly adding the DDC to the column, add a panel or
 fragment containing the DDC.
 
 Martijn
 
 On 3/10/08, jnorris [EMAIL PROTECTED] wrote:

  Hi All,

  I have implemented an AjaxFallbackDefaultDataTable and would like to put
 a
  DropDownChoice in one of the columns to list values.  For example in a
 table
  of users a roles column would show the roles assigned to the user as a
  dropdown list.  I haven't been able to find any examples of doing this. 
 If
  anyone has already done something like this or has any suggestions on
 how to
  do it, I'd appreciate the help.  I tried to extend AbstractColumn but
  couldn't get it to work due to cellItem.add( ddc ) throwing an exception
  (Component cell must be applied to a tag of type 'select', not '' ).

  Thanks,
  Jim



  --
  View this message in context:
 http://www.nabble.com/AjaxFallbackDefaultDataTable-and-DropDownChoice-tp15950744p15950744.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]


 
 
 -- 
 Buy Wicket in Action: http://manning.com/dashorst
 Apache Wicket 1.3.1 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/AjaxFallbackDefaultDataTable-and-DropDownChoice-tp15950744p15976495.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]



AjaxFallbackDefaultDataTable and DropDownChoice

2008-03-10 Thread jnorris

Hi All,

I have implemented an AjaxFallbackDefaultDataTable and would like to put a
DropDownChoice in one of the columns to list values.  For example in a table
of users a roles column would show the roles assigned to the user as a
dropdown list.  I haven't been able to find any examples of doing this.  If
anyone has already done something like this or has any suggestions on how to
do it, I'd appreciate the help.  I tried to extend AbstractColumn but
couldn't get it to work due to cellItem.add( ddc ) throwing an exception
(Component cell must be applied to a tag of type 'select', not '' ). 

Thanks,
Jim


-- 
View this message in context: 
http://www.nabble.com/AjaxFallbackDefaultDataTable-and-DropDownChoice-tp15950744p15950744.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: Checkbox problem

2008-01-18 Thread jnorris

Hi Timo,

I was in the process of renaming MyModel to UserPageModel when I cut and
pasted the code.  Anyway I feel a bit stupid after you pointed out that I
was using a Link instead of a Button and forgot that onClick() doesn't
submit the form.  I'm pretty much a newbie when it comes to web apps but I'm
learning.  Anyway the state of the checkbox is now what I would expect and
it works.  BTW the purpose of the checkbox was just for my testing of the DB
delete operation which can either remove the row from the DB or it can mark
the row as being deleted via deleted_by and date_deleted columns depending
on a flag setting.

I appreciate your taking time to help me.

Thanks,
Jim

Timo Rantalaiho wrote:
 
 As it's a Link and not a Button, deleteLink might be a 
 better name. And take on account that just clicking a Link 
 on the Form probably doesn't submit; you should either use a
 FormComponent that submits the form (Button?) or add a
 suitable ajax behavior to the Link.
 
 Did you check how this gets rendered in the end? Declaring
 it as a submit input in HTML and Link in Java seems
 contradictory.
 
 Best wishes,
 Timo
 
 -- 
 Timo Rantalaiho   
 Reaktor Innovations OyURL: http://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/Checkbox-problem-tp14926922p14949388.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]



Checkbox problem

2008-01-17 Thread jnorris

I have a table implemented using the example AjaxFallbackDefaultDataTable
which works like a charm.  I also have a checkbox on the page that is
created with an instance of a class that extends AbstractCheckBoxModel.  The
issue I am having is that the model state never changes.  I have breakpoints
in both the select() and unselect() methods that never get hit.  The
checkbox always renders as checked.  In an onClick method for a button I'm
retrieving the state and the value using getObject on the checkbox and it
always set to true.

BTW, I've scoured the user lists and tried every combination of setting the
model that I saw and the issue is the same.

I'd appreciate any ideas.

Thanks in advance,
Jim
-- 
View this message in context: 
http://www.nabble.com/Checkbox-problem-tp14926922p14926922.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]