Re: how to create DISQUS like web widgets that can be deployed to third party web pages

2012-04-23 Thread bad boy
Iframe does work but it is not an elegant solution

I guess I would to generate UI based on Javascript and use Wicket only as a 
JSON  Remote datasource for Jquery based widgets.


Thanks for the clarification

-B



- Original Message -
From: Dan Retzlaff 
To: users@wicket.apache.org; bad boy 
Cc: 
Sent: Monday, April 23, 2012 9:28 PM
Subject: Re: how to create DISQUS like web widgets that can be deployed to 
third party web pages

That approach is not a conventional use of Wicket AJAX, and I think it
would be very tricky. Can you have your partner host an IFRAME, populated
from your site with a Wicket page? That page can then easily host
repeaters, AJAX links, and panels.

Dan

On Mon, Apr 23, 2012 at 5:42 PM, bad boy  wrote:

> Hi  all
>
> I am looking at a scenario where some of my partner web sites would like
> to show some panels from my wicket application much like DISQUS or
> IntenseDebate.
>
> My wicket web application would run on my domain.
>
> My partners page would be on his domain
>
> The partner would have page with an onLoad(){} javascript script ; I want
> to put AjaxBehavior code in this javascript that would  call my wicket
> application which could send my wicket panel serialized to a string to the
> caller javascript . This way the partner web page would be able to display
> my wicket panels. My wicket panel would only contain AjaxLinks that would
> refresh / redraw the panel as necessary by adding / removing child
> components
>
> Is this possible ? Can I create a AjaxBehavior that can return a Panel
> serialized  to an HTML string that can be then written to the DOM of the
> caller HTML page.
>
>
> Regards
>
> -
> 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



how to create DISQUS like web widgets that can be deployed to third party web pages

2012-04-23 Thread bad boy
Hi  all

I am looking at a scenario where some of my partner web sites would like to 
show some panels from my wicket application much like DISQUS or IntenseDebate.

My wicket web application would run on my domain.

My partners page would be on his domain

The partner would have page with an onLoad(){} javascript script ; I want to 
put AjaxBehavior code in this javascript that would  call my wicket application 
which could send my wicket panel serialized to a string to the caller 
javascript . This way the partner web page would be able to display my wicket 
panels. My wicket panel would only contain AjaxLinks that would refresh / 
redraw the panel as necessary by adding / removing child components

Is this possible ? Can I create a AjaxBehavior that can return a Panel 
serialized  to an HTML string that can be then written to the DOM of the caller 
HTML page. 


Regards

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



UploadProgressBar not updating with with ajaxbutton form submit

2012-02-24 Thread bad boy


Hi 

When I submit the form with ajax button, the progress upload  bar is not 
getting  updated with progress. When I submit the same file with the non ajax 
button , the progress bar gets updated correctly. The file is uploaded 
correctly in both cases. I have configure the  webrequest in the wicket 
aplication as

 */
@Override
protected WebRequest newWebRequest(HttpServletRequest servletRequest)
{
return new UploadWebRequest(servletRequest);
}



I attached the  progrss bar as follows :

  final FileUploadForm ajaxSimpleUploadForm = new 
FileUploadForm("ajax-simpleUpload");
  ajaxSimpleUploadForm.addOrReplace(new UploadProgressBar("progress", 
ajaxSimpleUploadForm));

I am using wicket  1.4.18. This is my form




 --
 --               
 --                   
 --                       Upload form with ajax progress bar
 --                       
 --                           File
 --                           
 --                           
 --                       
 --                       
 --                        
 --                       [[ajax upload 
progressbar]]
 --                   
 --                   
 --               


Thanks
badami

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



Re: Wicket Wizard -- how to force a wizardstep to redraw or refresh

2011-10-03 Thread bad boy
Hi Sven
Thanks a lot for your help. That worked !!

Regards



