How to trigger Ajax event from client side javascript?

2008-09-05 Thread liza6218

Hi,

I'm trying to trigger OnChangeAjaxBehavior on an HiddenField (or TextField)
change from client side javascript.

Here is the code in html:

function change(){
var change = document.forms[0].changed.value;
if(change != true) {
document.forms[0].changed.value = true;
}
}
 
 input type=hiden wicket:id=changed/

in wicket:

Form form = new Form(form);
add(form);

final HidenField changed= new HidenField (changed);
form.add(HidenField);

final Label label = new Label(selectedValue);
label.setOutputMarkupId(true);
form.add(label);

OnChangeAjaxBehavior onChangeAjaxBehavior = new
OnChangeAjaxBehavior() {
@Override
protected void onUpdate(AjaxRequestTarget target) {
target.addComponent(label);

}
};
changed.add(onChangeAjaxBehavior);


Any help will be very much appreciated. 

- Lisa
-- 
View this message in context: 
http://www.nabble.com/How-to-trigger-Ajax-event-from-client-side-javascript--tp19335490p19335490.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]



Add a javascript window to a Link when text input not saved

2008-09-03 Thread liza6218

Hi,

I'm trying to figure out the following, any help will be apreciated.

I have a form with 3 TextFields , a DropDownChoice and  a save button , 
and a BookmarkablePageLink in the page.  

I need to add a javascript confirm window to the Link whenever any input
changed without save (submit).
and remove the confirm window when the change is saved.


public aPage() {
form = new Form(form);

DropDownChoicequestion questions = new DropDownChoice(question, ...);
form.add(questions);

TextField answer1 = new RequiredTextField(answer1);
TextField answer2 = new RequiredTextField(answer2);
TextField answer3 = new RequiredTextField(answer3);

form.add(answer1);
form.add(answer2);
form.add(answer3);

form.add(new Button(save) {
@Override
public void onSubmit() {
 saveChanges();
 //remove the confirm window
}
 }

add(form);

BookmarkablePageLink alink = new BookmarkablePageLink(alink,
LinkPage.class));
add(alink);
}


-- 
View this message in context: 
http://www.nabble.com/Add-a-javascript-window-to-a-Link-when-text-input-not-saved-tp19295365p19295365.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 DataTable columns, paging by columns

2008-05-02 Thread liza6218

I see, thank you for the reply.

- Liza


igor.vaynberg wrote:
 
 you will have to roll your own component. i would take a look at how
 datatable works: it is basically a repeater (for columns) inside
 another repeater(for rows)
 
 -igor
 
 
 On Thu, Apr 17, 2008 at 9:36 AM, liza6218 [EMAIL PROTECTED] wrote:

  Hi,

  I have to show a table where the number of columns and
  their titles are Dynamic.  And since there could be hundreds of columns,
  how can I do paging by columns and/or paging by rows.

  Thanks,
  Liza
  --
  View this message in context:
 http://www.nabble.com/Dynamic-DataTable-columns%2C--paging-by-columns-tp16746544p16746544.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/Dynamic-DataTable-columns%2C--paging-by-columns-tp16746544p17025256.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 DataTable columns, paging by columns

2008-04-17 Thread liza6218

Hi,

I have to show a table where the number of columns and 
their titles are Dynamic.  And since there could be hundreds of columns,  
how can I do paging by columns and/or paging by rows.

Thanks,
Liza
-- 
View this message in context: 
http://www.nabble.com/Dynamic-DataTable-columns%2C--paging-by-columns-tp16746544p16746544.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]