w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Eclipse plug-in to edit faces-config.xml file
No, but you can use the JBoss Developer Studio. There are more editors like VPE. Checkout some tutorials on Youtube: http://www.youtube.com/watch?v=OMtcjgTyP-g

Categories : Eclipse

Why can JSF resource bundle var be used differently with f:loadBundle and faces-config
Both <f:loadBundle> and <resource-bundle> are different ways to load properties with difference being in their access scopes. The latter has by the way the additional benefit that the bundle is also injectable in a managed bean by @ManagedProperty("#{myProp}") Using <resource-bundle> in faces-config.xml creates a global resource bundle which can be accessed anywhere in your application. This is implemented through a java.util.ResourceBundle instance. Using <f:loadBundle> in your view creates a view-specific resource bundle which is accessible only within that view. The tag handler implements this using an internal implementation of a Map. This is as specified in the VDL of the tag: Load a resource bundle localized for the Locale of the current view, and expo

Categories : JSF

View Scope doesn't work in faces-config.xml
JSF doesn't do that. You're apparently being misled by the IDE (e.g. Eclipse) giving this warning as if it came from JSF itself. Note that it works fine when you ignore this warning and run the project as is. You've apparently configured your IDE project to be a JSF 1.x project instead of a JSF 2.x one. You'd need to set it right in the project facets configuration in IDE project's properties. Unrelated to the concrete problem, since JSF 2.0 there's no need to register beans in faces-config.xml anymore. You could just use @ManagedBean and friends for that.

Categories : JSF

jsf 2 application scope bean initiliazed fron faces-config.xml
The <managed-bean> entry in faces-config.xml basically declares a new @ManagedBean. I.e. a JSF managed bean. However, with @Inject you're basically injecting a CDI managed bean. Those are two mutually exclusive ways of managing beans. Effectively, you end up with 2 instances of the very same bean class, one managed by JSF via faces-config.xml and another one managed by CDI via annotations. Only the one managed by JSF has those properties set. You've 2 options: Use @ManagedProperty to inject it as a JSF managed bean. This in turn however requires that the acceptor is by itself also a JSF managed bean. Forget the faces-config.xml approach altogether. Define them as JNDI resources in either web.xml or server config and use @Resource to inject them. Alternatively, define them as .pr

Categories : JSF

Migrating JSF 1.2 to 2.x resulted in java.lang.NullPointerException at com.sun.faces.config.InitFacesContext.cleanupInitMaps
java.lang.ClassNotFoundException: org.apache.myfaces.webapp.StartupServletContextListener As the package name hints, this is a MyFaces-specific class which is obviously not available anymore when you replace MyFaces 1.2 by Mojarra 2.0 instead of MyFaces 2.0. This class is usually been referenced as <listener> entry in webapp's web.xml. If you remove the whole <listener> entry from web.xml, then this exception should disappear. You usually don't need to explicitly declare one yourself as this is already registered in the TLD file. However, Jetty has some bugs with that and you'd need to explicitly register it yourself. For Mojarra, that would be: <listener> <listener-class>com.sun.faces.config.ConfigureListener</listener-class> </listener> A

Categories : JSF

What is Liferay Faces and its connection to JSF (Java Server Faces)
As stated on their main product page: What is Liferay Faces? Liferay Faces is an umbrella project that provides support for the JavaServer™ Faces (JSF) standard within Liferay Portal. Its Modules: Liferay Faces Alloy The Liferay Faces Alloy sub-project provides a suite of JSF UI components that utilize Alloy UI. Liferay Faces Bridge The Liferay Faces Bridge sub-project is a portlet bridge for JSF which provides the ability to deploy JSF web applications as portlets within Liferay Portal. Liferay Faces Portal The Liferay Faces Portal sub-project provides JSF utilities, EL keywords, and a suite of JSF UI components that are Facelet equivalents of the JSP tag libraries provided by Liferay Portal.

Categories : Java

I don't see the Web.Debug.config and Web.Release.config files on my web.config after upgrading my project to VS2012
I found the answer in a post here: how to add files in web.config transformation process? In your "App Data" folder you'll find your publish profiles you created and can right click on them to add a config transform file.

Categories : Visual Studio 2012

Python DNS resolver and original TTL
You can only get the original TTL by directly querying the authoritative server. This is not Python-specific. Find out what the set of authoritative nameservers is by querying for NS records for the desired name. If you find no NS records for the name then remove the first label and query again (query the parent domain). Recursively repeat until you get some NS records. Once you have NS records, query those nameservers directly for the originally requested name. In case one or more of these nameservers doesn't respond, query the next one in the list. This is basically equivalent to doing part of the job of a recursive resolver.

Categories : Python

Content resolver query NullException
Your Content resolver is null, also if you want to get all the music saved on external storage use context.managedQuery. look this: Android external storage or Get filename and path from uri from mediastore.