- Original Message -
From: Sven Meier <s...@meiers.net>
To: users@wicket.apache.org
Cc: 
Sent: Monday, October 3, 2011 3:18 PM
Subject: Re: Wicket Wizard -- how to force a wizardstep to redraw or refresh

Hi,

you could move you fragment setup into onBeforeRender():

  if (abModel.getObject().getQryType() == 1 &&
!(EasyQueryFragment.class.isInstance(get("querySpan"))) {
     addOrReplace(new EasyQueryFragment("querySpan",
"easyQueryFragment", abModel));
  } else ...

Sven

On 10/03/2011 06:54 PM, bad boy wrote:
>         if (abModel.getObject().getQryType() == 1) {
>             add(new EasyQueryFragment("querySpan", 
"easyQueryFragment", abModel));
>         } else if (abModel.getObject().getQryType() == 2) {
>             add(new AdvancedQueryFragment("querySpan", 
"advancedQueryFragment", abModel));
>         } else if (abModel.getObject().getQryType() == 3) {
>             add(new LuQueryFragment("querySpan", 
"luQueryFragment", abModel));
>         } else {
>             add(new EmptyPanel("querySpan"));
>         }

-
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



Wicket Wizard -- how to force a wizardstep to redraw or refresh

2011-10-03 Thread bad boy
Hi

I have a wicket wizard with 5 steps and in the confirmation  step, I have a 
panel which contains 3 Fragments.

This panel will render one of these fragments based on the  state of the Model. 
The problem is the that this panel is getting cached wen the wizard model is 
initialized .

Is it possible to force the wizard step which contains this panel to reload or 
refresh.


// this is the wizard step
  */
    public AlertQryConfirmationStep(final IModel abModel) {
        setDefaultModel(abModel);
        
        
        setTitleModel(new ResourceModel("confirmation.title"));
       add(new QryDisplayPanel("qryDisplayPanel", abModel));
        
       


    }



// this is the pane code
   public QryDisplayPanel(String idm, IModel abModel) {

        super(idm);
        logger.info("QryDisplayPanel -- -- QryType : " + 
abModel.getObject().getQryType());
        setDefaultModel(abModel);

        if (abModel.getObject().getQryType() == 1) {
            add(new EasyQueryFragment("querySpan", "easyQueryFragment", 
abModel));
        } else if (abModel.getObject().getQryType() == 2) {
            add(new AdvancedQueryFragment("querySpan", "advancedQueryFragment", 
abModel));
        } else if (abModel.getObject().getQryType() == 3) {
            add(new LuQueryFragment("querySpan", "luQueryFragment", abModel));
        } else {
            add(new EmptyPanel("querySpan"));
        }
    }


Thanks for your hep

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



Wicket Wizard -- How to jump back to a wizard step from outside the wizard

2011-09-30 Thread bad boy
Hi

I  am creating a  wicket wizard  based workflow and in one of the steps, I ask 
the user to authenticate via Facebook connect /OAUTH.  The Facebook api enables 
me to provide return URL where Facebook redirects the user after successful 
authentication.

The user returns to my application  and now I want to enable  him/her  to jump 
to the step in the wizard where he/she  was  before going to Facebook.

How do I make this happen ? 

Regards
Badami 

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



Re: how to implement a Form with Ajax Paginated List of Checkboxes?

2011-08-10 Thread bad boy
AjaxFormChoiceComponentUpdatingBehavior did not work. For some reason ir would 
only ccept the first checkbox.  when I checked  say 5 checkboxe, it would only 
remember the first fone


But changing Check to AjaxCheckBox worked perfectly.


Thanks





- Original Message -
From: Martin Grigorov 
To: users@wicket.apache.org; bad boy 
Cc: 
Sent: Wednesday, August 10, 2011 7:35 AM
Subject: Re: how to implement a Form with Ajax Paginated List of Checkboxes?

Add AjaxFormChoiceComponentUpdatingBehavior to the CheckGroup

On Wed, Aug 10, 2011 at 4:38 AM, bad boy  wrote:
> On my Wicket page, I have a form with a couple of TextFields and a paginated 
> List of Checkboxes implemented with Dataview and and a sortable data 
> provider.  The ajax pagination of the dataview works fine.
>
> The problem is that when I select a few items on Page 1 and then go to Page 2 
> and then return to Page 1 using the AjaxPagingNavigator, the selection is 
> lost : the items that were checked on Page 1 initially do no have the "check 
> mark" anymore.
>
> What should I do so that the items that were selected on a page of Dataview 
> do not get lost when the AjaxPagnigaion is used to traverse the pages of the 
> Dataview ?
>
>
>
> public final class AjaxFormWithPaginatedCheckBoxPage extends BasePage {
>
> static Logger logger = 
> Logger.getLogger(AjaxFormWithPaginatedCheckBoxPage.class);
> private Person person = new Person();
> int counter = 0;
>
> WebMarkupContainer webMC;
> static List pList=Person.getPersons(100);
> int maxListCount=5;
> DataView dv;
> CheckGroup group;
> public AjaxFormWithPaginatedCheckBoxPage() {
>     super();
>     final Form form = new Form("form", new CompoundPropertyModel(person)) {
>
>         protected void onSubmit() {
>             logger.info("form recived");
>             logger.info(" person name " + person.getName());
>
>             setResponsePage(new AjaxTogglePanelTestPage());
>         }
>     };
>     final TextField name = new TextField("name");
>     final TextField age = new TextField("age");
>     form.add(name);
>     form.add(age);
>
>
>     group=new CheckGroup("group", new ArrayList());
>     form.add(group);
>
>     webMC= new WebMarkupContainer("webMC");
>     webMC.setOutputMarkupId(true);
>
>
>     SortablePersonDataProvider personDataProvider=new 
> SortablePersonDataProvider(pList);
>     dv = new DataView("persons", personDataProvider) {
>
>         @Override
>         protected void populateItem(Item item) {
>             item.add(new Check("check", item.getModel()));
>
>             item.add(new Label("id", new PropertyModel(item.getModel(), 
> "id")));
>             item.add(new Label("name", new PropertyModel(item.getModel(), 
> "name")));
>             item.add(new Label("age", new PropertyModel(item.getModel(), 
> "age")));
>         }
>
>
>     };
>     dv.setItemsPerPage(maxListCount);
>
>
>     webMC.add(new AjaxFallbackOrderByBorder("orderByID", "id", 
> personDataProvider)
>     {
>         @Override
>         protected void onSortChanged()
>         {
>             dv.setCurrentPage(0);
>         }
>
>         @Override
>         protected void onAjaxClick(AjaxRequestTarget target) {
>             target.addComponent(webMC);
>         }
>     });
>
>     webMC.add(new AjaxFallbackOrderByBorder("orderByName", "name", 
> personDataProvider)
>     {
>         @Override
>         protected void onSortChanged()
>         {
>             dv.setCurrentPage(0);
>         }
>
>         @Override
>         protected void onAjaxClick(AjaxRequestTarget target) {
>             target.addComponent(webMC);
>         }
>     });
>     webMC.add(new AjaxFallbackOrderByBorder("orderByAge", "age", 
> personDataProvider)
>     {
>         @Override
>         protected void onSortChanged()
>         {
>             dv.setCurrentPage(0);
>         }
>
>         @Override
>         protected void onAjaxClick(AjaxRequestTarget target) {
>             target.addComponent(webMC);
>         }
>     });
>
>
>     webMC.add(dv);
>     webMC.add(new AjaxPagingNavigator("navigator",dv));
>     group.add(webMC);
>
>     AjaxButton ab = new AjaxButton("ajax-button", new 
> PropertyModel(this,
>             "counter"), form) {
>
>         @Override
>         protected void onSubmit(AjaxRequestTarget target, Form form) {
>             counter++;
>             logg

how to implement a Form with Ajax Paginated List of Checkboxes?

2011-08-09 Thread bad boy
On my Wicket page, I have a form with a couple of TextFields and a paginated 
List of Checkboxes implemented with Dataview and and a sortable data provider.  
The ajax pagination of the dataview works fine.

The problem is that when I select a few items on Page 1 and then go to Page 2 
and then return to Page 1 using the AjaxPagingNavigator, the selection is lost 
: the items that were checked on Page 1 initially do no have the "check mark" 
anymore. 

What should I do so that the items that were selected on a page of Dataview do 
not get lost when the AjaxPagnigaion is used to traverse the pages of the 
Dataview ?



public final class AjaxFormWithPaginatedCheckBoxPage extends BasePage {

static Logger logger = 
Logger.getLogger(AjaxFormWithPaginatedCheckBoxPage.class);
private Person person = new Person();
int counter = 0;

WebMarkupContainer webMC;
static List pList=Person.getPersons(100); 
int maxListCount=5;
DataView dv;
CheckGroup group;
public AjaxFormWithPaginatedCheckBoxPage() {
    super();
    final Form form = new Form("form", new CompoundPropertyModel(person)) {

        protected void onSubmit() {
            logger.info("form recived");
            logger.info(" person name " + person.getName());

            setResponsePage(new AjaxTogglePanelTestPage());
        }
    };
    final TextField name = new TextField("name");
    final TextField age = new TextField("age");
    form.add(name);
    form.add(age);


    group=new CheckGroup("group", new ArrayList());        
    form.add(group);

    webMC= new WebMarkupContainer("webMC");
    webMC.setOutputMarkupId(true);


    SortablePersonDataProvider personDataProvider=new 
SortablePersonDataProvider(pList);
    dv = new DataView("persons", personDataProvider) {

        @Override
        protected void populateItem(Item item) {
            item.add(new Check("check", item.getModel()));

            item.add(new Label("id", new PropertyModel(item.getModel(), 
"id")));                
            item.add(new Label("name", new PropertyModel(item.getModel(), 
"name")));                
            item.add(new Label("age", new PropertyModel(item.getModel(), 
"age")));                
        }


    };
    dv.setItemsPerPage(maxListCount);


    webMC.add(new AjaxFallbackOrderByBorder("orderByID", "id", 
personDataProvider)
    {
        @Override
        protected void onSortChanged()
        {
            dv.setCurrentPage(0);
        }

        @Override
        protected void onAjaxClick(AjaxRequestTarget target) {
            target.addComponent(webMC);
        }
    });

    webMC.add(new AjaxFallbackOrderByBorder("orderByName", "name", 
personDataProvider)
    {
        @Override
        protected void onSortChanged()
        {
            dv.setCurrentPage(0);
        }

        @Override
        protected void onAjaxClick(AjaxRequestTarget target) {
            target.addComponent(webMC);
        }
    });
    webMC.add(new AjaxFallbackOrderByBorder("orderByAge", "age", 
personDataProvider)
    {
        @Override
        protected void onSortChanged()
        {
            dv.setCurrentPage(0);
        }

        @Override
        protected void onAjaxClick(AjaxRequestTarget target) {
            target.addComponent(webMC);
        }
    });


    webMC.add(dv);        
    webMC.add(new AjaxPagingNavigator("navigator",dv));
    group.add(webMC);

    AjaxButton ab = new AjaxButton("ajax-button", new 
PropertyModel(this,
            "counter"), form) {

        @Override
        protected void onSubmit(AjaxRequestTarget target, Form form) {
            counter++;
            logger.info("ajx form recived");
            logger.info("ajx person name " + person.getName());

            target.addComponent(this);

        }
    };
    form.add(ab);
    form.setDefaultButton(ab);

    add(form);        
}
}

Thanks
Badmash

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