Re: FeedbackPanel rendering

2011-08-25 Thread Lurtz Nazgul
Hi Andre; Thanks for your answer. 


I didn't override form's onSubmit method.




From: Andrea Del Bene 
To: users@wicket.apache.org
Sent: Thursday, August 25, 2011 11:42 AM
Subject: Re: FeedbackPanel rendering

Hi Lurtz,

what does your form do in its onSubmit method? Have you overriden it?
> Hi all;
>
>
> I have two panels.
>
>
> Panel one have the standart form with one Label + TextField (required field) 
> + AjaxButton.
>
> Panel two have one FeedbackPanel.
>
>
> Ok, here is the the problem :
>
>
> I can reach Panel Two' FeedbackPanel from Panel One.
>
>
> So in AjaxButton
>
>
>     AjaxButton submit = new AjaxButton("submit") {
>                  @Override
>                  protected void onError(AjaxRequestTarget target, Form  
>form) {
>                      FeedbackPanel feedbackPanel = getFeedbackPanel(); // 
>gets FeedBackPanel from Panel Two
>                      target.addComponent(feedbackPanel); // it renders, no 
>problem
>                      target.addComponent(form);
>                  }
>
>                  @Override
>                  protected void onSubmit(AjaxRequestTarget target, Form  
>form) {
>                      FeedbackPanel feedbackPanel = getFeedbackPanel(); // 
>gets FeedBackPanel from Panel Two
>                     info("Saved"); // just an info message
>                      target.addComponent(form);
>                      target.addComponent(feedbackPanel); // no way
>                  
>                  }
>              };
> When Validation error occurs (onError)  Panel's two FeedbackPanel renders and 
> shows the error. Great !
>
>
> But when there is no error (onSubmit)Panel's two FeedbackPanel doesn't render 
> and it gives
>
>
> component-targetted feedback message was left unrendered. This could be 
> because you are missing a FeedbackPanel on the page.  Message: 
> [FeedbackMessage message = "Saved", reporter = go, level = INFO]
>
>
> Any suggestions ?
>
> Regards.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

FeedbackPanel rendering

2011-08-24 Thread Lurtz Nazgul
Hi all; 


I have two panels. 


Panel one have the standart form with one Label + TextField (required field) + 
AjaxButton.

Panel two have one FeedbackPanel. 


Ok, here is the the problem : 


I can reach Panel Two' FeedbackPanel from Panel One. 


So in AjaxButton 


   AjaxButton submit = new AjaxButton("submit") {
    @Override
    protected void onError(AjaxRequestTarget target, Form form) {
    FeedbackPanel feedbackPanel = getFeedbackPanel(); // gets 
FeedBackPanel from Panel Two
    target.addComponent(feedbackPanel); // it renders, no 
problem
    target.addComponent(form);
    }

    @Override
    protected void onSubmit(AjaxRequestTarget target, Form form) 
{
    FeedbackPanel feedbackPanel = getFeedbackPanel(); // gets 
FeedBackPanel from Panel Two
   info("Saved"); // just an info message
    target.addComponent(form);
    target.addComponent(feedbackPanel); // no way
  
    }
    };
When Validation error occurs (onError)  Panel's two FeedbackPanel renders and 
shows the error. Great ! 


But when there is no error (onSubmit)Panel's two FeedbackPanel doesn't render 
and it gives 


component-targetted feedback message was left unrendered. This could be because 
you are missing a FeedbackPanel on the page.  Message: [FeedbackMessage message 
= "Saved", reporter = go, level = INFO]


Any suggestions ?

Regards.

Re: rendering component

2011-08-11 Thread Lurtz Nazgul
 setVisible(false) , actually renders component but disables it via style sheet


like

 

I don't want that.

I will try isVisibleInHierachy now.

Thanks.



From: Martin Grigorov 
To: users@wicket.apache.org; Lurtz Nazgul 
Sent: Thursday, August 11, 2011 1:32 PM
Subject: Re: rendering component

org.apache.wicket.Component.setVisibilityAllowed(boolean) is for that purpose.

if component.isVisibleInHierachy() returns false then the component is
not rendered.
What exactly is the problem with setVisible(false) ?

On Thu, Aug 11, 2011 at 12:59 PM, Lurtz Nazgul  wrote:
> Hi,
>
> Is it possible not to render a component for security issues.
>
> I know i can use IAuthorizationStrategy for this but i want to to it manually
>
> I don't need just setVisible(false), i really need not to render that 
> component.
>
> I don't know which method to override. Below code gives error.
>
> TextField nameField = new TextField("name", new 
> PropertyModel(this,
>                 "name")) {
>             @Override
>             protected void onRender(MarkupStream markupStream) {
>
>             }
>         };
>
> Any way ?
>
> Thanks.



-- 
Martin Grigorov
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

rendering component

2011-08-11 Thread Lurtz Nazgul
Hi, 

Is it possible not to render a component for security issues. 

I know i can use IAuthorizationStrategy for this but i want to to it manually

I don't need just setVisible(false), i really need not to render that 
component. 

I don't know which method to override. Below code gives error.

