Re: ModalWindow and OnDomReady

2016-10-20 Thread Rob Audenaerde
It is the Panel that I put on the ModalWindow.

On Wed, Oct 19, 2016 at 7:56 PM, Martin Grigorov 
wrote:

> Hi,
>
> It depends on what you add the OnDomReady header item.
> Is it the ModalWindow ? Or its content (Panel or Page) ?
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Oct 19, 2016 at 5:06 PM, Rob Audenaerde 
> wrote:
>
> > Hi all,
> >
> > I have a panel that needs some JavaScript for sizing etc. to run after a
> > ModalWindow is shown, but as I now see it the Javascript is run *before*
> > the modal window is shown.
> >
> > What is the proper way to run javascript after a ModalWindow is shown? It
> > seems OnDomReady is not sufficient here?
> >
> > Thanks,
> >
> > Rob
> >
>


Re: ModalWindow and OnDomReady

2016-10-20 Thread Ernesto Reinaldo Barreiro
is this panel initially added to the mcdal? When page is created?

On Thu, Oct 20, 2016 at 10:13 AM, Rob Audenaerde 
wrote:

> It is the Panel that I put on the ModalWindow.
>
> On Wed, Oct 19, 2016 at 7:56 PM, Martin Grigorov 
> wrote:
>
> > Hi,
> >
> > It depends on what you add the OnDomReady header item.
> > Is it the ModalWindow ? Or its content (Panel or Page) ?
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Wed, Oct 19, 2016 at 5:06 PM, Rob Audenaerde <
> rob.audenae...@gmail.com>
> > wrote:
> >
> > > Hi all,
> > >
> > > I have a panel that needs some JavaScript for sizing etc. to run after
> a
> > > ModalWindow is shown, but as I now see it the Javascript is run
> *before*
> > > the modal window is shown.
> > >
> > > What is the proper way to run javascript after a ModalWindow is shown?
> It
> > > seems OnDomReady is not sufficient here?
> > >
> > > Thanks,
> > >
> > > Rob
> > >
> >
>



-- 
Regards - Ernesto Reinaldo Barreiro


Re: 8.0.0-M1 MarkupNotFoundException

2016-10-20 Thread Andrea Del Bene
That's strange...you should be able to create issues as you belong to  
jira-users group:


https://issues.apache.org/jira/plugins/servlet/project-config/WICKET/permissions

Which is exactly the problem or the error you get?


On 19/10/2016 02:40, greg.johnson wrote:

sure,

i don't seem to have permission in jira to create an issue, am i missing
something?
username: gregjohnson

thanks

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/8-0-0-M1-wicket-link-MarkupNotFoundException-tp4675812p4675828.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




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



Re: 8.0.0-M1 MarkupNotFoundException

2016-10-20 Thread Greg Johnson
Create link missing from home page (MacOs 10.12 Safari 10.0) …

Found a “create” link in the help docs …

Created WICKET-6256

Regards, Greg Johnson

> On 20 Oct. 2016, at 19:47, Andrea Del Bene  wrote:
> 
> That's strange...you should be able to create issues as you belong to  
> jira-users group:
> 
> https://issues.apache.org/jira/plugins/servlet/project-config/WICKET/permissions
> 
> Which is exactly the problem or the error you get?
> 
> 
> On 19/10/2016 02:40, greg.johnson wrote:
>> sure,
>> 
>> i don't seem to have permission in jira to create an issue, am i missing
>> something?
>> username: gregjohnson
>> 
>> thanks
>> 
>> --
>> View this message in context: 
>> http://apache-wicket.1842946.n4.nabble.com/8-0-0-M1-wicket-link-MarkupNotFoundException-tp4675812p4675828.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
>> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 



smime.p7s
Description: S/MIME cryptographic signature


Re: 8.0.0-M1 MarkupNotFoundException

2016-10-20 Thread greg.johnson
Created WICKET-6256 ...

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/8-0-0-M1-wicket-link-MarkupNotFoundException-tp4675812p4675852.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: 8.0.0-M1 MarkupNotFoundException

2016-10-20 Thread Andrea Del Bene

Ok thank you!

Andrea.


On 20/10/2016 12:07, Greg Johnson wrote:

Create link missing from home page (MacOs 10.12 Safari 10.0) …

Found a “create” link in the help docs …

Created WICKET-6256

Regards, Greg Johnson


On 20 Oct. 2016, at 19:47, Andrea Del Bene  wrote:

That's strange...you should be able to create issues as you belong to  
jira-users group:

https://issues.apache.org/jira/plugins/servlet/project-config/WICKET/permissions

Which is exactly the problem or the error you get?


On 19/10/2016 02:40, greg.johnson wrote:

sure,

i don't seem to have permission in jira to create an issue, am i missing
something?
username: gregjohnson

thanks

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/8-0-0-M1-wicket-link-MarkupNotFoundException-tp4675812p4675828.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



-
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: Check Group selected items called from other form loses the checked values

2016-10-20 Thread Francois Meillet
Hi,

Use a ListView.

