Wicket 8 and Edge : Known compatibilities problem ?

2019-01-24 Thread andre seame
Hello,

I have a wicket application that is Ok with Mozilla.
My company will to use windows 10 and Edge. I did some test and I have an error 
message : You need a new application to see this page.

Is this a know bug for edge ? A bad configuration of my HTML code ? a New 
security option of the network administrator that would say "Edge is not 
allowed on internal intranet network" ?

Thanks,



RE: hyperlink to a file on the server but ouside of the wicket war ? (solved)

2016-10-07 Thread andre seame
Thanks,


Other solution.


In the wiceket code : for a file in 
\\myserver\TestResults\A\B\image_timestamp.png. transform it in 
http://mysserver:8080/testresults/A/B/image_timestamp.png<https://outlook.live.com/owa/%5C%5Cmyserver%5CTestResults%5CA%5CB%5Cimage_timestamp.png.>


Add this hyperling in your Wicket page.


see 
http://stackoverflow.com/questions/9434964/tomcat-mapping-context-via-server-xml
 or 
http://stackoverflow.com/questions/1812244/simplest-way-to-serve-static-data-from-outside-the-application-server-in-a-java).
 The idea is to use tomcat as a file server.


So in my apache-tomcat/conf/localhost forlder (I create the localhost folder), 
I add a file : Access_to_testresults.xml



https://outlook.live.com/owa/%5C%5Cmyserver%5CTestResults%5CA%5CB%5Cimage_timestamp.png.>\"
 path="/testresults" reloadable="false">




Then I can access to all hyperlinks and read image, text, ... without any Java 
code.



Thanks.




De : Martin Grigorov <martin.grigo...@gmail.com>
Envoyé : jeudi 6 octobre 2016 02:40
À : users@wicket.apache.org
Objet : Re: hyperlink to a file on the server but ouside of the wicket war ?

Hi,

See ResourceLink component.

On Oct 5, 2016 6:18 PM, "andre seame" <andre1...@hotmail.fr> wrote:

> Hello,
>
>
> I have a windows server with TOMCAT and a wicket application in
> d:\apache-tomcat\webapps\mywcketapplication.war
>
>
> On this server, I have a shared disk where someone has put
> \\myserver\TestResults\image_timestamp.png.
>
>
> The wicket application can access to the file throught :
> d:/TestRsults/image_timestamp.png
>
>
> I would like to add in a wicket page a hyperlink to image_timestamp.png.
> My first (very stupid) idea was to set  href="d:/TestRsults/image_timestamp.png"
> ...
>
>
> Questions are :
>
>   *   What is the hyperlink ?
>   *   Must I configure tomcat to access to d:\result ?
>   *   Must I configure the wicket application to access to the file ?
>
>
> Thanks,
>
> PHL.
>


hyperlink to a file on the server but ouside of the wicket war ?

2016-10-05 Thread andre seame
Hello,


I have a windows server with TOMCAT and a wicket application in 
d:\apache-tomcat\webapps\mywcketapplication.war


On this server, I have a shared disk where someone has put 
\\myserver\TestResults\image_timestamp.png.


The wicket application can access to the file throught : 
d:/TestRsults/image_timestamp.png


I would like to add in a wicket page a hyperlink to image_timestamp.png. My 
first (very stupid) idea was to set 

RE: Having an array that manage the header raw and cells or adding colunm action to a cell array ?

2016-08-29 Thread andre seame
Hello,


Name + LinkToSortColumn + InputFields for Filtering 

  Date+ LinkToSortColumn + InputFields for Filtering 



Namex2016-08-29

Sorry, you are not allowed to see this 
information


I think that header toolbar, is not the solution, because it is not design to 
have cells.

And I need to have a sort action or a filtering action when I do action on 
header of the associated column.


I don't know if it possible to introduce the notion of "header line" and line 
with DataView or GridView.


Thanks,

PHL.










De : Martin Grigorov <mgrigo...@apache.org>
Envoyé : lundi 29 août 2016 19:56
À : users@wicket.apache.org
Objet : Re: Having an array that manage the header raw and cells or adding 
colunm action to a cell array ?

Hi,

Which component do you use as a repeater ?
Wicket provides DataTable component which can use Toolbars as
headers/footers.
Also DataView and GridView which provide a lot of flexibility in rendering
tabular data.

