Re: AjaxCallListener and script of Component

2013-07-11 Thread Altuğ Bilgin Altıntaş
Thanks.


On Thu, Jul 11, 2013 at 3:42 PM, Martin Grigorov wrote:

> Hi,
>
> Read
>
> https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax#WicketAjax-o.a.w.ajax.IAjaxCallDecoratorisreplacedwitho.a.w.ajax.attributes.IAjaxCallListener
> .
>
>
> On Thu, Jul 11, 2013 at 3:38 PM, Altuğ Bilgin Altıntaş  >wrote:
>
> > Hi all;
> >
> > We are trying to migrate from Wicket 1.4 to 6.9.0.
> >
> > We encountered a strange problem.
> >
> > Here is the migrated code (which is working incorrectly):
> >
> >  @Override
> > protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
> > super.updateAjaxAttributes(attributes);
> >
> > AjaxCallListener myAjaxCallListener = new AjaxCallListener() {
> >
> > @Override
> > public CharSequence getFailureHandler(Component component) {
> > return BlockerBehaviour.getJSUnBlock();
> > }
> >
> > @Override
> > public CharSequence getBeforeHandler(Component component) {
> >   return BlockerBehaviour.getJSBlock();
> > }
> >
> >@Override
> >public CharSequence getSuccessHandler(Component component)
>  {
> >   return BlockerBehaviour.getJSUnBlock();
> >}
> >  };
> >
> > attributes.getAjaxCallListeners().add(myAjaxCallListener);
> > }
> >
> > My application doesn't work because we need to add Component's script. I
> > mean in Wicket 1.4 version , I can append component's script like this,
> ex
> > :
> >
> > @Override
> >  public CharSequence decorateOnFailureScript(CharSequence script) {
> > return *script *+ " " + BlockerBehaviour.getJSUnBlock();
> > }
> >
> > How can we append script of Component in Wicket 6.9.0 ?
> >
> > Thanks.
> >
>


AjaxCallListener and script of Component

2013-07-11 Thread Altuğ Bilgin Altıntaş
Hi all;

We are trying to migrate from Wicket 1.4 to 6.9.0.

We encountered a strange problem.

Here is the migrated code (which is working incorrectly):

 @Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
super.updateAjaxAttributes(attributes);

AjaxCallListener myAjaxCallListener = new AjaxCallListener() {

@Override
public CharSequence getFailureHandler(Component component) {
return BlockerBehaviour.getJSUnBlock();
}

@Override
public CharSequence getBeforeHandler(Component component) {
  return BlockerBehaviour.getJSBlock();
}

   @Override
   public CharSequence getSuccessHandler(Component component){
  return BlockerBehaviour.getJSUnBlock();
   }
 };

attributes.getAjaxCallListeners().add(myAjaxCallListener);
}

My application doesn't work because we need to add Component's script. I
mean in Wicket 1.4 version , I can append component's script like this, ex
:

@Override
 public CharSequence decorateOnFailureScript(CharSequence script) {
return *script *+ " " + BlockerBehaviour.getJSUnBlock();
}

How can we append script of Component in Wicket 6.9.0 ?

Thanks.


Re: DownloadLink

2012-12-05 Thread Altuğ Bilgin Altıntaş
Thanks




On Wed, Dec 5, 2012 at 11:46 AM, Martin Grigorov wrote:

> s/handler/target/
>
>
> On Wed, Dec 5, 2012 at 10:44 AM, Altuğ Bilgin Altıntaş  >wrote:
>
> > Our Wicket version is 1.4.x
> >
> >
> >
> >
> > On Wed, Dec 5, 2012 at 11:42 AM, Ernesto Reinaldo Barreiro <
> > reier...@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > See
> > >
> > >
> > >
> >
> https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.html
> > >
> > > On Wed, Dec 5, 2012 at 10:38 AM, Altuğ Bilgin Altıntaş <
> alt...@gmail.com
> > > >wrote:
> > >
> > > > Hi;
> > > >
> > > > Is it possible to trigger form submit before DownloadLink execution.
> > > >
> > > > We need to get some values from the form in order to process pdf.
> > > >
> > > > Any suggestions ?
> > > >
> > > > Thanks.
> > > >
> > >
> > >
> > >
> > > --
> > > Regards - Ernesto Reinaldo Barreiro
> > > Antilia Soft
> > > http://antiliasoft.com/ <http://antiliasoft.com/antilia>
> > >
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>
>


Re: DownloadLink

2012-12-05 Thread Altuğ Bilgin Altıntaş
Our Wicket version is 1.4.x




On Wed, Dec 5, 2012 at 11:42 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Hi,
>
> See
>
>
> https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.html
>
> On Wed, Dec 5, 2012 at 10:38 AM, Altuğ Bilgin Altıntaş  >wrote:
>
> > Hi;
> >
> > Is it possible to trigger form submit before DownloadLink execution.
> >
> > We need to get some values from the form in order to process pdf.
> >
> > Any suggestions ?
> >
> > Thanks.
> >
>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
> Antilia Soft
> http://antiliasoft.com/ <http://antiliasoft.com/antilia>
>


DownloadLink

2012-12-05 Thread Altuğ Bilgin Altıntaş
Hi;

Is it possible to trigger form submit before DownloadLink execution.

We need to get some values from the form in order to process pdf.

Any suggestions ?

Thanks.


Re: Wicket with Spring AOP

2011-06-02 Thread Altuğ Bilgin Altıntaş
Merhaba izlem;

I think you should look at Proxy-based Approach. Spring and Wicket
integration type is important.

Please visit :  https://cwiki.apache.org/WICKET/spring.html.

A.

01 Haziran 2011 20:02 tarihinde İzlem Gözükeleş  yazdı:

> Furthermore, I changed the source code of spring framework and added serial
> interface for the class raising exception (
>
> org.springframework.aop.aspectj.annotation.InstantiationModelAwarePointcutAdvisorImp).
> and built it again.
>
> Application passed this exception, yet raised another
> NotSerializableException for another class from the same package (
> org.springframework.aop.aspectj.annotation).
>
> Is it possible to use spring's aspect annotations with wicket?
>
> Secondly, there are third party libraries containg classes which
> aren't Serializable.
> How can we inject these type of classes?
>
> Thanks,
>



-- 
*Altuğ*
*www.kodcu.com* **


Re: isValid and getFeedbackMessage

2011-02-03 Thread Altuğ Bilgin Altıntaş
I try to print business exception below the related form components so here
is solution i found :

final TextField txtName = new TextField("txtName ",
new PropertyModel(name, "name")) {
@Override
protected void onRender(MarkupStream markupStream) {
super.onRender(markupStream);

this.getResponse().write(
"" + error.getObject()
+ "");

}
};

Thanks.

2011/2/3 Wilhelmsen Tor Iver 

> > Can i change TextField's (FormComponent) valid status and set a custom
> error
> > message from outside ? Like :
>
> Normally you write a validator that calls component.error() to set the
> error message, and add that validator to the FormComponent. As long as it
> has that error it will count as invalid.
>
> - Tor Iver
>



-- 
*Altuğ*
*www.kodcu.com* **


isValid and getFeedbackMessage

2011-02-03 Thread Altuğ Bilgin Altıntaş
Hi,

Can i change TextField's (FormComponent) valid status and set a custom error
message from outside ? Like :

TextField txtname = new TextField(..)
// setting valid false and custom error message

if (!txtname.isValid) {
  // get custom error message now
  String error = txtname.getFeedbackMessage().getMessage().toString()
}

Thanks.

-- 
*Altuğ*
** 


Re: ListMultipleChoice getting all rows in user order

2011-02-02 Thread Altuğ Bilgin Altıntaş
I can get all ListMultipleChoice  rows after jquery selection if i select
non-ajax way.

 Button btnSave = new Button("btnSave") {

@Override
public void onSubmit() {

for (String s : MODEL) {
System.out.println("--> " + s);
}

}

};

But with if i use AjaxButton then jquery  selection  code doesn't work. Also
I 've tried putting jquery code in AjaxCallDecorator but no way.

Altug.

02 Şubat 2011 15:42 tarihinde Altuğ Bilgin Altıntaş yazdı:

> Hi
>
> In my page user can move up and down ListMultipleChoice content by jquery
> and now I need to take all ordered ListMultipleChoice items,
>
> For exampe
>
> 1 - original items in the ListMultipleChoice
>
> 2- user move up and down some items
>
> 3 - I need to get new ordered ListMultipleChoice from wicket
>
> I try select all items before submit via jquery but wicket doesn't detect
> all selection.
>
> Any suggestions ?
>
> Thanks.
>
>


--


ListMultipleChoice getting all rows in user order

2011-02-02 Thread Altuğ Bilgin Altıntaş
Hi

In my page user can move up and down ListMultipleChoice content by jquery
and now I need to take all ordered ListMultipleChoice items,

For exampe

1 - original items in the ListMultipleChoice

2- user move up and down some items

3 - I need to get new ordered ListMultipleChoice from wicket

I try select all items before submit via jquery but wicket doesn't detect
all selection.

Any suggestions ?

Thanks.


Re: ListChoice move up and down

2011-02-02 Thread Altuğ Bilgin Altıntaş
Ok i can move up and dowm using jquery

Here is the answer link :
http://stackoverflow.com/questions/4168817/how-can-i-fix-my-jquery-methods-so-i-can-re-order-the-items-in-a-multiselect-opti

but now i need to take ordered list items, any way to do this.

For exampe

1 - original items in the ListChoice

2- user move up and down some items

3 - I need to get new ordered ListChoice from wicket -- > any suggestions ??

Thanks.



2011/2/2 Andrea Del Bene 

> Hi,
>
> it's not exactly what you are looking for, but you could take a look at
> Palette component. You can find a live example here:
> http://wicketstuff.org/wicket14/compref/?wicket:bookmarkablePage=:org.apache.wicket.examples.compref.PalettePage
> This component support choices moving for 'selected' list. You can look in
> file  palette.js to see related JavaScript code.
>
>  Hi;
>>
>> Any example about how to move up and down via Javascript ListChoice items.
>>
>> Thanks.
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
*Altuğ*
*www.kodcu.com* **


ListChoice move up and down

2011-02-02 Thread Altuğ Bilgin Altıntaş
Hi;

Any example about how to move up and down via Javascript ListChoice items.

Thanks.

-- 
*Altuğ*
** 


Re: AjaxButton and opening popup

2011-01-24 Thread Altuğ Bilgin Altıntaş
Thanks Martin.

2011/1/24 Martin Grigorov 