The model of the second form is not updated until the form is submitted.
You need to perform a submit if you want to see this model updated, and the 
correct value for tst.getCheckedTestBeans().size().

If you want to avoid the manual submit phase, you need to use Ajax.

Please find here your code slightly modified.

TestPage
http://pastebin.com/DYNpeZLt
TestPage.html
http://pastebin.com/gFa6Z5ZS
ModelForForm
http://pastebin.com/EhjezBWJ
Wrapper
http://pastebin.com/8B7n68VH


François




> Le 20 oct. 2016 à 08:38, ganea iulia  a écrit :
> 
> Hello, Thank you for the samples.
> But I will explain again what I have:
> 
> I have two forms on my page.
> In the bottom form I have a RefreshingView component, with check all
> checkbox in the header, and check components for each items.
> In the top form there is a link, where I need to get the checked items from
> the second form (the bottom form);
> 
> This is what I have done:
> For checkAll and the individual checks I have used CheckGroup,
> CheckGroupSelector and Check.
> 
> The issue is that because the refreshing view refreshes the model at every
> server roundtrip, when I check on item, the check doesn't maintain it's
> value, because it receives every time a new model.
> 
> So this bit from the RefreshingView always returns a new model which makes
> the checks to dissapera:
> @Override
> protected Iterator> getItemModels() {
> List lst = SpringCtx.getAppDB(TestBeanDao.class).selectAll();
> List> models = new ArrayList>();
> for (TestBean tstSN:lst) {
> IModel modTst = new Model(tstSN);
> models.add(modTst);
> }
> return models.iterator();
> }
> 
> 
> Isn;t there any way that I can still use the CheckGroup and Check
> components? As this comes easy when it is needed a CheckAll functionality.
> 
> Thank you
> 
> Here is the code:
> 
> =Java code=
> 
> private static final long serialVersionUID = 311508940740808005L;
> private static final Logger logger = LogManager.getLogger(TestPage.class);
> private TestForm tst;
> public TestPage(IModel model) {
> super(model);
> 
> TestForm0 tst0 = new TestForm0("testForm0");
> tst0.setOutputMarkupId(true);
> add(tst0);
> tst = new TestForm("testForm", model);
> tst.setOutputMarkupId(true);
> add(tst);
> 
> 
> }
> 
> class TestForm0 extends Form {
> 
> /**
> *
> */
> private static final long serialVersionUID = 1L;
> 
> public TestForm0(String id) {
> super(id);
> 
> Link print = new Link("print") {
> private static final long serialVersionUID = 15L;
> 
> @Override
> public void onClick() {
> System.out.println("size=" + tst.getCheckedTestBeans().size());
> }
> };
> add(print);
> }
> }
> class TestForm extends Form {
> /**
> *
> */
> private static final long serialVersionUID = 1L;
> 
> private List checkedTestBeans;
> public List getCheckedTestBeans() {
> return checkedTestBeans;
> }
> 
> public void setCheckedTestBeans(List checkedTestBeans) {
> this.checkedTestBeans = checkedTestBeans;
> }
> 
> public TestForm(String id, IModel model) {
> super(id, model);
> 
> checkedTestBeans = new ArrayList();
> TextField txtName = new TextField("txtName", new
> PropertyModel(getModelObject(), "name"));
> add(txtName);
> txtName.setOutputMarkupId(true);
> txtName.add(new AjaxFormComponentUpdatingBehavior("change") {
> private static final long serialVersionUID = 1654345477970524731L;
> 
> @Override
> protected void onUpdate(AjaxRequestTarget target) {
> target.add(txtName);
> }
> 
> });
> 
> ///
> CheckGroup group = new CheckGroup("group1",
> checkedTestBeans);
> group.setOutputMarkupId(true);
> group.add(new AjaxFormChoiceComponentUpdatingBehavior() {
> private static final long serialVersionUID = 1654345477970524731L;
> 
> @Override
> protected void onUpdate(AjaxRequestTarget target) {
> target.add(group);
> }
> 
> });
> CheckGroupSelector cgs = new CheckGroupSelector("allCheck1");
> group.add(cgs);
> final WebMarkupContainer itemsContainer = new
> WebMarkupContainer("itemsContainer1");
> itemsContainer.setOutputMarkupId(true);
> itemsContainer.add(new RefreshingView("forEachItem1") {
> /**
> *
> */
> private static final long serialVersionUID = 1L;
> @Override
> protected Iterator> getItemModels() {
> List lst = SpringCtx.getAppDB(TestBeanDao.class).selectAll();
> List> models = new ArrayList>();
> for (TestBean tstSN:lst) {
> IModel modTst = new Model(tstSN);
> models.add(modTst);
> }
> return models.iterator();
> }
> 
> @Override
> protected void populateItem(Item item) {
> 
>  item.add(new Label("itemName", new
> PropertyModel(item.getModel(), "name")));
>  item.add(new Label("itemCode", new
> PropertyModel(item.getModel(), "code")));
>  item.add(new Label("itemId", new PropertyModel(item.getModel(),
> "id")));
>  Check chk = new Check("itemCheck", item.getModel(),
> group);
> 
>  item.add(chk);
> }
>  });
> group.add(itemsContainer);
> add(group);
> }
> 
> @Override
> protected void onSubmit() {
> 
> logger.info ("OnSubmit");
> System.out.println("size=" + checkedTestBeans.size())

Re: ModalWindow and OnDomReady

2016-10-20 Thread Rob Audenaerde
The panel is created and added with setContent just before the modal window
is shown.

On Oct 20, 2016 10:40 AM, "Ernesto Reinaldo Barreiro" 
wrote:

> is this panel initially added to the mcdal? When page is created?
>
> On Thu, Oct 20, 2016 at 10:13 AM, Rob Audenaerde  >
> wrote:
>
> > It is the Panel that I put on the ModalWindow.
> >
> > On Wed, Oct 19, 2016 at 7:56 PM, Martin Grigorov 
> > wrote:
> >
> > > Hi,
> > >
> > > It depends on what you add the OnDomReady header item.
> > > Is it the ModalWindow ? Or its content (Panel or Page) ?
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Wed, Oct 19, 2016 at 5:06 PM, Rob Audenaerde <
> > rob.audenae...@gmail.com>
> > > wrote:
> > >
> > > > Hi all,
> > > >
> > > > I have a panel that needs some JavaScript for sizing etc. to run
> after
> > a
> > > > ModalWindow is shown, but as I now see it the Javascript is run
> > *before*
> > > > the modal window is shown.
> > > >
> > > > What is the proper way to run javascript after a ModalWindow is
> shown?
> > It
> > > > seems OnDomReady is not sufficient here?
> > > >
> > > > Thanks,
> > > >
> > > > Rob
> > > >
> > >
> >
>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>


Re: 8.0.0-M1 MarkupNotFoundException

2016-10-20 Thread Greg Johnson
Hi Martin,

This is supposed to be a trivial menu/content replacement system that runs 
http://www.willinge.com.au, the architecture may very well be flawed :-)

The quickstart at  http://anekol.com/pub/myproject2.zip is a cutdown version of 
the website (images removed etc) for you to see the big picture.

Even if the architecture is flawed, it's still been running this trivial 
website successfully for years, a testament to Wicket :-)

I would of course appreciate your advice on what the architecture should look 
like if you ever ran out of more important things on your list to do :-)

