You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Brendan cheng <cc...@hotmail.com> on 2012/11/27 07:05:07 UTC

TableViewTextAreaCellRenderer failed in Row Header

Hi,
From the attached image, the second row of column "tagname" somehow merged with 3rd and 4th rows.  This is after I use TableViewTextAreaCellRenderer to render the string class.  I also added the snapshot of bxml file.  is this a bug or my set up, usage issue?
The following code I used to add the Renderer into TableViewMultiCellRenderer.
RendererMapping rm = new RendererMapping();
TableViewTextAreaCellRenderer tableViewTextAreaCellRenderer = new TableViewTextAreaCellRenderer();
//tableViewTextAreaCellRenderer.getStyles().put("wrapText", true);
rm.setCellRenderer(tableViewTextAreaCellRenderer);
rm.setValueClass(String.class);
tableViewMultiCellRenderer.getRendererMappings().add(rm);
Brendan 		 	   		  

RE: TableViewTextAreaCellRenderer failed in Row Header

Posted by Brendan cheng <cc...@hotmail.com>.
Hi Roger,
I use 2 tables to achieve:(1) To lock table 1 as the heading columns and table 2 to be data columns.(2) To allow the calculation a bit more easier.  As my program has spreadsheet style formula in each cell and the calculation scope is limited to table 2.(3) And all the interface components available for editing are used only in table 2.
I think it is possible to only use one table but not very complex.
What do you recommend?
Thanks for your concerns!
Brendan  		 	   		  

Re: TableViewTextAreaCellRenderer failed in Row Header

Posted by Roger and Beth Whitcomb <Ro...@rbwhitcomb.com>.
Hi guys,
     I (admittedly) haven't been through the sample code, but could you 
explain what you're trying to do with the "two linked tables"? Could you 
maybe accomplish the same thing with only one table, but with a combined 
data object?  That way there shouldn't be a problem keeping the row 
heights synchronized.  Just thinking out loud....

~Roger

Re: TableViewTextAreaCellRenderer failed in Row Header

Posted by Sandro Martini <sa...@gmail.com>.
Hi,

> Wow..you're "The chosen ones" for Bintray.and I'm not.
I'm sorry ... maybe I'm only lucky :-) ...


> How can we tell the different from your fix?
I think that the problem in your case is a little different, or
"assign the same row height to two linked tables", right ?
If you run new test bxml files for this (under tests:
table_pane_test2.bxml, table_view_test4.bxml,
table_view_test_empty.bxml), all should be ok ... is it true even for
you ? If yes, then we can to add some stuff there and try to reproduce
your case.

Anyway if you have more info/small examples/etc send here (of course
this is the best/suggested approach), or if private material and you
can/want send directly to me but you know my time is limited.

Let's update.

Bye

Re: TableViewTextAreaCellRenderer failed in Row Header

Posted by ccp999 <cc...@hotmail.com>.
Wow..you're "The chosen ones" for Bintray.and I'm not.

How can we tell the different from your fix?



--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TableViewTextAreaCellRenderer-failed-in-Row-Header-tp4022251p4022450.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: TableViewTextAreaCellRenderer failed in Row Header

Posted by Sandro Martini <sa...@gmail.com>.
Hi all,
just committed in the 2.0.x branch a small fix to tables and lists to
not select an element if it's not in range (as seems in some strange
and edge cases).

Committed revision 1446280.


Bye

Re: TableViewTextAreaCellRenderer failed in Row Header

Posted by Sandro Martini <sa...@gmail.com>.
Hi,

> I have similar workspace structure as you but use GIT instead of SVN.
ok, but for direct usage from GIT you can get sources from Apache GIT
mirrors (Pivot is read-only there):
git://git.apache.org/pivot.git
or even from GitHUB:
https://github.com/apache/pivot

And then in your eclipse workspace, do "Import project from existing
sources" (or similar) from the branches/2.0.x , or from trunk ,
without copying in workspace folder (so you can update in a simpler
way from git).