By the way: when you say "raw" you really mean "row" ;-)

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
[https://pbs.twimg.com/profile_images/498383088007643136/rWBpAHsz_400x400.jpeg]<https://twitter.com/mtgrigorov>

Martin Grigorov (@mtgrigorov) | Twitter<https://twitter.com/mtgrigorov>
twitter.com
The latest Tweets from Martin Grigorov (@mtgrigorov). Funemployed. R guy. 
Freelancer in the Scala/Java/Web/Wicket universe. Bulgaria



On Mon, Aug 29, 2016 at 3:31 PM, andre seame <andre1...@hotmail.fr> wrote:

> Hello,
>
>
> I have already written a HTML page 1 with a repeater that works on line
> level. In the header of the array, I have a complex header, with the name
> of the column, filtering and sorting capabilities. Each line of the array
> has the same number of cells
>
>
> I have already written a HTML page 2 with a repeater that works on cell
> level. So according the type of data, i modify the number of cells (via
> colspan) to have raw with 2 or 4 cells. On this page, there is no header
> for the array repeater.
>
>
> Question is it easy to have an array the manage header and cell :
>
> I would like to have in the header the name of the column, filtering and
> sorting capabilities, but the number of cell varying according the data.
> For instance 2 cells to give the name and the address of people. But only
> one cell to say that you are not granted to consult this people.
>
>
> Perhaps I can do that with  a "cell" array (like my page 2), but how to
> detect in the populate cell that I am on data raw or on header raw ?In
> order words, how to add colunm action to a cell array ? If I click on the
> header of the column, I would like to ordering the full array.
>
>
> Thanks,
>
> PHL
>
>


Having an array that manage the header raw and cells or adding colunm action to a cell array ?

2016-08-29 Thread andre seame
Hello,


I have already written a HTML page 1 with a repeater that works on line level. 
In the header of the array, I have a complex header, with the name of the 
column, filtering and sorting capabilities. Each line of the array has the same 
number of cells


I have already written a HTML page 2 with a repeater that works on cell level. 
So according the type of data, i modify the number of cells (via colspan) to 
have raw with 2 or 4 cells. On this page, there is no header for the array 
repeater.


Question is it easy to have an array the manage header and cell :

I would like to have in the header the name of the column, filtering and 
sorting capabilities, but the number of cell varying according the data. For 
instance 2 cells to give the name and the address of people. But only one cell 
to say that you are not granted to consult this people.


Perhaps I can do that with  a "cell" array (like my page 2), but how to detect 
in the populate cell that I am on data raw or on header raw ?In order words, 
how to add colunm action to a cell array ? If I click on the header of the 
column, I would like to ordering the full array.


Thanks,

PHL



RE: wicket-async-task or asynchronous task with wicket

2016-05-11 Thread andre seame
Hello, 

I found : http://wicketinaction.com that points 
https://github.com/raphw/wicket-async-task. 
Is this code the best way of doing asynchronous code with wicket ? 

Thanks, 
PHL.



De : andre seame <andre1...@hotmail.fr>
Envoyé : mercredi 11 mai 2016 16:25
À : users@wicket.apache.org
Objet : wicket-async-task

Hello,


When loading data from database, I would like to create my own (textual) 
progression bar. I create a small code (from World Clock 
Example<http://examples7x.wicket.apache.org/ajax/world-clock>) that uses ajax. 
The code does not work. In fact, the wicket renderer does not nothing, it waits 
the end of dowloading information from the database. When all data are 
available, the  progress bar works !


Therefore, I create a thread to download the data, but the behavior is the 
same. Nothing happens until the end of datadowloading.


How to do thread in wicket ?

Is there a new implementation of  https://github.com/raphw/wicket-async-task ?

The code was built in 2013!

What is the best way to do thread in wicket ? Does wicket have built-in 
capabilities to manage asynchronous tasks ?


Thanks,

PHL.

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



wicket-async-task

2016-05-11 Thread andre seame
Hello,


When loading data from database, I would like to create my own (textual) 
progression bar. I create a small code (from World Clock 
Example) that uses ajax. 
The code does not work. In fact, the wicket renderer does not nothing, it waits 
the end of dowloading information from the database. When all data are 
available, the  progress bar works !


Therefore, I create a thread to download the data, but the behavior is the 
same. Nothing happens until the end of datadowloading.


How to do thread in wicket ?

Is there a new implementation of  https://github.com/raphw/wicket-async-task ?

The code was built in 2013!

What is the best way to do thread in wicket ? Does wicket have built-in 
capabilities to manage asynchronous tasks ?


Thanks,

PHL.


Easy way to have a progression bar during repeater

2016-05-11 Thread andre seame
Hello,


In first approximation, inDataTableFilterToolbarPage the code is :

1) Get Data from "external Database" (in fact, the example build more or less 
random data) and put in  memory list

2) Use repeater wicket code to display the list to the end user.


Therefore the Wicket Html is just :

[table]


In my case, the reading of the database is very slow (2 to 5 minuts). Of course 
the idea is to do some optimization, but I would like present a progression bar 
to the End user.


How to do that ?

1) Create a Popup ? Is it possible to create a popup that will disappear at the 
end of progression ?

2) Adding a waiting page that will call my "old wicket code" (so use the page 
with the [table])

3) Design the page to have 2 components : 1 waiting component and 1 table 
dataview component ?


How to do that : Ajax code ? Java Thread ?


Is there any pointer in the wicket example ?


Thanks,

PHL.


RE: How to extends repeater.data.table.HeadersToolbar (How to resolve CssAttributeBehavior) ?

2016-04-25 Thread andre seame
Thanks, 

But it no so easy, because the idea is to modify the populateItem of 
refreshingView.

Thanks,
PHL.