With many years of IT experience, the very early versions of Wicket came to our 
notice as a high integrity framework and it continues to be a delight to watch 
the continuing success fo those who truly understand what it takes to build and 
deploy critical enterprise infrastructure. Congratulations.

Regards,
Greg Johnson

> On 18 Oct. 2016, at 05:58, Martin Grigorov  wrote:
> 
> Hi Greg,
> 
> What is the idea behind:
> 
> com/mycompany/AboutMenu$Overview.html (a Panel) containing just:
> 
> 
>Some Text
> 
> 
> 
> The full HTML produced by the home page is:
> 
> 
> 
> 
> http://localhost:8080/?5-1.-menu-items-0-item-link>">
> Overview
> 
> 
> 
> 
> 
> 
> 
> 
> Some Text
> 
> 
> 
> 
> 
> 
> It is totally incorrect!
> 
> 
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
> On Mon, Oct 17, 2016 at 1:19 AM, Greg Johnson 
> wrote:
> 
>> Hi, the example is a very basic “menu” example where on menu select main
>> content is changed.
>> 
>> From the attached quickstart …
>> * run Start.java
>> * localhost:8080/ - Home Page displays
>> * Press browser refresh - Home Page displays
>> * Press browser refresh - MarkupNotFoundException: Markup not found for
>> Component: [TransparentWebMarkupContainer [Component id = wicket_link1]]
>> 
>> if the  tags are removed there is no problem. Note that there
>> are no links, it is just the mere presence of the  tags that
>> seems to cause the problem.
>> Perhaps the architecture is flawed, however it is not clear to me why it
>> only fails on the 3rd render.
>> 
>> Any help would be appreciated, thanks.
>> 
>> Regards, Greg Johnson
>> 
>> 
>> 
>> 
>> 


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



Re: 7.3 : javascript attached to extended AjaxButton

2016-10-20 Thread sorinev
1. We extend AjaxButton.
2. In renderHead(), we do a JavaScriptReferenceHeaderItem with a
JavaScriptResourceReference that has a javascript file that is local to our
class.
3. Inside the javascript file there is a yahoo widget panel that does this:
panel.setBody(" <\"images/ajax-loader.gif\"> ").

So it appears to be resolved relative to the page. I've tried many different
ways to load an image, but they mostly seem to rely on manually adding a
html tag in the file and giving it a wicket:id, but this image is not loaded
in the standard wicket component way.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/7-3-javascript-attached-to-extended-AjaxButton-tp4675692p4675858.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: Wicket Appl - Cleanup & Scale

2016-10-20 Thread fzb
Thanks Martin for the reply. Very much answers the questions i had asked.
Will try the suggestions and post update here. 

- fzb




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Appl-Cleanup-Scale-tp4675820p4675859.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