labelFor issue

Discuss all problems you have with Servoy here. It might help to mention the Servoy version and Operating System version you are using

labelFor issue

Postby david » Mon Aug 11, 2008 9:25 pm

Servoy 3.5.6:

I can't get "elements.fld_item1.getLabelForElementNames()" to return anything. Can someone confirm that this is broken?

And I can't access labelFor elements independently because they disappear from the element tree as soon as you put something in the labelFor property.

Or maybe I'm doing something wrong....
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1723
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Re: labelFor issue

Postby pbakker » Tue Aug 12, 2008 9:13 am

So you got a label with a name and as soon as you also fill the labelFor property, the element disappears from the elements list of the form in the Method Editor?

If so, that doesn't sound right. Can you please file a case in our support system?

Paul
pbakker
 
Posts: 2817
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Re: labelFor issue

Postby david » Tue Aug 12, 2008 7:02 pm

Figured out that this only happens in table view -- so I'm not sure if this is expected behavior.

I'm trying to get "display tags" behavior in table view headers (column header names change dynamically depending on the data) which seems to be an impossible thing. I also can't put the column headers in labels in the title part because this part doesn't scroll right-to-left with the body part.

So I'm having to use a list view, use a graphic for the "header" background, and duplicate the sort functionality of table view to get what I want. I can't duplicate the user ability to drag columns around though.

I really like table view -- would love to get more control over the header part.
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1723
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Re: labelFor issue

Postby pbakker » Wed Aug 13, 2008 10:22 am

David,

Currently, the control you have over TableView headers is through attaching a label to the field using a labelFor relation. And the label you can then style, directly using properties of the label element, or using StyleSheets.

At this moment, that is only a designtime thing, since the label element is removed intentionally from the elements list when you assign the labelfor relation.

If you want to be able to script against it at runtime, please file a feature request for this, preferably with as much detail on what exactly you want to script.

Using display tags in TableView headers is not likely to start working though, as the overhead of this is too much.

Regards,

Paul
pbakker
 
Posts: 2817
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Re: labelFor issue

Postby david » Wed Aug 13, 2008 6:24 pm

pbakker wrote:Using display tags in TableView headers is not likely to start working though, as the overhead of this is too much.


How about adding in display tags for the labelFor elements? Same overhead issue?

Currently you can do display tags on the tooltips for table fields...which is how I'm giving some indication of what the tag names of the columns are (setting them to the values of global fields which I switch from record to record).

It seems to me that that the overhead wouldn't be different between labelFor elements and tooltips. Being able to switch header text at runtime has a lot of application.

Pics are an example of a mail merge workflow where the columns of the recipients table is based on external mapping that the user sets up when defining merge templates. To accommodate, the column names in the backend storage table have generic names that are easy to process in a loop. Being able to show the user mapping in the column heading (and not just in the tooltip) instead of the generic backend column names would be cool.
Attachments
Picture 52.png
Picture 52.png (14.65 KiB) Viewed 2954 times
Picture 51.png
Picture 51.png (24.22 KiB) Viewed 2956 times
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1723
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Re: labelFor issue

Postby Robert Huber » Mon Oct 06, 2008 12:15 pm

Hi David, Servoyans

We also would like to set the column text dynamically in table view, so we would like to make a vote for this as well. Table view is our most used form view, but setting the text dynamically is missing.
BTW, we also like table view a lot, as it is the one view you get what users typically need. If we get even a bit more control on it, that would be really great, as table views speed up the human interface development in a very good way (my opinion only .-)

Best regards, Robert

david wrote:Figured out that this only happens in table view -- so I'm not sure if this is expected behavior.

I'm trying to get "display tags" behavior in table view headers (column header names change dynamically depending on the data) which seems to be an impossible thing. I also can't put the column headers in labels in the title part because this part doesn't scroll right-to-left with the body part.

So I'm having to use a list view, use a graphic for the "header" background, and duplicate the sort functionality of table view to get what I want. I can't duplicate the user ability to drag columns around though.

I really like table view -- would love to get more control over the header part.
Robert Huber
7r gmbh, Switzerland
SAN Developer
www.seven-r.ch
User avatar
Robert Huber
 
Posts: 1239
Joined: Tue Aug 23, 2005 6:52 pm
Location: Schaffhausen, Switzerland

Re: labelFor issue

Postby mboegem » Tue Oct 07, 2008 12:12 pm

Hi all,

I already filed a case some time ago (casenr. 153655). I thought (same as David) that this was an issue, but my case has changed to 'feature request'. I have been responded that this feature is not possible at the moment, but the functionality will be added later.
My guess is that it all will be solved in 4.1. (looking at the great new features we will get in there... :-) )
_____________________
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance SAN Developer

Image
User avatar
mboegem
 
Posts: 1382
Joined: Sun Oct 14, 2007 1:34 pm
Location: Hoofddorp, The Netherlands

Re: labelFor issue

Postby lvostinar » Wed Oct 08, 2008 10:04 am

I am not sure will be solved in 4.1 as its priority is not very high.
Laurian Vostinar
Servoy
lvostinar
 
Posts: 1047
Joined: Tue Feb 19, 2008 10:53 am

Re: labelFor issue

Postby hsummerhays » Tue Aug 23, 2011 11:55 pm

