I'm getting the following error in Eclipse juno:
Attribute value (POST) uses wrong case character
in the following line inside one of my HTML files:
<form action="http://allteamz.us5.list-manage.com/subscribe/post"
method="POST" id="mc-embedded-subscribe-form">
Is there a way to tell eclipse to "ignore" this error? Tried a few things but nothing seems to be working..
Go to Windows>>Preferences>>Web>>HTML Files>>Validation. A list should be shown and there should exist a title in bold called "Attributes". Selecting "Ignore" for the option "Attribute value using wrong case character" should solve it.
According to W3Schools the allowed values for the method attribute in a form element are only 'get' and 'post', lower case, so I think a better solution is change to lower case. This is strange to me because everywhere else these methods seem to be capitalized.
Eclipse was acting funky but after the restart the normal validation-ignore worked.
Go to Eclipse (or Window) -> Preferences -> Validation -> HTML Syntax Validator, and then 'uncheck' both manual and build
Instead of ignoring the issue through Eclipse configuration try to use proper tag .
This error comes if something like this written
< div onClick="..." > < /div>
Here one need to write onclick="" ; C in lower case .
Related
I am using Eclipse and I have the following problem debbugging a JSP page.
So into a JSP page I have something like this:
<c:forEach items="${listaScuoleDS}" var="scuola" varStatus="item">
................................................
................................................
DO SOMETHING
................................................
................................................
</c:forEach>
So, as you can seem in the forEach cycle I am using the expresion language that identify a collection on which iterate: items="${listaScuoleDS}"
Now, starting the application in debug mode and putting a brackpoint on the previous statment, the application correctly stop on this line but I can't analyze the content of the "${listaScuoleDS}" variable.
I try to put "${listaScuoleDS}" into the Ecipse expression debug tab but I obtain no value.
How can I see the content of the previous EL variable in debug mode?
Tnx
Unfortunately you can not debug tags bound to taglibs inside JSP-Files.
There's an implicit object called pageContext. You should be able to access this variable through your debugger. I have noticed that this method may not work in IntelliJ but it does work in Eclipse.
In Eclipse:
Open Debug Perspective and write 'pageContext' in the Expressions window.
Here are a couple reference:
Page Context Reference
pageContext Example
I'm currently trying to develop an Eclipse Plugin to support code replacement, like what the default content assist in Eclipse do. What I want to implement is something like "insert argument names automatically on method completion with visualized box around the argument" and I can "use the Tab key to navigate between the inserted names" and "while navigating, list of optional variables for current argument can be displayed and be chosen".
In short, it comes to two questions:
How to add the visualized box around the already existed variable or even Java keywords that need replacement? And at the meanwhile I can use Tab key to switch between these boxes.
How to display a list of candidates to select from when I trigger on the box?
By now I only figure out the extension point : org.eclipse.jdt.ui.javaCompletionProposalComputer may be useful, but I have no idea where to start at? Thanks in advance.
Oh, finally I've solved it myself...
For the 'box', it should be the LinkedModeModel, this class should work with LinkedPositionGroup and LinkedPosition to add mutiple boxes. And we should use LinkedModeUI to set it up.
For the content assistant, there's no need to use the extension point. There is a ProposalPosition class which extends LinkedPosition for you to add your proposals for the 'box' in its constructor. And we can simply use the CompletionProposal to construct a ICompletionProposal array as the argument of ProposalPosition's constructor.
I can't disable escaping in a Zend_Form_Element_Submit, so when the label has special characters it won't display it's value..
This is my actual Zend Form piece of code:
$this->submit = new Zend_Form_Element_Submit('submit');
$this->submit->setLabel('Iniciar Sesión');
$this->submit->setIgnore(true);
$this->addElement($this->submit);
I've tried $this->submit->getDecorator('Label')->setOption('escape', false); but I obtain an "non-object" error (maybe submit isn't using the "Label" Decorator)..
I've also tried as suggested $this->submit->setAttrib('escape', false); but no text will be shown either.. Any idea? Thanks
Should be as simple as doing this:
$element->addDecorator('Label', аrray('escape'=>false));
Or see setEscape(). http://framework.zend.com/manual/1.12/en/zend.form.standardDecorators.html
Regarding failure to retrieve named decorator... Try getDecorators() Do you see 'label' in the results?
There is no Label decorator for submit form element by default (this is why you get the error).
The $this->submit->setLabel('Iniciar Sesión'); value goes to Zend_View_Helper_FormSubmit, which always does escaping and uses the label as a value.
The helper used by the Submit element escapes by default. Unlike with the label decorator, submit labels are included in a HTML attribute so they need to be escaped.
Your label - Iniciar Sesión - is a perfectly valid UTF-8 string, so the escaped version of it will be the same. If your label is not appearing then something else is going wrong. I'd guess that your page is being served using a charset that doesn't match what Zend View is using (UTF-8 by default).
View the page source to see what actually gets output - that might give you some more clues. Alternatively if the page this form is on is public, if you can provide a URL we might be able to spot the issue.
I ran into a similar issue. In my instance, I added both a label and a description to a text field element. This line of code allowed me to turn off the html escaping for the description attached to that field element:
$form->getElement('txtUPC')->getDecorator('description')->setOption('escape', false);
In my testing, the setEscape() was not recognized by the form elements or their decorators.
I have been using GQuery for a while now.
I recently came across some unexpected behaviour.
I have 2 different scenarios:
a) I want to select an element say
Link
I used
GQuery.$("a[href*=site:helloworld.com]")
This doesn't seem to work.
b) The other thing I wish to select is
<h1 data-title="SampleTitle">Title</h1>
I need to extract the value of data-title. I used the following:
GQuery.$("h1").attr("data-title");
Now, this doesn't return an error but it doesn't return the value either. It just returns a blank String. This doesn't have anything to do with the '-', is it?
What am I doing wrong here?
a) I did a quick test, and the selector works fine! (But you have to quote the value as mentioned in another answer: GQuery.$("a[href*=\"site:helloworld.com\"]"))
Note: The "*=" selector is defined in CSS 3. Gwtquery usually only supports CSS 2 at the moment, see http://code.google.com/p/gwtquery/wiki/CssGuide#CSS_scope
b) GQuery.$("h1").attr("data-title"); works for me: It returns the full attribute string value of the first "h1" element in the document
I'm using gwtquery 1.1.0 + GWT 2.4.0. If possible, try to upgrade to these (or later) versions.
i got a (hopefully) simple problem with a Code Template on Eclipse. I try to use a Code Template to surround a word with somehing. The Replacement is nearly successful, but i have a problem with handling the selected word.
My task is to select "save " on this example
<button type="submit">save</button>
and want to have
<button type="submit"><?= $this->_('save') ?></button>
The problem is, that i got this after replacement
<button type="submit">save<?= $this->_('save') ?></button>
Is there a possibility to remove the selected word after using a code template? I am thankful for every help i get. Smile
I forgot, the template looks like this:
<?= $$this->_('${word_selection}') ?>${cursor}
Maybe this question is somewhat old, but I came across the same idea in Java for adding String constants by simply typing the desired name and then replace it with a template, like this for example:
type VALUE and get it replaced with private static final String VALUE = "VALUE";
I use eclipse 3.6 and got it working with the following template:
private static final String ${word_selection} = "${word_selection}";
Then I do the following steps:
type VALUE
select it by double-clicking and hit CTRL+SPACE
enter first few chars for the template name in the opened proposal pop-up and select the template (see image below)
hit ENTER
And the result is this:
Maybe this is helpful.
Using templates and the ${line_selection} or ${word_selection} variables, Eclipse (Helios, 3.6.1 here) always seems to insert the rendered template after the text you initially selected.
I've experienced this myself (in the HTML editor) while trying to implement a similar 'Surround with Tag' template, and gave up and reverted to using Ctrl+1 (after selecting text), and using 'Surround with new element...'. Unfortunately this workaround doesn't help you much w/ PHP.
Possible bug report?
I also faced the same problem in jsp page. I resolved this issue by using 4 or more characters to select the template in eclipse. And I got the correct result.