w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
PrimeFaces components are not rendered
It seems the label is displaying because it is an h-tag whereas the other tags are p, so first off check whether your primefaces jar is implemented by checking the Libraries on your project (if using Netbeans ) or Java ResourcesLibraries if on eclipse. The xmlns:p="http://primefaces.org/ui" is not sufficient to make primefaces work, it only specifies the namespace. Note : you're tagging primefaces-extensions where I think primefaces tag is more relevant in your case.

Categories : JSF

Changing components language PrimeFaces
Choose = label="anyString" CANCEL = cancelLabel="anyString" and UPLOAD = uploadLabel="anyString" then <p:fileUpload cancelLabel="anyString" label="anyString" uploadLabel="anyString" />

Categories : JSF

PrimeFaces components are not rendered in browser
1. When ever you are referring to Managed Bean properties from JSF components, use correct syntax for JSF EL statements. #{bean_name.property} In your code you are forgetting to provide #{}. For example at line #15 in login.xhtml use : <h:inputText id="id" value="#{loginBean.id}" required="true" requiredMessage="ID required"/> 2. You are keeping <h:head> inside <h:body>. Its not a good practice. Keep <h:head> out side <h:body>. Actual structure would be: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.

Categories : Eclipse

How are PrimeFaces custom components registered in their JAR, I'm not seeing @FacesComponent and taglib.xml
They're registered in /META-INF/faces-config.xml and /META-INF/primefaces-p.taglib.xml of the PrimeFaces library JAR file (thus not the source JAR file!). Those files are autogenerated during the library JAR build process and that's why they don't appear in the source JAR file. Note that the <component> registrations in /META-INF/faces-config.xml are equivalent to the @FacesComponent annotation.

Categories : JSF

How to update Primefaces components present on child window?
Can you debug your code in actionListner method formBean.fillForm() when button is clicked and see whether the prams are passing into backing beans or not. First your request goes to fillForm() method and then when its processing gets completed then onComplete() is called and new window will be open. Now you can also check at this point either your parameter is going properly or not.

Categories : Ajax

JSF with Primefaces Menu duplicate Id error?
I completely re-write the code and there was no error afterwords. I think that although I couldn't trace any duplicate Ids in previous time, there must have been one. This time also the same error occurred and I found that there is a duplication introduced by myself. If anyone get the same error, I think there is a very high possibility that it is caused by duplicates in manual insertion of duplicate ids.

Categories : JSF

Disable all Joomla 3.0 inline styling
Be aware that this will remove the inline "style" attributes from all elements: <script type="text/javascript"> (function($){ $(document).ready(function(){ $(this).find("*").removeAttr("style"); }); })(jQuery); </script> To be absolutely effective, place it just before the </body> tag, just in case you may have any other jQuery scripts adding css("something") to the elements.

Categories : CSS

Duplicate id error with primefaces dialog in template
The prolbem was binding attribute on datatable. See also: I'm getting 'Duplicate id error' after adding 'binding' attribute SessionScoped component was used in multiple views. I've used EL-table binding and then the problem was disappeared.

Categories : JSF

How to remove/disable styling on some bootstrap elements
Would Javascript be of any help to you? If so the .setAttribute native javascript function can help: http://jsfiddle.net/nMJjS/1/ Just replace the id that I made up with the id of input element you want to change

Categories : CSS

Tanslucent Java Chat showing duplicate components?
What is the point of setting both the foreground and background transparent? You will never see the text if it is transparent! Anyway to make a component completely transparent you don't play with the background. Instead you just use: textArea.setOpaque(false); If you want partially transparent backgrounds then you do use the setBackground() method. But you will have painting problems. See Backgrounds With Transparency for an explanation of the problems and some potential solutions. Also, you should NOT be using setBounds() to set the size/location of a component. Swing was designed to be used with layout managers. So take the time to learn how to use them for better functioning programs.

Categories : Java

Enable or disable primefaces datatable buttons at the certain row
You can make use of the rowIndexVar Something like this: <p:dataTable value="#{myBean.myRows}" rowIndexVar="myRowIndex" var="myRow"> <p:column headerText="#"> <h:commandLink styleClass="upArrow" disabled="#{myRowIndex eq 0}"/> <h:commandLink styleClass="downArrow" disabled="#{myRowIndex eq myBean.myRows.size()}"/> </p:column> </p:dataTable>

Categories : Java