> target.appendJavascript("window.open('"+ url +"', 'someName');");
>
> 2011/1/24 Altuğ Bilgin Altıntaş 
>
> > Hi all;
> >
> > Is it possible opening a new page at AjaxButton's onSubmit button ?
> >
> > I've tried
> >
> >  PopupSettings popupSettings = new PopupSettings();
> >  popupSettings.setTarget("'" + url + "'");
> >  target.appendJavascript(popupSettings.getPopupJavaScript());
> >
> > but it doesn't work.
> >
> > Also
> >
> > throw new RestartResponseAtInterceptPageException(new RedirectPage(url);
> >
> > works but it opens popup in the same tab not a new window.
> >
> >
> > Any suggestions ?
> >
> > Thanks.
> >
> > --
> > *Altuğ*
> > ** <http://www.kodcu.com>
> >
>



-- 
*Altuğ*
*www.kodcu.com* <http://www.kodcu.com>**


AjaxButton and opening popup

2011-01-24 Thread Altuğ Bilgin Altıntaş
Hi all;

Is it possible opening a new page at AjaxButton's onSubmit button ?

I've tried

 PopupSettings popupSettings = new PopupSettings();
 popupSettings.setTarget("'" + url + "'");
 target.appendJavascript(popupSettings.getPopupJavaScript());

but it doesn't work.

Also

throw new RestartResponseAtInterceptPageException(new RedirectPage(url);

works but it opens popup in the same tab not a new window.


Any suggestions ?

Thanks.

-- 
*Altuğ*
** 


Re: Different browsers behavior iframe

2011-01-19 Thread Altuğ Bilgin Altıntaş
Hi,

Wicket code dees something special ? If yes then please paste it.



2011/1/19 

> I can download a zip document from the Internet with InternetExplorer and
> can read it.
> But with my wicket application (see html-code with iframe tag), I can not
> read a zip document with InternetExplorer.
>
> -Ursprüngliche Nachricht-
> Von: Martijn Dashorst [mailto:martijn.dasho...@gmail.com]
> Gesendet: Mittwoch, 19. Januar 2011 14:35
> An: users@wicket.apache.org
> Betreff: Re: Different browsers behavior iframe
>
> Probably better asked here:
>
> http://social.answers.microsoft.com/Forums/en-US/InternetExplorer/threads
>
> On Wed, Jan 19, 2011 at 2:28 PM,  
> wrote:
> > Hi,
> >
> > HTML:
> >  > height="400px">
> >
> > I have the following behavior in Internet Explorer (v. 6.0)  and Firefox
> .
> >
> > Firefox: PDF and JPG is embedded. zip, doc, .. is not embedded but opened
> with appropriate program.
> > Internet Explorer: PDF, JPG, doc to be embedded. Zip file can not be
> read.
> >
> > can someone help me why a Zip File in Internet Explorer can not be read.
> >
> > Thanks
> >
> > Mehmet
> >
> >
> >
> >
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
*Altuğ*
*www.kodcu.com* **


Datatable filterToolbar TextField

2011-01-13 Thread Altuğ Bilgin Altıntaş
Hi;

My Datatable works and I put FilterToolbar on it. When i enter some values
in FilterToolbar 's TextField and press enter, FilterForm's onsubmit()
doesn't triggered

Has anyone encountered  this problem before ?

Thanks.

-- 
*Altuğ*
** 


Re: AjaxFallbackDefaultDataTable

2011-01-12 Thread Altuğ Bilgin Altıntaş
As Igor said,

I create a new instance DataTable (with new Columns) and add form again.

//
 users =  new MyAjaxFallbackDefaultDataTable
("users", createColumnsForExcel(),
dataProvider, 10);
 form.remove(users);
 form.add(users)

solved.

Thanks.


12 Ocak 2011 15:08 tarihinde Altuğ Bilgin Altıntaş  yazdı:

> martin's suggestion is right, i've made my own DataTable but still couldn't
> find how to remove (visible = false) some columns from datatable while
> exporting to excel.
>
>
> 2011/1/12 Ernesto Reinaldo Barreiro 
>
> The markup of AjaxFallbackDefaultDataTable comes from Data table and is:
>>
>> 
>> 
>>  
>> 
>> 
>>
>> 
>> 
>>
>>
>>[cell]
>>
>>
>> 
>> 
>>
>> maybe you can create a MyAjaxFallbackDefaultDataTable and use the markup
>>
>> 
>> 
>>   
>> 
>> 
>>
>> 
>> 
>>    
>>
>>[cell]
>>
>>
>> 
>> 
>>
>> Haven't tried to do the above trick myself but I think It might  work;-)
>>
>> Ernesto
>>
>> 2011/1/12 Altuğ Bilgin Altıntaş :
>> > Hi,
>> >
>> > I've questions about AjaxFallbackDefaultDataTable, here they are
>> >
>> > 1 - Is it possible to remove NavigationToolbar from top of this because
>> i
>> > want navigation bar at the end  - I want to use addBottomToolbar
>> >
>> > 2 - I tried  to export the data to excel using classic
>> > ComponentRequestTarget, it works great ! but every FilterToolbar
>> elements
>> > also exported too (Textfields ...) Also I tried to make FilterToolbar
>> > visible before exported to excel like :
>> >
>> > filterToolbar.setVisible(true);
>> > super.respond(requestCycle); -- > exporting to excel
>> > filterToolbar.setVisible(false); -- > recover it
>> >
>> > but it doesn't work (- i made filterToolbar set
>> > setOutputMarkupPlaceholderTag(true) - )
>> >
>> > How can i get rid off  FilterToolbar  while exporting?
>> >
>> > 3 - It is very similar to question #2 - How can i make a CheckBoxColumn
>> > visibility "false" according to case.?
>> >
>> >
>> > Thanks.
>> >
>> > --
>> > *Altuğ*
>> > ** <http://www.kodcu.com>
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> --
> *Altuğ*
> *www.kodcu.com* <http://www.kodcu.com>**
>
>


-- 
*Altuğ*
*www.kodcu.com* <http://www.kodcu.com>**


Re: AjaxFallbackDefaultDataTable

2011-01-12 Thread Altuğ Bilgin Altıntaş
martin's suggestion is right, i've made my own DataTable but still couldn't
find how to remove (visible = false) some columns from datatable while
exporting to excel.


2011/1/12 Ernesto Reinaldo Barreiro 

> The markup of AjaxFallbackDefaultDataTable comes from Data table and is:
>
> 
> 
>  
> 
> 
>
> 
> 
>
>
>[cell]
>
>
> 
> 
>
> maybe you can create a MyAjaxFallbackDefaultDataTable and use the markup
>
> 
> 
>   
> 
> 
>
> 
> 
>
>
>[cell]
>
>
> 
> 
>
> Haven't tried to do the above trick myself but I think It might  work;-)
>
> Ernesto
>
> 2011/1/12 Altuğ Bilgin Altıntaş :
> > Hi,
> >
> > I've questions about AjaxFallbackDefaultDataTable, here they are
> >
> > 1 - Is it possible to remove NavigationToolbar from top of this because i
> > want navigation bar at the end  - I want to use addBottomToolbar
> >
> > 2 - I tried  to export the data to excel using classic
> > ComponentRequestTarget, it works great ! but every FilterToolbar elements
> > also exported too (Textfields ...) Also I tried to make FilterToolbar
> > visible before exported to excel like :
> >
> > filterToolbar.setVisible(true);
> > super.respond(requestCycle); -- > exporting to excel
> > filterToolbar.setVisible(false); -- > recover it
> >
> > but it doesn't work (- i made filterToolbar set
> > setOutputMarkupPlaceholderTag(true) - )
> >
> > How can i get rid off  FilterToolbar  while exporting?
> >
> > 3 - It is very similar to question #2 - How can i make a CheckBoxColumn
> > visibility "false" according to case.?
> >
> >
> > Thanks.
> >
> > --
> > *Altuğ*
> > ** <http://www.kodcu.com>
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
*Altuğ*
*www.kodcu.com* <http://www.kodcu.com>**


AjaxFallbackDefaultDataTable

2011-01-12 Thread Altuğ Bilgin Altıntaş
Hi,

I've questions about AjaxFallbackDefaultDataTable, here they are

1 - Is it possible to remove NavigationToolbar from top of this because i
want navigation bar at the end  - I want to use addBottomToolbar

2 - I tried  to export the data to excel using classic
ComponentRequestTarget, it works great ! but every FilterToolbar elements
also exported too (Textfields ...) Also I tried to make FilterToolbar
visible before exported to excel like :

filterToolbar.setVisible(true);
super.respond(requestCycle); -- > exporting to excel
filterToolbar.setVisible(false); -- > recover it

but it doesn't work (- i made filterToolbar set
setOutputMarkupPlaceholderTag(true) - )

How can i get rid off  FilterToolbar  while exporting?

3 - It is very similar to question #2 - How can i make a CheckBoxColumn
visibility "false" according to case.?


Thanks.

-- 
*Altuğ*
** 


External resource Bundle + Wicket's resource Bundles

2011-01-10 Thread Altuğ Bilgin Altıntaş
Hi all,

I tried
https://cwiki.apache.org/WICKET/creating-a-custom-resource-locator.html  it
works great but i now i can't reach Wicket's core resource bundles

Are there any way to load external resource bundle and still reaching
Wicket's core resource bundles too.

Thanks.

-- 
*Altuğ*
** 


Re: removing SimpleAttributeModifier after added

2011-01-10 Thread Altuğ Bilgin Altıntaş
Thanks Martin.


2011/1/10 Martin Grigorov 

> 2011/1/10 Altuğ Bilgin Altıntaş 
>
> > your solutions are hack but ok.
> >
> > invisible is ok but what if i wanna change the DOM structure...
> >
> then you need to use Panels
> use one Panel for structure1 and another panel for structure2, and Wicket's
> EmptyPanel when you want to remove the sub-tree
> just replace the panels depending on your conditions
> it doesn't look like a hack to me
>
> >
> >
> >
> > 2011/1/10 andrea del bene 
> >
> > > Or simply make it invisible
> > >
> > >  replace it with dummy one that renders nothing
> > >>
> > >> 2011/1/10 Altuğ Bilgin Altıntaş
> > >>
> > >>  Thanks. Also i want to know if i remove an component from Java side
> > >>>
> > >>> final WebMarkupContainer delete = new WebMarkupContainer("delete");
> > >>> add (delete )
> > >>>
> > >>> after than
> > >>>
> > >>> remove(delete );
> > >>>
> > >>> gives error because on html side tag is still there.
> > >>>
> > >>> How to remove a component without markup error.
> > >>>
> > >>> Thanks.
> > >>>
> > >>>
> > >>> 2011/1/10 Martin Grigorov
> > >>>
> > >>>  Component#remove(behavior)
> > >>>> you need to keep a reference to the behavior or you may iterate over
> > the
> > >>>> behavior and remove the one that match your criteria
> > >>>>
> > >>>> 2011/1/10 Altuğ Bilgin Altıntaş
> > >>>>
> > >>>>  Hi,
> > >>>>>
> > >>>>> Java code:
> > >>>>>
> > >>>>> final WebMarkupContainer delete = new WebMarkupContainer("delete");
> > >>>>> delete.setOutputMarkupPlaceholderTag(true);
> > >>>>> delete.add(new SimpleAttributeModifier("filter", "false"));
> > >>>>>
> > >>>>> html :
> > >>>>>
> > >>>>>   
> > >>>>>
> > >>>>> then after i want to remove SimpleAttributeModifier - filter" from
> > >>>>> WebMarkupContainer - delete,
> > >>>>>
> > >>>>> Are there any way to to this ?
> > >>>>>
> > >>>>> Thanks.
> > >>>>>
> > >>>>> --
> > >>>>> *Altuğ*
> > >>>>> **<http://www.kodcu.com>
> > >>>>>
> > >>>>>
> > >>>
> > >>> --
> > >>> *Altuğ*
> > >>> *www.kodcu.com*<http://www.kodcu.com>**
> > >>>
> > >>>
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >
> > >
> >
> >
> > --
> > *Altuğ*
> > *www.kodcu.com* <http://www.kodcu.com>**
> >
>