Does anyone have an update on this? Is it possible now to change the column names dynamically? It seems like for Web Client, this is a "must have".
Hugh Summerhays
Mainstream Data
hsummerhays
 
Posts: 29
Joined: Tue Mar 01, 2011 6:12 pm
Location: SLC, UT, USA

Re: labelFor issue

Postby lvostinar » Wed Aug 24, 2011 8:57 am

hsummerhays wrote:Does anyone have an update on this? Is it possible now to change the column names dynamically? It seems like for Web Client, this is a "must have".


Case from Marc has been closed with resolution:

We have added the right click support on header via labelfor label in tableview and then we also reevaluated this issue. We are not going to make headers in tableview scriptable. If you need some more properties of the label to be applied to tableview header please open separate case(s).

What exactly do you want to achieve ?
Laurian Vostinar
Servoy
lvostinar
 
Posts: 1047
Joined: Tue Feb 19, 2008 10:53 am

Re: labelFor issue

Postby hsummerhays » Wed Aug 24, 2011 4:34 pm

Hi Laurian,

I wanted to be able to update the text property of the label at runtime. It seems that the titletext property of the field is also not updatable at runtime. Here is a related topic: viewtopic.php?t=15528&start=15. If we had CSS for headers and could change titletext at runtime, then we wouldn't need to mess with labelfor. Also, I was thinking that a work around for now might be to use an html iframe and get the text from a custom html page that accepts some parameters. However, for my current needs I decided to simply show the data that needed the custom headers in a detail view below a table.
Hugh Summerhays
Mainstream Data
hsummerhays
 
Posts: 29
Joined: Tue Mar 01, 2011 6:12 pm
Location: SLC, UT, USA

Re: labelFor issue

Postby lvostinar » Thu Aug 25, 2011 10:38 am

hsummerhays wrote:Hi Laurian,

I wanted to be able to update the text property of the label at runtime. It seems that the titletext property of the field is also not updatable at runtime. Here is a related topic: viewtopic.php?t=15528&start=15. If we had CSS for headers and could change titletext at runtime, then we wouldn't need to mess with labelfor. Also, I was thinking that a work around for now might be to use an html iframe and get the text from a custom html page that accepts some parameters. However, for my current needs I decided to simply show the data that needed the custom headers in a detail view below a table.


1. You can change titletext property via solution model.
2. You can assign to labelfor text a tag (form variable for example); (there may be some refresh issue with this solution)
3. There is a case for adding a header css class, not sure if/when it will be implemented, anyway you can style the labelfor label which seems more powerful.

So, there are ways to achieve what you want, these workarounds are not enough for your solution?
Laurian Vostinar
Servoy
lvostinar
 
Posts: 1047
Joined: Tue Feb 19, 2008 10:53 am

Re: labelFor issue

Postby hsummerhays » Thu Aug 25, 2011 4:16 pm

Thank you for your suggestions. As I get more familiar with Servoy, I realize that the runtime components are fairly inflexible, but the SolutionModel makes up for that. Sadly, it's just not very intuitive - I think I understand a little bit why it is the way it is, but it is a bit unusual and clunky. That said, Servoy definitely has its strengths and v6 has some excellent improvements, otherwise I am not sure I would have felt comfortable moving forward with it. Thanks again for your help - this forum is great and Servoy does a good job of following up.
Hugh Summerhays
Mainstream Data
hsummerhays
 
Posts: 29
Joined: Tue Mar 01, 2011 6:12 pm
Location: SLC, UT, USA

Re: labelFor issue

Postby sergei.sheinin » Sun Feb 22, 2015 5:21 am

I need to add a checkbox to table view header with "checkall" option. There is a column with checkboxes and we need a feature with a "check all" box in the header (like in some email clients for example). I wasn't able to add a checkbox directly to the header and tried an approach with html tag but can't seem to change elements.<button>.text property. I also tried imageURL property which also didn't work. It says that the element is undefined. Also as soon as I set action method for a label it changes to button. Doesn't seem intuitive.

What workaround would you suggest?
Sergei Sheinin
JavaScript, RDBMS
http://js2dx.com
sergei.sheinin
 
Posts: 79
Joined: Wed May 07, 2014 3:22 pm

Re: labelFor issue

Postby mboegem » Tue Feb 24, 2015 11:53 am

Wow this is kicking up old stuff...
Nevertheless this 'old stuff' hasn't changed much.
As you can read in the previous posts scriptable headers hasn't made it as a new feature.

I guess the 'best' solution you can get is this:
On a tableview use a label with the labelFor property set to bind it to a body element.
Now the label will be displayed as custom header.
You can apply styles to your custom header, you can show images using html in the text property for example, but you can't change the element type: it is and will be a label, no matter what.
So if you want a 'checkbox' there: find yourself a nice icon and use it.

As it is a header, it will behave as such.
If you click it, it will 'sort' the column that you bind it to.
In case you want to change that behaviour, you'll need to attach a custom function to the 'onSort' event of the form.

The onSort event will receive a couple of arguments. Which will enable you to distinguish which column header was clicked.
This should be the replacement for your 'onAction' question.

Hope this helps.
_____________________
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance SAN Developer

Image
User avatar
mboegem
 
Posts: 1382
Joined: Sun Oct 14, 2007 1:34 pm
Location: Hoofddorp, The Netherlands


Return to Discuss possible Issues and Bugs

Who is online

Users browsing this forum: No registered users and 2 guests

cron