Categories : Android

Spring XML View Resolver not working
after 2 days, i found what i needed the issue was simple just made the class PDFDocumentController to extend the Class AbstractController just made public class PDFDocumentController extends AbstractController instead of public class PDFDocumentController extends SecurityController

Categories : Java

Can we expect a browser javascript API to a DNS resolver?
Went digging a second time (properly now) on the W3C lists. http://lists.w3.org/Archives/Public/public-webapps/2011AprJun/1065.html https://www.w3.org/Bugs/Public/show_bug.cgi?id=12965 This was discussed in May 2011. I didn't find anything else on other relevant lists, nor at the WHATWG, so I now assume that this is the current state of things (as of July 2013). To summarize: There are legitimate concerns, It's not clear that they can't be overcome, A formal proposal has yet to be submitted to either the W3C or the WHATWG, Support from browser vendors is probably required first since the feature appears to be non-trivial, A collection of use-cases is needed. PS: Also retrieved the logs for the discussion at #whatwg on Freenode mentioned in the bug entry; it doesn't seem directly

Categories : Javascript

Ivy Resolver Namespaces and the Resolve task
I just found the namespace doco in the manual.... I think this approach would be overly complex. I suggest creating two repository declarations as follows, with the appropriate file system pattern: <ivysettings> <settings defaultResolver="central"/> <resolvers> <!-- Default resolver used to resolve 3rd party software from Maven Central --> <ibiblio name="central" m2compatible="true"/> <!-- Team1's repository. ivy and artifact patterns can be customized --> <filesystem name="team1-repo"> <ivy pattern="${ivy.settings.dir}/repo/1/[organisation]/[module]/ivys/ivy-[revision].xml"/> <artifact pattern="${ivy.settings.dir}/repo/1/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/> </filesyste

Categories : Misc

How can I customize Source Resolver in Media Foundation
Generic ways of customization are documented in Scheme Handlers and Byte-Stream Handlers: The source resolver can create a media source from a URL or from a byte stream [...]. For URLs, the source resolver uses scheme handlers. For byte streams, it uses byte-stream handlers. [...] To register a new scheme handler, add an entry whose name is the CLSID of the scheme handler, [...] To register a new byte-stream handler, add an entry whose name is the CLSID of the handler, [...]

Categories : Misc

How to ignore prefix in spring view resolver
According to the documentation of UrlBasedViewResolver: View names can either be resource URLs themselves, or get augmented by a specified prefix and/or suffix. You could give back the absolute path. To avoid returning the absolute path everywhere, you could define multiple ViewResolver (in your case multiple InternalResourceViewResolver) using the order attribute to define the resolution order. ViewResolvers can be chained.

Categories : Java

Is Dependency Resolver (MEF/Unity) the only way to resolve the View from the ViewModel in WPF?
You can use DataTemplates: <DataTemplate DataType="{x:Type local:ViewModelClass}"> <views:ViewClass /> </DataTemplate> This templates can be declared as XAML resources. Update: In this cases, wouldn't it be better to use Unity and resolve your viewmodels from code behind? I'm actually doing it this way for cases where the container of my views is not an ItemsControl: public MyView(MyViewModel vm) { InitializeComponent(); DataContext = vm; } And let Unity resolve the ViewModel.

Categories : Wpf

Trying to connect to XMPP server with aSmack on Android gets me "no dns resolver active"
I recommend using Smack instead of aSmack. Asmack is a patched and enhanced version of Smack and aSmack is somewhat dead. In Smack code refactoring is done, added some new methods and refactored DNS classes. See this Smack UPDATE After seeing your error log it seems to be the problem of network call on main UI thread How to resolve NetworkOnMainThread exception? Use AsyncTask which makes your network call on different thread(in background) rather than on app's main thread. Move your code to AsynTask:- private class ConnectToXmpp extends AsyncTask<Void, Void, Void> { @Override protected Void doInBackground(Void... params) { ConnectionConfiguration config = new ConnectionConfiguration( server_host, SERVER_PORT); XMPPConnection m_connection = new XMPPCo

Categories : Android

Autofac dependency resolver passes the same value for parameters when resolving the service
Figured it out! I had to replace this: var factory = _dependencyResolver.GetService<Func<string, string, string, IContext>>(); IContext context = factory(contextToken, hostUrl, request.Url.Authority); with this: var context = _dependencyResolver.RequestLifetimeScope.Resolve<IContext>( new NamedParameter("contextToken", contextToken), new NamedParameter("hostUrl", hostUrl), new NamedParameter("appUrl", request.Url.Authority));

Categories : Asp Net Mvc

Custom Json.NET contract resolver for lowercase underscore to CamelCase
OK, found the solution. I was missing a default constructor for the Person class. Once I did that, the mapping worked when calling the Put method. In fact, I could also remove the FromBody specifier: public object Put(int id, Person person)