> Strange!
don't worry, we will be able to better understand (I hope) :-) ...
During the week-end I should be able to commit new test sources, so we
can re-start from them.

Now I have an account in BinTray ( https://bintray.com ) so in the
worst case I'll put unofficial snapshot jars there ...


Bye

RE: TableViewTextAreaCellRenderer failed in Row Header

Posted by Brendan cheng <cc...@hotmail.com>.
Hi,
I have similar workspace structure as you but use GIT instead of SVN. Strange!  
> Date: Thu, 31 Jan 2013 11:52:54 +0100
> Subject: Re: TableViewTextAreaCellRenderer failed in Row Header
> From: sandro.martini@gmail.com
> To: user@pivot.apache.org
> 
> Hi,
> usually I have a workspace with all Pivot source projects (usually
> downloaded "live" from SVN in a folder, like "pivot_trunk"), and in
> another folder (could be the same, but using another one if a good
> trick, to avoid confusion) the eclipse workspace for example
> "eclipse_workspace" the inside eclipse I do an "Import from existing
> folder" but without copying them in the workspace folder.
> In this way I can update Pivot sources often (of course via svn)
> without the need for generated jars (or better, in this case without
> the need to generated them and post somewhere daily).
> Additional benefit: you could easily switch to another version/branch,
> by deleting Pivot source projects from eclipse (but without flagging
> the delete files in the eclipse confirm dialog), and importing from
> another folder ...
> 
> 
> As a last option, I'm trying to look if put unofficial snapshots for
> Pivot jars (but updated manually) in BinTray, I hope in a few days (if
> I get access ...), otherwise in another place.
> 
> 
> Let's update.
> 
> Bye
 		 	   		  

Re: TableViewTextAreaCellRenderer failed in Row Header

Posted by Sandro Martini <sa...@gmail.com>.
Hi,
usually I have a workspace with all Pivot source projects (usually
downloaded "live" from SVN in a folder, like "pivot_trunk"), and in
another folder (could be the same, but using another one if a good
trick, to avoid confusion) the eclipse workspace for example
"eclipse_workspace" the inside eclipse I do an "Import from existing
folder" but without copying them in the workspace folder.
In this way I can update Pivot sources often (of course via svn)
without the need for generated jars (or better, in this case without
the need to generated them and post somewhere daily).
Additional benefit: you could easily switch to another version/branch,
by deleting Pivot source projects from eclipse (but without flagging
the delete files in the eclipse confirm dialog), and importing from
another folder ...


As a last option, I'm trying to look if put unofficial snapshots for
Pivot jars (but updated manually) in BinTray, I hope in a few days (if
I get access ...), otherwise in another place.


Let's update.

Bye

Re: TableViewTextAreaCellRenderer failed in Row Header

Posted by ccp999 <cc...@hotmail.com>.
Hi Sandro,

I couldn't get your result despite I put the jar built from your code in my
VMBox of Win7 Java 6_38.  Do you mind to send me your jar for testing
including pivot as well?

Thanks in advance!

Brendan



--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TableViewTextAreaCellRenderer-failed-in-Row-Header-tp4022251p4022415.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: TableViewTextAreaCellRenderer failed in Row Header

Posted by Sandro Martini <sa...@gmail.com>.
Hi,
I'm using updated sources from our maintenance 2.0.x branch:

http://svn.apache.org/repos/asf/pivot/branches/2.0.x/

(but even trunk should be approx. identical up to now)


As dev environment I'm on Windows XP with one of latest JDK 6.


Bye

Re: TableViewTextAreaCellRenderer failed in Row Header

Posted by ccp999 <cc...@hotmail.com>.
Hi Sandro,

I tested your src.zip but still get the same result, even under latest
version of Pivot, updated on Jan 26.

Which version is your pivot?

Brendan  



--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TableViewTextAreaCellRenderer-failed-in-Row-Header-tp4022251p4022412.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: TableViewTextAreaCellRenderer failed in Row Header

Posted by Sandro Martini <sa...@gmail.com>.
Hi Brendan,

> The issue with drag and drop is not part of this thread.  That drag and drop
> for column issue has been fixed under the thread "ScrollPane usage on
> modified RowEditor".
uh good, at least this is gone  :-) ...