-- 
*Altuğ*
*www.kodcu.com* <http://www.kodcu.com>**


Re: removing SimpleAttributeModifier after added

2011-01-10 Thread Altuğ Bilgin Altıntaş
your solutions are hack but ok.

invisible is ok but what if i wanna change the DOM structure...



2011/1/10 andrea del bene 

> Or simply make it invisible
>
>  replace it with dummy one that renders nothing
>>
>> 2011/1/10 Altuğ Bilgin Altıntaş
>>
>>  Thanks. Also i want to know if i remove an component from Java side
>>>
>>> final WebMarkupContainer delete = new WebMarkupContainer("delete");
>>> add (delete )
>>>
>>> after than
>>>
>>> remove(delete );
>>>
>>> gives error because on html side tag is still there.
>>>
>>> How to remove a component without markup error.
>>>
>>> Thanks.
>>>
>>>
>>> 2011/1/10 Martin Grigorov
>>>
>>>  Component#remove(behavior)
>>>> you need to keep a reference to the behavior or you may iterate over the
>>>> behavior and remove the one that match your criteria
>>>>
>>>> 2011/1/10 Altuğ Bilgin Altıntaş
>>>>
>>>>  Hi,
>>>>>
>>>>> Java code:
>>>>>
>>>>> final WebMarkupContainer delete = new WebMarkupContainer("delete");
>>>>> delete.setOutputMarkupPlaceholderTag(true);
>>>>> delete.add(new SimpleAttributeModifier("filter", "false"));
>>>>>
>>>>> html :
>>>>>
>>>>>   
>>>>>
>>>>> then after i want to remove SimpleAttributeModifier - filter" from
>>>>> WebMarkupContainer - delete,
>>>>>
>>>>> Are there any way to to this ?
>>>>>
>>>>> Thanks.
>>>>>
>>>>> --
>>>>> *Altuğ*
>>>>> **<http://www.kodcu.com>
>>>>>
>>>>>
>>>
>>> --
>>> *Altuğ*
>>> *www.kodcu.com*<http://www.kodcu.com>**
>>>
>>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
*Altuğ*
*www.kodcu.com* <http://www.kodcu.com>**


Re: removing SimpleAttributeModifier after added

2011-01-10 Thread Altuğ Bilgin Altıntaş
Thanks. Also i want to know if i remove an component from Java side

final WebMarkupContainer delete = new WebMarkupContainer("delete");
add (delete )

after than

remove(delete );

gives error because on html side tag is still there.

How to remove a component without markup error.

Thanks.


2011/1/10 Martin Grigorov 

> Component#remove(behavior)
> you need to keep a reference to the behavior or you may iterate over the
> behavior and remove the one that match your criteria
>
> 2011/1/10 Altuğ Bilgin Altıntaş 
>
> > Hi,
> >
> > Java code:
> >
> > final WebMarkupContainer delete = new WebMarkupContainer("delete");
> > delete.setOutputMarkupPlaceholderTag(true);
> > delete.add(new SimpleAttributeModifier("filter", "false"));
> >
> > html :
> >
> >  
> >
> > then after i want to remove SimpleAttributeModifier - filter" from
> > WebMarkupContainer - delete,
> >
> > Are there any way to to this ?
> >
> > Thanks.
> >
> > --
> > *Altuğ*
> > ** <http://www.kodcu.com>
> >
>



-- 
*Altuğ*
*www.kodcu.com* <http://www.kodcu.com>**


removing SimpleAttributeModifier after added

2011-01-09 Thread Altuğ Bilgin Altıntaş
Hi,

Java code:

final WebMarkupContainer delete = new WebMarkupContainer("delete");
delete.setOutputMarkupPlaceholderTag(true);
delete.add(new SimpleAttributeModifier("filter", "false"));

html :

 

then after i want to remove SimpleAttributeModifier - filter" from
WebMarkupContainer - delete,

Are there any way to to this ?

Thanks.

-- 
*Altuğ*
** 


Start.java in debug mode jetty hangs up

2011-01-04 Thread Altuğ Bilgin Altıntaş
Hi I try to start jetty via in debug mode

Here is Start.java


 Server server = new Server();
 SocketConnector connector = new SocketConnector();

 // Set some timeout options to make debugging easier.
  connector.setMaxIdleTime(1000 * 60 * 60);
  .
   try {
System.out.println(">>> STARTING EMBEDDED JETTY SERVER, PRESS
ANY KEY TO STOP");
server.start();
System.in.read();
System.out.println(">>> STOPPING EMBEDDED JETTY SERVER");
// while (System.in.available() == 0) {
//   Thread.sleep(5000);
// }
server.stop();
server.join();
} catch (Exception e) {
 .
  }


I took above code from wicket.apache.org --> quickstart

My problem is when I try to launch Start.java in debug mode,  jetty seems
starts (it hangs actually) and when i try to reach http://localhost:8080 it
gives  :


HTTP ERROR: 503

Problem accessing / Reason:

SERVICE_UNAVAILABLE

Any suggestions.

(There are no error logs )

Thanks.


Re: Taking a moment ...

2010-12-24 Thread Altuğ Bilgin Altıntaş
Thanks Cemal.

2010/12/24 Cemal Bayramoglu 

> This is an appropriate moment to explicitly say a sincere thanks and
> reiterate my respect and gratitude to everyone that has contributed to
> Wicket, all the useful satellite projects, and to this forum, the
> quality and value of which I have not witnessed on any other medium,
> free or paid-for!
>
> In 2011 we are looking forward to formally moving up to Wicket 1.5,
> more wide-spread and imaginative use of Brix to help it also evolve to
> meet its potential, and who knows, maybe even more people building
> interesting apps on Wicket and Scala!
>
> I wish you a merry Xmas and a 2011 full of good health, happiness and
> enjoyable projects.
>
> Regards - Cemal
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
*Altuğ*
*www.kodcu.com* **


Re: Best Pattern for Admin Pages and User Pages

2010-12-06 Thread Altuğ Bilgin Altıntaş
You can add css object programatically.

https://cwiki.apache.org/WICKET/including-css-resources.html

altug



2010/12/6 Taner Diler 

> Hi all,
>
> I'm writing a blog application. as all blog applications it has an admin
> module. I wrote two abstract page : AdminPage and BlogPage. the
> differencies
> between them are menu, left/right panels and also screen styles. This make
> me develope duplicate pages for admin and blog.
>
> So how can I reduce code duplication, what is the best solution for it?
>
> Thanks
>


Re: Problem on wicket-auth-role ve Spring-security integration

2010-12-02 Thread Altuğ Bilgin Altıntaş
why you don't just use Spring Security + Wicket ?



2010/12/2 Taner Diler 

> Hi,
>
> I'm trying to integrate Wicket-auth-roles 1.4.9 and Spring Security 3.0.4
> by
> following
> https://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.html
> .
>
> @AuthorizeAction and @AuthorizeInstantiation annotations are not working.
>
> The blog says "
>
> The only filter we need defined from Acegi is the
> HttpSessionContextIntegrationFilter. This filter will ensure that the
> SecurityContext is transported to and from the HttpSession onto the Thread
> context. All authorization is delegated to the wicket-auth-roles module
> which uses Annotations (@AuthorizeInstantiation)."
>
> So how can I make configuration to provide this?
>


Re: exception

2010-10-29 Thread Altuğ Bilgin Altıntaş
wicket version ?

2010/10/29 fachhoch 

>
> this is another exception I get after I click on any download  link , the
> file download works without any problem but this exception is thrown I
> donot
> know how to control these ,
>
> 
> 2010-10-29 15:39:32,221 [http-8080-5] ERROR
> org.apache.wicket.protocol.http.WicketFilter - closing the buffer error
> java.lang.IllegalStateException: getOutputStream() has already been called
> for this response
>at
> org.apache.catalina.connector.Response.getWriter(Response.java:610)
>at
>
> org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)
>at
>
> javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:112)
> at
> org.apache.wicket.protocol.http.WebResponse.write(WebResponse.java:392)
>at
>
> org.apache.wicket.protocol.http.BufferedWebResponse.close(BufferedWebResponse.java:74)
>at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:500)
>at
>
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:317)
>at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>at
>
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
>at
>
> org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
>at
>
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>at
> org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
>at
>
> org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
>at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>at
>
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
>at
>
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
>at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>at
>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>at
>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>at
>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>at
>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>at
>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
>at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>at
>
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
>at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>at java.lang.Thread.run(Thread.java:619)
>
> 
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/exception-tp3019667p3019670.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: sending ajax response part by part

2010-10-24 Thread Altuğ Bilgin Altıntaş
By the way this JS file does the same job :


***
window.onload = initPage;

function initPage() {
/* on start up;  assign checkUsername function to onblur */
document.getElementById("username").onblur = checkUsername;

/* disable register button*/
document.getElementById("register").disabled = true;
}



function checkUsername() {
document.getElementById("username").className = "thinking";
request = createRequest();
if (request == null)
alert("Unable to create request");
else {
var theName = document.getElementById("username").value;
var username = escape(theName);
var url = "engine?username=" + username;
request.onreadystatechange = showUsernameStatus;
request.open("GET", url, true);
request.send(null);
}
}

function showUsernameStatus() {
if (request.readyState == 4) {
if (request.status == 200) {
if (request.responseText == "okay") {
document.getElementById("username").className = "approved";
document.getElementById("register").disabled = false;
} else {
document.getElementById("username").className = "denied";
document.getElementById("username").focus();
document.getElementById("username").select();
document.getElementById("register").disabled = true;
}
}
}
}
***

Altug.

25 Ekim 2010 09:10 tarihinde Altuğ Bilgin Altıntaş  yazdı:

> Thanks Martin;
>
> AjaxTimerBehavior doesn't tackle this issue
>
> I solved the issue by using IAjaxCallDecorator.
>
> Here is the code :
>
> final TextField username = new TextField("username", new
> Model());
> username.setMarkupId("username");
> username.setOutputMarkupId(true);
> form.add(username);
>
>
>
> username.add(new AjaxFormComponentUpdatingBehavior("onblur") {
>
> @Override
> protected IAjaxCallDecorator getAjaxCallDecorator() {
> return new IAjaxCallDecorator() {
> public CharSequence
> decorateOnFailureScript(CharSequence script) {
>return  "alert('2');"+script ;
> }
>
> public CharSequence decorateScript(CharSequence script)
> {
> *return
> "document.getElementById(\"username\").className = \"thinking\";"+script ;
> *
> }
>
> public CharSequence
> decorateOnSuccessScript(CharSequence script) {
> return  script ;
>
> }
> } ;
> }
>
> @Override
> public void onUpdate(AjaxRequestTarget target) {
> String thisUsername = username.getModelObject();
> username.add(new SimpleAttributeModifier("class",
> "thinking"));
>
> try {
>   // long running job - not so long...
>  Thread.sleep(2000);
> } catch (Exception ex) {
>
> }
>
> if (ArrayUtils.contains(takenUsernames, thisUsername)) {
> username.add(new SimpleAttributeModifier("class",
> "approved"));
> } else {
>     username.add(new SimpleAttributeModifier("class",
> "denied"));
> }
> target.addComponent(username);
> }
> });
>
> Altug.
>
>
> 2010/10/22 Martin Grigorov 
>
> No.
>> The parsing on the client part (wicket-ajax.js) will not start until the
>> whole XML response is delivered.
>>
>> You can use AjaxTimerBehavior to check whether the *slow* calculation is
>> finished and then deliver its response
>>
>> 2010/10/22 Altuğ Bilgin Altıntaş 
>>
>> > Hi all;
>> >
>> >  username.add(new AjaxFormComponentUpdatingBehavior("onblur") {
>> >@Override
>> >public void onUpdate(AjaxRequestTarget target) {
>> >String thisUsername = username.getModelObject();
>> >username.add(new SimpleAttributeModifier("class",
>> > "thinking")); // I need repaint
>> >target.addComponent(username); // It doesn't w

Re: sending ajax response part by part

2010-10-24 Thread Altuğ Bilgin Altıntaş
Thanks Martin;

AjaxTimerBehavior doesn't tackle this issue

I solved the issue by using IAjaxCallDecorator.

Here is the code :

final TextField username = new TextField("username", new
Model());
username.setMarkupId("username");
username.setOutputMarkupId(true);
form.add(username);


username.add(new AjaxFormComponentUpdatingBehavior("onblur") {

@Override
protected IAjaxCallDecorator getAjaxCallDecorator() {
return new IAjaxCallDecorator() {
public CharSequence decorateOnFailureScript(CharSequence
script) {
   return  "alert('2');"+script ;
}

public CharSequence decorateScript(CharSequence script)
{
*return
"document.getElementById(\"username\").className = \"thinking\";"+script ;*
}

public CharSequence decorateOnSuccessScript(CharSequence
script) {
return  script ;
}
} ;
}

@Override
public void onUpdate(AjaxRequestTarget target) {
String thisUsername = username.getModelObject();
username.add(new SimpleAttributeModifier("class",
"thinking"));

try {
  // long running job - not so long...
 Thread.sleep(2000);
} catch (Exception ex) {

}

if (ArrayUtils.contains(takenUsernames, thisUsername)) {
username.add(new SimpleAttributeModifier("class",
"approved"));
} else {
username.add(new SimpleAttributeModifier("class",
"denied"));
}
target.addComponent(username);
}
});

Altug.


2010/10/22 Martin Grigorov 

> No.
> The parsing on the client part (wicket-ajax.js) will not start until the
> whole XML response is delivered.
>
> You can use AjaxTimerBehavior to check whether the *slow* calculation is
> finished and then deliver its response
>
> 2010/10/22 Altuğ Bilgin Altıntaş 
>
> > Hi all;
> >
> >  username.add(new AjaxFormComponentUpdatingBehavior("onblur") {
> >@Override
> >public void onUpdate(AjaxRequestTarget target) {
> >String thisUsername = username.getModelObject();
> >username.add(new SimpleAttributeModifier("class",
> > "thinking")); // I need repaint
> >target.addComponent(username); // It doesn't work
> >
> >// long process
> > try {
> >Thread.sleep(2000);
> >} catch (Exception ex) {
> >
> >}
> >
> >// the result so i need to repaint and send to user again
> >if (ArrayUtils.contains(takenUsernames, thisUsername)) {
> >username.add(new SimpleAttributeModifier("class",
> > "approved"));
> >} else {
> >username.add(new SimpleAttributeModifier("class",
> > "denied"));
> >}
> >target.addComponent(username);
> >}
> >});
> >
> > How can i send Ajax response part by part; before long process i want to
> > change css and send it to user, after process i again want to send Ajax
> > response in one method.
> >
> > Is it possible ?
> >
> > Thanks.
> >
>


sending ajax response part by part

2010-10-22 Thread Altuğ Bilgin Altıntaş
Hi all;

 username.add(new AjaxFormComponentUpdatingBehavior("onblur") {
@Override
public void onUpdate(AjaxRequestTarget target) {
String thisUsername = username.getModelObject();
username.add(new SimpleAttributeModifier("class",
"thinking")); // I need repaint
target.addComponent(username); // It doesn't work

// long process
 try {
Thread.sleep(2000);
} catch (Exception ex) {

}

// the result so i need to repaint and send to user again
if (ArrayUtils.contains(takenUsernames, thisUsername)) {
username.add(new SimpleAttributeModifier("class",
"approved"));
} else {
username.add(new SimpleAttributeModifier("class",
"denied"));
}
target.addComponent(username);
}
});

How can i send Ajax response part by part; before long process i want to
change css and send it to user, after process i again want to send Ajax
response in one method.

Is it possible ?

Thanks.


Re: TextField submit via Ajax

2010-10-20 Thread Altuğ Bilgin Altıntaş
Hi Martin;

It works thanks; but my condition needs "onkeydown" anyway  now i am posting
the complete solution for others

Code goal : user enters some char in textfield and press enter, and data
comes via ajax.

final TextField txtMy= new TextField("txtMy", new Model(""))
;
txtMy.add(new AjaxFormComponentUpdatingBehavior("onkeydown") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
//...
}

@Override
protected IAjaxCallDecorator getAjaxCallDecorator() {
return new AjaxCallDecorator() {
private static final long serialVersionUID = 1L;

@Override
public CharSequence decorateScript(CharSequence script)
{
return "if(wicketKeyCode(event) == 13){" + script +
" return false;}";
}
};
}
;
});

Altug.

2010/10/19 Martin Grigorov 

> 1. you need AjaxFormSubmitBehavior("onkeyup")
> 2. you'll have to add AjaxCallDecorator to it do fire only when the key is
> ENTER, i.e. event.keyCode === 13
>
> 2010/10/19 Altuğ Bilgin Altıntaş 
>
> > Hi;
> >
> > How can i submit a form via Ajax when user hit the enter key on a
> TextField
> > ?
> >
> > I did below but it doesn't work.
> >
> > myTextField.add(new AjaxFormComponentUpdatingBehavior("onsubmit") {
> >@Override
> >protected void onUpdate(AjaxRequestTarget target) {
> >   //...
> >
> >}
> >
> >  });
> >
> > Thanks.
> >
>


TextField submit via Ajax

2010-10-19 Thread Altuğ Bilgin Altıntaş
Hi;

How can i submit a form via Ajax when user hit the enter key on a TextField
?

I did below but it doesn't work.

myTextField.add(new AjaxFormComponentUpdatingBehavior("onsubmit") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
   //...

}

 });

Thanks.


Re: could not serialize the page java.lang.OutOfMemoryError: PermGen space

2010-10-13 Thread Altuğ Bilgin Altıntaş
http://javahowto.blogspot.com/2006/06/6-common-errors-in-setting-java-heap.html

2010/10/13 fachhoch 

>
> I added   this to   eclipse -XX:PermSize=256m -XX:MaxPermSize=512m
>
> but the problem is   I cannot start my jetty container I get this error
>
>
>
> Error occurred during initialization of VM
> Could not reserve enough space for object heap
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/could-not-serialize-the-page-java-lang-OutOfMemoryError-PermGen-space-tp2993745p2994036.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: could not serialize the page java.lang.OutOfMemoryError: PermGen space

2010-10-13 Thread Altuğ Bilgin Altıntaş
What is your application server or container ?

Is it a heavy object page ?

Every application can get java.lang.OutOfMemoryError: PermGen space
potentially

First countermeasure you can take is to increase your container's memory.

Altuğ


2010/10/13 fachhoch 

>
> could not serialize the pagejava.lang.OutOfMemoryError: PermGen space ,
>
> I got this error, it happens once in a while , its hard to reproduce,
> please tell me   can wicket cause memory errors  for any reason ?
> I am using 1.4.8
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/could-not-serialize-the-page-java-lang-OutOfMemoryError-PermGen-space-tp2993745p2993745.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: DownloadLink with AjaxIndicator

2010-10-13 Thread Altuğ Bilgin Altıntaş
my below example codes works on http://jquery.malsup.com/block/

//**
public class BlockerBehaviour {


@SuppressWarnings("unused")
private String componentId;

public BlockerBehaviour(String componentId) {
   this.componentId = componentId;
}

public String getJSBlock() {
String JS = " $(document).ready(function() {\n" +
"  $.blockUI({ message: '  "+ new
ResourceModel("please.wait").getObject()+"' });\n" +
"}) ;";

return JS;
}

 public String getJSUnBlock() {
String JS = " $(document).ready(function() {\n" +
"  $.unblockUI(); " +
"}) ;";

return JS;
}

}


//***

public abstract class MyAjaxIndicatorButton extends AjaxButton {
private static final long serialVersionUID = 1L;


public MyAjaxIndicatorButton (String id) {
super(id);
}


@Override
protected IAjaxCallDecorator getAjaxCallDecorator() {
return new AjaxCallDecorator() {
private static final long serialVersionUID = 1L;

@Override
public CharSequence decorateOnFailureScript(CharSequence script)
{
return script + " " + new
BlockerBehaviour(getId()).getJSUnBlock();
}

@Override
public CharSequence decorateScript(CharSequence script) {

return script + " " + new
BlockerBehaviour(getId()).getJSBlock();
}

@Override
public CharSequence decorateOnSuccessScript(CharSequence script)
{
return script + " " + new
BlockerBehaviour(getId()).getJSUnBlock();
}
};
}  ;
}

2010/10/13 Ann Baert 