De : Sven Meier <s...@meiers.net>
Envoyé : lundi 25 avril 2016 07:22
À : users@wicket.apache.org
Objet : Re: How to extends repeater.data.table.HeadersToolbar (How to resolve 
CssAttributeBehavior) ?

Hi,

HeadersToolbar already creates a RefreshingView in its constructor, you should 
not repeat that.
The following should do:

 public  THHeadersToolbar(final DataTable<T, S> table, final 
ISortStateLocator stateLocator)
 {
 // inherited stuff
 super(table);

 // ... do custom stuff
 }

Have fun
Sven



On 25.04.2016 00:45, andre seame wrote:
> I would like to modify
>
> org.apache.wicket.extensions.markup.html.repeater.data.table.HeadersToolbar.html
>  and 
> org.apache.wicket.extensions.markup.html.repeater.data.table.HeadersToolbar.java.
>
>
> So I would to create myHeadersToolbar that extends 
> org.apache.wicket.extensions.markup.html.repeater.data.table.HeadersToolbar.
>
>
> But, I have a problem :
>
>
> public  THHeadersToolbar(final DataTable<T, S> table, final 
> ISortStateLocator stateLocator)
>   {
>  super(table);
>
>  RefreshingView<IColumn<T, S>> headers = new 
> RefreshingView<IColumn<T, S>>("headers")
>  { 
>
>
>@Override
>  protected void populateItem(Item<IColumn<T, S>> item)
>  {  ...
>  if (column instanceof IStyledColumn)
>  {
>
>CssAttributeBehavior cssAttributeBehavior = new 
> DataTable.CssAttributeBehavior() ...
>
>
> Therefore, Eclipse propose to
>
> import 
> org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable.CssAttributeBehavior;
>
>
> But this fails :
>
>
> Eclipse says : CssAttributeBehavior cannot be resolved to a type
>
>
> And Eclipse is right :
>
>
> public class DataTable<T, S> extends Panel implements IPageableItems
> {
>  static abstract class CssAttributeBehavior extends Behavior
>
>
> How to modify the HeadersToolbar ? Is "extends" the good idea ? Other 
> Solution ?
>
>
> Thanks,
>
> PHL.
>
>
>


-
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 extends repeater.data.table.HeadersToolbar (How to resolve CssAttributeBehavior) ?

2016-04-24 Thread andre seame
I would like to modify

org.apache.wicket.extensions.markup.html.repeater.data.table.HeadersToolbar.html
 and 
org.apache.wicket.extensions.markup.html.repeater.data.table.HeadersToolbar.java.


So I would to create myHeadersToolbar that extends 
org.apache.wicket.extensions.markup.html.repeater.data.table.HeadersToolbar.


But, I have a problem :


public  THHeadersToolbar(final DataTable table, final 
ISortStateLocator stateLocator)
 {
super(table);

RefreshingView> headers = new RefreshingView>("headers")
{ 


  @Override
protected void populateItem(Item> item)
{  ...
if (column instanceof IStyledColumn)
{

  CssAttributeBehavior cssAttributeBehavior = new 
DataTable.CssAttributeBehavior() ...


Therefore, Eclipse propose to

import 
org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable.CssAttributeBehavior;


But this fails :


Eclipse says : CssAttributeBehavior cannot be resolved to a type


And Eclipse is right :


public class DataTable extends Panel implements IPageableItems
{
static abstract class CssAttributeBehavior extends Behavior


How to modify the HeadersToolbar ? Is "extends" the good idea ? Other Solution ?


Thanks,

PHL.




Expected: 'filterForm:tableWithFilterForm:topToolbars:toolbars:3:headers:3:header:blockh:tf_h'. Found with similar names: 'filterForm:tf_h'

2016-04-13 Thread andre seame

Hello,


The error message is:


Unexpected RuntimeException

Last cause: Unable to find component with id 'tf_h' in [WebMarkupContainer 
[Component id = blockh]]
Expected: 
'filterForm:tableWithFilterForm:topToolbars:toolbars:3:headers:3:header:blockh:tf_h'.
Found with similar names: 'filterForm:tf_h'

Markup

The problem is in "file:.../table/HeadersToolbar.html":

 

  


Here is my code (This is the code of Wicket with patches)



The problem is in "file:../table/HeadersToolbar.html":


http://wicket.apache.org;>
   
   
  
  

  
  

  
  
   
   



"file:../WEB-INF/classes/com/thales/orchestra/ivvq/phlof/wicktable/table/HeadersToolbar.java":


@Override

protected void populateItem(Item> item)
 {   final IColumn column = item.getModelObject();

WebMarkupContainer header = new WebMarkupContainer("header") ;

 MyPanelForSortingAndFiltering ps = (MyPanelForSortingAndFiltering ) 
column.getHeader("link") ; // On se pose pas de question on impose que tous 
soit en panelsort

if (ps.isFiltering()) // Add the filter input
{   WebMarkupContainer blockh = new WebMarkupContainer("blockh") ;
header.add(blockh) ;
TextField tf_h = new 
TextField("tf_h",ps.getModelHeader()) ;
blockh.add(tf_h) ;
ps.getFilterForm().add(tf_h) ;  // For understanding purpose
 }
 else
 {   Label  blockh = new Label("blockh","invisible") ;
 header.add(blockh) ; blockh.setVisible(false) ;
  }


  WebMarkupContainer container = null ;
   if (column.isSortable()) // Add the link to sort
{  container = newSortableHeader("container", 
column.getSortProperty(), stateLocator) ; }
else
{  container = new WebMarkupContainer("container") ; }
container.add(new Label("link",ps.getColumnTitle())) ;
header.add(container) ;

if (column instanceof IStyledColumn)
...

item.add(header) ;
item.setRenderBodyOnly(true) ;
}
} ; // End of RefreshingView headers



With this mechanism a column could sortable or not.


No I am trying to add filtering capabilities: The first step is to add a input 
zone in the header of the current column. The second step will to send input 
value to the filter processing.



TEST n°1 : ps.getFilterForm().add(tf_h)


Last cause: Unable to find component with id 'tf_h' in [WebMarkupContainer 
[Component id = blockh]]
Expected: 
'filterForm:tableWithFilterForm:topToolbars:toolbars:3:headers:3:header:blockh:tf_h'.
Found with similar names: 'filterForm:tf_h'


If my undstanding is correct, ps.getFilterForm().add(tf_h) need to have a 
wicket:id like 
filterForm:tableWithFilterForm:topToolbars:toolbars:3:headers:3:header:blockh:tf_h
 for the input field. But, the headerToolbar.java/PopulateItem add the input 
field as a tf_h member of a container.


I don't kown how to resolve this kind of problem.



TEST n°2 : no ps.getFilterForm().add(tf_h)

In this case, the page is on the screen without error. The input field is in 
the appropriate column.


The processing of the form does nothing:

  *   I have to check that input values are send to the processing of the form,
  *   If yes I imagine that I have to do a "mapping" between input value and 
filterform. How to do that ?

Thanks,

PHL.






Test with IMarkupResourceStreamProvider and using IMarkupResourceStreamProvider for input

2016-03-30 Thread andre seame
Hello,

1°) According the advices of this mailing list, I try to use 
IMarkupResourceStreamProvider as described in
https://ci.apache.org/projects/wicket/guide/7.x/guide/single.html#advanced_5

When using something like:

public class AutoMarkupGenPanel extends Panel implements 
IMarkupResourceStreamProvider
 {
public AutoMarkupGenPanel(String id, IModel model)
  {
super(id, model);
}

@Override
public IResourceStream getMarkupResourceStream(MarkupContainer 
container,
Class containerClass)
   {
String markup = "Panel markup";
StringResourceStream resourceStream = new 
StringResourceStream(markup);
return resourceStream;
}
}
I get :
Last cause: Expected to find  in associated markup file. Markup: 
org.apache.wicket.util.resource.StringResourceStream@761796f3:

Misunderstanding or bug in documentation?

2°) If I change the markup to: String markup = " my dynamic code 
";
It is OK.

If I declare class AutoMarkupGenPanel extends Panel as class AutoMarkupGenPanel 
extends Label, it does not work. It seems just as getMarkupResourceStream is 
not called.


3°) I want to have is : ";

It fails:

Root cause:

Unable to find component with id 'dateTo' in [InputText [Component id = after]]
Expected: 
'filterForm:tableWithFilterForm:topToolbars:toolbars:3:headers:6:header:panel:after:dateTo'.
Found with similar names: 'filterForm:dateTo'
 MarkupStream: [markup = 
org.apache.wicket.util.resource.StringResourceStream@3055f58b: 

, index = 1, current =  
'' (line 0, column 0)]
 at 
org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:526)

Is it possible to use IMarkupResourceStreamProvider  in this use case ?


Thanks for any idea or pointers.

PHL.



RE: HTML markup file generated by code or HTML markup file with parameter

2016-03-26 Thread andre seame
Hello, 

I have not test your suggestion, I need to add "reference or wicket id" in the 
HTML Markup, like : 


So the wicket engine have to do a link between thr input filed10 with a Java 
object. 

I think, this will be more complex as add "
Envoyé : vendredi 25 mars 2016 11:36
À : users@wicket.apache.org
Objet : Re: HTML markup file generated by code or HTML markup file with 
parameter

https://ci.apache.org/projects/wicket/guide/7.x/guide/single.html#advanced_5

On 25/03/2016 12:24, Ernesto Reinaldo Barreiro wrote:
> IMarkupResourceStreamProvider?
>
> On Fri, Mar 25, 2016 at 12:19 PM, andre seame <andre1...@hotmail.fr> wrote:
>
>> Hello,
>>
>> Question?
>> I would like to create a component.java that is associated to a HTML
>> markup file component.html, but a part of the markup file must be dynamic.
>>
>> Why?
>> A standard form is associated to a HTML markup file like:
>> 
>> ...
>> 
>> ...
>> 
>> ..
>> 
>> ...
>> But, I would like to group the input fields with other information,
>> therefore I create panels. So my form is now associated to a HTML markup
>> file like:
>>
>> 
>> ...
>> panel contents come here - The panel includes
>>  
>> ...
>> panel contents come here - The panel includes
>>  
>> ..
>> panel contents come here - The panel includes
>>  
>> ...
>> How to do that?
>> Create GenericPanel.java and Panel1.java that extends GenericPanel.java.
>> Panel1.java is associated to the HTML markup file Panel1.html:
>> ...
>> 
>> ... 
>>   
>>
>> And do again for iI = 2 to 10. This will probably work, but it is complex.
>> The idea is to create a repeater:
>> http://wicket.apache.org;>
>> 
>> 
>> panel contents come here -
>>   The panel includes  > type="text" size="40"/>
>> 
>> 
>> 
>> 
>>
>> So the question is how to do the association between GenericPanel.java[i]
>> and GenericPanel.htlm[i] that must contain > id="Field_i" type="text" size="40"/> ?
>>
>> As far as I understand the wicket mechanism, the HTML markup file is a
>> constant file that describes the HTML code of the component.
>> Is it possible in wicket 6? Wicket 7?
>>
>> Thanks,
>> PHL
>>
>>
>


-
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



HTML markup file generated by code or HTML markup file with parameter

2016-03-25 Thread andre seame
Hello,

Question?
I would like to create a component.java that is associated to a HTML markup 
file component.html, but a part of the markup file must be dynamic.

Why?
A standard form is associated to a HTML markup file like:

...

...

..

...
But, I would like to group the input fields with other information, therefore I 
create panels. So my form is now associated to a HTML markup file like:


...
panel contents come here - The panel includes  
...
panel contents come here - The panel includes  
..
panel contents come here - The panel includes  
...
How to do that?
Create GenericPanel.java and Panel1.java that extends GenericPanel.java. 
Panel1.java is associated to the HTML markup file Panel1.html:
...

... 
 

And do again for iI = 2 to 10. This will probably work, but it is complex. The 
idea is to create a repeater:
http://wicket.apache.org;>
   
   
   panel contents come here -
 The panel includes  
   
   
   


So the question is how to do the association between GenericPanel.java[i] and 
GenericPanel.htlm[i] that must contain  ?

As far as I understand the wicket mechanism, the HTML markup file is a constant 
file that describes the HTML code of the component.
Is it possible in wicket 6? Wicket 7?

Thanks,
PHL



RE: Misunderstanding : Unable to find component with id 'phl' or A child with id 'phl' already exists:

2016-03-22 Thread andre seame
The ajout method is a debug method. 
The main objective is  that the method
HeadersToolbar//HeadersToolbar(final DataTable/RefreshingView>//Iterator>>//populateItem(Item> item)

is able to modify the content of "getheader" that is the X1 object (X1 is a for 
debug). 

In case 1 - I use "ajout" and wicket says  phl already exists in the X1 object. 
OK, I agree. X1 has already 2 labels. 

In case 2 - I use "ajout", but the phl label is not yet declared in the java 
object (ajout must add it), but the wicket render says 
"Sorry, phl label does not exists". 

This means that I cannot modify the getheader object from HeadersToolbar. 

The example set the sortable link to the global header object. But I want to 
put the sortable link to part of the header object. 

Thanks,
PHL

De : Gabriel Landon 
Envoyé : mardi 22 mars 2016 18:04
À : users@wicket.apache.org
Objet : Re: Misunderstanding : Unable to find component with id 'phl' or A 
child with id 'phl' already exists:

PHL,

I'm sorry but it's hard to understand what your are trying to do.
Anyway, I find the X1 class very strange. I think you simply need to remove
the "ajout" method as the label is already added in the constructor. You
cannot add a label several times on the same panel unless you are using a
repeater.

public class X1 extends Panel
{
public X1(String id, String ColumnTilte)
{
super(id) ;
lbl = new Label("labelx", ColumnTilte) ;
add(lbl) ;
add(new Label("phl","added by constructor")) ;
}

public Label getLabel() { return lbl ; }
}

regards,
Gabriel.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Misunderstanding-Unable-to-find-component-with-id-phl-or-A-child-with-id-phl-already-exists-tp4674083p4674087.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



Misunderstanding : Unable to find component with id 'phl' or A child with id 'phl' already exists:

2016-03-21 Thread andre seame
Hello,

I try to modify the header of a table. So according to the advice of this 
mailing list, I write


public class DataTableFilterToolbarPage extends WebPage
{

 /**
 * constructor
 */
public DataTableFilterToolbarPage()
{
List> columns = new ArrayList>();

columns.add(new PropertyColumn(new 
Model("ID"), "id")
{   private static final long serialVersionUID = 1L;

@Override
public Component getHeader(final String componentId)
{   X1 x = new X1(componentId,"id") ; // My own panel instead of a 
label
   return x;
}

});


As I want to set the sortable link in a part of X1, I modify HeadersToolbar


public  HeadersToolbar(final DataTable table, final 
ISortStateLocator stateLocator)
{
super(table);

RefreshingView> headers = new RefreshingView>("headers")
{
private static final long serialVersionUID = 1L;

@Override
protected Iterator>> getItemModels()


@Override
protected void populateItem(Item> item)

  {

if (column.isSortable())
{
header = newSortableHeader("header", 
column.getSortProperty(), stateLocator);
}
else
{
header = new WebMarkupContainer("header");
}

if (column instanceof IStyledColumn)
{  }

item.add(header);
item.setRenderBodyOnly(true)
((X1)column.getHeader("panel")).ajout() ; // action on X1
header.add(column.getHeader("panel"));

Where X1 is

public class X1 extends Panel
{
public X1(String id, String ColumnTilte) //,  TextField x)
{
super(id) ;
lbl = new Label("labelx", ColumnTilte) ;
add(lbl) ;
}

public Label getLabel() { return lbl ; }

public void ajout()
{
   add(new Label("phl","added by  headersTools")) ;
}
}


Run this code, I get

Unexpected RuntimeException

Last cause: Unable to find component with id 'phl' in [X1 [Component id = 
panel]]
Expected: 
'filterForm:tableWithFilterForm:topToolbars:toolbars:3:headers:1:header:panel:phl'.
Found with similar names: ''


Markup

The problem is in 
"file:/home/phl/apache-tomcat-7.0.47/webapps/phlwick/WEB-INF/classes/xxx/X1.html":

http://wicket.apache.org;>
1


The Title of the column 
goes here



Action from HeadersTools goes here 





I was expecting that the action ((X1)column.getHeader("panel")).ajout() ; will 
define phl in X1


If I change the X.java to


public class X1 extends Panel
{
public X1(String id, String ColumnTilte) //,  TextField x)
{
super(id) ;
lbl = new Label("labelx", ColumnTilte) ;
add(lbl) ;
add(new Label("phl","added by constructor")) ;
}

public Label getLabel() { return lbl ; }

public void ajout()
{
   add(new Label("phl","added by  headersTools")) ;
}
}


So I don't understand why the some time the id phl is not declared and sometime 
is it already declared.


This is probably due to the fact that I don't clearly understand the render 
mechanism.


Pointers or ideas are welcome.


Thanks,

PHL.


Then I get :

Last cause: A child with id 'phl' already exists:
[X1 [Component id = panel]]
WicketMessage: Error attaching this container for rendering: [HeadersToolbar 
[Component id = 3]]



RE: Is there any pointers to change the markup header of a column or propertyColumn ?

2016-03-14 Thread andre seame
Yes Tom, I would like to modify the header. 

So I modify the getHader method. If the column is not sortable, its work. if 
the column is sortable, myheader is inside the "sortable link border". In fact, 
I would like to set the sortable link inside a part of my header. 

Instead of : 

   http://wicket.apache.org;>
   Machine 

I would like to have
th wicket:id="header" class="wicket_orderUp">
   Machine 
   http://wicket.apache.org;>
   Sort the machines


This probably means that I have also to interact with the PropertyColumn.java 

Thanks, 
PHL


De : Tom Götz <t...@decoded.de>
Envoyé : mercredi 9 mars 2016 21:17
À : users@wicket.apache.org
Objet : Re: Is there any pointers to change the markup header of a column or 
propertyColumn ?

Hi,

I think the question was how to modify the *header* of the column and not the 
cell’s content. Therefore you only need to do the following:

@Override
Component getHeader(String componentId) {
return new MyFancyHeaderPanel(componentId);
}

… in your PropertyColumn (anonymous) subclass.

Cheers,
   Tom


> On 09.03.2016, at 19:09, Francois Meillet <francois.meil...@gmail.com> wrote:
>
> If you want to your own html, you need to create an object that extends 
> PropertyColumn
>
> Let's say that XXXPropertyColumn extend PropertyColumn
>
> You need to override the populateItem(Item<ICellPopulator> item, String 
> componentId, IModel rowModel) method
>
> for example
>
> @Override
> public void populateItem(Item<ICellPopulator> item, String componentId, 
> IModel rowModel) {
>   item.add(new YYYPanel(item, componentId, rowModel));
> }
>
> Then you create the YYYPanel.java and the html file 
> XXXPropertyColumn$YYYPanel.html with your own design.
>
>
> François
>
>
>
>
> Le 9 mars 2016 à 18:41, andre seame <andre1...@hotmail.fr> a écrit :
>
>>
>> Hello,
>>
>>
>> In DataTableFilterToolbarPag, we use columns.add(new PropertyColumn<Contact, 
>> String> ...
>>
>>
>> I would like to modify the content of the header of this column.
>>
>>
>> Must I do "replace the header component of the header of column" ? But how 
>> to do that?
>>
>>
>> Must i my own column objects? I imlagine that the header (th) is defined by 
>> the column. But how to do that?
>>
>>
>> Thanks,
>>
>> PHL.
>



-
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



Is there any pointers to change the markup header of a column or propertyColumn ?

2016-03-09 Thread andre seame

Hello,


In DataTableFilterToolbarPag, we use columns.add(new PropertyColumn ...


I would like to modify the content of the header of this column.


Must I do "replace the header component of the header of column" ? But how to 
do that?


Must i my own column objects? I imlagine that the header (th) is defined by the 
column. But how to do that?


Thanks,

PHL.


RE: Bug in example ? repeater.DataTableFilterToolbarPage

2016-03-09 Thread andre seame
You have right, the "size" was broken.

Thanks
PHL.


De : Martin Grigorov <mgrigo...@apache.org>
Envoyé : vendredi 4 mars 2016 07:26
À : users@wicket.apache.org
Objet : Re: Bug in example ? repeater.DataTableFilterToolbarPage

Hi,

On Fri, Mar 4, 2016 at 1:44 AM, andre seame <andre1...@hotmail.fr> wrote:

> Hello,
>
>
> I try to understand the DataTableFilterToolbarPage. In Versin 6.21 and
> 6.22. I have 2 problems :
>
>   *   If I use the date filter to get 2 anwsers, I got exception.
>   *   If I suppress the exception (see the following paragraph), the
> "Pager" is not updated. So I have the 2 answer on the first page, but the
> "pager" says : Value from 1 to 8 / 50 and of course there are 7 links. Of
> course, goto page 2 will throw an exception.
>
>
> How to suppress the exception ?
>
> public Iterator iterator(long first, long count)
> {
> List contactsFound = getContactsDB().getIndex(getSort());
>
> return filterContacts(contactsFound).
> subList((int)first, (int)(first + count)).
> iterator();
> }
>
>
> If the sublist is < 8, then there is an exception on the first page. In
> fact the first page is not send because there is an exception.
>
>
> So, I replace the size of the sublist by;
>
> x = filterContacts(contactsFound) ;
>
> return x.subList((int)first, Math.min((int)(first +
> count),x.size()).iterator();
>
>
> if size of filterContacts(contactsFound) is 4, it is not possible to
> return a sublist form 1 to 8.
>
>
> Questions
>
> =
>
>   *   Why does the on line example working ?
>

When there just 2 results the value of 'count' parameter is 2.


>   *   Is my correction good or do I miss something ?
>

Usually it is a safe bet. So keep it!


>   *   How to update the "pager" information, that is how to replace the
> initial list of 50 items, by a list of 2 items (or 0 items).
>

It seems your impl
of org.apache.wicket.markup.repeater.data.IDataProvider#size() is broken.


Set a breakpoint
at 
org.apache.wicket.examples.repeater.SortableContactDataProvider#filterContacts()
and see how it works, i.e. what are the values and what are the callers.


>
> Thanks,
>
> PHL;
>
>
>
>

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



Bug in example ? repeater.DataTableFilterToolbarPage

2016-03-03 Thread andre seame
Hello,


I try to understand the DataTableFilterToolbarPage. In Versin 6.21 and 6.22. I 
have 2 problems :

  *   If I use the date filter to get 2 anwsers, I got exception.
  *   If I suppress the exception (see the following paragraph), the "Pager" is 
not updated. So I have the 2 answer on the first page, but the "pager" says : 
Value from 1 to 8 / 50 and of course there are 7 links. Of course, goto page 2 
will throw an exception.


How to suppress the exception ?

public Iterator iterator(long first, long count)
{
List contactsFound = getContactsDB().getIndex(getSort());

return filterContacts(contactsFound).
subList((int)first, (int)(first + count)).
iterator();
}


If the sublist is < 8, then there is an exception on the first page. In fact 
the first page is not send because there is an exception.


So, I replace the size of the sublist by;

x = filterContacts(contactsFound) ;

return x.subList((int)first, Math.min((int)(first + count),x.size()).iterator();


if size of filterContacts(contactsFound) is 4, it is not possible to return a 
sublist form 1 to 8.


Questions

=

  *   Why does the on line example working ?
  *   Is my correction good or do I miss something ?
  *   How to update the "pager" information, that is how to replace the initial 
list of 50 items, by a list of 2 items (or 0 items).

Thanks,

PHL;





Filtering capabilities in TH (Array Header) or for dataview.

2016-02-26 Thread andre seame
Hello

The DataTableFilterToolbarPage demonstrates the capability of filtering dates 
for a Datatable. Great.

I would like to have an array of . Column 1 and 2 are 
sortable (ASC or DESC). Column 3 and 4 (the dates) are sortable and filterable.

I would like to have a different presentation as DataTableFilterToolbarPage 
does. Instead of having the forms for filtering outside the table, I would like 
to include it into the TH.

 int

 String

 date1  .. 

 date2  .. 

In this case the user will type the filtering condition in the header of the 
column Date1 or Date2.

So questions are:

  *   Is it possible to add filtering capabilities to a dataview? If Yes, I can 
access to the TH cell and had the form information.

  *   Is it possible to modify the content of the cell th Date1 to add the form 
information.

Thanks,

PHL



Quesitont about .repeater.DataTableFilterToolbarPage : mutliple fitered

2016-02-19 Thread andre seame
Hello,


The repeater.DataTableFilterToolpage 

 demonstrates a unique filter.


My questions are :

- Is it possible to have several sortable columns.

- How to put the 2 sortable fields into the th ? Or Foreach sortable column, I 
would like to add the 2 fields in the associated column.


For instance:


 
   Born datefrom: ...
   Death Datefrom: ...



Thanks,

PHL.


Repater : How to colspan cell on a line

2016-01-22 Thread andre seame
Hello,


By using the simple example of repeater, it is easy to create a HTML table of 
contacts.


Example 1




In my case, the data are not contacts but a list of tasks. So I would like to 
have :


<.. colspan = 2 ...>Liste of tasks of January 2016
 => The line is "single Cell"

1/01/2016 Say happy nuew year to every body  => line 
is 2 cells

2/01/2016 begin to learn Wikclet


<.. colspan = 2 ...>Liste of tasks of February 2016   
  => The line is "single Cell"

14/04/2016 Don't forget Valentin day  => line is 2 
cells


In the example, we see how to modify the tr element by adding a parmater class: 
odd or even.


Here the question is : How to modify the tr element, but also a part of td 
element that must disappear.



Example 2 (a varaint of Example 1)



In the contact list, there is phone number and cell number.

If the phone number or the cell number. is empty, concatenate the cells into a 
single one.


This mean that the HTML code must be :

 ... The unique number ... . A  block must 
be missing.



Thanks for pointer,

PHL.


RE: Publish Javadoc or big number of Static pages

2014-01-14 Thread andre seame
Use the web server to show the static page is a very good idea. As all other 
pages are in generated by wicket, I was only thinking in term of wicket. 

Thanks for the idea.
PHL

 Date: Fri, 10 Jan 2014 15:11:17 -0500
 Subject: Re: Publish Javadoc or big number of Static pages
 From: p...@bors.ws
 To: users@wicket.apache.org
 
 I'm not following, you want to show 200 static HTML pages in your webapp?
 
 Your webapp must be running on top of a web server, why not just let the
 web server server the static content?
 What's the dynamic part of those 200 static HTML pages?
 Do you need to authenticate the user first or something before they can
 view the static content?
 
 
 On Fri, Jan 10, 2014 at 12:23 PM, andre seame andre1...@hotmail.fr wrote:
 
 
 
  Hello,
 
 
 
  I
  have a wicket site to manage different points on the project. I receive 200
  HTML pages for the developer teams. These pages are javadoc pages.
 
  I
  add some dynamic pages built over the static pages with wicket. And I will
  to
  publish all pages with wicket.
 
  As
  I have static HTML pages and as want to use them immediately, I must use
  the
  Frame HTML mechanism.
 
  So
  I will have a page with a left part: the menu or the list of pages, and on
  the
  right part (in another frame) the associated page.
 
  So
  I am using the
  http://www.wicket-library.com/wicket-examples/frames/ examples. This
  works, but I have 2 problems:
 
  -
  I have to created 200 page.java/page.class, one per static pages!
 
  -
  I have to modify the code (creating a new page.java/page.class) if there
  is a
  new static page.
 
 
 
  So
  what is the easiest way to manage this problem?
 
 
 
  May
  be an idea is to say to wicket:  just for
  this time, the associated html page to genericsaticpage.class is
  staticpage1.html. Of course for another link, the associated html page to
  genericsaticpage.class will be staticpage2.html.
 
 
 
  I
  can also image to have staticpage.html : ...bodydiv
  wicket:id=The body will be read from the static
  page/body. In this case, I will lost the css or the javascript
  code that may be included in the original static page.
 
 
 
  Thanks
  for any pointers or suggestion.
 
 
  

Publish Javadoc or big number of Static pages

2014-01-10 Thread andre seame


Hello,

 

I
have a wicket site to manage different points on the project. I receive 200
HTML pages for the developer teams. These pages are javadoc pages.

I
add some dynamic pages built over the static pages with wicket. And I will to
publish all pages with wicket. 

As
I have static HTML pages and as want to use them immediately, I must use the
Frame HTML mechanism. 

So
I will have a page with a left part: the menu or the list of pages, and on the
right part (in another frame) the associated page. 

So
I am using the 
http://www.wicket-library.com/wicket-examples/frames/ examples. This
works, but I have 2 problems: 

-
I have to created 200 page.java/page.class, one per static pages! 

-
I have to modify the code (creating a new page.java/page.class) if there is a
new static page.

 

So
what is the easiest way to manage this problem? 

 

May
be an idea is to say to wicket:  just for
this time, the associated html page to genericsaticpage.class is
staticpage1.html. Of course for another link, the associated html page to
genericsaticpage.class will be staticpage2.html.

 

I
can also image to have staticpage.html : ...bodydiv
wicket:id=The body will be read from the static
page/body. In this case, I will lost the css or the javascript
code that may be included in the original static page.

 

Thanks
for any pointers or suggestion.