> So I think the title is still valid and we should concentrate on the TextAreaCellRenderer.
ok, but probably this is due to your case, with two tables linked ...
After being crazy debugging (and add a lot of println statements to
better see what Pivot renderers are doing ... and for future releases
of Pivot this is something I'd like to improve in some way) the code
for some days I re-started from scratch, with a single table and
different combination of cell renderers but all seems to be good ...
but up to now hadn't enough time to clean up new test files and commit
(I'll do it soon).

After this, if we are sure that this is due to the "two linked tables"
case, it's something we can explore (and fix/extend if needed), ok ?

> I had tried to put the table row height to 200 but didn't get the result like you did.
strange, but better ... in attach I put my (a little revised) sources from you.

So I think that for now we should try to restart but from a clean situation ...
Have you got some suggestion ?

Let's update.

Bye

Re: TableViewTextAreaCellRenderer failed in Row Header

Posted by ccp999 <cc...@hotmail.com>.
Hi Sandro,

The issue with drag and drop is not part of this thread.  That drag and drop
for column issue has been fixed under the thread "ScrollPane usage on
modified RowEditor".

So I think the title is still valid and we should concentrate on the
TextAreaCellRenderer.

I had tried to put the table row height to 200 but didn't get the result
like you did. 

<http://apache-pivot-users.399431.n3.nabble.com/file/n4022410/Screen_Shot_2013-01-30_at_3.21.07_PM.png> 

and my code change in BXML file:

<http://apache-pivot-users.399431.n3.nabble.com/file/n4022410/Screen_Shot_2013-01-30_at_3.20.22_PM.png> 

Cheers,

Brendan



--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TableViewTextAreaCellRenderer-failed-in-Row-Header-tp4022251p4022410.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: TableViewTextAreaCellRenderer failed in Row Header

Posted by Sandro Martini <sa...@gmail.com>.
Sorry, a little thing:
I'm not saying that your code is bugged, but only that we have to look
better at it, but starting from a simpler case.
It's possible that we discovered some condition that we now must be able to
better understand for the fixes.

Waiting for feedback.
Sandro
 Il giorno 28/gen/2013 17:16, "Sandro Martini" <sa...@gmail.com>
ha scritto:

> Hi Brendan,
> after some debugging with your application (only a little revised) I
> have many doubt ... of course this is not a simple thing to fix, but I
> think it's something related on how you link the two tables (and
> related data) in your code.
>
> First a small thing:
> if in your file "cellsTagPane.bxml" I change (near line 50)
>                 <TablePane.Row height="-1">
> to
>                 <TablePane.Row height="200">
> now I see all rows in the right way, but if I click/double-click
> bottom the data rows I get some exceptions due to inconsistent row
> numbering, probably due to incongruency between the two tables ...
> anyway I'm doing some fixes to avoid these exceptions.
>
>
> Really I tried many times debugging your code, but could be something
> too much specific.
> I think that we should start from simple cases made from scratch. I'll
> commit asap some new bxml files (under tests) to show/discuss this,
> but currently with them I see the right behaviour.
>
>
> The drag and drop is another issue, do you need to have drag and drop
> in all table rows (and not only in table header) ?
> It would be better to test/discuss it in another mail thread (and
> maybe with a JIRA issue), otherwise things get too much confused here
> ...
>
>
> In Pivot we can see what to do/how if two tables need to be linked to
> visually seem only one, but this is another feature ...
>
>
> What do you think ?
>
> Bye,
> Sandro
>

Re: TableViewTextAreaCellRenderer failed in Row Header

Posted by Sandro Martini <sa...@gmail.com>.
Hi Brendan,
after some debugging with your application (only a little revised) I
have many doubt ... of course this is not a simple thing to fix, but I
think it's something related on how you link the two tables (and
related data) in your code.

