DropDownChoice selection won't update form fields

2012-02-23 Thread oggie
I have a dropdownchoice populated from a database call. When a user selects
an item from the drop down, I want to load the values of the drop down
object into the form. 

I can't seem to be able to just get the form to reload with the chosen
object. But I can change the form fields individually by setting the model
on each text field. 

If I do : id.setModel(new PropertyModel(chosenConfigType, configTypeId)); 
It works. I was hoping that I wouldn't have to modify the model for each
field.  If I populate the configType field in the beginning (with 9) it
works and is displayed on page load. I would like to avoid this since I'm
going to have other pages with larger forms.

CommonBO is just a business object that has the business rules in it and
makes calls to the DAO objects to get the DTO objects.

The ConfigTypeDTO is just a POJO.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-selection-won-t-update-form-fields-tp4413980p4413980.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: DropDownChoice selection won't update form fields

2012-02-23 Thread oggie
Also, the drop down is not part of the form. Here's the HTML:


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-selection-won-t-update-form-fields-tp4413980p4414035.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: DropDownChoice selection won't update form fields

2012-02-23 Thread oggie
That worked. Thanks!

The only downside is that the wicket plugin for netbeans is throwing a bunch
of errors at me due to the way it's now set up. 

It's saying that everything I add to the form is a child in Java and not in
HTML.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-selection-won-t-update-form-fields-tp4413980p4414600.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: DropDownChoice selection won't update form fields

2012-02-23 Thread oggie
I jumped the gun on that one. It didn't work. 

I was still calling the old page from my menu. Once I fixed that and I am
now calling a new page with your suggestions, the form objects never get
updated. Here's the code:


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-selection-won-t-update-form-fields-tp4413980p4414709.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: DropDownChoice selection won't update form fields

2012-02-23 Thread oggie
Once again, you make it simpler than I thought it would be. Thanks again. 

Finally, how do I reset the form from the onSubmit button of the form? I
tried this:


But it doesn't work. The form never gets reset. I'm able to get the updated
list from the DB and repopulate the list. And the list is updated on the
page. But the form isn't.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-selection-won-t-update-form-fields-tp4413980p4415082.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: DropDownChoice selection won't update form fields

2012-02-24 Thread oggie
I got it working, but I'm not sure if the way I did it is correct. Here's the
final code:



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-selection-won-t-update-form-fields-tp4413980p4417640.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



dynamic control of location of panels on page

2012-08-07 Thread oggie
Let's say we want to have a number of widgets on the page. But we want to be
able to dynamically define what widgets are shown, and in what order they
appear on the page.

So I can create a bunch of panels, each with their own html, and add those
panels to a container to display on the screen. But how do I  control the
order of them? If I put them in a list, will they be drawn in the order they
were added to the list?

I'm following this example:
https://cwiki.apache.org/WICKET/page-with-dynamic-components.html wicket
dynamic content 

Will this type of solution work even if the widgets are of different widths?
Can we still control the layout in the html if we never know what widgets
are shown?

I hope I explained it properly.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/dynamic-control-of-location-of-panels-on-page-tp4651043.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: dynamic control of location of panels on page

2012-08-09 Thread oggie
If everything is in panels, and all panels have proper CSS, wouldn't they
automatically wrap properly, no matter what order they were in?

So if I added the panels to the container in the order I wanted, isn't it
just ensuring the css for those panels is correct and that they will line up
properly and wrap properly?

 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/dynamic-control-of-location-of-panels-on-page-tp4651043p4651085.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: Wicket 1.5 - Generic JSON Response

2012-09-27 Thread oggie
Ahijah wrote
 
 Martin Grigorov-4 wrote
 On Thu, Apr 12, 2012 at 7:38 AM, Ahijah lt;

 darren.greer@

 gt; wrote:
 
 mountResource(/Feed2, new MyResourceReference());
 
 class MyResourceReference extends ResourceReference {
   public IResource getResource() { return new MyResource(); }
 }
 Thanks Martin!  For everyone else's reference, the final code that is
 working looks like this:
 
 --Feed.class
 public class Feed extends AbstractResource {
   
   private static final long serialVersionUID = 1L;
   
   protected ResourceResponse newResourceResponse(Attributes a) { 
   ResourceResponse r = new ResourceResponse(); 
   r.setContentType(application/json);
   r.setWriteCallback(new WriteCallback() { 
   public void writeData(Attributes a) { 
   
 a.getResponse().write([{\id\:111,\title\:\MainEvent\,\start\:\2012-04-10T07:00:00\,\end\:\2012-04-10T09:30:00\,\url\:\?EventID=111\,\allDay\:false}]);
 } 
   }); 
   return r; 
   } 
 
 }
 ---End Feed.class--
 
 --Application.class
   @Override
   protected void init() {
   super.init();   
   mountResource(/Feed, new FeedReference());
   }
 
   public class FeedReference extends ResourceReference { 
   public FeedReference() {
   super(FeedReference.class, feed);
   }
   public IResource getResource() { return new Feed(); } 
   } 
 ---End Application.class-

Is there any way to tie this to the standard wicket security model? Right
now, our web pages are all annotated with @AuthorizeInstantiation(admin),
so how would we be able to apply it to this scenario?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-Generic-JSON-Response-tp4550807p4652432.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: Wicket 1.5 - Generic JSON Response

2012-09-27 Thread oggie
Any suggestions on how I might roll my own? I tried a few things like
injecting the Feed class and annotating it, but I suspect it's too late at
that point.




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-Generic-JSON-Response-tp4550807p4652442.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