w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
The metadata component needs to be nested within a f:metadata tag. Suggestion: enclose the necessary components within
As to the false UI warning, this is caused by Mojarra issue 2868 and already fixed since 2.2.1. As to the <f:viewAction> still not working on 2.2.1, another Mojarra bug with the since Java EE 7 introduced xmlns.jcp.org XML namespace domain is causing this trouble. In specifically Mojarra versions 2.2.0 and 2.2.1 the new XML namespace domain is not properly registered for all new JSF 2.2 specific tags which didn't exist in JSF 2.0/2.1, such as <f:viewAction>. In effects, the xmlns.jcp.org will give you in Mojarra 2.2.0/2.2.1 only the JSF 2.1 compatible tags back. This totally explains why the new JSF 2.2 <f:viewAction> didn't work for you. You have 2 options: Use the "old" java.sun.com XML namespace domain instead. The new JSF 2.2 specific tags are properly registered

Categories : JSF

implementation of tab bar programmatically not in the rootView
Create your UITabBarController as per normal. When a user touches a button, push to that controller: YourTabController *tabController = [[YourTabController alloc] initWithNibName:@"Tabs" bundle:nil]; [self.navController pushViewController:tabController animated:YES];

Categories : Iphone

how to add new SubView to rootView controller in SplitViewController
You have two solutions. Solution 1 : Try to add the view to a window. To cover the whole view, you have to give subView's dimesions as CGRect subViewBounds = [[UIScreen mainScreen] bounds]; UIView*subView=[[UIView alloc]initWithFrame:subViewBounds]; [self.view.window addSubview:subView] ; try to adjust the subviews contents (like labels, buttons, etc.,) according to that. Solution 2 : Create a new view like backgroundView CGRect backgroundViewBounds = [[UIScreen mainScreen] bounds]; UIView*backgroundView = [[UIView alloc]initWithFrame:backgroundViewBounds]; [self.view.window addSubview:backgroundView] ; CGRect subViewBounds = CGRectMake(0,10,600,400) ; UIView*subView=[[UIView alloc]initWithFrame:subViewBounds]; [backgroundView addSubview:subView] ;

Categories : IOS

Write a Custom JsonView for cakephp
For 2.x simply extend the current class (if possible): App::uses('JsonView', 'View'); class MyJsonView extends JsonView {} Otherwise you can just create a complete new one, of course. Either way, drop it into your /APP/Lib folder: /Lib/View/MyJsonView.php Then you can easily use it as $this->View = 'MyJsonView';

Categories : Cakephp

fasterxml jackson: there is no necessary methods to use @JsonView functionality
Have a look at ObjectWriter and ObjectReader which do include functionality for setting active view to use. This is different from Jackson 1.x, which exposed them through SerializationConfig and DeserializationConfig. You can construct these objects from ObjectMapper (mapper.readerXxx() and mapper.writerXxx()); they are reusable, and offer more thread-safe configurability than ObjectMapper.

Categories : Json

Jackson JSON - @JsonProperty overriding @JsonView?
You have to disable DEFAULT_VIEW_INCLUSION feature in _mapper object. See my example: ObjectMapper _mapper = new ObjectMapper(); _mapper.disable(MapperFeature.DEFAULT_VIEW_INCLUSION); ObjectWriter objectWriter = _mapper.writerWithView(View1.class); String json = objectWriter.writeValueAsString(bean); System.out.println(json);

Categories : Java

metadata query failed for: api/breeze/metadata;Nan on server only. In hot towel application
Assuming your SPA is deployed to a Virtual Application in IIS have you tried adding the name of the application to your service name if your url is www.test.com/myapp var dataService = new breeze.DataService({ serviceName: '[myapp]/api/breeze', hasServerMetadata: true }); Just a shot in the dark.

Categories : Iis

