Re: Handle Ajax event onChange or onInput by changing TextField with Javascript

2016-02-25 Thread Radovan Račák
Yes! That was the problem. 
Thank you

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Handle-Ajax-event-onChange-or-onInput-by-changing-TextField-with-Javascript-tp4673697p4673727.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: Handle Ajax event onChange or onInput by changing TextField with Javascript

2016-02-24 Thread Radovan Račák
Ok,
now I am solving some workaround of this problem, please do you have any
idea how can I edit values with javascript and handling this event in Java
Ajax Handler?

Thank you

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Handle-Ajax-event-onChange-or-onInput-by-changing-TextField-with-Javascript-tp4673697p4673712.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: Handle Ajax event onChange or onInput by changing TextField with Javascript

2016-02-24 Thread Radovan Račák
I think it is bug too. I tried run this project in Wicket version 6.22 and it
works

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Handle-Ajax-event-onChange-or-onInput-by-changing-TextField-with-Javascript-tp4673697p4673708.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: Handle Ajax event onChange or onInput by changing TextField with Javascript

2016-02-24 Thread Radovan Račák
Okey,

here is quickstart project 
https://github.com/vanrado/quickstart
   with one HomePage, in
HomePage.html I am changing input value by Javascript when user click on the
link, and I have OnChangeAjaxBehavior in Java class of that Page

Thanks

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Handle-Ajax-event-onChange-or-onInput-by-changing-TextField-with-Javascript-tp4673697p4673706.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: Handle Ajax event onChange or onInput by changing TextField with Javascript

2016-02-24 Thread Radovan Račák
No problem,

but at this moment a couldn't clean my example project from nested classes.
I upload it to github from browser. I don't have my machine now.
So : 
https://github.com/vanrado/poznamky   

I describe how to find right files in that project.

Thanks for help, I really appreciate it!



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Handle-Ajax-event-onChange-or-onInput-by-changing-TextField-with-Javascript-tp4673697p4673704.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: Handle Ajax event onChange or onInput by changing TextField with Javascript

2016-02-24 Thread Radovan Račák
Hi,

thanks a lot but your advice doesn't work. I tried it for first just
OnChangeAjaxBehavior with trigger("change") and then I tried
OnChangeAjaxBehavior with trigger("inputchange"), in both cases it doesn't
work. 

I also tried change fields input value from JS console and then call
trigger("change") or trigger("inputchange") on field element.. Doesn't
invoke my Java Ajax Handler :-/

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Handle-Ajax-event-onChange-or-onInput-by-changing-TextField-with-Javascript-tp4673697p4673702.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: Handle Ajax event onChange or onInput by changing TextField with Javascript

2016-02-24 Thread Radovan Račák
Thank you very much for really fast response and help,

but it seems it still doesn't work. I tried call trigger(event) and
triggerHandler(event) functions but both of them didn't invoke my Ajax
handler in Java. 

This is my Javascript from where I am updating textfields value and calling
trigger function:
*// updating input field values
this.rangeSlider.noUiSlider.on('update', function (values, handle) {
var value = values[handle];
this.inputField.value = value;
$(this.inputField).triggerHandler('change');
}.bind(this));*

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Handle-Ajax-event-onChange-or-onInput-by-changing-TextField-with-Javascript-tp4673697p4673700.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



Handle Ajax event onChange or onInput by changing TextField with Javascript

2016-02-23 Thread Radovan Račák
Hello dear friends,

I would like to ask you how to resolve my little problem. I have problem to
handle Ajax event onChange or onInput when I want to change TextField's
value by Javascript.

Let me describe my situation: 
I have one TextField - I added this TextField in Wicket and added to it
*AjaxFormComponentUpdatingBehavior("change")*. Everythings works fine when I
manually write something to the textfield - Ajax event change is invoked.
But I am coding very customized Input Range Slider, so I created my custom
implementation in Javascript. So, when I move with slider, TextField is
editing but my Ajax event in Java is no invoked when I change textfields
value in this way.
I tried another ajax events and behaviors in Wicket, but nothing is
working...