> I would like to add an ajaxindicator on a DownloadLink.
> How can I do this?
>
> But because DownloadLink isn't ajax, I tried the following:
>
> AjaxLink downloadLink = new AjaxLink("id") {
>
>@Override
>public void onClick(AjaxRequestTarget target) {
>
>}
> };
> downloadLink.add(new AjaxEventBehavior("onclick") {
>
>@Override
>public void onEvent(final AjaxRequestTarget target) {
>RequestCycle.get().setRequestTarget(new IRequestTarget() {
>
>public void detach(RequestCycle requestCycle) {
>}
>
>public Object getLock(RequestCycle requestCycle) {
>return null;
>}
>
>public void respond(RequestCycle requestCycle) {
>WebResponse r = (WebResponse) requestCycle.getResponse();
>r.setAttachmentHeader("header.ext");
>r.setContentType("application/contentype");
>
>...
>Streams.copy(bais, r.getOutputStream());
>
>target.appendJavascript("...");
>}
>});
>
>}
>
>@Override
>protected CharSequence getEventHandler() {
>AppendingStringBuffer handler = new AppendingStringBuffer();
>handler.append("...");
>handler.append(super.getEventHandler());
>return handler;
>}
> });
> add(downloadLink);
>
>
>
> Thanks
> Ann
>  DISCLAIMER 
>
> http://www.tvh.com/newen2/emaildisclaimer/default.html
>
> "This message is delivered to all addressees subject to the conditions
> set forth in the attached disclaimer, which is an integral part of this
> message."
>


Re: "Page Expired" page with PatternDateConverter

2010-10-11 Thread Altuğ Bilgin Altıntaş
quickstart

11 Ekim 2010 16:00 tarihinde Hemant Shah  yazdı:

>  Yes, it works fine if we do not override the getConverter method. In which
> case it behaves like a normal AjaxEditableLabel, as would be expected, and
> we are using AjaxEditableLabel instances in many places in our application.
>
>
> - Hemant
>
>
> On 10/11/2010 6:24 AM, Altuğ Bilgin Altıntaş wrote:
>
>> if you don't override IConverter then everything works fine ?
>>
>> 2010/10/11 Hemant Shah
>>
>>   Altuğ, thanks for responding.
>>>
>>> There are no errors reported in the log. All the classes in the project
>>> are
>>> serializable.
>>>
>>> Could this be a bug?
>>>
>>> Regards,
>>>
>>>
>>> Hemant
>>>
>>>
>>>
>>> On 10/10/2010 5:03 PM, Altuğ Bilgin Altıntaş wrote:
>>>
>>>  Did you look at Wicket's logs ?
>>>>
>>>> Be sure serialization is done correctly.
>>>>
>>>> 2010/10/10 Hemant Shah
>>>>
>>>>   I am new to the Wicket framework and I hope I can get some help with a
>>>>
>>>>> problem I am facing.
>>>>>
>>>>> I am using version 1.4.12.
>>>>>
>>>>> I am overriding the AjaxEditableLabel class and its overridden
>>>>> getConverter
>>>>> method is at follows:
>>>>>
>>>>>@Override
>>>>>public IConverter. getConverter(Class type) {
>>>>>return new PatternDateConverter("MM/dd/", true);
>>>>>}
>>>>>
>>>>> However, the first time in a session the component is updated, I get
>>>>> the
>>>>> "Page Expired" message.  The error results only when the getConverter
>>>>> method
>>>>> is called.
>>>>>
>>>>> Note that this happens only the first time I access it in a session. If
>>>>> I
>>>>> go to the home page and from there back to the page which contains the
>>>>> component, it works without any problems.
>>>>>
>>>>> I am not sure how to overcome this problem. I hope you guys can help.
>>>>> Thanks.
>>>>>
>>>>>
>>>>> - Hemant
>>>>>
>>>>>
>>>>>
>>>>>


Re: DropDownChoice loses Selection in Disabled Panels

2010-10-11 Thread Altuğ Bilgin Altıntaş
did you bind DropDownChoices with models (ex : PropertyModel)  ?

2010/10/11 splitshade 

>
> Hi,
>
> i have spent some time researching this strange behaviour.
> I have a Page with some Panels, that contain DropDownChoices.
> These Panels are initially disabled on the Page.
>
> If a validationError occurs on this page, ALL dropdownchoices that are in
> disabled panels
> lose their values.
>
> Is this a known Bug? an Implementation Issue?
>
> Some hints are greatly appreciated, thanks in advance.
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-loses-Selection-in-Disabled-Panels-tp2989677p2989677.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: "Page Expired" page with PatternDateConverter

2010-10-11 Thread Altuğ Bilgin Altıntaş
if you don't override IConverter then everything works fine ?

2010/10/11 Hemant Shah 

>  Altuğ, thanks for responding.
>
> There are no errors reported in the log. All the classes in the project are
> serializable.
>
> Could this be a bug?
>
> Regards,
>
>
> Hemant
>
>
>
> On 10/10/2010 5:03 PM, Altuğ Bilgin Altıntaş wrote:
>
>> Did you look at Wicket's logs ?
>>
>> Be sure serialization is done correctly.
>>
>> 2010/10/10 Hemant Shah
>>
>>   I am new to the Wicket framework and I hope I can get some help with a
>>> problem I am facing.
>>>
>>> I am using version 1.4.12.
>>>
>>> I am overriding the AjaxEditableLabel class and its overridden
>>> getConverter
>>> method is at follows:
>>>
>>>@Override
>>>public IConverter. getConverter(Class type) {
>>>return new PatternDateConverter("MM/dd/", true);
>>>}
>>>
>>> However, the first time in a session the component is updated, I get the
>>> "Page Expired" message.  The error results only when the getConverter
>>> method
>>> is called.
>>>
>>> Note that this happens only the first time I access it in a session. If I
>>> go to the home page and from there back to the page which contains the
>>> component, it works without any problems.
>>>
>>> I am not sure how to overcome this problem. I hope you guys can help.
>>> Thanks.
>>>
>>>
>>> - Hemant
>>>
>>>
>>>


Re: "Page Expired" page with PatternDateConverter

2010-10-10 Thread Altuğ Bilgin Altıntaş
Did you look at Wicket's logs ?

Be sure serialization is done correctly.

2010/10/10 Hemant Shah 

>  I am new to the Wicket framework and I hope I can get some help with a
> problem I am facing.
>
> I am using version 1.4.12.
>
> I am overriding the AjaxEditableLabel class and its overridden getConverter
> method is at follows:
>
>@Override
>public IConverter. getConverter(Class type) {
>return new PatternDateConverter("MM/dd/", true);
>}
>
> However, the first time in a session the component is updated, I get the
> "Page Expired" message.  The error results only when the getConverter method
> is called.
>
> Note that this happens only the first time I access it in a session. If I
> go to the home page and from there back to the page which contains the
> component, it works without any problems.
>
> I am not sure how to overcome this problem. I hope you guys can help.
> Thanks.
>
>
> - Hemant
>
>


Re: multiple html pages to 1 class

2010-10-08 Thread Altuğ Bilgin Altıntaş
Thanks...

2010/10/8 Jeremy Thomerson 

> I forgot to include the URLs you should try in that quickstart:
>
> http://localhost:8080/example1
> http://localhost:8080/example1?template=red
> http://localhost:8080/example2
> http://localhost:8080/example2?template=red
>
> Here's the link to the quickstart again:
>
> http://apache-wicket.1842946.n4.nabble.com/file/n2967852/multitemplates.tar.gz
>
> Best regards,
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
> On Thu, Oct 7, 2010 at 11:26 PM, jer...@wickettraining.com <
> jer...@wickettraining.com> wrote:
>
> >
> > Here is a quickstart that demonstrates two ways of accomplishing this.
> >  These
> > are the ways that were previously suggested on this thread.  Please open
> it
> > and try the following links, and submit the form on each to prove that
> the
> > HTML template choice is persisted even after "the url becomes unusable":
> >
> >
> >
> http://apache-wicket.1842946.n4.nabble.com/file/n2967852/multitemplates.tar.gz
> > multitemplates.tar.gz
> >
> > Jeremy Thomerson
> > http://www.wickettraining.com
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/multiple-html-pages-to-1-class-tp2717304p2967852.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: Getting client IP address

2010-10-06 Thread Altuğ Bilgin Altıntaş
Read with order

1 - http://www.javadb.com/get-users-ip-address
2 - https://cwiki.apache.org/WICKET/raw-httpservletrequest.html

2010/10/6 Josh Kamau 

> Hi Team;
>
> Is it possible to get the IP address of the client and how?
>
> kind regards.
>


Re: Modal Window and Fade In effect

2010-10-05 Thread Altuğ Bilgin Altıntaş
are you sure dlgTerms is markup id; please look at your generated html and
check it if id is dlgTerms or something like dlgTerms17...

my advice is to generate jquery code on the fly using actual model's markup
id. After that you can stream this jquery code before model window is
rendered - beforeRendered ..

Altug



2010/10/5 rawe 

>
> Hello everybody,
>
> I'm looking for a solution opening a Wicket modal window using fade in
> effect.
>
> I tried some jQuery code but without success.
>
> Maybe someone has some example code or hints.
>
>
> here is my example:
>
>
> jQuery-Code
>
> < script type="text/javascript">
>$(document).ready(function() {
>$('#terms').click(function() {
>  $('#dlgTerms').fadeIn('slow', function() {
>   alert("FadeIn complete!");
>  });
>});
>
>});
>
>
>
> Markup:
>
>
>
>
>
>
>
>• Frankaturen
>
>
>
> Code:
>
>
> ModalWindow dlgTermsAdmin = new ModalWindow("openTermsAdminDlg", "myTitle",
> this);
>
> AjaxLink lnkTermsAdmin = new AjaxLink("lnkTermsAdmin") {
>@Override
>public void onClick(AjaxRequestTarget target) {
>dlgTermsAdmin.show(target);
>}
> };
>
> lnkTermsAdmin.setMarkupId("terms");
> lnkTermsAdmin.add(dlgTermsAdmin);
> add(lnkTermsAdmin);
>
>
>
>
>
> The MarkupId of my ModalWindow is set to "dlgTerms"
>
>
> Thanks for help!
>
>
> Ralph
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Modal-Window-and-Fade-In-effect-tp2955922p2955922.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: Modal window and Ajax exception

2010-10-05 Thread Altuğ Bilgin Altıntaş
Found the answer :

previously i only ajax update table like this which gives javascript error
with  jquery TableSorter


  


  


Now I ajax update more wide area like this :



  


  



--> target.addComponent(pageContainer);

And it works without Javascript error

Altuğ.


2010/9/30 Igor Vaynberg 

> it may be that jquery is screwing things up. try without it first.
>
> -igor
>
> 2010/9/30 Altuğ Bilgin Altıntaş :
> >  Hi;
> >
> > I have Webmarkupcontainer which includes ListView and I am using jquery
> > Table Sorter.
> >
> > When i open a update modal window and close model window and refresh
> table
> > via Ajax i got :
> >
> > Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript:
> > [object Error]
> > *INFO: *Response processed successfully.
> >
> > And all jqıery table sorter's features gone
> >
> > My wicket version : 1.4.9
> >
> > I've read https://issues.apache.org/jira/browse/WICKET-2663 but it says
> it
> > is fixed since 1.4.7
> >
> > Any idea ?
> >
> > Thanks.
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: mountBookmarkablePage and BookmarkablePageLink with PageParameters