First a small thing:
if in your file "cellsTagPane.bxml" I change (near line 50)
		<TablePane.Row height="-1">
to
		<TablePane.Row height="200">
now I see all rows in the right way, but if I click/double-click
bottom the data rows I get some exceptions due to inconsistent row
numbering, probably due to incongruency between the two tables ...
anyway I'm doing some fixes to avoid these exceptions.


Really I tried many times debugging your code, but could be something
too much specific.
I think that we should start from simple cases made from scratch. I'll
commit asap some new bxml files (under tests) to show/discuss this,
but currently with them I see the right behaviour.


The drag and drop is another issue, do you need to have drag and drop
in all table rows (and not only in table header) ?
It would be better to test/discuss it in another mail thread (and
maybe with a JIRA issue), otherwise things get too much confused here
...


In Pivot we can see what to do/how if two tables need to be linked to
visually seem only one, but this is another feature ...


What do you think ?

Bye,
Sandro

Re: TableViewTextAreaCellRenderer failed in Row Header

Posted by Sandro Martini <sa...@gmail.com>.
Hi,
ok I'll try to look at it ... this time seems not-so-simple to
show/fix, I hope to have some luck :-) .

Thank you very much for test sources.
Let's update in a few days (unless problems).

Bye,
Sandro

Re: TableViewTextAreaCellRenderer failed in Row Header

Posted by ccp999 <cc...@hotmail.com>.
Hi Sandro,

Thanks for looking into the issue.  I uploaded again of my last uploaded
sample for other issue with uncommented block to test this issue.  I also
added one more row to let you spot the result more easier.

You can also use the upload to test the scrolling bar issue you fixed.  But
it is a bit hard to describe it.  Let me try again.

(1) turn on the over lay component (the cell editor) by double click on a
cell. (preferable the last second column).
(2) type in any text 
(3) click the 'tick' button to save the change
<http://apache-pivot-users.399431.n3.nabble.com/file/n4022352/Screen_Shot_2013-01-05_at_1.51.03_PM.png> 
(4) extend the column width and shrink the window with to have the scrolling
in effect and partly column of the last one is not hidden
<http://apache-pivot-users.399431.n3.nabble.com/file/n4022352/Screen_Shot_2013-01-05_at_1.51.19_PM.png> 
(5) drag the last column (next to the editor) to the column with editor, so
that the column is move in front of the column with editor. Drag and drop is
activate only in column header.
<http://apache-pivot-users.399431.n3.nabble.com/file/n4022352/Screen_Shot_2013-01-05_at_1.50.07_PM.png> 

you should see

gui.test_2.zip
<http://apache-pivot-users.399431.n3.nabble.com/file/n4022352/gui.test_2.zip>  



--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TableViewTextAreaCellRenderer-failed-in-Row-Header-tp4022251p4022352.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: TableViewTextAreaCellRenderer failed in Row Header

Posted by Sandro Martini <sa...@gmail.com>.
Hi Brendan,
just started to look at this, but in the samples you sent for the
Scrollbar issue (now solved), how can I see it ?
I see a commented block inside CellsTagPane (and probably comment some
lines that do: prevent different row height in two tables), then there
is other to uncomment/activate ?

Thanks, this would simplify my work ... otherwise I have to create a
test case for this.

Sandro

Re: TableViewTextAreaCellRenderer failed in Row Header

Posted by Sandro Martini <sa...@gmail.com>.
Hi Brendan,
just started to look at it, but could be something related to the
calculation of max height for row cells (with cells using different
renderers), so I have to look better in the skin.

Let's update soon.

Bye