Topic
  • 8 replies
  • Latest Post - ‏2013-03-21T17:00:05Z by deshetti
deshetti
deshetti
26 Posts

Pinned topic Selection Coach View Style changes when you rename the Coach View

‏2013-03-20T19:00:41Z |
Hi,

I am trying to create a new selection coach view with an ability to place the label on the left rather than the OOB way of placing it on the top. I am able to achieve what I am trying to do apart from the following issue.

I was able to replicate the issue by the following steps:

1. To change the coach view I started of with a copy of the existing selection coach view from 8.0.1 coaches toolkit to my sample toolkit
2. When I use this selection coach view on the coach it looks as expected
3. When I change the name of the coach view from selection to selection2(or any other name) the styling for the control changes with a weird arrow with looking arrow and some space before that

Attaching the image for the above.

I tried to look up what is causing the issue and I am not able to find the cause. Any help is appreciated.

Regards
Shashi
Updated on 2013-03-21T17:00:05Z at 2013-03-21T17:00:05Z by deshetti
  • huangjd
    huangjd
    47 Posts

    Re: Selection Coach View Style changes when you rename the Coach View

    ‏2013-03-20T21:13:48Z  
    The class names are hard coded to the name of the Coach View. So OOB "Select". So when you change the coach view's name it adds the new custom name to the class list. But in the Style sheet, it's looking for "Select"

    You can fix it one of two ways. Add the "Select" classname to the HTML attributes of your custom Select.
    OR
    In your custom Coach View, add domClass.add(this.context.element, "Select"). You'll want to do this in a if statement where it knows it's a single select.

    The multi select looks for a different set of styles

    Jonathan Huang | Centric Consulting | http://bpmandyou.wordpress.com/
  • kolban
    kolban
    3322 Posts

    Re: Selection Coach View Style changes when you rename the Coach View

    ‏2013-03-21T00:00:34Z  
    • huangjd
    • ‏2013-03-20T21:13:48Z
    The class names are hard coded to the name of the Coach View. So OOB "Select". So when you change the coach view's name it adds the new custom name to the class list. But in the Style sheet, it's looking for "Select"

    You can fix it one of two ways. Add the "Select" classname to the HTML attributes of your custom Select.
    OR
    In your custom Coach View, add domClass.add(this.context.element, "Select"). You'll want to do this in a if statement where it knows it's a single select.

    The multi select looks for a different set of styles

    Jonathan Huang | Centric Consulting | http://bpmandyou.wordpress.com/
    See also the following Request For Enhancement:

    http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=30893

    If this is of value to you, consider voting it up. Also, if y'all ever have bored-time, surf through the list of all enhancements and add your own comments and votes.

    Neil
  • deshetti
    deshetti
    26 Posts

    Re: Selection Coach View Style changes when you rename the Coach View

    ‏2013-03-21T14:53:41Z  
    • huangjd
    • ‏2013-03-20T21:13:48Z
    The class names are hard coded to the name of the Coach View. So OOB "Select". So when you change the coach view's name it adds the new custom name to the class list. But in the Style sheet, it's looking for "Select"

    You can fix it one of two ways. Add the "Select" classname to the HTML attributes of your custom Select.
    OR
    In your custom Coach View, add domClass.add(this.context.element, "Select"). You'll want to do this in a if statement where it knows it's a single select.

    The multi select looks for a different set of styles

    Jonathan Huang | Centric Consulting | http://bpmandyou.wordpress.com/
    Thanks Jonathan. That worked.
  • deshetti
    deshetti
    26 Posts

    Re: Selection Coach View Style changes when you rename the Coach View

    ‏2013-03-21T14:59:54Z  
    • kolban
    • ‏2013-03-21T00:00:34Z
    See also the following Request For Enhancement:

    http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=30893

    If this is of value to you, consider voting it up. Also, if y'all ever have bored-time, surf through the list of all enhancements and add your own comments and votes.

    Neil
    Hi Niel,

    I came across the link in one your other posts and already voted up for the enhancement request last week. I went ahead and did the left label (with an ability to switch it b/w Top and Left) for both Input Text and Select Controls. I will test it a bit more and post it on the community site.

    Thanks
    Shashi
  • kolban
    kolban
    3322 Posts

    Re: Selection Coach View Style changes when you rename the Coach View

    ‏2013-03-21T15:03:09Z  
    • deshetti
    • ‏2013-03-21T14:59:54Z
    Hi Niel,

    I came across the link in one your other posts and already voted up for the enhancement request last week. I went ahead and did the left label (with an ability to switch it b/w Top and Left) for both Input Text and Select Controls. I will test it a bit more and post it on the community site.

    Thanks
    Shashi
    Shashi,
    How did you achieve the effect? A new Coach View?

    Neil
  • deshetti
    deshetti
    26 Posts

    Re: Selection Coach View Style changes when you rename the Coach View

    ‏2013-03-21T15:54:16Z  
    • kolban
    • ‏2013-03-21T15:03:09Z
    Shashi,
    How did you achieve the effect? A new Coach View?

    Neil
    Koblan,

    Yeah, I created a new coach view.

    Regards,
    Shashi
  • kolban
    kolban
    3322 Posts

    Re: Selection Coach View Style changes when you rename the Coach View

    ‏2013-03-21T16:04:52Z  
    • deshetti
    • ‏2013-03-21T15:54:16Z
    Koblan,

    Yeah, I created a new coach view.

    Regards,
    Shashi
    Yesterday when I was re-reading the RFE for left labels, I noted that IBM development had said "This can already be done with CSS". To which I went "Huh?". Turns out they were exactly right and it wasn't horrible to figure out. See the attached PDF to this post. Is this a satisfactory alternative?

    Neil

    Attachments

  • deshetti
    deshetti
    26 Posts

    Re: Selection Coach View Style changes when you rename the Coach View

    ‏2013-03-21T17:00:05Z  
    • kolban
    • ‏2013-03-21T16:04:52Z
    Yesterday when I was re-reading the RFE for left labels, I noted that IBM development had said "This can already be done with CSS". To which I went "Huh?". Turns out they were exactly right and it wasn't horrible to figure out. See the attached PDF to this post. Is this a satisfactory alternative?

    Neil
    Thanks Neil! This is a lot simpler way to what I was doing earlier. I will definitely prefer this approach and change what I already did.

    Regards,
    Shashi