Categories : C#

brew doctor yields python config warning: should I remove these config files? (Mac)
Homebrew mainly uses built-in tools, so formulae generally should be built against system Python anyway. You shouldn't have any problem with them unless you override system Python with Homebrew ones (which is generally not recommended unless you need to do something special).

Categories : Python

add and tag to collections in applicationHost.config or web.config using Powershell webadministration module
Without resorting to xml manipulation, the following answer may help you get started with this problem: Add a 'clear' element to WebDAV authoringRules using powershell

Categories : Shell

What is the recommended method of storing EJB configuration? (Java version of app.config/web.config)
There are several ways and depending on what's your deployment structure it may make sense to pick one or another. META-INF/ejb-jar.xml - this is used when the EJBs are inside their own JAR which in turn is part of an EAR. WEB-INF/ejb-jar.xml - this is used when EJBs are part of a WAR. annotations - many configuration options can be specified through annotations on the bean class itself. The above are configurations specific to EJBs. However, some of the resources you mention may be specified in both ejb-jar.xml and web.xml. For reference, try reading the schema file - it's fairly well documented, or something like this.

Categories : Java

override git config --system in .gitconfig user file ( git config --global )
If it is a system wide config, each user can override a config value in his/her global and local settings. But there is no easy way to "deactivate" a setting in a lower config file. Even set it to "" generally has unintended consequences. That very topic was discussed in April 2010. For instance, deactivating the send-email option: True, after thinking a bit about this using no value to unset is a horrible, horrible hack. git-send-email should be corrected to not only check that there is value from config or command line option, but also that it is sane (i.e. non-empty, or simply true-ish if we say that smtpuser = "0" is not something we need to worry about supporting). That would be true for any setting: the diff.c#run_diff_cmd() function will attempt to run an external diff i

Categories : GIT

Updating a config file adds additional config sections
Try changing the ConfigurationSaveMode from ConfigurationSaveMode.Minimal to ConfigurationSaveMode.Modified Modified only saves the properties that you have changed. From MSDN: Full Causes all properties to be written to the configuration file. This is useful mostly for creating information configuration files or moving configuration values from one machine to another. Minimal Causes only properties that differ from inherited values to be written to the configuration file. Modified Causes only modified properties to be written to the configuration file, even when the value is the same as the inherited value.

Categories : C#

Passing config file as argument to config parse module
start.py ... options.ConfigFile = args.filename ... options.py from ConfigReader import getConfigValue as getVal, ConfigFile def getTest(): Test = getVal('main', 'test') return Test ConfigReader.py import os import ConfigParser ConfigFile='default.cfg' def config(): cfg = ConfigParser.ConfigParser() for f in set(['default.cfg',ConfigFile]):

Categories : Python

Is there a way to unset a global git config section in a local git config file?
No Git config includes operate: as if its contents had been found at the location of the include directive ref That means you can't override/remove the include itself, as as soon as it's found the contents of the included file are injected/loaded. You can of course override the settings it contains in a more specific config file: # ~/.git.config.team [user] name = name Locally, via git config user.name nic # /some/project/.git/config [user] name = alias Yielding: /some/project $ git config user.name alias /some/project $

Categories : GIT

Website is not taking connection string from web.config. it is searching for app.config
you can have either a web.config for a web project or an app.config for an application. as alternative you can load in custom configuration files see also http://msdn.microsoft.com/en-us/library/system.configuration.sectioninformation.configsource.aspx

Categories : C#

codeigniter custom config file calling config data
it seems you create form at wrong place, try to get main controller first: $CI =$ get_instence(); 'rules'=>'required|min_length['.$CI->config->item('min_password_length', 'ion_auth').']'

Categories : Codeigniter

mongoDB, could not read from config file -- config in different folder / Uninstall it?
Issue resolved with following steps (thanks to Karl Seguin's 'The Little MongoDB Book'). If you installed MongoDB via the download package from mongodb.org, you have to create create your own config file in /bin. Follow the instructions below (copied from Karl Seguin's book): download package unzip package Create a new text file in the bin subfolder named mongodb.config (if you have permission issues saving the file, save it first to your desktop then move file into folder). Add a single line to your mongodb.config: dbpath=PATH_TO_WHERE_YOU_WANT_TO_STORE_YOUR_DATABASE_FILES. For example, on Windows you might do dbpath=c:mongodbdata and on Linux you might do dbpath=/var/lib/ mongodb/data. Make sure the dbpath you specified exists Launch mongod with the --config /path/to/your/mongodb

Categories : Mongodb