Enable/Disable SelectOneMenu of primefaces using Java Script
You can use the disabled attributes of <h:selectOneMenu> to do the same. you don't need to use java script. <h:body> <h:form> <h:outputText value="#{test.visible}"/> <h:selectOneMenu valueChangeListener="#{test.valuChangeHandler}" onchange="submit()" immediate="true"> <f:selectItems value="#{test.opList}"/> </h:selectOneMenu> <h:selectOneMenu disabled="#{!test.visible}"> <f:selectItems value="#{test.testList}"/> </h:selectOneMenu> </h:form> </h:body> and the Bean can be written as: private boolean visible = false; public boolean isVisible() { return visible; } public void setVisible(boolean visible) { this.visible = visible; } //Other Co

Categories : Javascript

How to disable ctrl+v (paste) function in a JSF page ?. I am using primefaces component.
With JSF 2.2 you can "pass through" attributes to be rendered via <f:passThroughAttribute /> and you would be able to add something like onpaste="return false;", but I assume you do not use JSF 2.2 yet. You can still easily disable copy-pasting via some custom javascript. With standard javascript this is as easy as this (taken from here): window.onload = function() { var myInput = document.getElementById('myInput'); myInput.onpaste = function(e) { e.preventDefault(); } } With jQuery you can do it like this (taken from here): $(document).ready(function(){ $('#myInput').bind("cut copy paste",function(e) { e.preventDefault(); }); }); The jQuery option is also nice, because you can easily do this with all inputs on your site using a combination of t

Categories : JSF

Python: inherit from the built-in list type VS filter, map built-in functions
No, you'll have to cast the output of filter() or map() back to MyList. These functions are documented to produce a list, (almost) always. They do so if you pass other types of sequences as well. Quoting from the map() documentation: The iterable arguments may be a sequence or any iterable object; the result is always a list. In other words, filter() and map() don't care about the exact type of the sequences you pass in, that is not limited to your MyList type. The exception is filter(), which special-cases for tuple() and str(); quoting the filter() documentation: If iterable is a string or a tuple, the result also has that type; otherwise it is always a list. This special handling is hard-coded and cannot be extended. In Python 3, this exception no longer applies; both map

Categories : Python

Link error adding library built with Clang to iOS app built with GCC
On processors like ARM, with relatively simple instruction sets, some more complex operations are mapped on to function calls rather sequences of instructions. When you link using the "correct" compiler, the implementations of these are pulled in and it works! You on't normally see it. The obvious solution here would be to use marmalade to compile the dropbox library, then it will use a compatible compiler. The question then, I guess, is whether there is a reason you are not doing this to start with? Current Marmalade compilers don't support ARC. I guess that would be a reason not to compile under ARC.

Categories : IOS

Uncaught TypeError: Cannot call method 'remove' of null in primefaces.js?ln=primefaces
And I get this strange jQuery error: Uncaught TypeError: Cannot call method 'remove' of null in primefaces.js?ln=primefaces. Those kind of jQuery errors are typically caused by having duplicate different versioned jQuery JS files loaded by the webapp. PrimeFaces as being a jQuery-based JSF component library already automatically loads jQuery by itself. This problem suggests that you're for some reason manually loading another jQuery JS file yourself on top of PrimeFaces one via <script>/<h:outputScript>. If you remove them, then this error should disappear. If you happen to have a page wherein you'd like to use some jQuery, but the page itself doesn't utilize any PrimeFaces component and thus doesn't necessarily have PrimeFaces-bundled jQuery automatically loaded, then yo

Categories : Jquery

Is there any differences between java or .NET projects built in win 32 bit and another built in win 64 bit?
Pure Java is platform indepependent. It used on any project different platform which has a Java Runtime Environment (JRE). Oracle (Sun) provides the JRE implementation for major known platform architectures and OS. More overe, there's any thirdparty JRE instances which comply Java specs. All of these JREs will run your bytecoded projects. Yes, they could share the code with you, either you running x86 or x64 processor architecture. Just uses different JRE implementation, but it should not concirn your project if it's 100% pure Java certified. You could consult the Oracle about get certification for your Java project. I have nothing to know about .NET, but if it used with the Java project then you may have incompatibilities between platforms. dlls ofcourse are different which built for d

Categories : Java

Components on top of components block the mouse position
To track mouse move application-wide, you have to track WM_MOUSEMOVE message. You can use TApplicationEvents component for that. So, drop TApplicationEvents on form, and process WM_MOUSEMOVE in OnMessage event. Low order word in LParam specifies X coordinate of the cursor (relative to the window that the message is posted to), and high order word Y coordinate. procedure TfrmMain.ApplicationEventsMessage(var Msg: tagMSG; var Handled: Boolean); var Pt: TPoint; begin if Msg.message = WM_MOUSEMOVE then begin Pt := Point(WORD(Msg.lParam), HiWord(Msg.lParam)); windows.ClientToScreen(Msg.hwnd, Pt); windows.ScreenToClient(Handle, Pt); MouseMoved(Pt.X, Pt.Y); end; end; procedure TfrmMain.MouseMoved(const AX, AY: Integer); begin // do the work here end;

