Read this page: http://cwiki.apache.org/WICKET/working-with-wicket-models.html
And after that:
public Gbrowse(String id, final String position, final String[] sources) {
super(id);
Label label = new Label("gbrowse", new
LoadableDetachableModel() { @Override Object load() { return
getGbrowse(position,sources); });
label.setEscapeModelStrings(false);
add(label);
}
On Tue, Jul 29, 2008 at 4:57 PM, Ryan O'Hara
<[EMAIL PROTECTED]> wrote:
> I have a custon class extending Panel. The constructor accepts two
> parameters which are passed to another method that sets the content of the
> label. I have been able to get the initial loading of the custom Panel to
> work, but it doesn't seem to be updating via AJAX. Below is some of the
> code to help you better understand what I'm dealing with:
>
> public Gbrowse(String id, String position, String[] sources) {
> super(id);
> Label label = new Label("gbrowse", getGbrowse(position,sources));
> label.setEscapeModelStrings(false);
> add(label);
> }
>
>
> Page using Gbrowse:
>
> gbrowse = new Gbrowse("gbrowse", position, new String
> []{"CHOPCNVs","CHOPCNVRs","CHOPCNVBlocks"});
> gbrowse.setOutputMarkupId(true);
> form.add(gbrowse);
>
> //submit button
> AjaxSubmitLink asl = new AjaxSubmitLink("submit") {
> public void onSubmit(AjaxRequestTarget target, Form form) {
> try {
> target.addComponent(gbrowse);
> .......
>
>
> Thanks for the help.
>
> Ryan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]