how to properly nest config-sections config-elements?
Took me a while to find the problem. It seems the collections don't know which elementitems to look for in the config file. Therefore Adding an ItemName at the Collections ConfigurationCollection-Attribute will do the trick: ... [ConfigurationCollection(typeof(LoggerRegistration), AddItemName = "LoggerRegistration")] public class LoggerRegistrations : ConfigurationElementCollection { ... . ... [ConfigurationCollection(typeof(LogMapperElement), AddItemName = "LogMapper")] public class LogMappers : ConfigurationElementCollection ... The ItemName must be set to the tagname used in the config file for the collections elements, and be passed via 'AddItemName="..."'

Categories : C#

Class Library project in ASP.NET reading from web.config and not app.config
A web application will use web.config. Keep your app settings inside that. A dll specic config file is not required. A windows application will use App.config while a web application will use web.config. If you use your dll in a windows or console application put the setting in app.config. Dlls will always use the config file of the application they are loaded into. If you want to have a dll specific config file, you will have to load it yourself.

Categories : Asp Net

ConfigurationManager reading wrong file - Web.config instead of App.config
App.config that resides in a Class Library project would not be loaded (at least not without extra effort), the only configuration loaded by the framework is the Client configuration (i.e the Web.config of a project that references and uses your Class Library). See this answer for possible solutions.

Categories : Asp Net Mvc

Use aSmack on Android to connect the local xmpp server and get "IllegalStateException: No DNS resolver active."
Follow the readme in the aSmack documentation and call SmackAndroid.init(Context) See Flows answer here

Categories : Android

Can I set a conditional compilation constant in a web.config or app.config, if so how?
No, the processor directives are not available in the web.config or app.config files. Edited to add: These files are not actually compiled, and the #debug preprocessor value is used during compilation to tell the compiler what to do.

Categories : C#

What is the appropriate pattern to ignore *.config except for packages.config in svn?
In a word: You can't... However, if you already have packages.configin your repository, then it won't be ignored even if svn ignore is set to *.config. You can't ignore stuff already in the repository. However, from what you want, it sounds like you can use my pre-commit hook for finer control over your situation. My hook takes a list of rules specified in a control file. For file rules, the last rule that matches the file's name is the access they're granted. In your situation, you would have two rules: [FILE Configuration files must be named "packages.config"] file = **/*.config access = no-add users = @ALL [FILE Configuration files must be named "packages.config"] file = **/packages.config access = read-write users = @ALL If someone tried to add bob.config, to the repository, my f

Categories : Svn

How do I read a config value in JavaScript where the config value is dynamic?
The syntax you're implying is impossible. I can think of two ways for you to achieve this: Preload all the codes: var preloadedCodeArray = ["<%= ConfigurationManager.AppSettings[line1] %>", "<%= ConfigurationManager.AppSettings[line2] %>", "<%= ConfigurationManager.AppSettings[line3] %>"]; Or via a method that returns the wanted string: var preloadedCodeArray = ["<%= GetAllConfigurationLines() %>"]; Use AJAX calls to retrieve the wanted line (this would require of you to build a specific http-handler for handling the calls and returning the wanted code line). something in the form of: function getConfigLine(lineNum) { var config; $.ajax("../WebConfigLineHandle.ashx?line=" + lineNum, { com

Categories : Javascript

What's the difference between require.config and requirejs.config
"requirejs" is just an alias to the same API, since "require" is used by other libraries. From the documentation: If you just want to load some JavaScript files, use the require() API. If there is already a require() in the page, you can use requirejs() to access the RequireJS API for loading scripts. Even though it makes no technical difference, just by convention I would stay with require.config unless you have a naming conflict with some other module loader. Results as of 6-Jun-2013: http://stackoverflow.com/search?q=require.config (609 results) http://stackoverflow.com/search?q=requirejs.config (258 results)

Categories : Javascript

Issue with rowSelector in ice faces
Row selector sometimes cause problems with dynamic columns. Try adding a fake ice:column and put the selector under that tag like suggested here.

Categories : JSF

Creating faces from only the vertices?
You could create "native" Three.js JSON model directly on the server and just load it up with JSONLoader. Should be fast. It's a bit briefly documented, but here: https://github.com/mrdoob/three.js/wiki/JSON-Model-format-3.1 , and you can study the sample files on the examples folder. It's quite easy to understand. In the JSON, you can have multiple materials, and define the material index per face.

Categories : Javascript

Comparing two faces in android
Try this: http://www.lac.inpe.br/JIPCookbook/6050-howto-compareimages.jsp The tutorial is very easy and the example works very well.

Categories : Java

Not getting value on selection of row using prime faces
You need to set the rowKey attribute on the <p:dataTable/> to properly enable row selection. The rowKey attribute should be set to a unique identifier for the entity in your datatable, like the primary key attribute. From your sample, it'll look something like: <p:dataTable value="#{userManagedBean.dataModel}" rowKey="#{user.userId}" var="user" pagination="true" rows="5" selection="#{userManagedBean.selectedUser}" selectionMode="single">

Categories : JSF



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