Joomla frontpage component template parameter switch
Try the following: <?php $app = JFactory::getApplication(); $menu = $app->getMenu(); if ($frontpageshow){ // show on all pages ?><jdoc:include type="component" /><?php } else { if ($menu->getActive() !== $menu->getDefault()) { // show on all pages but the default page ?><jdoc:include type="component" /><?php } } ?> Hope this helps

Categories : PHP

How to pass a parameter to backing bean using EL expression in JSF component?
Method parameters are a feature of EL 2.2 so you need to download the appropriate JARs and add them to your project. If you are using Maven go to this link https://uel.java.net/download.html (or go straight to Maven central) Then add the following in web.xml <context-param> <param-name>com.sun.faces.expressionFactory</param-name> <param-value>com.sun.el.ExpressionFactoryImpl</param-value> </context-param> EDIT This is a follow up from your comment. You could do something like this. <h:inputText value="#{bean.id}"> <---This one will set the id <h:outputText value="#{bean.name}"> <--- This one will display the name and define your methods like this private Integer id; //Make setter and getter private String name

Categories : JSF

The parser's result for this metadata did not match the input metadata
Did you read the complete output of https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fabele-optik.de%2Fangebote%2Fangebot-kinderbrillen.html It says: Provided og:image is not big enough. Please use an image that's at least 200x200 px. Image 'http://abele-optik.de/uploads/tx_flexslider/ABELE_slider_AngebShopAug_01.jpg' will be used instead. I think this will solve the first problem. The second one may be caused because you have specified fb:admins but not an fb:app_id (see this post).

Categories : Facebook

mysql_num_rows() expects parameter 1 to be resource, boolean in joomla component
may be this is your issue.. Change your query as following $sql="select * from #__npco_car,#__npco_namayeshgah,#__npco_agahi where #__npco_car.car_id='".$id."' and #__npco_namayeshgah.id_namayeshgah=#__npco_agahi.id_namayeshgah and #__npco_car.car_id=#__npco_agahi.car_id "; $sql="select * from #__npco_car,#__npco_useragahi,#__npco_user where #__npco_car.car_id='".$id."' and #__npco_user.id_user=#__npco_useragahi.id_user and #__npco_car.car_id=#__npco_useragahi.car_id ";

Categories : Mysql

How to remove Index.php on Select set of URLs Matching Pagination and Component Parameter
Add this rule to your .htaccess that I'm assuming is in your web root / directory RewriteCond %{REQUEST_URI} ^/index.php$ [NC] RewriteCond %{QUERY_STRING} (^|&)page=d+(&|$) [NC] RewriteCond %{QUERY_STRING} (^|&)option=com_(latestnews|toyschemes)(&|$) [NC] RewriteRule ^ /?%{QUERY_STRING} [R=301,L]

Categories : PHP

MEF update exported part metadata (the metadata view is invalid because property has a property set method)
Metadata filtering and DefaultValueAttribute When you specifiy a metadata view, an implicit filtering will occur to match only those exports which contain the metadata properties defined in the view. You can specify on the metadata view that a property is not required, by using the System.ComponentModel.DefaultValueAttribute. Below you can see where we have specified a default value of false on IsSecure. This means if a part exports IMessageSender, but does not supply IsSecure metadata, then it will still be matched. citation Short Version (EDITED in after question edit). You shouldn't ever need to update metadata at runtime. If you have some data that should be updated and belongs to a mef part, you need to choose to either have it be updated by recompiling, or s

Categories : C#

How to display Gridview in SapUI5
Use the following code to create a image and then place it in a grid layout: var oImage = new sap.ui.commons.Image("image"); oImage.setSrc("source of image"); oImage.setTooltip("tooltip"); oImage.placeAt("grid layout");

Categories : HTML

How to parse json using sapui5
Try something like var oControl = new sap.ui.commons.TextView().bindProperty("text", "user/usernme"); oTable.addColumn(new sap.ui.table.Column({label: new sap.ui.commons.Label({text: "User Name"}), template: oControl})); var oControl = new sap.ui.commons.TextView().bindProperty("text", "user/id"); oTable.addColumn(new sap.ui.table.Column({label: new sap.ui.commons.Label({text: "UserID"}), template: oControl})); https://sapui5.hana.ondemand.com/sdk/#docs/guide/JSONModel.html

Categories : Javascript

sapui5 table shows only the same record
My understanding is every entity/entry in the collection should have a unique id <entry><id>...</id></entry>. And in my case, the returned collection had no ids set for the entities. So the bound ui element finds multiple objects with same id (in this case empty id) and ends up displaying value which it finds the last. The same should apply even if the id is same across all entities. Hope it helps, if you have not already found what the problem is. Thanks,

Categories : Jquery

SapUi5 + Phonegap - loading Sap libraries
UI5 does not seem to officially support Windows Phone Browsers at all: https://openui5.hana.ondemand.com/#docs/guide/BrowserSupport.html Anyways since it is supporting IE9+ it should work on Windows Phone as well. At least starting from IE10 the mobile version shouldn't differ from the desktop version: http://en.wikipedia.org/wiki/Internet_Explorer_Mobile#Version_10

Categories : Javascript

How does one make function calls or trigger events from a Native component into a C#/XAML component?
This is because your not able to have your C++ code call into C#. You can only have C# call (and return) into C++. http://social.msdn.microsoft.com/Forums/wpapps/en-us/a850b680-6052-41c5-825a-d764d3369fe9/calling-c-code-from-c-in-windows-phone-8

Categories : C#

prime faces DockMenu component scrolling how to fixed the position of component
With CSS, overriding the top container position rule for the dock-container-top class: .ui-dock-container-top { position: absolute !important; } Hope it helps!

Categories : JSF

dynamic ui:include with ui:fragment: component with rendered false still make inside component tree
The <ui:include> doesn't extend from UIComponent. It's a tag handler. It does thus not support the rendered attribute at all. It's also nowhere listed in the tag documentation. <ui:fragment> is indeed an UIComponent. So basically you end up with all those 3 include files being included during view build time and thus all 3 physically end up in JSF component tree. It's only the HTML output which is conditionally rendered via <ui:fragment rendered>. You still end up with duplicate component IDs from those includes because they all end up in JSF component tree. You should be using a taghandler like <c:if> instead of <ui:fragment> to conditionally build the JSF component tree. So, theoretically, this should do for each of them: <c:if test="#{filtersPopup.fi

Categories : JSF

Free Pascal use for loop to determine visibility of component based on status of Date Component
You can iterate over the components via FindComponent. In the example below Self as the Form is given as Owner. Procedure SetChecks(AOwner:TComponent); var x:Integer; begin for x:=1 to 5 do TCheckBox(AOwner.FindComponent('check' + IntToStr(x))).Visible := TDateEdit(AOwner.FindComponent('date' + IntToStr(x))).Date <>StrToDateTime('00:00:00'); end; procedure TForm1.Button1Click(Sender: TObject); begin SetChecks(Self); end;

Categories : Delphi

How to extract character component and numeric component from a variable and mix these components in other one
To extract part of a string, use a regular expression: in R, type help(regex) and help(grep) for instructions. > test=data.frame(ID=1:3,Code=c("101ABC","021DPA","FCA123"),Mixture=c("BD","AA","IO")) > test$v1=gsub("[A-Z]*","",test$Code) # this returns the Code column with capital letters removed > test$v2=gsub("[0-9]*","",test$Code) > test$v3=paste(test$Mixture,test$v2,sep="") > print(test) ID Code Mixture v1 v2 v3 1 1 101ABC BD 101 ABC BDABC 2 2 021DPA AA 021 DPA AADPA 3 3 FCA123 IO 123 FCA IOFCA (There's probably a neater solution using the stringr package, but I haven't used stringr myself.)

Categories : R

How to lay out components so that the middle component gets all the space, but the right-most component is aligned left?
It is very rare that one individual layout manager will meet all your needs. Instead you could use a compound layout approach. That is, separate each individual layout requirement into a separate component, with it's own layout manager. Then added all these to your master component, managing the overall requirements. As an example import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.EventQueue; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; import javax.swing.border.LineBorder; public class SimpleGridBagLayout { public static void main(String[] args) {

Categories : Java

BorderLayout - child component remains visible after adding another component
You are calling things that affect the UI after setViisble() is called -- a Swing no-no. Put things that affect the UI into an invokeLater call; look it up. While you're at it, I think you're still supposed to get the content pane from the frame for adding components... And I don't think creating things in the constructor is a good idea. import java.awt.BorderLayout; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.SwingUtilities; public class SwingTest extends JFrame { public void createUI() { setDefaultCloseOperation(DISPOSE_ON_CLOSE); SwingUtilities.invokeLater( new Runnable() { public void run() { getContentPane().setLayout(new BorderLayo

Categories : Java

JSF events not propagating from composite component with backing component
Any relative client ID in <f:ajax render> is evaluated relative to the parent naming container of the component it's been attached to. In this construct, the <f:ajax> ultimately ends up being attached inside the composite component, which is by itself a naming container. However, there's no component with ID out2 inside the composite. That explains your problem. To solve it, you'd need to specify the absolute client ID. For example, when it's actually inside a <h:form id="formId">: <f:ajax execute="@all" render=":formId:out2" /> If it's however more complicated than that, consider binding the component to the view and dynamically referring its client ID: <h:outputText id="out2" binding="#{out2}" ... /> ... <f:ajax execute="@all" render=":#{out2.clientI

Categories : JSF

JSF Backing Component - Composite Component - Stackoverflow Exception
UIComponent#getAttributes() is a very special map. On a given key, say "foo", it first evaluates #{component.foo} as a ValueExpression which implicitly invokes UIComponent#getFoo() method. See also the javadoc. That totally explains the infinite loop. If the getFoo() method was absent, then it'd just have continued to look in the "static" map (which you can control by overriding UIComponent#getValueExpression()). You need to solve your concrete functional requirement differently. I have actually had a hard time in wrapping my head around your concrete functional requirement, but I believe that you actually need to define separate properties with separate getters/setters, all properly delegating to the state helper: public String getLocalName() { return getStateHelper().eval("localNam

Categories : JSF

component.query versus component.getcomponent in performance
While Ext.ComponentQuery queries for all underlying Components (you may define a traversing start as second param after the query string) it also allow you to query by a various set of params, attributes, pseudo classes, functions, etc. Full Reference and always result in a set (array) compinstance.GetComponent('itemId') only queries the direct childs of the calling component for the itemId property and will always return one reference or null. Note that the itemId need only to be unique to all it's siblings. So yes GetComponent() will be a bit faster. I don't think that there are huge pros and cons. GetComponent() cannot be used that often because you may not only looking in level. Take a menu which groups the the buttons, GetComponent() will only find the group but not the anything wit

Categories : Javascript

How to find composite component in JSF component tree?
The UIComponent class has a isCompositeComponent() helper method for exactly this purpose. So, this should just do: for (UIComponent child : component.getChildren()) { if (UIComponent.isCompositeComponent(child)) { // It's a composite child! } } For the interested in "under the covers" workings, here's the implementation source code from Mojarra 2.1.25: public static boolean isCompositeComponent(UIComponent component) { if (component == null) { throw new NullPointerException(); } boolean result = false; if (null != component.isCompositeComponent) { result = component.isCompositeComponent.booleanValue(); } else { result = component.isCompositeComponent = (component.getAttributes().containsKey(

Categories : JSF

What is difference in JSF between component.getAttributeName() vs. component.getAttributes().get("name")
Functionally, it doesn't make any difference. Technically, UIComponent#getAttributes() allows the developer to not worry about the exact component type while getting/setting the attributes. Look at your particular example with disabled="true". The UIComponent superclass doesn't have any isDisabled() method at all. You'd need to perform an instanceof check on e.g. HtmlInputText before you can cast it and finally invoke isDisabled() on it. The getAttributes() is then much easier in order to be independent from that. A lot of UIComponent related methods in standard JSF API take or return UIComponent superclass instead of a specific type. In properly designed components, both delegate under the covers ultimately to the same, the UIComponent#getStateHelper().

Categories : JSF

how to pass data from one component to other component without using events
To question a, you can use callback or observer instead of event callback Assume we have Component A and B, and the instances are a and b. Use callback will make it no context needed. b.callback = a.handler; b.doSth(); // component define Class A { public function handler(param:*):void {//you can have your param here } } class B { private var _callback:Function;//here you can use a array to save multi callbacks. public function set callback(value:Function):void { _callback = value; } public function doSth():void { //do something if (_callback != null) { _callback.apply(null, [some data]); } } } Observer Here is some introduce to Observer, it looks like callback in some way. Observer

Categories : Actionscript

No such component has been registered in the kernel's component container
Most likely you have added Ninject.Extensions.Interception but not any of the concrete implementations Ninject.Extensions.Interception,DynamicProxy or Ninject.Extensions.Interception,LinFu

Categories : C#

Haskell component-by-component addition
The second argument of foldr is aggregate value: foldr :: (a -> b -> b) -> b -> [a] -> b. So, your expressions should look like sumPw1 = foldr ( x s -> (fst x) + s) 0 tl More succinct way of solving your task is sumPointwise tl = let (xs, ys) = unzip tl in (sum xs, sum ys)

Categories : Haskell

Should I separate my API component from my Dashboard component?
Well I have no experience with laravel, but since a some time with Zend Framework 2. For developing I use the approuch of domain driven design + MVC. My suggestion is use the first approach. 1. Code is better to maintain If you want to change something you only have to change 1 thing in one place and it will be done. Not in all you shared copies 2. Server You worry about that you need a second server so you can dedicated taskes to a server. Well unless you have really big tasks (like sending millions of mails to clients per hour) then you should not worry about a dedicated server for a specific task. Just put a load balancer in front of the server. This way when alot of api calls come in but no dashboard, you still use both servers, and not 1 is relaxing. 3. maintain If there would

Categories : PHP

Using session component in custom component
For using session inside the custom component I tried with public $components = array('Session'); and then called it by using $this->Session->read('Cart'); but I cant able to use it and I start to use CakeSession::read('Cart') Now it works Hope it will used for you note I used in cake php version > 2

Categories : Cakephp

Add a module to a component , but not every page of the component
One method would be to set the module to be hidden on that page using CSS. Go to views/view_name/tmpl/default.php and within the tags at the top, add the following code in: $doc = JFactory::getDocument(); $doc->addStyleDeclaration(" #element_id { display: none; } "); You will need to inspect the module using a tool such as Firebug, Chrome Dev Tools or another tool depending on which browser you're using, and change element_id to whatever suits your needs. Hope this helps

Categories : Joomla

Display joomla component within another component
Using an iframe is not the best option, you would be better off invoking the model of the other component from your main component's controller and handle the views from the main component. So the double component would only exist in your backend logic, and the views would be completely handled by the main component alone. This will work only if the secondary component's developer refrained from using JPATH_COMPONENT or other constants that would point to the wrong component. To make an example, in your controller or main component's model: $com_path = JPATH_SITE.'/components/com_secondary_component/models'; JModelLegacy::addIncludePath($com_path , 'SecCompPrefixModel'); $secondaryModel = JModelLegacy::getInstance( 'modelName', 'SecCompPrefixModel' ,array('ignore_request' => true));

Categories : Joomla

How to use component binding in JSF right ? (request-scoped component in session scoped bean)
In JSF 2.x, unless you want to manipulate components programmatically (which is at its own also rather fishy), there is no sensible real world use case to bind components to a backing bean. For sure not if they are further not been used in the backing bean itself, or if it are solely their attributes which are been flattened out. As to the functional requirement of getting the current row of the data table, there are much better ways listed here, How can I pass a parameter to a commandLink inside a datatable?, for example if your environment supports EL 2.2: <h:dataTable value="#{bean.items}" var="item"> <h:column> <h:commandLink value="Foo" action="#{bean.foo(item)}" /> The two last requirements are totally unclear. At least, if you're doing something

Categories : JSF

How to insert another component between the Label and TextField in the ExtJS TextField component?
You are looking for Ext.form.field.FieldContainer Here is the simplest example: Ext.create('Ext.form.Panel', { title: 'FieldContainer Example', width: 550, bodyPadding: 10, items: [{ xtype: 'fieldcontainer', fieldLabel: 'Last Three Jobs', labelWidth: 100, layout: 'hbox', items: [{ xtype: 'combo', store: { fields: ['abbr', 'name'], data : [ {"abbr":"AL", "name":"Alabama"}, {"abbr":"AK", "name":"Alaska"}, {"abbr":"AZ", "name":"Arizona"} ] }, queryMode: 'local', displayField: 'name', valueField: 'abbr', flex: 1 }, { xtype:

Categories : Extjs

Component, controller and context: wrong controller inside the component?
The context inside a component is the component itself. This is by design, so that components will be isolated from surrounding context. To access a property of your controller from within a component, pass it as an argument like: {{controller}}{{test}} {{#options-carousel test="test"}} <div class="active item"> {{controller}}{{test}} </div> {{/options-carousel}}

Categories : Ember Js

Joomla component - how to convert standard php form into joomla component
You might want to look at http://docs.joomla.org/J3.1:Developing_a_MVC_Component/Introduction and follow the process outlined.

Categories : Joomla



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