Categories : Delphi

Batch file fails when solution is built by Jenkis, but works when solution is built via command line
At the end, it seems that the issue was that there was a duplicate workspace folder. 1 was updated, and the other 1 was built, resulting the tested workspace did not get latest updates. according to this link this was due to the way jenkins behaves with multiple configurations.

Categories : Visual Studio 2012

Parse an Expression to its components and sub components
Actually if you want your parser to be strong enough to deal with most cases, you would like to use a tokenizer(java has a implemented tokenizer class) to token the string first, then try to recognize each expression, storing operands and operators in a tree structure, then evaluate them recursively. If you only want to deal with some simple situations, remember to use recursion, that is the core part~

Categories : Java

How to combine two multidimensional arrays with showing duplicate keys or if duplicate, must add the values
$array1 = array( 'a1' => array(200,300,300), 'a2' => array(100,600,200)); $array2 = array( 'a1' => array('gen','gen2','gen'), 'a2' => array('gen2','gen3','gen3')); $result = array('a1' => array(), 'a2' => array()); foreach($array2 as $k => $v) { foreach ($v as $k2 => $v2){ if (array_key_exists($v2, $result[$k])){ $result[$k][$v2] += $array1[$k][$k2]; } else { $result[$k][$v2] = $array1[$k][$k2]; } } } Output: Array ( [a1] => Array ( [gen] => 500 [gen2] => 300 ) [a2] => Array ( [gen2] => 100 [gen3] => 800 ) )

Categories : PHP

Hudson server running app engine, duplicate shell script executions result in duplicate property errors
It might be the case that the dev_appserver is already running and then you run it again with hudson job. The best way will be to stop the dev_appserver instance first and then pump it up again.

Categories : Python

Disable autochange scrollbar position (disable scroll to active control)
Find the same question here How can I disable the scroll-into-view behavior of TScrollBox? In my case I use override AutoScrollInView procedure. Disable implemention of this procedure at all. procedure TfrSection.AutoScrollInView(AControl: TControl); begin // inherited; end; It works.

Categories : Delphi