2010-10-05 Thread Altuğ Bilgin Altıntaş
Quickstart please ...



2010/10/5 virtualizer 

>
>
> Altuğ Bilgin Altıntaş wrote:
> >
> > Also could you please try without   just
> >
> > add(new BookmarkablePageLink("testlink1", Test1.class, pp));
> >
> > Which wicket version ?
> >
>
> Without generic type it is the same problem.
>
> I´m using 1.4.9.
>
> I have the same problem if I don´t use PageParameters and
> mount("/some/path", PackageName.forClass(Test1.class))
>
> Thanks!
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/mountBookmarkablePage-and-BookmarkablePageLink-with-PageParameters-tp2954926p2955651.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: mountBookmarkablePage and BookmarkablePageLink with PageParameters

2010-10-05 Thread Altuğ Bilgin Altıntaş
Also could you please try without   just

add(new BookmarkablePageLink("testlink1", Test1.class, pp));

Which wicket version ?

Altug

2010/10/4 virtualizer 

>
> Hello,
>
> in my tomcat I have a context (home.xml) with the path "home". So I open my
> wicket-stuff with localhost:8080/home. Fine!
>
> Now I have two pages Test1 and Test2. For both I´ve called
> mountBookmarkablePage...
>
> mountBookmarkablePage("/test1", Test1.class)
> mountBookmarkablePage("/test2", Test2.class)
>
> And I have two BookmarkablePageLink (one for each page) with PageParameters
> on every Page...
>
> add(new BookmarkablePageLink("testlink1", Test1.class, pp));
> add(new BookmarkablePageLink("testlink2", Test1.class, pp));
>
> ...where pp is test=hello.
>
> If I´ve loaded the page with url http://localhost:8080/home/test1 the
> links
> are still ok. Bt if I click on a link and call a page with the
> pageparameters the links are suddenly without the "home"-part:
> http://localhost:8080/test1/test/hello and
> http://localhost:8080/test2/test/hello.
>
> So, if I use no pageparameters everthing is ok. But if I use pageparameters
> (and I really want to do this!) the the home-url is wrong.
>
> What couold I´ve done wrong?
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/mountBookmarkablePage-and-BookmarkablePageLink-with-PageParameters-tp2954926p2954926.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: What is the correct way to extending a window - if I've not content to add

2010-10-04 Thread Altuğ Bilgin Altıntaş
I don't know if there is a another way; but it is consistent

abstract Class TopMost_Parent {
abstract void methodZ();
}

abstract Class SubParent extends TopMost_Parent {
public void methodZ() {.};
abstract void methodY();
}

class Class Child extends SubParent {
  // Should Child implement methodY() ???
}

SubParent is a "Sub" at the end so it should use  when you
compare it with OOP  it is consistent, right ?

Altuğ

2010/10/4 LutherBaker 

>
> TopMost_Parent
>
>
>
>
>
> SubParent extends TopMost_Parent
>
>
> blah blah
>
>
>
>
> Child that needs to add no markup
> Nothing seems to work
>
>
> To get this to work, I end up doing this:
>
> SubParent extends TopMost_Parent
>
>
> blah blah
>
>
>
>
>
> Child that needs to add no markup
>
> 
>
>
>
> I understand I need child.html markup ... but do I need to 
> inside of it? and do I need to include  in the SubParent?
>
> -Luther
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/What-is-the-correct-way-to-extending-a-window-if-I-ve-not-content-to-add-tp2954955p2954955.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: wickert:id changes to attribute

2010-10-04 Thread Altuğ Bilgin Altıntaş
Quickstart please

2010/10/5 James Carman 

> Show some code
>
> On Mon, Oct 4, 2010 at 8:48 PM, Jered Myers
>  wrote:
> >  My markup looks like this:
> > ...
> > 
> > stuff
> > 
> > ...
> >
> > When I render the code and swap in another panel via
> > canvasPanel.replaceWith(newPanel);, the page source looks like this:
> > ...
> > 
> >  new panel markup
> > 
> > ...
> >
> > Any ideas on why this would happen?  I looked through my markup and it
> looks
> > correct.  I have seen the wicket:id become part of the id (e.g.
> > id="canvasPanel0"), but I have never seen a wicket:id become an
> attribute.
> >
> > Jered
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: [JOB] Developer with exceptional OO, Java, Wicket skills. Scala a plus.

2010-10-04 Thread Altuğ Bilgin Altıntaş
+1

2010/10/4 Cemal Bayramoglu 