How can I invoke this Ajax event manually by Javascript? 
Thank you very much

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Handle-Ajax-event-onChange-or-onInput-by-changing-TextField-with-Javascript-tp4673697.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: RadioChoice with Ajax

2008-10-07 Thread radovan

it works, thank you very much!!


Michael Sparer wrote:
> 
> just a guess:
> from the AjaxFormComopnentUpdatingBehavior's javadoc:
> "NOTE: This behavior does not work on Choices or Groups use the
> AjaxFormChoiceComponentUpdatingBehavior for that. "
> 
> regards,
> Michael
> 
> 
> radovan wrote:
>> 
>> Hallo, I have this code:
>> 
>> private static final List Orders = Arrays.asList(new String[]
>> { "asc", "desc" });
>> private final IModel model = new
>> Model(Orders.get(0));
>> 
>> RadioChoice radioChoice = new RadioChoice("orders", model,
>> Orders);
>> radioChoice.add(new AjaxFormComponentUpdatingBehavior("onchange")
>> {
>> private static final long serialVersionUID = 1L;
>> 
>> @Override
>> protected void onUpdate(AjaxRequestTarget target) {
>> System.out.println(model);
>> }
>> });
>> 
>> I expected, that model contains selected choice, but this print "null".
>> How I can get value of selected choice? - with Ajax (no submit button)
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/RadioChoice-with-Ajax-tp19855494p19856526.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]



RadioChoice with Ajax

2008-10-07 Thread radovan

Hallo, I have this code:

private static final List Orders = Arrays.asList(new String[] {
"asc", "desc" });
private final IModel model = new Model(Orders.get(0));

RadioChoice radioChoice = new RadioChoice("orders", model, Orders);
radioChoice.add(new AjaxFormComponentUpdatingBehavior("onchange") {
private static final long serialVersionUID = 1L;

@Override
protected void onUpdate(AjaxRequestTarget target) {
System.out.println(model);
}
});

I expected, that model contains selected choice, but this print "null". How
I can get value of selected choice? - with Ajax (no submit button)
-- 
View this message in context: 
http://www.nabble.com/RadioChoice-with-Ajax-tp19855494p19855494.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 - modify css for some column

2008-09-29 Thread radovan



Thies Edeling wrote:
> 
> radovan wrote:
>> Hallo community, my code looks like this:
>>
>> listView = new ListView("collectionIterator",
>> listOfMyItems) {
>>
>> @Override
>> protected void populateItem(ListItem item) {
>> MyItem myItem = (MyItem) item.getDefaultModelObject();
>> String name = myItem.getName();
>>  String value = myItem.getValue();
>> item.add(new Label("name", name));
>> item.add(new Label("value", value));
>> }
>> };
>>
>>  
>>  NameValue
>>  
>>  
>>  
>>  
>>  
>>
>> and I need to change css class for  element in table.  
>>
>> If I add this:
>>
>> item.add(new AttributeAppender("class", new
>> Model("newCssClass)," "));
>>
>> It adds this css class for all  tags. By oter words for whole row.
>> But I
>> need modify only some , only some column. Could you give me some
>> advice?
>> Thanks a lot
> use an if statement to only add the attribute to that specific td?
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


ok, but listItem is for whole row (for ), how I get td from listItem?
-- 
View this message in context: 
http://www.nabble.com/ListView---modify-css-for-some-column-tp19726888p19727084.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 - modify css for some column

2008-09-29 Thread radovan

Hallo community, my code looks like this:

listView = new ListView("collectionIterator",
listOfMyItems) {

@Override
protected void populateItem(ListItem item) {
MyItem myItem = (MyItem) item.getDefaultModelObject();
String name = myItem.getName();
String value = myItem.getValue();
item.add(new Label("name", name));
item.add(new Label("value", value));
}
};


NameValue






and I need to change css class for  element in table.  

If I add this:

item.add(new AttributeAppender("class", new
Model("newCssClass)," "));

It adds this css class for all  tags. By oter words for whole row. But I
need modify only some , only some column. Could you give me some advice?
Thanks a lot.

-- 
View this message in context: 
http://www.nabble.com/ListView---modify-css-for-some-column-tp19726888p19726888.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]