Find duplicate values in an array which creates a new array with key as duplicate keys and values as the dupes
This should do what you want. Loop over the array, and see if the value was already in there. If so, add it to the result. $arr_duplicates = array(); foreach($array as $k=>$v){ // array_search returns the 1st location of the element $first_index = array_search($v, $array); // if our current index is past the "original" index, then it's a dupe if($k != $first_index){ $arr_duplicates[$k] = $first_index; } } DEMO: http://ideone.com/Kj0dUV

Categories : PHP

CSS
<div class="headerClear" /></div> see this div has unexpected close the right method is <div class="headerClear"></div> replace with this and add this to your css body{ margin:0px;}

Categories : CSS

PHP variable and styling
Try using double quotes for your HTML attributes and concatenate your $first variable, like so: $user = "$email"; $usersubject = "Thank you for subscribing"; $userheaders = "From: subscriptions@3elementsreview.com "; $userheaders .= "Content-type: text/html "; $usermessage = "Welcome <span style="color:#ff6000; font-size:1.25em; font-weight:bold;">".$first."</span>, We're glad you've decided to subscribe to our email list! There's a lot of great things happening at 3Elements that we can't wait to show you. So stay tuned for notifications about submission periods, issue release dates, contests, and other news. Also, be sure to like us on Facebook and follow us on Twitter! Sincerely, The 3Elements Team www.3ElementsReview.com Facebook.com/3elementsreview @3ElementsRevie

Categories : PHP

Styling problems using CSS
Do you have a reset sheet? Copy this to a new css file, call it reset.css and then load it in your page before you load your main css. html{color:#000;background:#FFF} body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0} table{border-collapse:collapse;border-spacing:0} fieldset,img{border:0} address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal} ol,ul{list-style:none} caption,th{text-align:left} h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal} q:before,q:after{content:''} abbr,acronym{border:0;font-variant:normal} sup{vertical-align:text-top} sub{vertical-align:text-bottom} input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit} input,textarea,select{*fon

Categories : HTML

Styling sub menu
You need to put the sub-menu ul inside the li-element, like so: <nav id="navbar_text"> <ul> <li><a href="index.html">Home</a></li> <li><a href="aboutus.html">About</a></li> <li><a href="#">Products</a> <ul class="submenu"> <li><a href="index.html">Fireplaces & Accessories</a></li> <li><a href="aboutus.html">Stoves</a></li> <li><a href="aboutus.html">Outdoor Kitchens</a></li> <li><a href="aboutus.html">Gas Grills</a></li> </ul> </li> <li><a href="#">Servic

Categories : HTML

CSS styling for Mono C#
I think Pixate tries to do this. https://github.com/Pixate/MonoTouch-Pixate No idea how good it is though.

Categories : C#

Styling tables using CSS
I'll provide you a CSS solution for this: table.class_name tr:nth-child(odd) { /* Styles */ } table.class_name tr:nth-child(even) { /* Styles */ } That's all you need, although it’s not supported in IE 8 and earlier. Demo For your table headers, you can simply use a different selector to over ride the background styles like table.altrowstable tr th { background: #fff; } Demo 2

Categories : Javascript

Navigation Bar Styling with Css
Simply apply .active to the navigation item you require to be active. HTML <li><a href="#" class="active">Home</a></li> CSS ul.topnav li a.active { border-top: 5px solid orange; }

Categories : Javascript

Using LESS for custom styling
Wrote an MSBuild target to compile all the LESS files for each of the different customers using the dotless compiler. The target uses the FileUpdate task from MSBuildTasks to amend the variables Import statement in each LESS file prior to the compilation task e.g @import '/css/default/variables.less' is changed to '/css/customer1/variables.less' etc.

Categories : CSS

Css styling in rails
Apart from that your HTML markup is terrible wrong, for example you can not have a li tag within a span tag. Check your site out at http://validator.w3.org/check?uri=http%3A%2F%2Fwww.leapfm.com%2F&charset=%28detect+automatically%29&doctype=Inline&group=0. You can not add margin and padding to a span without it being a block object. If you add display:block to your .subtext it will sit closer to your title and can have more margin at the bottom.

Categories : CSS

Hover Styling CSS
Try using a reset [1]. Simply checking the Normalized CSS[2] box in Fiddle Options solves this. http://jsfiddle.net/H9CTe/2/ (will update)

Categories : HTML

Styling Inconsistencies
This will fix your image issue <img style="border:none" src="./Seltec Computers - Contact Us_files/logo.png"> I'm still working on your footer issue, I'll post back when I solve the issues

Categories : HTML

WPF label styling
The error is correct, you cannot set a corner radius on a Label. What you can do is wrap the Label with a Border and apply your style to that to get the desired look. EDIT: The Style Resource: <Style x:Key="MyBorderStyle" TargetType="Border"> <Setter Property="BorderBrush" Value="White" /> <Setter Property="BorderThickness" Value="2" /> <Setter Property="CornerRadius" Value="3" /> </Style> The border wrapped label: <Border Style="{StaticResource MyBorderStyle}"> <Label Content="My Label" /> </Border>

Categories : Wpf

Text box styling
Replace <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" /> with <ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> ScrollViewer named PART_ContentHost is a mandatory part of any TextBox control template. You should use Default WPF Control Styles and Templates as reference instead of coming up with your own template.

Categories : Wpf

Styling Wpf Pie Chart
I think that you should be able to use a Color Palette. Take a look at the How to set a default colour to the Pie slices in WPF Pie chart post here on StackOverflow. Additionally, take a look at the Chart Appearance article on MSDN.

Categories : C#

Styling navigation through CSS
You can try something like: #navi img, #navi a { float: left; /* float next to each other on the left hand side */ } #navi a { /* use some padding to have some empty space */ padding: 5px; border-right: 1px solid #ffffff; } #navi a:hover { /* on hover, background white on A tags */ background: #ffffff; } And than play untill it fits, with the right side you could do the same, inside the nav you can float it to the right. If you want to have a seperate DIV you should also float this #navi to the left and the #social to the right. If you only use padding on an element (which is blocked) the text will always be centered because the padding left / right are the same. TIP: If you use floats like this and you want an item to be on a new line. Normally it would be set next to

Categories : HTML

Text styling in CSS
That is because you need to print this: footer { background: #333; } footer p { color: #FFFFFF; font-size: 60%; font-family: tahoma, sans-serif; text-align: center; margin: 0; padding: 10px 0; } instead of this: footer { background: #333; color: #ccc; font-size: 70%; font-family: tahoma, sans-serif; text-align: center; margin: 0; padding: 10px 0; } In CSS you always need to cut your code on p, h2 a, span etc.

Categories : HTML



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.