> Ernesto,
>
> ... nothing is impossible.
>
> Regards - Cemal
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
>
>
>
> On 4 October 2010 10:55, Ernesto Reinaldo Barreiro 
> wrote:
> > Cemal,
> >
> > Are you willing/able to consider applications from people living in
> > other European countries which cannot move to England:-(
> >
> > Kind regards,
> >
> > Ernesto
> >
> > On Mon, Oct 4, 2010 at 11:28 AM, Cemal Bayramoglu
> >  wrote:
> >> We are looking for one, possibly two more very talented developers to
> >> join jWeekend's team.
> >>
> >> You will have exceptionally strong OO, Java and Wicket skills, and
> >> already be deeply into, or have a strong desire to become highly
> >> proficient in Scala. You already enjoy writing clean JavaScript, XHTML
> >> and CSS.
> >>
> >> You see the value of and enjoy writing sensible tests and are
> >> experienced enough to know no work is complete until you have
> >> thoroughly tested it. You are also the type that loves to discuss
> >> ideas, concepts and share knowledge, but can concentrate well and work
> >> efficiently alone too.
> >>
> >> Frameworks you already use, or are keen to master, include
> >> Spring/Guice/JPA2 and possibly GWT/SmartGWT. Our current projects
> >> include architecting, designing and building scalable event driven
> >> infra-structure, plenty of knowledge transfer, some Drools, and,
> >> naturally, state of the art web-application development. Creating
> >> Scala DSLs looks like becoming increasingly relevant to us. Some of
> >> our work is confidential/sensitive, so integrity and good-judgement is
> >> essential.
> >>
> >> You will generally be contributing on multiple jWeekend projects at a
> >> time, both internally (R&D or product development) and for our small
> >> number of close clients in a variety of industries, where you will be
> >> confident to pick up and be productive with their applications/code
> >> and new frameworks/technologies we need to use without fuss.
> >>
> >> You will be encouraged, and even given work time, to contribute to
> >> open source projects we support like wiQuery, and to (at least) test
> >> and provide patches for Wicket 1.5.
> >>
> >> It is not required, but if you would like to, you could be given the
> >> opportunity to work on course material and even deliver training if
> >> you consistently demonstrate the essential qualities.
> >>
> >> Although you may be able to work from home when appropriate, you will
> >> also be happy to be on client-site (suit and tie) whenever it's
> >> required, even for longer assignments, or at our office, so, it is our
> >> preference that you are living in London. For an exceptional developer
> >> that demonstrates the ability to comfortably and efficiently
> >> communicate with the the rest of the team and demonstrates excellent
> >> integrity, we may reevaluate this.
> >>
> >> A visa to work in UK (preferably anywhere in Europe) may be essential,
> >> and it would be a bonus if you can work in the USA too. If you are
> >> coming from abroad to work with us we will help you settle in London.
> >>
> >> You most likely have at least 3 years solid experience with all
> >> aspects of core Java on professional quality projects, to supplement
> >> your excellent bachelors or masters degree.
> >>
> >> You can expect a GBP30k-GBP55k package (comprised of a fixed basic and
> >> revenue sharing, with negotiable format) in your first year with us if
> >> you are based in London, or, the equivalent remuneration for such a
> >> role/your experience in your locality if you are not in London. In
> >> exceptional circumstances, we can review initial terms after as little
> >> as 6 months.
> >>
> >> If you are not the type to study books like "Effective Java", or
> >> "JavaScript, the Good Parts" and try out new technologies just for
> >> fun, or to master Scala by reading Odersky and, importantly, writing
> >> lots of code (which you can also keep well organised and documented so
> >> others can learn from it later), then you're probably not going to be
> >> a perfect match. We operate in a sometimes demanding environment, with
> >> knowledgeable, confident and sometimes forthright clients and
> >> colleagues, so shrinking violets could find it tough too.
> >>
> >> Please contact me [1] including bullets highlighting your
> >> experience/skills/passions and have a CV ready for when we get back to
> >> you because we can arrange interviews as early as this week.
> >>
> >> Regards - Cemal
> >> jWeekend
> >> Training, Consulting, Development
> >> http://jWeekend.com
> >>
> >> [1] http://jweekend.com/dev/ContactUsBody/
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
>
> -
> To unsubscribe, e

Re: Coding - On Software Design Process

2010-10-04 Thread Altuğ Bilgin Altıntaş
Hi;

I am living in Turkey and Amazon says no Kinda for Turkey :( I couldn't
understand why a software cannot be available for a such
country.

Kinda is a big filter against readability.

Altuğ.


2010/10/3 Jonathan Locke 

>
> You can always read it on your Mac or PC (there's a free Kindle reader).
> Also, there will be a print book. It's just been delayed a bit by some
> printer issues.
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Coding-On-Software-Design-Process-tp2720854p2952828.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: StatelessLink

2010-10-03 Thread Altuğ Bilgin Altıntaş
Problem occurs because of Spring integration; I called Service like that

final SupplierService supplierService = (SupplierService)
LazyInitProxyFactory.createProxy(SupplierService.class, new
IProxyTargetLocator() {
public Object locateProxyTarget() {
return ((WicketApplication) Application.get()).

getSpringContextLocator().getSpringContext().getBean("supplierService");

}
} );

Now It works.

I know i can use @SpringBean...

Thanks.

AOP trigerred when get

2010/10/3 Jeremy Thomerson 

> Show your link code. You're obviously holding a reference to the aspect,
> which can't be serialized.
>
> Jeremy Thomerson
> http://wickettraining.com
> -- sent from my "smart" phone, so please excuse spelling, formatting, or
> compiler errors
>
> On Oct 3, 2010 2:16 PM, "Altuğ Bilgin Altıntaş"  wrote:
>
> I found the problem (not solution yet)
>
> Spring's AOP config  :
>
>   
>   
>  expression="execution(boolean org.jtpd.data..*(..))" />
>   
>   
>   
>
> For logging and when i search logs i see :
>
> org.apache.wicket.util.io.SerializableChecker$*
> WicketNotSerializableException*: Unable to serialize class:
> org.springframework.aop.aspectj.AspectJPointcutAdvisor
>
> AspectJPointcutAdvisor can not serializable so StatelessLink doesn't work
> and i always get Page Expired Error when exporting CSV file via using
> WebResponse.
>
> Any comment on that ?
>
>
>
> 2010/9/28 Igor Vaynberg 
>
>
> > even if the page is stateful, the url the stateless link generates
> > should be stateless...got a ...
>


Re: StatelessLink

2010-10-03 Thread Altuğ Bilgin Altıntaş
I found the problem (not solution yet)

Spring's AOP config  :








For logging and when i search logs i see :

org.apache.wicket.util.io.SerializableChecker$*
WicketNotSerializableException*: Unable to serialize class:
org.springframework.aop.aspectj.AspectJPointcutAdvisor

AspectJPointcutAdvisor can not serializable so StatelessLink doesn't work
and i always get Page Expired Error when exporting CSV file via using
WebResponse.

Any comment on that ?



2010/9/28 Igor Vaynberg 

> even if the page is stateful, the url the stateless link generates
> should be stateless...got a quickstart?
>
> -igor
>
> On Tue, Sep 28, 2010 at 2:09 AM, Martin Grigorov 
> wrote:
> > You may use wicket-devutils. There is a stateless checker. It will tell
> you
> > which component makes the page stateful.
> >
> > 2010/9/28 Altuğ Bilgin Altıntaş 
> >
> >> Hi ;
> >>
> >> I used StatelessLink but i still get Page Expired , is it normal ?
> >>
> >> Also this StatelessLink is in StatelessForm and Page is Bookmarkable but
> >> wicket - 1.4.9 still generates :
> >>
> >>
> >>
> http://localhost:8080/ac/customer?wicket:interface=:1:frmSearch:linkExcel::ILinkListener
> >> ::
> >>
> >> why ?
> >>
> >> Thanks.
> >>
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Modal window and Ajax exception

2010-09-30 Thread Altuğ Bilgin Altıntaş
 Hi;

I have Webmarkupcontainer which includes ListView and I am using jquery
Table Sorter.

When i open a update modal window and close model window and refresh table
via Ajax i got :

Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript:
[object Error]
*INFO: *Response processed successfully.

And all jqıery table sorter's features gone

My wicket version : 1.4.9

I've read https://issues.apache.org/jira/browse/WICKET-2663 but it says it
is fixed since 1.4.7

Any idea ?

Thanks.


Re: Which component to use for html iframe

2010-09-30 Thread Altuğ Bilgin Altıntaş
WebMarkupContainer

2010/9/30 

> Hi,
>
> I would like to use html iframe tag. Example in html:
>  height="400px">
>
> My Example to use Wicket:
>  height="400px">
>
> Which Wicket component can I use for iframe
>
> Regards,
>
> Mehmet
>
>
>


Re: pagemap and link

2010-09-28 Thread Altuğ Bilgin Altıntaş
I need onClick method so BookmarkablePageLink is not for me. Am i right ?

Also i search inside BookmarkablePageLink and i think the key point is to
generate Link - getURL but i couldn't achieve to generate the right Url
which doesn't cause Page Expired .

I read the mailing list and see Igor wrote that Use different PageMap to get
rid of Page Expired but still couldn't find how to set a new pageMap into
Link.

Thanks.

2010/9/28 Martin Grigorov 

> The same.
>
> 2010/9/28 Altuğ Bilgin Altıntaş 
>
> > BookmarkableLink ?? Do you mean BookmarkablePageLink
> >
> > 2010/9/28 Martin Grigorov 
> >
> > > This will not save you.
> > > You need BookmarkableLink for this case.
> > >
> > > 2010/9/28 Altuğ Bilgin Altıntaş 
> > >
> > > > Hi,
> > > >
> > > > How can i open a link  with a different pagemap so that i expect not
> to
> > > get
> > > > page Expired error.
> > > >
> > > > Link link = new Link{
> > > >
> > > >  public void onClick() {
> > > > // how can i set a new page map here ?
> > > >  }
> > > >
> > > > }
> > > >
> > > > Thanks.
> > > >
> > >
> >
>


Re: pagemap and link

2010-09-28 Thread Altuğ Bilgin Altıntaş
BookmarkableLink ?? Do you mean BookmarkablePageLink

2010/9/28 Martin Grigorov 

> This will not save you.
> You need BookmarkableLink for this case.
>
> 2010/9/28 Altuğ Bilgin Altıntaş 
>
> > Hi,
> >
> > How can i open a link  with a different pagemap so that i expect not to
> get
> > page Expired error.
> >
> > Link link = new Link{
> >
> >  public void onClick() {
> > // how can i set a new page map here ?
> >  }
> >
> > }
> >
> > Thanks.
> >
>


pagemap and link

2010-09-28 Thread Altuğ Bilgin Altıntaş
Hi,

How can i open a link  with a different pagemap so that i expect not to get
page Expired error.

Link link = new Link{

  public void onClick() {
 // how can i set a new page map here ?
  }

}

Thanks.


StatelessLink

2010-09-28 Thread Altuğ Bilgin Altıntaş
Hi ;

I used StatelessLink but i still get Page Expired , is it normal ?

Also this StatelessLink is in StatelessForm and Page is Bookmarkable but
wicket - 1.4.9 still generates :

http://localhost:8080/ac/customer?wicket:interface=:1:frmSearch:linkExcel::ILinkListener
::

why ?

Thanks.


Re: Page Expired after WebResponse

2010-09-27 Thread Altuğ Bilgin Altıntaş
No I didn't use ResourceStremRequestTarget  because my aim is to  dumped
Listview component's content into excel so I used ComponentRequestTarget
which works great.

But

WebResponse wr = (WebResponse) getResponse();
wr.setContentType("application/vnd.ms-excel;
charset=windows-1254" );
wr.setCharacterEncoding(Constants.ENCODING);
wr.setHeader("content-disposition", "attachment;filename=" +
Constants.DEFAULT_EXCEL_FILE);

causes Page Expired error if click :

StatelessLink linkExcel = new StatelessLink("linkExcel") {
private static final long serialVersionUID = 1L;

@Override
public void onClick() {

getRequestCycle().setRequestTarget(
new ComponentRequestTarget(tableContainer) {

@Override
public void respond(RequestCycle requestCycle) {
Component actions =
tableContainer.get("actions");
actions.setVisible(false);

Component navigator =
tableContainer.get("navigator");
navigator.setVisible(false);

final int oldipp = listView.getRowsPerPage();

listView.setRowsPerPage(Integer.MAX_VALUE);
isExcel = true;
super.respond(requestCycle);

/* Back to original. */
listView.setRowsPerPage(oldipp);
actions.setVisible(true);
navigator.setVisible(true);

}
});

WebResponse wr = (WebResponse) getResponse();
wr.setContentType("application/vnd.ms-excel;
charset=windows-1254" );
wr.setCharacterEncoding(Constants.ENCODING);
wr.setHeader("content-disposition", "attachment;filename=" +
Constants.DEFAULT_EXCEL_FILE);

}
};

Any suggestions or samples ? .

Thanks.




2010/9/22 Rodolfo Hansen 

> Have you thought about using simply using a ResourceStremRequestTarget ?
>
>
> On Wed, 2010-09-22 at 20:26 +0300, Altuğ Bilgin Altıntaş wrote:
>
> > AjaxLink doesn't throw an Excel file to user.
> >
> > Also I changed the code like that :
> >
> >  WebResponse wr =
> > (WebResponse)*target.getHeaderResponse().getResponse()
> > ;*
> > wr.setContentType("application/vnd.ms-excel;
> > charset=windows-1254" );
> > wr.setCharacterEncoding(Constants.ENCODING);
> > wr.setHeader("content-disposition",
> "attachment;filename=" +
> > Constants.DEFAULT_EXCEL_FILE);
> >
> > It sends the table via Ajax :) but no excel file download process begins
> >
> > Any suggestions ?
> >
> > Thanks.
> >
> >
> >
> > 2010/9/22 Rodolfo Hansen 
> >
> > > Use an AjaxLink (or extends abstractlink), this way the page version is
> > > not expected to increment.
> > >
> > >
> > > On Wed, 2010-09-22 at 18:27 +0300, Altuğ Bilgin Altıntaş wrote:
> > > > Hi,
> > > >
> > > > Here is code to export excel;
> > > >
> > > >  Link linkExcel = new Link("linkExcel") {
> > > >  public void onClick() {
> > > > getRequestCycle().setRequestTarget(
> > > > new ComponentRequestTarget(tableContainer) {
> > > >
> > > > @Override
> > > > public void respond(RequestCycle
> requestCycle) {
> > > >   .
> > > >WebResponse wr = (WebResponse)
> getResponse();
> > > >
>  wr.setContentType("application/vnd.ms-excel;
> > > > charset=utf-8" );
> > > >
>  wr.setCharacterEncoding(Constants.ENCODING);
> > > >wr.setHeader("content-disposition",
> > > > "attachment;filename=" + Constants.DEFAULT_EXCEL_FILE);
> > > > }
> > > >
> > > >  }
> > > >
> > > > It works great.
> > > >
> > > > *Problem steps  *:
> > > >
> > > >1. Click excel link and get the excel file - great !
> > > >2. Click a modalwindow link (Ajax) gets "*Page Expired"* error.
> > > >
> > > >
> > > > Any suggestions on *step 2* ?
> > > >
> > > > Thanks.
> > >
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >
> > >
>
>
>


Re: Page Expired after WebResponse

2010-09-22 Thread Altuğ Bilgin Altıntaş
AjaxLink doesn't throw an Excel file to user.

Also I changed the code like that :

 WebResponse wr =
(WebResponse)*target.getHeaderResponse().getResponse()
;*
wr.setContentType("application/vnd.ms-excel;
charset=windows-1254" );
wr.setCharacterEncoding(Constants.ENCODING);
wr.setHeader("content-disposition", "attachment;filename=" +
Constants.DEFAULT_EXCEL_FILE);

It sends the table via Ajax :) but no excel file download process begins

Any suggestions ?

Thanks.



2010/9/22 Rodolfo Hansen 

> Use an AjaxLink (or extends abstractlink), this way the page version is
> not expected to increment.
>
>
> On Wed, 2010-09-22 at 18:27 +0300, Altuğ Bilgin Altıntaş wrote:
> > Hi,
> >
> > Here is code to export excel;
> >
> >  Link linkExcel = new Link("linkExcel") {
> >  public void onClick() {
> > getRequestCycle().setRequestTarget(
> > new ComponentRequestTarget(tableContainer) {
> >
> > @Override
> > public void respond(RequestCycle requestCycle) {
> >   .
> >WebResponse wr = (WebResponse) getResponse();
> >wr.setContentType("application/vnd.ms-excel;
> > charset=utf-8" );
> >wr.setCharacterEncoding(Constants.ENCODING);
> >wr.setHeader("content-disposition",
> > "attachment;filename=" + Constants.DEFAULT_EXCEL_FILE);
> > }
> >
> >  }
> >
> > It works great.
> >
> > *Problem steps  *:
> >
> >1. Click excel link and get the excel file - great !
> >2. Click a modalwindow link (Ajax) gets "*Page Expired"* error.
> >
> >
> > Any suggestions on *step 2* ?
> >
> > Thanks.
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Page Expired after WebResponse

2010-09-22 Thread Altuğ Bilgin Altıntaş
Hi,

Here is code to export excel;

 Link linkExcel = new Link("linkExcel") {
 public void onClick() {
getRequestCycle().setRequestTarget(
new ComponentRequestTarget(tableContainer) {

@Override
public void respond(RequestCycle requestCycle) {
  .
   WebResponse wr = (WebResponse) getResponse();
   wr.setContentType("application/vnd.ms-excel;
charset=utf-8" );
   wr.setCharacterEncoding(Constants.ENCODING);
   wr.setHeader("content-disposition",
"attachment;filename=" + Constants.DEFAULT_EXCEL_FILE);
}

 }

It works great.

*Problem steps  *:

   1. Click excel link and get the excel file - great !
   2. Click a modalwindow link (Ajax) gets "*Page Expired"* error.


Any suggestions on *step 2* ?

Thanks.


Re: Export Excel file containing string and rendered component

2010-09-16 Thread Altuğ Bilgin Altıntaş
Hi;

After using  WebResponse to export excel then clicking a Link gives *Page
expired* error.

Any suggestion ?


2009/6/4 Igor Vaynberg 

> you have the webresponse, can you not simply write into it?
>
> -igor
>
> On Thu, Jun 4, 2009 at 9:49 AM, Frank Silbermann
>  wrote:
> >
> > I, too, am trying to have my application download MS Excel files.  Until
> now,
> > mine have contained the content of a DataTable, using the code I received
> > from the mailing list three years ago:
> >
> > Button button = new Button("excelExport") {
> >public void onSubmit() {
> >getRequestCycle().setRequestTarget(
> >new ComponentRequestTarget(dataTable)
> >);
> >WebResponse wr = (WebResponse)getResponse();
> >wr.setContentType( "excel/ms-excel; name="+getMSExcelFilename() );
> >wr.setHeader( "content-disposition",
> > "attachment;filename="+getMSExcelFilename() );
> >}
> > };
> >
> > The file downloaded contains an HTML fragment that both MS Excel and MS
> Word
> > can interpret, if one opens the resulting file in those applications.
> >
> > Now my users told me they would like the download to contain not just the
> > data, but the date of its creation.  Is there an easy way to pre-pend an
> > arbitrary string to that HTML fragment?  I don't really understand the
> > details of Wicket's page rendering process, and looking at the classes
> I've
> > been using there don't seem to be any obvious hooks.
> >
> >
> >
> >
> >stream = class AbstractResourceStreamWriter()
> >{
> >  public void write(OutputStream output)
> > {
> >   // do your writing
> > }
> >}
> >
> > getRequestCycle().setRequestTarget(
> > new ResourceStreamRequestTarget( stream
> ).setFileName(
> > "file.xls" )
> >);
> >
> > johan
> >
> >
> > On Tue, Apr 1, 2008 at 9:31 AM,  wrote:
> >
> >> Hello:
> >> I am trying to export dynamically generated excel file.
> >> The generator would send the file.xls to an OutputStream.
> > ...
> >
> > --
> > View this message in context:
> http://www.nabble.com/export-excel-file-via-an-OutputStream-tp16416239p23873774.html
> > Sent from the Wicket - User 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
> >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicket Problem: Ajax request encoding

2010-09-01 Thread Altuğ Bilgin Altıntaş
I found solution for Glassfish

just write sun-web.xml this


http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-1.dtd";>

  /cts
  
  

  Keep a copy of the generated servlet class' java
code.

  
  


  



Again ISO-8859-1 problem.

01 Eylül 2010 08:22 tarihinde Altuğ Bilgin Altıntaş yazdı:

> Hi Ronaldo;
>
> Did you find any solution on that problem ?
>
> Thanks.
>
> 2010/7/20 Ronaldo Cisneiros Veras 
>
> Hi,
>>
>> We're using Wicket framework (Version 1.4.9) on our systems. Our problem
>> occurs when there is a submission of ajax request in text fields. When you
>> type the word "descrição" for example by submitting the text by ajax event
>> the word is modified to "descrição". This problem only occurs in Internet
>> Explorer and does not occur in Firefox.
>>
>> We are overriding the init () method of WebApplication class and add the
>> following lines for the encoding:
>>
>> getMarkupSettings().setDefaultMarkupEncoding("ISO-8859-1");
>> ((Settings) getMarkupSettings()).setResponseRequestEncoding("ISO-8859-1");
>>
>> Could you tell us a solution for this issue?
>>
>> Systems informations:
>>
>> Windows XP SP2
>> Windows encoding: UTF-8
>>
>> Regards, Ronaldo.
>>
>
>


Re: Wicket Problem: Ajax request encoding

2010-08-31 Thread Altuğ Bilgin Altıntaş
Hi Ronaldo;

Did you find any solution on that problem ?

Thanks.

2010/7/20 Ronaldo Cisneiros Veras 

> Hi,
>
> We're using Wicket framework (Version 1.4.9) on our systems. Our problem
> occurs when there is a submission of ajax request in text fields. When you
> type the word "descrição" for example by submitting the text by ajax event
> the word is modified to "descrição". This problem only occurs in Internet
> Explorer and does not occur in Firefox.
>
> We are overriding the init () method of WebApplication class and add the
> following lines for the encoding:
>
> getMarkupSettings().setDefaultMarkupEncoding("ISO-8859-1");
> ((Settings) getMarkupSettings()).setResponseRequestEncoding("ISO-8859-1");
>
> Could you tell us a solution for this issue?
>
> Systems informations:
>
> Windows XP SP2
> Windows encoding: UTF-8
>
> Regards, Ronaldo.
>


Re: Listview remove columns on the fly

2010-08-31 Thread Altuğ Bilgin Altıntaş
Any code example ?

Thanks.

2010/8/31 Martin Makundi 

> Re-render it before going to excel..
>
> 2010/8/31 Altuğ Bilgin Altıntaş :
> > Hi all;
> >
> > How can i disable Listview's column/s while post it to excel on the fly.
> I
> > mean i don't want to post all columns into excel.
> >
> > Link linkExcel = new Link("linkExcel") {
> >private static final long serialVersionUID = 1L;
> >
> >@Override
> >public void onClick() {
> >
> >getRequestCycle().setRequestTarget(
> >new ComponentRequestTarget(tableContainer) {
> >@Override
> >public void respond(RequestCycle requestCycle)
> {
> >final int oldipp =
> > supplierListView.getRowsPerPage();
> >
> > supplierListView.setRowsPerPage(Integer.MAX_VALUE);
> >supplierListView.setMetaData();
> >*// I don't want to post all listview's
> > columns into excel *
> >
> > super.respond(requestCycle);
> >supplierListView.setRowsPerPage(oldipp);
> >}
> >});
> >WebResponse wr = (WebResponse) getResponse();
> >wr.setContentType("application/vnd.ms-excel;
> > charset=UTF-8");
> >wr.setCharacterEncoding("UTF-8");
> >wr.setHeader("content-disposition",
> > "attachment;filename=excel.xls");
> >
> >}
> >};
> >
> > Thanks.
> >
>


Listview remove columns on the fly

2010-08-31 Thread Altuğ Bilgin Altıntaş
Hi all;

How can i disable Listview's column/s while post it to excel on the fly. I
mean i don't want to post all columns into excel.

Link linkExcel = new Link("linkExcel") {
private static final long serialVersionUID = 1L;

@Override
public void onClick() {

getRequestCycle().setRequestTarget(
new ComponentRequestTarget(tableContainer) {
@Override
public void respond(RequestCycle requestCycle) {
final int oldipp =
supplierListView.getRowsPerPage();

supplierListView.setRowsPerPage(Integer.MAX_VALUE);
supplierListView.setMetaData();
*// I don't want to post all listview's
columns into excel *

super.respond(requestCycle);
supplierListView.setRowsPerPage(oldipp);
}
});
WebResponse wr = (WebResponse) getResponse();
wr.setContentType("application/vnd.ms-excel;
charset=UTF-8");
wr.setCharacterEncoding("UTF-8");
wr.setHeader("content-disposition",
"attachment;filename=excel.xls");

}
};

Thanks.


Re: Listview excel

2010-08-30 Thread Altuğ Bilgin Altıntaş
Thanks;

I added table in to WebMarkupContainer and WebMarkupContainer in to
getRequestCycle().setRequestTarget(
new ComponentRequestTarget(table));

It works.



2010/8/30 Martin Makundi 

> Hi!
>
> Just change  the mime type of the page to "application/vnd.ms-excel".
>
> **
> Martin
>
> 2010/8/30 Altuğ Bilgin Altıntaş :
> > Hi all;
> >
> > Is it possible to export a ListView to excel. Should i use always
> Datatable
> > ?
> >
> > Thanks.
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Spring security + remember me question

2010-05-24 Thread Altuğ Bilgin Altıntaş
Hi all;

I am using wicket + spring 3.0 + spring security 3.0

Problem is : Spring security authenticate the user via cookie (remember-me
service) but AuthenticatedWebSession couldn't understand this and populate
login panel. How can i solve it ?

Thanks

Regards.
Altug.


Re: Caching menu

2010-05-14 Thread Altuğ Bilgin Altıntaş
Hi;

For distributed caching i can advice hazelcast.com, take a look.

Cheers

Altug.

2010/5/7 nino martinez wael 

> Id go for at "pojo" dao provider which then can cache the menu, and
> just use that from your wicket menu components.. You could then use
> something like ehcache, for caching..
>
> 2010/5/5 Wolfgang :
> >
> > I'm working on a web site that has a menu bar with sub-items, and
> > sub-sub-items. The configuration of this menu is computed from
> hilariously
> > complex SQL queries and needs quite some time to be established. The menu
> > looks different for each user (session) but stays the same for the
> lifetime
> > of the session. So it's time for caching as this menu shows up on most of
> > the pages.
> >
> > From other posts on this site I've taken that it's not a good idea to
> share
> > the components that represent the menu among different pages. Now I
> wonder
> > on which level I can cache and re-use objects.
> >
> > Is it advisable to share models (in the Wicket sense), i.e. store the
> menu
> > models on the session and construct the menu components according to
> their
> > information for every page?
> >
> > Or do I have to create separate, Wicket-independent data structures that
> > hold the menu structure information and store it on the session or in the
> > database?
> >
> > Or am I on a complete wrong track and should look for caching of the
> > rendered HTML code on a component basis?
> >
> > Thanks in advance for sharing your knowledge/experience.
> >
> > --
> > View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Caching-menu-tp2130813p2130813.html
> > Sent from the Wicket - User 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
> >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>