TextField nameField = new TextField("name", new 
PropertyModel(this,
                "name")) {
            @Override
            protected void onRender(MarkupStream markupStream) {
                             
            }
        };

Any way ? 

Thanks.

Re: flush ajaxRequestTarget.appendJavascript

2011-08-03 Thread Lurtz Nazgul
I used AjaxSelfUpdatingTimerBehavior and it's done. 

Thanks.




From: Lurtz Nazgul 
To: users@wicket.apache.org
Sent: Wed, August 3, 2011 11:36:50 AM
Subject: flush ajaxRequestTarget.appendJavascript

Hi;

When i append jquery progressbar script to AjaxRequestTarget like below

for (int i = 0; i < 101; i++) {

ajaxRequestTarget.appendJavascript("$(document).ready(function() 
{\n" +
"$(\"#progressbar\").progressbar({ value: " + i 
+ " });\n" +
"});");

 //  other stuff
}


Wicket sends it to the server, but i need to flush that jquery script code in 
order to work progressbar. 

Any suggestions ?

Thanks.

flush ajaxRequestTarget.appendJavascript

2011-08-03 Thread Lurtz Nazgul
Hi;

When i append jquery progressbar script to AjaxRequestTarget like below

 for (int i = 0; i < 101; i++) {

ajaxRequestTarget.appendJavascript("$(document).ready(function() 
{\n" +
"$(\"#progressbar\").progressbar({ value: " + i 
+ " });\n" +
"});");

 //  other stuff
}


Wicket sends it to the server, but i need to flush that jquery script code in 
order to work progressbar. 

Any suggestions ?

Thanks.

Re: catch jquery event at AjaxEventBehavior

2011-08-01 Thread Lurtz Nazgul
Hi ; 

I used AbstractDefaultAjaxBehavior to catch jquery close event. 

On jquery side i triggered event when jquery event window closed. 

wicketAjaxGet('"+behavior.getCallbackUrl()+ "'");

It is little tricky.

Thanks.



________
From: Lurtz Nazgul 
To: users@wicket.apache.org
Sent: Mon, August 1, 2011 9:57:30 AM
Subject: catch jquery event at  AjaxEventBehavior

Hi; 

I used jquery dialog. I can open and close jquery dialog box. I represent 
jquery 

dialog as a panel at wicket side.

My question is how can i catch jquery close event ? 

I tested like below but it doesn't work

dialogConfirmation.add(new AjaxEventBehavior("close") {
  @Override
  protected void onEvent(AjaxRequestTarget target) {
  System.out.println(" closed" );
  }
}) ;

Thanks.

catch jquery event at AjaxEventBehavior

2011-07-31 Thread Lurtz Nazgul
Hi; 

I used jquery dialog. I can open and close jquery dialog box. I represent 
jquery 
dialog as a panel at wicket side.

My question is how can i catch jquery close event ? 

I tested like below but it doesn't work

dialogConfirmation.add(new AjaxEventBehavior("close") {
  @Override
  protected void onEvent(AjaxRequestTarget target) {
  System.out.println(" closed" );
  }
}) ;

Thanks.

Re: dynamic DataTable

2011-07-21 Thread Lurtz Nazgul
Any simple way ? 

Thanks.




From: Wilhelmsen Tor Iver 
To: "users@wicket.apache.org" 
Sent: Thu, July 21, 2011 3:10:16 PM
Subject: RE: dynamic DataTable

> Since TextArea can contain any SELECT statement, Column names, count can  
>change 
>
> every time. So I need a dynamic table that is compatible to view  any SELECT 
> Statement result.

Since you appear to have no need for performing updates or inserts, try 
ditching 
the DataTable in favour of using nested repeaters over the ResultSetMetaData 
column info and ResultSet rows instead.

- Tor Iver

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

dynamic DataTable

2011-07-21 Thread Lurtz Nazgul
Hi,

How can we create a dynamic DataTable which has dynamic Columns? I want to 
create a page that has following components:
- A TextArea for SQL Statement input (User will type any SELECT Sql here)
- A Submit button to run the SQL
- A Table to view the SQL Resultset.

Since TextArea can contain any SELECT statement, Column names, count can  
change 
every time. So I need a dynamic table that is compatible to view  any SELECT 
Statement result.

How can I simply do this in Wicket?

Thanks a lot,
Regards,

Re: Forward to Bookmarkable

2011-07-21 Thread Lurtz Nazgul
Hi Hans; 

Thanks for your answer

But still url can be seen by the user. 
I need to forward in order to hide the url from user. 

Any idea ?

Thanks.





From: Hans Lesmeister 
To: Wicket Users 
Sent: Thu, July 21, 2011 12:35:21 PM
Subject: Re: Forward to Bookmarkable

You can setResponePage or throw one of the RestartResponse*-Exceptions

Regards
Hans


Am 21.07.11 11:19 schrieb "Lurtz Nazgul" unter :

> I also tried 
> 
> WebRequestCycle cycle = (WebRequestCycle) RequestCycle.get();
> ServletRequest httpRequest =
> cycle.getWebRequest().getHttpServletRequest();
> ServletResponse httpResponse =
> cycle.getWebResponse().getHttpServletResponse();
> ServletContext context = ((WebApplication)
> Application.get()).getServletContext();
> context.getRequestDispatcher("/mywelcome").forward(httpRequest,
> httpResponse);
> 
> where mywelcome url is BookmarkablePage, in MyWebApplication.java
> 
>  this.mountBookmarkablePageWithUrlCoding("/mywelcome", Welcome.class);
> 
> Thanks.
> 
> 
> 
> 
> 
> From: Lurtz Nazgul 
> To: users@wicket.apache.org
> Sent: Thu, July 21, 2011 12:15:19 PM
> Subject: Forward to Bookmarkable
> 
> Hi;
> 
> How can i forward user to a BookmarkablePage.  I don't need redirection. I
> don't 
> 
> want user to see url.
> 
> 
> Thanks.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Re: Forward to Bookmarkable

2011-07-21 Thread Lurtz Nazgul
I also tried 

WebRequestCycle cycle = (WebRequestCycle) RequestCycle.get();
ServletRequest httpRequest = 
cycle.getWebRequest().getHttpServletRequest();
ServletResponse httpResponse = 
cycle.getWebResponse().getHttpServletResponse();
ServletContext context = ((WebApplication) 
Application.get()).getServletContext();
context.getRequestDispatcher("/mywelcome").forward(httpRequest, 
httpResponse);

where mywelcome url is BookmarkablePage, in MyWebApplication.java

 this.mountBookmarkablePageWithUrlCoding("/mywelcome", Welcome.class);

Thanks.




________
From: Lurtz Nazgul 
To: users@wicket.apache.org
Sent: Thu, July 21, 2011 12:15:19 PM
Subject: Forward to Bookmarkable

Hi;

How can i forward user to a BookmarkablePage.  I don't need redirection. I 
don't 

want user to see url. 


Thanks.

Forward to Bookmarkable

2011-07-21 Thread Lurtz Nazgul
Hi;

How can i forward user to a BookmarkablePage.  I don't need redirection. I 
don't 
want user to see url. 


Thanks.

Re: Generate ajax link

2011-07-14 Thread Lurtz Nazgul
Thanks Martin; but it doesn't make sense to me, sorry.

Wicket generates below code for a simple counter increment example.

 var wcall = 
wicketAjaxGet('?wicket:interface=:2:panel1:okla::IBehaviorListener:0:', 
function() {
}.bind(this), function() {
}.bind(this), function() {
return Wicket.$('okla') != null;
}.bind(this));
return !wcall;

Any suggestions ? 

Thanks.




From: Martin Grigorov 
To: users@wicket.apache.org
Sent: Thu, July 14, 2011 2:46:04 PM
Subject: Re: Generate ajax link

See how AjaxLink generates its markup.

On Thu, Jul 14, 2011 at 2:31 PM, Lurtz Nazgul  wrote:
> I mean; generating ajax link  format
>
> Instead of
>
> 
>
> I want to generate ajax link on the fly
>
> Example :
> increment
>
> Any suggestions ?
>
> Thanks.
>
>
>
>
> 
> From: Andrea Del Bene 
> To: users@wicket.apache.org
> Sent: Thu, July 14, 2011 2:00:32 PM
> Subject: Re: Generate ajax link
>
> Hi,
>
> you can use Loop component to generate a dynamic number of links. For example:
>
>
>
> HTML code:
>
> 
> 
> 
> 
> 
>
>
>
> Java  code:
>
>
> List linkList = ...
> Loop loop = new Loop("itemList", linkList.size()) {
>@Override
>protected void populateItem(LoopItem item) {
>AbstractLink curLink = linkList.get(item.getIndex());
>item.add(curLink);
>}
>};
>
>
>
>> Hi all;
>>
>> I can generate normal links in to my dynamic menu
>>
>> 
>> ...
>>
>> I wonder if i can generate those links in ajax link format ?
>>
>> Thanks.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org



-- 
Martin Grigorov
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

Re: Generate ajax link

2011-07-14 Thread Lurtz Nazgul
I mean; generating ajax link  format

Instead of 



I want to generate ajax link on the fly 

Example : 
increment

Any suggestions ?

Thanks.





From: Andrea Del Bene 
To: users@wicket.apache.org
Sent: Thu, July 14, 2011 2:00:32 PM
Subject: Re: Generate ajax link

Hi,

you can use Loop component to generate a dynamic number of links. For example:



HTML code:









Java  code:


List linkList = ...
Loop loop = new Loop("itemList", linkList.size()) {
@Override
protected void populateItem(LoopItem item) {
AbstractLink curLink = linkList.get(item.getIndex());
item.add(curLink);
}
};



> Hi all;
> 
> I can generate normal links in to my dynamic menu
> 
> 
> ...
> 
> I wonder if i can generate those links in ajax link format ?
> 
> Thanks.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Generate ajax link

2011-07-14 Thread Lurtz Nazgul
Hi all;

I can generate normal links in to my dynamic menu


...

I wonder if i can generate those links in ajax link format ?

Thanks.